Description:
The Connector/C++ 6.0.1 binaries (for Linux) link libstdc++. A C driver must not link C++ libraries.
The version of libstdc++ we link belongs to the GCC 3.x series. Many current Linux systems run GCC 4.x. Those systems may not have libstdc++.so.5 installed by default.
nixnutz@ulflinux:~/ftp/mysql-connector-c-6.0.1-linux-glibc2.3-x86-32bit> ldd lib/libmysqlclient.so
linux-gate.so.1 => (0xffffe000)
libpthread.so.0 => /lib/libpthread.so.0 (0xf7d45000)
libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0xf7c84000)
libm.so.6 => /lib/libm.so.6 (0xf7c5f000)
libc.so.6 => /lib/libc.so.6 (0xf7b2c000)
/lib/ld-linux.so.2 (0x56555000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xf7b1f000)
The dependency is created by YaSSL. For whatever reason, cmake compiles the YaSSL sources from the Connector/C source distribution using a C++ compiler. This will cause the inclusion of libstdc++ when linking the driver library.
Note that the libmysqlclient that ships with MySQL, e.g. MySQL 5.1.35, does not link libstdc++. This is how things should work:
nixnutz@ulflinux:~/src/php5_libmysql> ldd /usr/local/mysql/lib/mysql/libmysqlclient.so
libpthread.so.0 => /lib64/libpthread.so.0 (0x00002aed75cac000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00002aed75ec7000)
libnsl.so.1 => /lib64/libnsl.so.1 (0x00002aed76100000)
libm.so.6 => /lib64/libm.so.6 (0x00002aed76318000)
libz.so.1 => /lib64/libz.so.1 (0x00002aed7656b000)
libc.so.6 => /lib64/libc.so.6 (0x00002aed76780000)
/lib64/ld-linux-x86-64.so.2 (0x0000555555554000)
The dependency with libstdc++ is causing trouble for the MySQL OpenOffice.org extension (AKA Connector/OO.org). Therefore, I have set the flag "Affects customer". Connector/OpenOffice.org wraps Connector/C++. Connector/C++ is linked against Connector/C. The OpenOffice.org build environment is using a pre-compiled version of Connector/C for building Connector/OpenOffice.org. Therefore, Connector/OpenOffice.org inherits the libstdc++ dependency. libstdc++.so.5 is both clashing with libstdc++.so.6 used by OpenOffice.org and - as it belongs to GCC 3.x - may be missing on may systems. For various reasons OpenOffice.org cannot build Connector/C from source.
The libstdc++ dependency of Connector/C is a Connector/OpenOffice.org show stopper bug for the planned GA release in September. In other words: we need a fix and a binary release well before September to be able to proceed with Connector/OpenOffice.org.
Compiling from source, BTW, does not fix it. The libstdc++ dependency will remain.
How to repeat:
Download, unpack, check ldd or download, compile, check ldd.