Package Details: creduce 2.10.0-2

Git Clone URL: https://aur.archlinux.org/creduce.git (read-only, click to copy)
Package Base: creduce
Description: A C/C++ program reducer
Upstream URL: https://embed.cs.utah.edu/creduce/
Licenses: custom:University of Illinois Open Source License
Submitter: tavianator
Maintainer: tavianator
Last Packager: tavianator
Votes: 6
Popularity: 0.019954
First Submitted: 2015-05-17 16:18
Last Updated: 2020-12-31 17:46

Latest Comments

Volker_Weissmann commented on 2020-12-29 12:59

This package is broken, the following diff fixes it.

diff --git a/PKGBUILD b/PKGBUILD
index a773652..fc6b9b6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,8 +2,7 @@

 pkgname=creduce
 pkgver=2.10.0
-#_commit=fb91843c547794f165e5764a003166191e6c6643
-pkgrel=1
+pkgrel=2
 epoch=
 pkgdesc="A C/C++ program reducer"
 arch=('i686' 'x86_64')
@@ -12,11 +11,18 @@ license=('custom:University of Illinois Open Source License')
 depends=('astyle' 'clang>=8.0.0' 'indent' 'llvm>=8.0.0'
          'perl-benchmark-timer' 'perl-exporter-lite' 'perl-file-which'
          'perl-getopt-tabular' 'perl-regexp-common' 'perl-sys-cpu')
-source=("https://embed.cs.utah.edu/$pkgname/$pkgname-$pkgver.tar.gz")
-md5sums=('ec9d5fd3c71840c7361cdf626fe1f202')
-sha256sums=('db1c0f123967f24d620b040cebd53001bf3dcf03e400f78556a2ff2e11fea063')
+
+source=("https://embed.cs.utah.edu/$pkgname/$pkgname-$pkgver.tar.gz"
+       "arch.patch")
 #source=("$pkgname-$_commit.tar.gz::https://github.com/csmith-project/creduce/archive/$_commit.tar.gz")

+sha256sums=('db1c0f123967f24d620b040cebd53001bf3dcf03e400f78556a2ff2e11fea063'
+           'SKIP')
+
+prepare() {
+   patch -p1 -i ../arch.patch
+}
+
 build() {
    cd "$pkgname-$pkgver"
    ./configure --prefix=/usr
diff --git a/arch.patch b/arch.patch
new file mode 100644
index 0000000..3233e5e
--- /dev/null
+++ b/arch.patch
@@ -0,0 +1,176 @@
+diff -ur original/creduce-2.10.0/clang_delta/CMakeLists.txt myfork/creduce-2.10.0/clang_delta/CMakeLists.txt
+--- original/creduce-2.10.0/clang_delta/CMakeLists.txt 2019-05-13 23:17:30.000000000 +0200
++++ myfork/creduce-2.10.0/clang_delta/CMakeLists.txt   2020-12-29 01:36:11.522510944 +0100
+@@ -86,24 +86,7 @@
+ )
+ 
+ set(CLANG_LIBS
+-  clangStaticAnalyzerFrontend
+-  clangStaticAnalyzerCheckers
+-  clangStaticAnalyzerCore
+-  clangFrontendTool
+-  clangFrontend
+-  clangDriver
+-  clangSerialization
+-  clangCodeGen
+-  clangParse
+-  clangSema
+-  clangAnalysis
+-  clangRewriteFrontend
+-  clangRewrite
+-  clangAST
+-  clangBasic
+-  clangEdit
+-  clangLex
+-  clangARCMigrate
++  clang-cpp
+ )
+ 
+ add_executable(clang_delta
+diff -ur original/creduce-2.10.0/clang_delta/CommonRenameClassRewriteVisitor.h myfork/creduce-2.10.0/clang_delta/CommonRenameClassRewriteVisitor.h
+--- original/creduce-2.10.0/clang_delta/CommonRenameClassRewriteVisitor.h  2019-05-13 23:17:30.000000000 +0200
++++ myfork/creduce-2.10.0/clang_delta/CommonRenameClassRewriteVisitor.h    2020-12-29 01:36:11.519177605 +0100
+@@ -98,7 +98,7 @@
+     return true;
+ 
+   IdentifierInfo *IdInfo = DeclName.getAsIdentifierInfo();
+-  std::string IdName = IdInfo->getName();
++  std::string IdName = IdInfo->getName().data();
+   std::string Name;
+   if (getNewNameByName(IdName, Name)) {
+     SourceLocation LocStart = NameInfo.getBeginLoc();
+@@ -332,7 +332,7 @@
+   TransAssert(DTST && "Bad DependentTemplateSpecializationType!");
+ 
+   const IdentifierInfo *IdInfo = DTST->getIdentifier();
+-  std::string IdName = IdInfo->getName();
++  std::string IdName = IdInfo->getName().data();
+   std::string Name;
+   if (getNewNameByName(IdName, Name)) {
+     SourceLocation LocStart = DTSLoc.getTemplateNameLoc();
+diff -ur original/creduce-2.10.0/clang_delta/Makefile.am myfork/creduce-2.10.0/clang_delta/Makefile.am
+--- original/creduce-2.10.0/clang_delta/Makefile.am    2019-05-13 23:17:30.000000000 +0200
++++ myfork/creduce-2.10.0/clang_delta/Makefile.am  2020-12-29 01:36:11.519177605 +0100
+@@ -128,12 +128,7 @@
+ # libraries.  So probably, we could move `LLVMLDFLAGS' back to the definition
+ # of `clang_delta_LDFLAGS'.  I'll do that later.
+ clang_delta_LDADD = \
+-  -lclangStaticAnalyzerFrontend -lclangStaticAnalyzerCheckers \
+-  -lclangStaticAnalyzerCore \
+-  -lclangFrontendTool -lclangFrontend -lclangDriver -lclangSerialization \
+-  -lclangCodeGen -lclangParse -lclangSema -lclangAnalysis \
+-  -lclangRewriteFrontend -lclangRewrite -lclangAST -lclangBasic -lclangEdit -lclangLex \
+-  -lclangARCMigrate \
++  -lclang-cpp \
+   $(LLVMLIBS) \
+   $(CLANG_LDFLAGS) \
+   $(LLVMLDFLAGS)
+diff -ur original/creduce-2.10.0/clang_delta/Makefile.in myfork/creduce-2.10.0/clang_delta/Makefile.in
+--- original/creduce-2.10.0/clang_delta/Makefile.in    2019-05-13 23:17:30.000000000 +0200
++++ myfork/creduce-2.10.0/clang_delta/Makefile.in  2020-12-29 01:36:11.519177605 +0100
+@@ -575,12 +575,7 @@
+ # libraries.  So probably, we could move `LLVMLDFLAGS' back to the definition
+ # of `clang_delta_LDFLAGS'.  I'll do that later.
+ clang_delta_LDADD = \
+-  -lclangStaticAnalyzerFrontend -lclangStaticAnalyzerCheckers \
+-  -lclangStaticAnalyzerCore \
+-  -lclangFrontendTool -lclangFrontend -lclangDriver -lclangSerialization \
+-  -lclangCodeGen -lclangParse -lclangSema -lclangAnalysis \
+-  -lclangRewriteFrontend -lclangRewrite -lclangAST -lclangBasic -lclangEdit -lclangLex \
+-  -lclangARCMigrate \
++  -lclang-cpp \
+   $(LLVMLIBS) \
+   $(CLANG_LDFLAGS) \
+   $(LLVMLDFLAGS)
+diff -ur original/creduce-2.10.0/clang_delta/RemoveNamespace.cpp myfork/creduce-2.10.0/clang_delta/RemoveNamespace.cpp
+--- original/creduce-2.10.0/clang_delta/RemoveNamespace.cpp    2019-05-13 23:17:30.000000000 +0200
++++ myfork/creduce-2.10.0/clang_delta/RemoveNamespace.cpp  2020-12-29 01:36:11.522510944 +0100
+@@ -458,7 +458,7 @@
+   TransAssert(DTST && "Bad DependentTemplateSpecializationType!");
+ 
+   const IdentifierInfo *IdInfo = DTST->getIdentifier();
+-  std::string IdName = IdInfo->getName();
++  std::string IdName = IdInfo->getName().data();
+   std::string Name;
+ 
+   // FIXME:
+diff -ur original/creduce-2.10.0/clang_delta/RewriteUtils.cpp myfork/creduce-2.10.0/clang_delta/RewriteUtils.cpp
+--- original/creduce-2.10.0/clang_delta/RewriteUtils.cpp   2019-05-13 23:17:30.000000000 +0200
++++ myfork/creduce-2.10.0/clang_delta/RewriteUtils.cpp 2020-12-29 01:36:11.519177605 +0100
+@@ -730,7 +730,7 @@
+     ++I;
+   indentSpace = MB.substr(lineOffs, I-lineOffs);
+ 
+-  return indentSpace;
++  return indentSpace.data();
+ }
+ 
+ bool RewriteUtils::addLocalVarToFunc(const std::string &VarStr,
+diff -ur original/creduce-2.10.0/clang_delta/Transformation.cpp myfork/creduce-2.10.0/clang_delta/Transformation.cpp
+--- original/creduce-2.10.0/clang_delta/Transformation.cpp 2019-05-13 23:17:30.000000000 +0200
++++ myfork/creduce-2.10.0/clang_delta/Transformation.cpp   2020-12-29 01:36:11.499177577 +0100
+@@ -357,7 +357,7 @@
+   llvm::SmallString<8> IntStr;
+   Result.toStringUnsigned(IntStr);
+ 
+-  std::stringstream TmpSS(IntStr.str());
++  std::stringstream TmpSS(IntStr.str().data());
+ 
+   if (!(TmpSS >> Sz)) {
+     TransAssert(0 && "Non-integer value!");
+diff -ur original/creduce-2.10.0/clang_delta/TransformationManager.cpp myfork/creduce-2.10.0/clang_delta/TransformationManager.cpp
+--- original/creduce-2.10.0/clang_delta/TransformationManager.cpp  2019-05-13 23:17:30.000000000 +0200
++++ myfork/creduce-2.10.0/clang_delta/TransformationManager.cpp    2020-12-29 01:36:11.519177605 +0100
+@@ -18,6 +18,8 @@
+ 
+ #include "clang/Basic/Diagnostic.h"
+ #include "clang/Basic/TargetInfo.h"
++#include "clang/Basic/FileManager.h"
++#include "clang/Basic/Builtins.h"
+ #include "clang/Lex/Preprocessor.h"
+ #include "clang/Frontend/CompilerInstance.h"
+ #include "clang/Parse/ParseAST.h"
+@@ -101,16 +103,16 @@
+   CompilerInvocation &Invocation = ClangInstance->getInvocation();
+   InputKind IK = FrontendOptions::getInputKindForExtension(
+         StringRef(SrcFileName).rsplit('.').second);
+-  if (IK.getLanguage() == InputKind::C) {
+-    Invocation.setLangDefaults(ClangInstance->getLangOpts(), InputKind::C, T, PPOpts);
++  if (IK.getLanguage() == clang::Language::C) {
++    Invocation.setLangDefaults(ClangInstance->getLangOpts(), clang::Language::C, T, PPOpts);
+   }
+-  else if (IK.getLanguage() == InputKind::CXX) {
++  else if (IK.getLanguage() == clang::Language::CXX) {
+     // ISSUE: it might cause some problems when building AST
+     // for a function which has a non-declared callee, e.g.,
+     // It results an empty AST for the caller.
+-    Invocation.setLangDefaults(ClangInstance->getLangOpts(), InputKind::CXX, T, PPOpts);
++    Invocation.setLangDefaults(ClangInstance->getLangOpts(), clang::Language::CXX, T, PPOpts);
+   }
+-  else if(IK.getLanguage() == InputKind::OpenCL) {
++  else if(IK.getLanguage() == clang::Language::OpenCL) {
+     //Commandline parameters
+     std::vector<const char*> Args;
+     Args.push_back("-x");
+@@ -122,7 +124,7 @@
+     ClangInstance->createFileManager();
+ 
+     if(CLCPath != NULL && ClangInstance->hasFileManager() &&
+-       ClangInstance->getFileManager().getDirectory(CLCPath, false) != NULL) {
++       ClangInstance->getFileManager().getDirectory(CLCPath, false)) {
+         Args.push_back("-I");
+         Args.push_back(CLCPath);
+     }
+@@ -132,10 +134,10 @@
+     Args.push_back("-fno-builtin");
+ 
+     CompilerInvocation::CreateFromArgs(Invocation,
+-                                       &Args[0], &Args[0] + Args.size(),
++                                       llvm::ArrayRef<const char*>(&Args[0], Args.size()),
+                                        ClangInstance->getDiagnostics());
+     Invocation.setLangDefaults(ClangInstance->getLangOpts(),
+-                               InputKind::OpenCL, T, PPOpts);
++                               clang::Language::OpenCL, T, PPOpts);
+   }
+   else {
+     ErrorMsg = "Unsupported file type!";

krobelus commented on 2020-12-27 08:57

The upstream branch llvm-11.0 works with Arch's current LLVM package. Not sure when that will be released.

tavianator commented on 2018-02-10 17:07

@marehr: Thanks for the report, should be fixed!

marehr commented on 2018-01-24 12:00

Currently, the standard compiler is clang-5.x in arch. But, creduce 2.7 is depending on clang-4.x/llvm-4.x. upstream has an open issue to bump it to llvm 5.x https://github.com/csmith-project/creduce/issues/147.

It seems that the recent master branch already fixed this issue and is using llvm 5.x by default. Could you change the source to a snapshot from the github repository?

tavianator commented on 2017-07-21 15:35

@jschievink: Looks like perl-benchmark-timer is missing a dependency on perl-module-install. Take it up with the maintainer of perl-benchmark-timer!

jschievink commented on 2017-07-21 15:29

I'm getting this error when trying to install this:

error: target not found: perl-benchmark-timer

Running pacaur -S perl-benchmark-timer then gives this error:

Can't locate inc/Module/Install.pm in @INC (you may need to install the inc::Module::Install module) (@INC contains: private-lib /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl) at Makefile.PL line 8.
BEGIN failed--compilation aborted at Makefile.PL line 8.

sebo commented on 2016-05-14 16:25

NB: looks like the new version 2.5.0 doesn't depend on delta.