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

Scott Ricketts sricketts at maxentric.com
Fri May 8 11:34:21 PDT 2009

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

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!"'
../../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

Here is the error when I try to build llvm with gcc-4.2.4 with

referenced in section
of /pkg/build/llvm/llvm-obj/Release/lib/libLLVMSelectionDAG.a(LegalizeVectorTypes.o):
defined in discarded section
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?


More information about the llvm-dev mailing list