I have the working app in Ubuntu. When I copy it to FreeBSD with all shared libs I get such message: app.linux: symbol lookup error: ../lib/libstdc++.so.6: undefined symbol: _ZNSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE2idE, version GLIBCXX_3.4 ./lib/libstdc++.so.6 has been taken from Ubuntu (gcc-4.5.1). It was compiled there from gcc sources. Upon closer inspection I see that on FreeBSD: > readelf -aW ../lib/libstdc++.so.6 | grep _ZNSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE2idE 1426: 000f30dc 4 OBJECT <OS specific>: 10 DEFAULT 26 _ZNSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE2idE@@GLIBCXX_3.4 3380: 000f30dc 4 OBJECT <OS specific>: 10 DEFAULT 26 _ZNSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE2idE But on Ubuntu the word 10 is replaced with UNIQUE. It refers to the relatively newly introduced extension STB_GNU_UNIQUE, see here: http://osdir.com/ml/general/2009-08/msg09809.html I think Linux emulator is outdated and needs to be updated.
Responsible Changed From-To: freebsd-bugs->freebsd-emulation Over to maintainer(s).
Hello, I don't think that this area belongs to the linux emulator, as this problem probably is related to the runtime linker and not the kernel. Two questions, though: (1) did you run "brandelf -t Linux" on your program binary? (2) can you provide us with a small testcase (like a one-line program trying to use libstdc++ in a smiliar way)? Thanks in advance, //Marcin
Hi, > I don't think that this area belongs to the linux emulator, as this problem probably is related to the runtime linker and not the kernel. Two questions, though: Why it doesn't belong to emulator? Runtime linker for Linux executables is outdated, this is related to linux emulator. > (1) did you run "brandelf -t Linux" on your program binary? No I didn't, usually linux executables (like skype and acroread) don't need this. (2) can you provide us with a small testcase (like a one-line program trying to use libstdc++ in a smiliar way)? Regarding the testcase, my linux executable itself doesn't use the symbol _ZNSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE2idE. Instead it links with some open source shared libraries, some of which probably links to this symbol. But looking at the readelf output it's pretty clear what triggers the problem. Yuri