[LLVMdev] llvm-2.2 cannot be successfully built with 'make ENABLE_OPTIMIZED=1'

Tobias Oberstein
Wed, 20 Feb 2008 10:08:03 -0000

> I follow the command:
>
>          CXX=PATH_TO_MY_G++ ../llvm/configure –prefix=/usr/local
>
> To configure llvm
>
>
>
> And next when I use ‘make ENABLE_OPTIMIZED=0’, it can successfully build
> llvm, with the warning that I may get 10 times slower…
>
>
>
> But when I use ‘make ENABLE_OPTMIZED=1’, the compilation fails with the
> message:
>
>          /home/wuxi/llvm-2.2/llvm-objects-opt/Release/bin/tblgen:
> /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by
> /home/wuxi/llvm-2.2/llvm-objects-opt/Release/bin/tblgen)


try putting your self built newer gcc & libstdc++ in the environment

export PATH=/home/wuxi/gcc-4.2-install/bin:${PATH}
export LD_LIBRARY_PATH=/home/wuxi/gcc-4.2-install/lib:${LD_LIBRARY_PATH}

the systems /usr/lib/libstdc++.so.6 doesn't work with the newer GCC.

Tobias