Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


On Mon, Nov 14, 2011 at 10:47:31AM +0100, Stephan Bergmann wrote:

I must admit I'm confused.  On my system,

~ objdump -T /usr/lib64/libstdc++.so.6 | grep _ZNSs4_Rep20_S_empty_rep_storageE
0000003e504f45a0 g    DO .bss  0000000000000020 GLIBCXX_3.4 _ZNSs4_Rep20_S_empty_rep_storageE

~ objdump -T /usr/lib64/libmysqlcppconn.so | grep _ZNSs4_Rep20_S_empty_rep_storageE
0000000000000000      DO *UND* 0000000000000000 GLIBCXX_3.4 _ZNSs4_Rep20_S_empty_rep_storageE

~ objdump -t mysqlc/unxlngx6/lib/mysqlc.uno.so | grep _ZNSs4_Rep20_S_empty_rep_storageE
00000000003dbe40 l     O .bss  0000000000000020             _ZNSs4_Rep20_S_empty_rep_storageE

That is, libstdc++.so.6 exports the symbol with version GLIBCXX_3.4
and libmysqlcppconn.so links against it, while mysqlc.uno.so emits
its own definition of the symbol (as a local symbol, due to the map
file).  Do you have an idea why mysqlc.uno.so emits its own
definition at all?

Now that you mention it, my *system* libmysqlcppconn.so also links
against the symbol:

$ objdump -T /usr/lib/libmysqlcppconn.so|grep _rep_st
0000000000000000      DO *UND*  0000000000000000  GLIBCXX_3.4 _ZNSs4_Rep20_S_empty_rep_storageE

But the LibreOffice-*internal* libmysqlcppconn defines the symbol as
"globally unique":

$ objdump -T ~/src/libreoffice/core/mysqlcppconn/unxlngx6/lib/libmysqlcppconn.so|grep _rep_st
000000000031bca0 u    DO .bss   0000000000000020  Base        _ZNSs4_Rep20_S_empty_rep_storageE


Hmm... Maybe it is a question of different version of G++/libstdc++,
but on my system, libmysqlcppconn.so defines symbol itself as "u". Or
would that be a change introduced by -D_GLIBCXX_DEBUG? Now, the weird
thing is that if I recompile my distro's libmysqlcppconn package, that
symbol disappears *completely*:

$ objdump -T 
~/src/mysqlcppconn/mysql-connector-c++-1.1.0/debian/libmysqlcppconn5/usr/lib/libmysqlcppconn.so.5.1.1.0
 | grep -i _rep_st
$


Also compare:

$ ldd ~/src/libreoffice/core/mysqlcppconn/unxlngx6/lib/libmysqlcppconn.so
        linux-vdso.so.1 =>  (0x00007fff89fef000)
        libmysqlclient.so.16 => /usr/lib/libmysqlclient.so.16 (0x00007f4de8623000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f4de8407000)
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f4de8102000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f4de7e80000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f4de7c6a000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4de78e5000)
        libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007f4de76ae000)
        libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1 (0x00007f4de7496000)
        libz.so.1 => /usr/lib/libz.so.1 (0x00007f4de727e000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f4de8d77000)

$ ldd 
~/src/mysqlcppconn/mysql-connector-c++-1.1.0/debian/libmysqlcppconn5/usr/lib/libmysqlcppconn.so.5.1.1.0
        linux-vdso.so.1 =>  (0x00007fff72ca9000)
        libmysqlclient_r.so.16 => /usr/lib/libmysqlclient_r.so.16 (0x00007f7898da5000)
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f7898aa1000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f789881e000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f7898608000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f7898284000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f7898067000)
        libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007f7897e30000)
        libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1 (0x00007f7897c18000)
        libz.so.1 => /usr/lib/libz.so.1 (0x00007f7897a00000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f78994f4000)

$ ldd /usr/lib/libmysqlcppconn.so.5.1.1.0 
        linux-vdso.so.1 =>  (0x00007fff1f4c3000)
        libmysqlclient_r.so.16 => /usr/lib/libmysqlclient_r.so.16 (0x00007f7e9f79a000)
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f7e9f496000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f7e9f213000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f7e9effd000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f7e9ec79000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f7e9ea5c000)
        libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007f7e9e825000)
        libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1 (0x00007f7e9e60d000)
        libz.so.1 => /usr/lib/libz.so.1 (0x00007f7e9e3f5000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f7e9fe77000)


libpthread disappearing, libmysqlclient_r.so.16 vs
libmysqlclient.so.16...


-- 
Lionel

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.