go-llvm / llgo

LLVM-based compiler for Go
Other
1.25k stars 81 forks source link

Won't build on ubuntu 14.04 #223

Closed Swaagie closed 9 years ago

Swaagie commented 9 years ago

Tried numerous things but simply can't get it past Linking the CXX exectuable.

This is 64 bit btw, can't find any good intel about this clang error on google either, hopefully some of you here an provide more insight, thanks!

Linking CXX executable ../../bin/clang
../../lib/libclangFrontend.a(SerializedDiagnosticReader.cpp.o): In function `llvm::ManagedStatic<(anonymous namespace)::SDErrorCategoryType>::operator*()':
SerializedDiagnosticReader.cpp:(.text._ZN4llvm13ManagedStaticIN12_GLOBAL__N_119SDErrorCategoryTypeEEdeEv+0x5a): undefined reference to `AnnotateHappensAfter'
../../lib/libclangStaticAnalyzerFrontend.a(AnalysisConsumer.cpp.o): In function `llvm::Statistic::init()':
AnalysisConsumer.cpp:(.text._ZN4llvm9Statistic4initEv[_ZN4llvm9Statistic4initEv]+0x47): undefined reference to `AnnotateHappensAfter'
../../lib/libclangLex.a(Lexer.cpp.o): In function `llvm::sys::UnicodeCharSet::rangesAreValid() const':
Lexer.cpp:(.text._ZNK4llvm3sys14UnicodeCharSet14rangesAreValidEv[_ZNK4llvm3sys14UnicodeCharSet14rangesAreValidEv]+0x6d): undefined reference to `llvm::DebugFlag'
Lexer.cpp:(.text._ZNK4llvm3sys14UnicodeCharSet14rangesAreValidEv[_ZNK4llvm3sys14UnicodeCharSet14rangesAreValidEv]+0x80): undefined reference to `llvm::isCurrentDebugType(char const*)'
Lexer.cpp:(.text._ZNK4llvm3sys14UnicodeCharSet14rangesAreValidEv[_ZNK4llvm3sys14UnicodeCharSet14rangesAreValidEv]+0xaf): undefined reference to `llvm::DebugFlag'
Lexer.cpp:(.text._ZNK4llvm3sys14UnicodeCharSet14rangesAreValidEv[_ZNK4llvm3sys14UnicodeCharSet14rangesAreValidEv]+0xc2): undefined reference to `llvm::isCurrentDebugType(char const*)'
Lexer.cpp:(.text._ZNK4llvm3sys14UnicodeCharSet14rangesAreValidEv[_ZNK4llvm3sys14UnicodeCharSet14rangesAreValidEv]+0xf0): undefined reference to `llvm::DebugFlag'
Lexer.cpp:(.text._ZNK4llvm3sys14UnicodeCharSet14rangesAreValidEv[_ZNK4llvm3sys14UnicodeCharSet14rangesAreValidEv]+0x103): undefined reference to `llvm::isCurrentDebugType(char const*)'
Lexer.cpp:(.text._ZNK4llvm3sys14UnicodeCharSet14rangesAreValidEv[_ZNK4llvm3sys14UnicodeCharSet14rangesAreValidEv]+0x132): undefined reference to `llvm::DebugFlag'
Lexer.cpp:(.text._ZNK4llvm3sys14UnicodeCharSet14rangesAreValidEv[_ZNK4llvm3sys14UnicodeCharSet14rangesAreValidEv]+0x145): undefined reference to `llvm::isCurrentDebugType(char const*)'
Lexer.cpp:(.text._ZNK4llvm3sys14UnicodeCharSet14rangesAreValidEv[_ZNK4llvm3sys14UnicodeCharSet14rangesAreValidEv]+0x1a6): undefined reference to `llvm::DebugFlag'
Lexer.cpp:(.text._ZNK4llvm3sys14UnicodeCharSet14rangesAreValidEv[_ZNK4llvm3sys14UnicodeCharSet14rangesAreValidEv]+0x1b9): undefined reference to `llvm::isCurrentDebugType(char const*)'
Lexer.cpp:(.text._ZNK4llvm3sys14UnicodeCharSet14rangesAreValidEv[_ZNK4llvm3sys14UnicodeCharSet14rangesAreValidEv]+0x1e8): undefined reference to `llvm::DebugFlag'
Lexer.cpp:(.text._ZNK4llvm3sys14UnicodeCharSet14rangesAreValidEv[_ZNK4llvm3sys14UnicodeCharSet14rangesAreValidEv]+0x1fb): undefined reference to `llvm::isCurrentDebugType(char const*)'
Lexer.cpp:(.text._ZNK4llvm3sys14UnicodeCharSet14rangesAreValidEv[_ZNK4llvm3sys14UnicodeCharSet14rangesAreValidEv]+0x22e): undefined reference to `llvm::DebugFlag'
Lexer.cpp:(.text._ZNK4llvm3sys14UnicodeCharSet14rangesAreValidEv[_ZNK4llvm3sys14UnicodeCharSet14rangesAreValidEv]+0x241): undefined reference to `llvm::isCurrentDebugType(char const*)'
Lexer.cpp:(.text._ZNK4llvm3sys14UnicodeCharSet14rangesAreValidEv[_ZNK4llvm3sys14UnicodeCharSet14rangesAreValidEv]+0x270): undefined reference to `llvm::DebugFlag'
Lexer.cpp:(.text._ZNK4llvm3sys14UnicodeCharSet14rangesAreValidEv[_ZNK4llvm3sys14UnicodeCharSet14rangesAreValidEv]+0x283): undefined reference to `llvm::isCurrentDebugType(char const*)'
collect2: error: ld returned 1 exit status
make[4]: *** [bin/clang-3.6] Error 1
make[4]: Leaving directory `/home/swaagie/projects/go/src/github.com/go-llvm/llgo/workdir/clang_build'
make[3]: *** [tools/driver/CMakeFiles/clang.dir/all] Error 2
make[3]: Leaving directory `/home/swaagie/projects/go/src/github.com/go-llvm/llgo/workdir/clang_build'
make[2]: *** [tools/driver/CMakeFiles/clang.dir/rule] Error 2
make[2]: Leaving directory `/home/swaagie/projects/go/src/github.com/go-llvm/llgo/workdir/clang_build'
make[1]: *** [clang] Error 2
make[1]: Leaving directory `/home/swaagie/projects/go/src/github.com/go-llvm/llgo/workdir/clang_build'
make: *** [workdir/.update-clang-stamp] Error 2
axw commented 9 years ago

The reason for the failure is not apparent to me. llgo recently became a subproject of LLVM, and development has been moved to the LLVM subversion repository. Please try again using the new repository and build instructions: http://llvm.org/svn/llvm-project/llgo/trunk/README.TXT

Swaagie commented 9 years ago

Works like a charm, thanks for the reference. Would be nice to have that intel on top in the readme.md :)

axw commented 9 years ago

Done, thanks for the gentle prod.