[LLVMdev] Building llvm using non-system gcc/binutils

Eli Friedman eli.friedman at gmail.com
Fri May 14 13:48:47 PDT 2010


The dynamic linker is somehow linking against the wrong libstdc++.
Not sure why that's happening.  Since it looks like the issue is
unrelated to LLVM, you might want to try asking on the gcc-help
mailing list.

-Eli

On Fri, May 14, 2010 at 11:00 AM, john blair
<mailtome200420032002 at yahoo.com> wrote:
> Hi Eli,
>
> I tried to build llvm with gcc-4.4.3 and binutils-2.20.1. This time it failed with
> /build/toolchain/src/llvm-2.7/objdir/Release/bin/tblgen: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /build/toolchain/src/llvm-2.7/objdir/Release/bin/tblgen)
> make[1]: *** [/build/toolchain/src/llvm-2.7/objdir/lib/VMCore/Release/Intrinsics.gen.tmp] Error 1
> make[1]: Leaving directory `/build/toolchain/src/llvm-2.7/objdir/lib/VMCore'
> make: *** [all] Error 1
>
> Hmm, it shouldn't be looking for libstdc++ in /usr/lib
>
> --- On Thu, 5/13/10, Eli Friedman <eli.friedman at gmail.com> wrote:
>
>> From: Eli Friedman <eli.friedman at gmail.com>
>> Subject: Re: [LLVMdev] Building llvm using non-system gcc/binutils
>> To: "john blair" <mailtome200420032002 at yahoo.com>
>> Cc: llvmdev at cs.uiuc.edu
>> Date: Thursday, May 13, 2010, 1:00 PM
>> On Thu, May 13, 2010 at 12:28 PM,
>> john blair
>> <mailtome200420032002 at yahoo.com>
>> wrote:
>> > I am trying to build llvm-2.7 using non-system
>> gcc/binutils. My gcc version is 4.1.2, and binutils is
>> 2.17.50.0.15. I get the following errors
>>
>> That version of gcc is known to have issues building LLVM;
>> see
>> http://llvm.org/docs/GettingStarted.html#brokengcc
>> .  Try upgrading
>> your gcc version.
>>
>> -Eli
>>
>> > `.L2438' referenced in section
>> `.gnu.linkonce.r._ZNK4llvm16DAGTypeLegalizer13getTypeActionENS_3EVTE'
>> of
>> /build/toolchain/src/llvm-2.7/objdir/Release/lib/libLLVMSelectionDAG.a(LegalizeTypes.o):
>> defined in discarded section
>> `.gnu.linkonce.t._ZNK4llvm16DAGTypeLegalizer13getTypeActionENS_3EVTE'
>> of
>> /build/toolchain/src/llvm-2.7/objdir/Release/lib/libLLVMSelectionDAG.a(LegalizeTypes.o)
>> > ....
>> > ....
>> > make[1]: ***
>> [/build/toolchain/src/llvm-2.7/objdir/Release/lib/libLLVM-2.7.so]
>> Error 1
>> > make[1]: Leaving directory
>> `/build/toolchain/src/llvm-2.7/objdir/tools/llvm-shlib'
>> > make: *** [all] Error 1
>> >
>> > I configure it using
>> > export
>> PATH=/build/toolchain/lin32/binutils-2.17.50.0.15/bin:$PATH
>> > LDFLAGS=-L"/build/toolchain/lin32/gcc-4.1.2-8/lib"
>> CC=/build/toolchain/lin32/gcc-4.1.2/bin/gcc
>> CXX=/build/toolchain/lin32/gcc-4.1.2/bin/g++
>> ../llvm-2.7/configure
>> >
>> > This works with 2.6.
>> >
>> >
>> >
>> > _______________________________________________
>> > LLVM Developers mailing list
>> > LLVMdev at cs.uiuc.edu
>>         http://llvm.cs.uiuc.edu
>> > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>> >
>>
>
>
>
>




More information about the llvm-dev mailing list