Package Details: creduce 2.10.0.r100.1f1bfd7-1

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.000000
First Submitted: 2015-05-17 16:18 (UTC)
Last Updated: 2023-09-25 14:41 (UTC)

Latest Comments

1 2 Next › Last »

andreyv commented on 2023-11-10 16:29 (UTC)

Missing dependency perl-term-readkey:

checking for perl module Term::ReadKey... no
...
## ------------------------------------------------------------------------ ##
## NOTE: The following optional C-Reduce dependencies were not found.       ##
## ------------------------------------------------------------------------ ##
configure: One or more useful Perl modules were not found.

interruptinuse commented on 2023-09-20 12:12 (UTC) (edited on 2023-09-20 12:14 (UTC) by interruptinuse)

@patlefort: For llvm-16, use creduce-git, or apply this patch:

diff --git a/PKGBUILD b/PKGBUILD
index 8fbb939..f13ff68 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,18 +1,18 @@
 # Maintainer: Tavian Barnes <tavianator@tavianator.com>

 pkgname=creduce
-pkgver=2.10.0.r94.4ae77d1
+pkgver=2.10.0.r99.9250247
 pkgrel=2
 epoch=
 pkgdesc="A C/C++ program reducer"
 arch=('i686' 'x86_64')
 url="https://embed.cs.utah.edu/creduce/"
 license=('custom:University of Illinois Open Source License')
-depends=('astyle' 'clang>=9.0.0' 'indent' 'llvm>=9.0.0'
+depends=('astyle' 'clang>=16.0.0' 'indent' 'llvm>=16.0.0'
          'perl-benchmark-timer' 'perl-exporter-lite' 'perl-file-which'
          'perl-getopt-tabular' 'perl-regexp-common')
 makedepends=('git')
-source=('creduce::git+https://github.com/csmith-project/creduce.git#commit=4ae77d1e101135a6aea310b30c19e2af968b7bf6')
+source=('creduce::git+https://github.com/csmith-project/creduce.git#commit=92502474f38e37d17a3404ea69fb4b6bb42b4233')
 sha256sums=('SKIP')

 pkgver() {

patlefort commented on 2023-06-02 00:40 (UTC)

Does not compile currently:

ExpressionDetector.cpp:62:16: error: ‘virtual void {anonymous}::IncludesPPCallbacks::InclusionDirective(clang::SourceLocation, const clang::Token&, llvm::StringRef, bool, clang::CharSourceRange, const clang::FileEntry*, llvm::StringRef, llvm::StringRef, const clang::Module*, clang::SrcMgr::CharacteristicKind)’ marked ‘override’, but does not override
   62 |   virtual void InclusionDirective(SourceLocation HashLoc,
      |                ^~~~~~~~~~~~~~~~~~

tavianator commented on 2023-01-31 18:38 (UTC)

@tabz: flex is in the base-devel group which is assumed to be installed, see https://wiki.archlinux.org/title/Makepkg#Usage

tabz commented on 2023-01-16 11:30 (UTC)

Building fails with

/bin/sh ../autoconf/ylwrap clex.l .c clex.c -- /bin/sh /home/samteb02/.cache/yay/creduce/src/creduce/autoconf/missing flex  
/home/samteb02/.cache/yay/creduce/src/creduce/autoconf/missing: line 81: flex: command not found
WARNING: 'flex' is missing on your system.
         You should only need it if you modified a '.l' file.
         You may want to install the Fast Lexical Analyzer package:
         <https://github.com/westes/flex>

So flex needs to be added as a dependency.

tavianator commented on 2022-05-31 20:26 (UTC)

@Volker_Weissmann: Should be fixed now, I pointed it to the upstream llvm-13.0 branch. Hopefully someday there's an official release :)

Volker_Weissmann commented on 2022-05-25 23:19 (UTC)

Build fails on my machine:

g++ -DHAVE_CONFIG_H -I. -I..   -I"/usr/include/clang"  -I/usr/include -std=c++14 -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fno-rtti -fno-exceptions -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -MT clang_delta-RemoveNamespace.o -MD -MP -MF .deps/clang_delta-RemoveNamespace.Tpo -c -o clang_delta-RemoveNamespace.o `test -f 'RemoveNamespace.cpp' || echo './'`RemoveNamespace.cpp
RemoveNamespace.cpp: In member function ‘void RemoveNamespace::handleOneUsingShadowDecl(const clang::UsingShadowDecl*, const clang::DeclContext*)’:
RemoveNamespace.cpp:789:28: error: ‘const class clang::UsingShadowDecl’ has no member named ‘getUsingDecl’
  789 |   const UsingDecl *D = UD->getUsingDecl();
      |                            ^~~~~~~~~~~~
make[2]: *** [Makefile:1377: clang_delta-RemoveNamespace.o] Error 1
make[2]: Leaving directory '/home/volker/.cache/pacaur/creduce/src/creduce-2.10.0/clang_delta'
make[1]: *** [Makefile:445: all-recursive] Error 1
make[1]: Leaving directory '/home/volker/.cache/pacaur/creduce/src/creduce-2.10.0'
make: *** [Makefile:377: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
:: failed to build creduce package(s)

Volker_Weissmann commented on 2020-12-29 12:59 (UTC)

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 (UTC)

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 (UTC)

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