seltzered / ccons

Automatically exported from code.google.com/p/ccons
MIT License
0 stars 0 forks source link

Trying to make a package for 64-bit Arch Linux (and make it compile) #15

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Follow the instructions in the README.txt file
2. Assume LLVM 2.9 and that -march isn't needed (creates problems)
3. make
- or -
1. Try to install this package on Arch Linux:
   http://aur.archlinux.org/packages.php?ID=49443

What is the expected output? What do you see instead?

Instead of a successful compilation, this is what I get:

-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: 
/home/alexander/archpackages/ccons/src/llvm-2.9/tools/ccons
Scanning dependencies of target ccons
[ 14%] [ 14%] [ 21%] [ 28%] [ 35%] [ 42%] [ 50%] Building CXX object 
CMakeFiles/ccons.dir/ccons.cpp.o
Building CXX object CMakeFiles/ccons.dir/Diagnostics.cpp.o
Building CXX object CMakeFiles/ccons.dir/ClangUtils.cpp.o
Building CXX object CMakeFiles/ccons.dir/Console.cpp.o
Building CXX object CMakeFiles/ccons.dir/Parser.cpp.o
Building CXX object CMakeFiles/ccons.dir/StringUtils.cpp.o
[ 57%] Building CXX object CMakeFiles/ccons.dir/EditLineReader.cpp.o
/home/alexander/archpackages/ccons/src/llvm-2.9/tools/ccons/Console.cpp:25:33: 
fatal error: llvm/ModuleProvider.h: No such file or directory
compilation terminated.
/home/alexander/archpackages/ccons/src/llvm-2.9/tools/ccons/ccons.cpp:17:33: 
fatal error: llvm/System/Signals.h: No such file or directory
compilation terminated.
make[2]: *** [CMakeFiles/ccons.dir/Console.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/ccons.dir/ccons.cpp.o] Error 1
In file included from 
/home/alexander/archpackages/ccons/src/llvm-2.9/tools/ccons/StringUtils.cpp:10:0
:
/home/alexander/archpackages/ccons/src/llvm-2.9/tools/ccons/StringUtils.h:20:56:
 error: ‘va_list’ has not been declared
/home/alexander/archpackages/ccons/src/llvm-2.9/tools/ccons/StringUtils.cpp: In 
function ‘void ccons::vstring_printf(std::string*, const char*, 
__va_list_tag*)’:
/home/alexander/archpackages/ccons/src/llvm-2.9/tools/ccons/StringUtils.cpp:21:2
7: error: ‘vasprintf’ was not declared in this scope
make[2]: *** [CMakeFiles/ccons.dir/StringUtils.cpp.o] Error 1
/home/alexander/archpackages/ccons/src/llvm-2.9/tools/ccons/Diagnostics.cpp: In 
constructor 
‘ccons::DiagnosticsProvider::DiagnosticsProvider(llvm::raw_os_ostream&, const 
clang::LangOptions&)’:
/home/alexander/archpackages/ccons/src/llvm-2.9/tools/ccons/Diagnostics.cpp:25:1
4: error: no matching function for call to 
‘clang::TextDiagnosticPrinter::TextDiagnosticPrinter(llvm::raw_os_ostream&, 
bool, bool, bool, bool, bool)’
/home/alexander/archpackages/ccons/src/llvm-2.9/tools/ccons/Diagnostics.cpp:25:1
4: note: candidates are:
/usr/include/clang/Frontend/TextDiagnosticPrinter.h:39:3: note: 
clang::TextDiagnosticPrinter::TextDiagnosticPrinter(llvm::raw_ostream&, const 
clang::DiagnosticOptions&, bool)
/usr/include/clang/Frontend/TextDiagnosticPrinter.h:39:3: note:   candidate 
expects 3 arguments, 6 provided
/usr/include/clang/Frontend/TextDiagnosticPrinter.h:25:7: note: 
clang::TextDiagnosticPrinter::TextDiagnosticPrinter(const 
clang::TextDiagnosticPrinter&)
/usr/include/clang/Frontend/TextDiagnosticPrinter.h:25:7: note:   candidate 
expects 1 argument, 6 provided
/home/alexander/archpackages/ccons/src/llvm-2.9/tools/ccons/Diagnostics.cpp:25:1
4: error: no matching function for call to 
‘clang::Diagnostic::Diagnostic(ccons::DiagnosticsProvider* const)’
/home/alexander/archpackages/ccons/src/llvm-2.9/tools/ccons/Diagnostics.cpp:25:1
4: note: candidates are:
/usr/include/clang/Basic/Diagnostic.h:293:12: note: 
clang::Diagnostic::Diagnostic(const 
llvm::IntrusiveRefCntPtr<clang::DiagnosticIDs>&, clang::DiagnosticClient*, bool)
/usr/include/clang/Basic/Diagnostic.h:293:12: note:   no known conversion for 
argument 1 from ‘ccons::DiagnosticsProvider* const’ to ‘const 
llvm::IntrusiveRefCntPtr<clang::DiagnosticIDs>&’
/usr/include/clang/Basic/Diagnostic.h:106:7: note: 
clang::Diagnostic::Diagnostic(const clang::Diagnostic&)
/usr/include/clang/Basic/Diagnostic.h:106:7: note:   no known conversion for 
argument 1 from ‘ccons::DiagnosticsProvider* const’ to ‘const 
clang::Diagnostic&’
/home/alexander/archpackages/ccons/src/llvm-2.9/tools/ccons/Diagnostics.cpp:27:7
: error: ‘class clang::TextDiagnosticPrinter’ has no member named 
‘setLangOptions’
/home/alexander/archpackages/ccons/src/llvm-2.9/tools/ccons/Diagnostics.cpp:29:5
1: error: no matching function for call to 
‘clang::Diagnostic::setDiagnosticMapping(clang::diag::<anonymous enum>, 
clang::diag::Mapping)’
/home/alexander/archpackages/ccons/src/llvm-2.9/tools/ccons/Diagnostics.cpp:29:5
1: note: candidate is:
/usr/include/clang/Basic/Diagnostic.h:417:8: note: void 
clang::Diagnostic::setDiagnosticMapping(clang::diag::kind, 
clang::diag::Mapping, clang::SourceLocation)
/usr/include/clang/Basic/Diagnostic.h:417:8: note:   candidate expects 3 
arguments, 2 provided
/home/alexander/archpackages/ccons/src/llvm-2.9/tools/ccons/Diagnostics.cpp:31:5
2: error: no matching function for call to 
‘clang::Diagnostic::setDiagnosticMapping(clang::diag::<anonymous enum>, 
clang::diag::Mapping)’
/home/alexander/archpackages/ccons/src/llvm-2.9/tools/ccons/Diagnostics.cpp:31:5
2: note: candidate is:
/usr/include/clang/Basic/Diagnostic.h:417:8: note: void 
clang::Diagnostic::setDiagnosticMapping(clang::diag::kind, 
clang::diag::Mapping, clang::SourceLocation)
/usr/include/clang/Basic/Diagnostic.h:417:8: note:   candidate expects 3 
arguments, 2 provided
/home/alexander/archpackages/ccons/src/llvm-2.9/tools/ccons/Diagnostics.cpp:33:5
2: error: no matching function for call to 
‘clang::Diagnostic::setDiagnosticMapping(clang::diag::<anonymous enum>, 
clang::diag::Mapping)’
/home/alexander/archpackages/ccons/src/llvm-2.9/tools/ccons/Diagnostics.cpp:33:5
2: note: candidate is:
/usr/include/clang/Basic/Diagnostic.h:417:8: note: void 
clang::Diagnostic::setDiagnosticMapping(clang::diag::kind, 
clang::diag::Mapping, clang::SourceLocation)
/usr/include/clang/Basic/Diagnostic.h:417:8: note:   candidate expects 3 
arguments, 2 provided
/home/alexander/archpackages/ccons/src/llvm-2.9/tools/ccons/Diagnostics.cpp:35:5
2: error: no matching function for call to 
‘clang::Diagnostic::setDiagnosticMapping(clang::diag::<anonymous enum>, 
clang::diag::Mapping)’
/home/alexander/archpackages/ccons/src/llvm-2.9/tools/ccons/Diagnostics.cpp:35:5
2: note: candidate is:
/usr/include/clang/Basic/Diagnostic.h:417:8: note: void 
clang::Diagnostic::setDiagnosticMapping(clang::diag::kind, 
clang::diag::Mapping, clang::SourceLocation)
/usr/include/clang/Basic/Diagnostic.h:417:8: note:   candidate expects 3 
arguments, 2 provided
/home/alexander/archpackages/ccons/src/llvm-2.9/tools/ccons/Diagnostics.cpp: In 
member function ‘virtual void 
ccons::DiagnosticsProvider::HandleDiagnostic(clang::Diagnostic::Level, const 
clang::DiagnosticInfo&)’:
/home/alexander/archpackages/ccons/src/llvm-2.9/tools/ccons/Diagnostics.cpp:43:2
2: error: ‘const class clang::SourceLocation’ has no member named 
‘getManager’
make[2]: *** [CMakeFiles/ccons.dir/Diagnostics.cpp.o] Error 1
/home/alexander/archpackages/ccons/src/llvm-2.9/tools/ccons/Parser.cpp:22:45: 
fatal error: clang/Frontend/InitHeaderSearch.h: No such file or directory
compilation terminated.
make[2]: *** [CMakeFiles/ccons.dir/Parser.cpp.o] Error 1
/home/alexander/archpackages/ccons/src/llvm-2.9/tools/ccons/SrcGen.cpp: In 
function ‘std::string ccons::getFunctionDeclAsString(const 
clang::PrintingPolicy&, const clang::FunctionDecl*)’:
/home/alexander/archpackages/ccons/src/llvm-2.9/tools/ccons/SrcGen.cpp:72:49: 
error: ‘const class clang::Type’ has no member named ‘getAsFunctionType’
/home/alexander/archpackages/ccons/src/llvm-2.9/tools/ccons/SrcGen.cpp:74:6: 
error: ‘const class clang::FunctionType’ has no member named 
‘getAsStringInternal’
/home/alexander/archpackages/ccons/src/llvm-2.9/tools/ccons/ClangUtils.cpp: In 
function ‘ccons::SrcRange ccons::getStmtRangeWithSemicolon(const 
clang::Stmt*, const clang::SourceManager&, const clang::LangOptions&)’:
/home/alexander/archpackages/ccons/src/llvm-2.9/tools/ccons/ClangUtils.cpp:52:78
: error: conversion from ‘llvm::StringRef’ to non-scalar type 
‘std::pair<const char*, const char*>’ requested
make[2]: *** [CMakeFiles/ccons.dir/SrcGen.cpp.o] Error 1
make[2]: *** [CMakeFiles/ccons.dir/ClangUtils.cpp.o] Error 1
make[1]: *** [CMakeFiles/ccons.dir/all] Error 2
make: *** [all] Error 2
==> ERROR:(B A failure occurred in build().(B
    Aborting...(B

What version of the product are you using? On what operating system?

r189
64-bit Arch Linux

Please provide any additional information below.

The "special steps" taken in the PKGBUILD are these:
1. Copy ccons to the llvm/tools folder
2. Removing -march from CMakeLists.txt:
sed -i 's/ -march=${LLVM_HOST_ARCH}//' CMakeLists.txt
3. Specifying clang as the compiler:
CXX=clang++ CC=clang make

Even with -march or without CC=clang, ccons does not compile here.

Original issue reported on code.google.com by rods...@gmail.com on 30 May 2011 at 1:38

GoogleCodeExporter commented 9 years ago
Are there any plans to offer a pre-compiled binary for 64-bit Linux available 
in the mean time? (LSB-like or otherwise)

Original comment by rods...@gmail.com on 31 May 2011 at 12:24

GoogleCodeExporter commented 9 years ago
I see that there is ongoing development, but there has not been a release for 
two years now. A new .tar.gz release would be great.

Original comment by rods...@gmail.com on 9 Sep 2011 at 9:10