Scott Ricketts
2009-May-08 18:34 UTC
[LLVMdev] Using non-system compiler to build llvm and llvm-gcc front end
Unfortunately I still have yet to successfully install llvm. On Wed, May 6, 2009 at 2:32 PM, Anton Korobeynikov <anton at korobeynikov.info> wrote:> That's correct. Since you have everything linked as shared libraries > system dynamic linker will pick the shared library installed in the > default library location. Most probably you will need to edit > /etc/ld.so.conf and put the gcc 4.2.4 library path there *before* > system compiler one and rerun "ldconfig" (from root)....I added the gcc 4.2.4 library paths to /etc/ld.so.conf, then ran ldconfig. Then I: configured llvm: $ ../llvm/configure --prefix=/pkg/bin/llvm built llvm: $ make -j15 configured llvm-gcc: $ ../llvm-gcc/configure --prefix=/pkg/build/llvm/install --program-prefix=llvm- --enable-llvm=/pkg/build/llvm/llvm-obj --enable-languages=c,c++ attempted to build llvm-gcc: $ make -j15 ... 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. I have tried gcc-4.2.4 and gcc-4.3.2. ENABLE_OPTIMIZED=1 only seems to work with gcc-4.3.2. 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' 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. Any suggestions? Thanks, Scott
Duncan Sands
2009-May-09 07:38 UTC
[LLVMdev] Using non-system compiler to build llvm and llvm-gcc front end
Hi,> $ make -j15do 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.
Scott Ricketts
2009-May-09 16:42 UTC
[LLVMdev] Using non-system compiler to build llvm and llvm-gcc front end
>> $ make -j15 > > do you really have 15 CPUs? If not, this will most > likely just slow things down. >I have 8 CPUs. I started with -j8 and turned the knob up a bit. It seemed to run faster, so I stuck with j15. I guess there might be some context switching when threads are blocking on memory or IO. I could be imagining the speedups though because of some sort of placebo effect.>> 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.Release 2.5 was giving me problems (see older posts on this thread). I will see if updating my current revision helps.> 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.OK, not quite sure what this means about my system tools. Is there something I should be concerned about?>> 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.Yes, I assumed so. I was just getting frustrated with not being able to build the svn llvm-gcc, so I tried the binary.> Ciao, > > Duncan. >Thanks for your help.
Seemingly Similar Threads
- [LLVMdev] Using non-system compiler to build llvm and llvm-gcc front end
- [LLVMdev] Using non-system compiler to build llvm and llvm-gcc front end
- [LLVMdev] Using non-system compiler to build llvm and llvm-gcc front end
- [LLVMdev] LLVM build error under gcc version 4.2.1 (SUSE Linux)
- [LLVMdev] Using non-system compiler to build llvm and llvm-gcc front end