Bug #7522 Shared libraries are installed with wrong extension on FreeBSD
Submitted: 24 Dec 2004 7:57 Modified: 24 Dec 2004 16:31
Reporter: Alexander Barkov Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.1.8 OS:
Assigned to: CPU Architecture:Any

[24 Dec 2004 7:57] Alexander Barkov
Description:
After installing mysql-4.1.8 on a Linux machine, I have
these files in PREFIX/lib/mysql directory:

  libmysqlclient.a
  libmysqlclient.la
  libmysqlclient.so ->  libmysqlclient.so.14.0.0
  libmysqlclient.so.14 -> libmysqlclient.so.14.0.0
  libmysqlclient.so.14.0.0

It's fine. 

On a FreeBSD 5.1 something is going wrong:

  libmysqlclient -> libmysqlclient.14
  libmysqlclient.14
  libmysqlclient.a
  libmysqlclient.la

"libmysqlclient" is a wrong name for a shared library.
It should have been libmysqlclient.so, like on a Linux box.

Linker doesn't see this library and all client programs
are linked against static libmysqlclient.a, which results
into a huge executable file size.

How to repeat:
Run make install on a FreeBSD box.
Type "ls" in the library dicterctory.

Then try to complie some some program:

[bar@bar:~]$cc a.c -I/usr/local/mysql-4.1/include/mysql -L/usr/local/mysql-4.1/lib/mysql -lmysqlclient -lz -lssl -lcrypto -lm -o a
[bar@bar:~]$ls -l a
-rwxr-xr-x  1 bar  wheel  2292411 24 dec 11:52 a
[bar@bar:~]$ldd a
a:
        libz.so.2 => /usr/lib/libz.so.2 (0x2809d000)
        libssl.so.3 => /usr/lib/libssl.so.3 (0x280ab000)
        libcrypto.so.3 => /usr/lib/libcrypto.so.3 (0x280dc000)
        libm.so.2 => /usr/lib/libm.so.2 (0x281e7000)
        libc.so.5 => /usr/lib/libc.so.5 (0x28204000)

Shared version of libmysqlclient is not seen. And the executable file size is very big.
[24 Dec 2004 16:31] Hartmut Holzgraefe
seems to be the same problem as in bug 7401