[LLVMdev] Using non-system compiler to build llvm and llvm-gcc front end

Duncan Sands baldrick at free.fr
Sat May 9 00:38:28 PDT 2009


Hi,

> $ make -j15

do you really have 15 CPUs?  If not, this will most
likely just slow things down.

> cc1: /pkg/build/llvm/llvm/lib/Analysis/ScalarEvolution.cpp:511:
> bool<unnamed>::SCEVComplexityCompare::operator()(const llvm::SCEV*,
> const llvm::SCEV*) const: Assertion `0 && "Unknown SCEV kind!"'
> failed.
> ../../llvm-gcc/libdecnumber/decNumber.c:5591: internal compiler error: Aborted
> 
> This is all with llvm and llvm-gcc source from svn.

Since the SCEV code is changing rapidly at the moment, it may be that you
had the bad luck to update to a broken revision.

> Here is the error when I try to build llvm with gcc-4.2.4 with
> ENABLE_OPTIMIZED=1:
> 
> `.gnu.linkonce.t._ZNK4llvm16DAGTypeLegalizer13getTypeActionENS_3MVTE'
> referenced in section
> `.gnu.linkonce.r._ZNK4llvm16DAGTypeLegalizer13getTypeActionENS_3MVTE'
> of /pkg/build/llvm/llvm-obj/Release/lib/libLLVMSelectionDAG.a(LegalizeVectorTypes.o):
> defined in discarded section
> `.gnu.linkonce.t._ZNK4llvm16DAGTypeLegalizer13getTypeActionENS_3MVTE'
> of /pkg/build/llvm/llvm-obj/Release/lib/libLLVMSelectionDAG.a(LegalizeVectorTypes.o)
> collect2: ld returned 1 exit status
> make[2]: *** [/pkg/build/llvm/llvm-obj/Release/lib/libLTO.so] Error 1
> make[2]: Leaving directory `/pkg/build/llvm/llvm-obj/tools/lto'

This looks like a clear bug in your system tools: note how it complains
that a certain section is referenced by itself, and that this is a problem
because it is being discarded, d'oh!  There's not much we can do about this
kind of thing.

> I have also tried installing with the llvm-gcc binary for RHEL4 (even
> though I am running Centos 5). However, "make check" returned a bunch
> of unexpected failures.

If you want llvm from svn, then you should use llvm-gcc from svn too.

Ciao,

Duncan.



More information about the llvm-dev mailing list