[odb-users] Cross-compiling issue with ODB source code
Wayne Zhang
zwmosquito at 126.com
Wed Dec 28 21:20:24 EST 2016
Dear developers,
Recently I compiled odb source code on my local VM ( Ubuntu 16.04.1, with gcc 4.9.3 ), and expected it could work on another Linux server (
Redhat with gcc 4.1.2, very old but I don't have root access to upgrade it ).
It complained something like this:
odb: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by odb)
odb: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /var/fpwork/w39zhang/CBTS_HA_POC/ODB_root/lib/libcutl-1.10.so)
odb: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /var/fpwork/w39zhang/CBTS_HA_POC/ODB_root/lib/libcutl-1.10.so)
odb: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /var/fpwork/w39zhang/CBTS_HA_POC/ODB_root/lib/libcutl-1.10.so)
odb: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /var/fpwork/w39zhang/CBTS_HA_POC/ODB_root/lib/libcutl-1.10.so)
odb: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /var/fpwork/w39zhang/CBTS_HA_POC/ODB_root/lib/libcutl-1.10.so)
make: *** [gen] Error 1
I learnt from google that it was a cross-compiling issue but I don't have such experience to fix it. After trying in many ways ( passing
"-static-libstdc++ -static-libgcc" to LDFLAGS, or hardcode "-Wl,-rpath" with Ubuntu libstdc++.so.6 in odb/libtool ), I have to admit my poor
knowledge in Linux :'(
I notice that odb executable and odb plugin "odb.so" in official release ( odb-2.4.0-x86_64-linux-gnu.tar.bz2 ) work quite perfectly on that
Redhat server. They both have less dependencies than the one I have built.
The differences between my plugin and the official one:
## plugin built by me
$ ldd odb.so
./odb.so: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by ./odb.so)
./odb.so: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /var/fpwork/w39zhang/CBTS_HA_POC/ODB_root/lib/libcutl-1.10.so)
./odb.so: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /var/fpwork/w39zhang/CBTS_HA_POC/ODB_root/lib/libcutl-1.10.so)
./odb.so: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /var/fpwork/w39zhang/CBTS_HA_POC/ODB_root/lib/libcutl-1.10.so)
./odb.so: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /var/fpwork/w39zhang/CBTS_HA_POC/ODB_root/lib/libcutl-1.10.so)
./odb.so: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /var/fpwork/w39zhang/CBTS_HA_POC/ODB_root/lib/libcutl-1.10.so)
linux-vdso.so.1 => (0x00007fff8f5ff000)
libcutl-1.10.so => /var/fpwork/w39zhang/CBTS_HA_POC/ODB_root/lib/libcutl-1.10.so (0x00007f701df92000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f701dc46000)
libc.so.6 => /lib64/libc.so.6 (0x00007f701d8ed000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f701d6d1000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f701d4c2000)
libm.so.6 => /lib64/libm.so.6 (0x00007f701d23f000)
/lib64/ld-linux-x86-64.so.2 (0x0000003307800000)
## official plugin ( odb-2.4.0-x86_64-linux-gnu.tar.bz2 )
$ ldd odb.so
linux-vdso.so.1 => (0x00007fff6a7ff000)
libm.so.6 => /lib64/libm.so.6 (0x00007f9f8c7f9000)
libc.so.6 => /lib64/libc.so.6 (0x00007f9f8c4a0000)
/lib64/ld-linux-x86-64.so.2 (0x0000003307800000)
May I ask how did you do that?
I want to static link with libcutl and stdc++ lib just like the offical release. And the different version of libc.so.6 is also a problem ( Ubuntu
VM uses GLIBC 2.23 but Redhat server uses GLIBC 2.5 ).
Expecting your reply. Thanks!
Br,
Wayne
More information about the odb-users
mailing list