Scott Ricketts
2009-May-06 20:26 UTC
[LLVMdev] Using non-system compiler to build llvm and llvm-gcc front end
On Wed, May 6, 2009 at 12:51 PM, Anton Korobeynikov <anton at korobeynikov.info> wrote:> Even if you'll succeed, most probably LLVM will be miscompiled. gcc > 4.1.2 is known buggy: http://llvm.org/docs/GettingStarted.html#brokengcc >Yes, so I have read -- which is why I initially installed gcc-4.2.4. My original post was looking for help on how to use gcc-4.2.4. Some suggestions were made, but I was not able to get everything built. It seems that despite attempting to configure with everything pointing to gcc-4.2.4 (and not the system gcc 4.1.2), at some point in the build, something would look for a file or use a file from the system gcc 4.1.2. I would love to get this built using gcc-4.2.4, but I think I could use some help. If someone could point me to the relevant config variables, I might be able to debug this.
Anton Korobeynikov
2009-May-06 21:32 UTC
[LLVMdev] Using non-system compiler to build llvm and llvm-gcc front end
Hello, Scott> Yes, so I have read -- which is why I initially installed gcc-4.2.4. > My original post was looking for help on how to use gcc-4.2.4. Some > suggestions were made, but I was not able to get everything built. It > seems that despite attempting to configure with everything pointing to > gcc-4.2.4 (and not the system gcc 4.1.2), at some point in the build, > something would look for a file or use a file from the system gcc > 4.1.2.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).... -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
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
Apparently Analagous 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] Using non-system compiler to build llvm and llvm-gcc front end
- [LLVMdev] LLVM build error under gcc version 4.2.1 (SUSE Linux)