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

Scott Ricketts sricketts at maxentric.com
Fri May 1 14:14:51 PDT 2009

I am attempting to install llvm on CentOS 5.3, which uses gcc-4.1.2 as its
system compiler. Since this compiler has reported to behave poorly with
llvm, I built gcc-4.2.4 in an insulated directory for use with my llvm

However, I am not sure I am configuring properly. The gcc-4.2.4 installation
is in /pkg/bin/gcc-4.2.4. Here is my config line:

../llvm-2.5/configure --prefix=/pkg/bin/llvm/ CC=/pkg/bin/gcc-4.2.4/bin/gcc
CXX=/pkg/bin/gcc-4.2.4/bin/g++ CXXCPP=/pkg/bin/gcc-4.2.4/bin/cpp LDFLAGS=-L
/pkg/bin/gcc-4.2.4/lib64/  CXXFLAGS=-I/pkg/bin/gcc-4.2.4/include/c++/4.2.4/

I am trying to specify all the appropriate environment variables for using
the non-default gcc. However, it is likely that I have made an error or are
ommitting some important variable(s).

Then I do "gmake tools-only" (because I have yet to build the llvm-gcc front
end). Here is the error:

gmake[1]: Entering directory `/pkg/build/llvm/llvm-obj/lib/VMCore'
llvm[1]: Building Intrinsics.gen.tmp from Intrinsics.td
/pkg/build/llvm/llvm-obj/Release/bin/tblgen: /usr/lib64/libstdc++.so.6:
version `GLIBCXX_3.4.9' not found (required by
gmake[1]: ***
[/pkg/build/llvm/llvm-obj/lib/VMCore/Release/Intrinsics.gen.tmp] Error 1
gmake[1]: Leaving directory `/pkg/build/llvm/llvm-obj/lib/VMCore'
gmake: *** [all] Error 1

So it is looking in /usr/lib64/ for libstdc++.so.6, when in fact I want it
to look in /pkg//bin/gcc-4.2.4/lib64/ (which I thought I had specified with
the configuration).

Any help would be appreciated.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090501/157c6981/attachment.html>

More information about the llvm-dev mailing list