[LLVMdev] llvm-gcc4 needs update on libstdc++-v3/config/linker-map.gnu ?

Reid Spencer rspencer at reidspencer.com
Thu Nov 16 11:10:49 PST 2006


Hi,

I'm trying to track down some nasty glibc failures on Linux. I think the
problem is that my system compiler (3.4.6) doesn't match llvm-gcc
(4.0.x) so when the llc compiled programs run they don't quite get the
right libstdc++.  If I run a test program with:

LD_LIBRARY_PATH=/path/to/my/llvm-gcc4/libs Output/sieve.llc

then I get this:

Output/sieve.llc: symbol lookup error: /proj/llvm/cfe/install-1/lib/libstdc++.so.6: undefined symbol: _ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreEi

Indeed, llvm-gcc4 when it is building or installing gets the same error
in a few places:

/proj/llvm/cfe/build-1/gcc/xgcc: symbol lookup error: /proj/llvm/cfe/build-1/i686-pc-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6: undefined symbol: _ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreEi
/proj/llvm/cfe/build-1/gcc/xgcc: symbol lookup error: /proj/llvm/cfe/build-1/i686-pc-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6: undefined symbol: _ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreEi
/proj/llvm/cfe/build-1/gcc/xgcc: symbol lookup error: /proj/llvm/cfe/build-1/i686-pc-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6: undefined symbol: _ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreEi

There are several references to this on our mailing list:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2006-August/006522.html
http://lists.cs.uiuc.edu/pipermail/llvmdev/2006-August/006587.html
http://lists.cs.uiuc.edu/pipermail/llvmdev/2006-August/006588.html 

However, the recommended solution is to *not* use LD_LIBRARY_PATH. This
could only work if the system version of libstdc++.so matched the
llvm-gcc4 library (i.e. 4.0.x). In my case, that is not true. I have a
4.1.1 compiler on the system (that I don't use) and a 3.4.6 compiler
that I do use.  

So, I'm thinking the real problem is that llvm-gcc4 is somehow not
including this symbol in libstdc++.so. If you look at: libstdc
++-v3/config/linker-map.gnu in llvm-gcc4, you will find that there is no
section for the 3.4.6 compiler. It stops at 3.4.5.

I'm wondering if the llvm-gcc4 maintainers could find a patch that would
update the linker-map to support 3.4.6 ?

Reid






More information about the llvm-dev mailing list