Matthias Andree:
[ Charset windows-1252 converted... ]
> Am 22.03.2015 um 20:46 schrieb Wietse Venema:
> 
> > Ignore the patch. The crashes are the result of a name conflict
> > with the non-system zlib implementation that is bundled with MySQL.
> > The fix is to build mysql with the system zlib implementation.
> 
> The strange thing is, on my system the mysqlclient library appears to
> include system zlib (10.1-RELEASE amd64):
> 
> $ pkg which /usr/local/lib/mysql/libmysqlclient.so.18
> /usr/local/lib/mysql/libmysqlclient.so.18 was installed by package
> mysql55-client-5.5.42

I fell into that trap, too.

> $ ldd /usr/local/lib/mysql/libmysqlclient.so.18
> /usr/local/lib/mysql/libmysqlclient.so.18:
>       libz.so.6 => /lib/libz.so.6 (0x801971000)
>       libm.so.5 => /lib/libm.so.5 (0x801b87000)
>       libc++.so.1 => /usr/lib/libc++.so.1 (0x801daf000)
>       libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x802070000)
>       libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x80228c000)
>       libthr.so.3 => /lib/libthr.so.3 (0x80249a000)
>       libc.so.7 => /lib/libc.so.7 (0x80081f000)

The libz dependency above is the result of the MYSQL_README
instructions where AUXLIBS contains "-lz". The linker blindly records
the libz dependency, regardless of whether any symbols from that
file are used.

Closer examination of the libmysqlclient.so file shows that it
exports (not imports on) global symbols with the same names as the
system libz. Their implementation is different, hence the crashes.

Instead they should have namespaced the private libz (alias the
names, or whatever). That's how FreeBSD supports peaceful coexistence
of multiple versions of Berkeley DB and other components.

        Wietse

Reply via email to