Bug #17159 --disable-static build produces *.a libs
Submitted: 6 Feb 2006 14:58 Modified: 13 Feb 2006 13:46
Reporter: [ name withheld ] Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1.16 OS:Linux (Linux)
Assigned to: CPU Architecture:Any

[6 Feb 2006 14:58] [ name withheld ]
Description:
--disable-static build has following static libs:

# ls -lR /usr/app/mysql-4.1.16/lib/
/usr/app/mysql-4.1.16/lib/:
total 1
drwxr-xr-x  2 root root 488 Feb  6 15:51 mysql

/usr/app/mysql-4.1.16/lib/mysql:
total 1576
-rw-r--r--  1 root root  11662 Feb  6 15:50 libdbug.a
-rw-r--r--  1 root root  47588 Feb  6 15:50 libheap.a
-rw-r--r--  1 root root  15036 Feb  6 15:50 libmerge.a
-rw-r--r--  1 root root 406188 Feb  6 15:50 libmyisam.a
-rw-r--r--  1 root root  27614 Feb  6 15:50 libmyisammrg.a
-rwxr-xr-x  1 root root    866 Feb  6 15:51 libmysqlclient.la
lrwxrwxrwx  1 root root     24 Feb  6 15:51 libmysqlclient.so -> libmysqlclient.so.14.0.0
lrwxrwxrwx  1 root root     24 Feb  6 15:51 libmysqlclient.so.14 -> libmysqlclient.so.14.0.0
-rwxr-xr-x  1 root root 427632 Feb  6 15:51 libmysqlclient.so.14.0.0
-rw-r--r--  1 root root 244050 Feb  6 15:50 libmystrings.a
-rw-r--r--  1 root root 283700 Feb  6 15:50 libmysys.a
-rw-r--r--  1 root root 119112 Feb  6 15:50 libnisam.a
-rw-r--r--  1 root root   6072 Feb  6 15:50 libvio.a

How to repeat:
Configure and build with:

../configure \
--prefix=/usr/app/mysql-4.1.16                        \
--exec-prefix=/usr/app/mysql-4.1.16                   \
--bindir=/usr/bin                       \
--sbindir=/usr/sbin                     \
--libexecdir=/usr/app/mysql-4.1.16/libexec            \
--datadir=/usr/app/mysql-4.1.16/share                 \
--sysconfdir=/etc                       \
--sharedstatedir=/usr/app/mysql-4.1.16/var/com        \
--localstatedir=/usr/app/mysql-4.1.16/var             \
--libdir=/usr/app/mysql-4.1.16/lib                    \
--includedir=/usr/include               \
--infodir=/usr/info                     \
--mandir=/usr/man                       \
\
--oldincludedir=/usr/include            \
\
--build=i386-pc-linux-gnu               \
--disable-rpath                         \
--disable-nls                           \
\
--disable-static                        \
[13 Feb 2006 13:26] Valeriy Kravchuk
Thank you for a problem report. Sorry, but I was not able to repeat the problem you described with a simpler configure options and 4.1.19-BK. I had performed the following commands:

./configure --prefix=/home/openxs/dbs/4.1 --with-extra-charsets=all --with-readline --disable-static
make
cd ~/dbs
rm -rf 4.1
cd
cd work/mysql-4.1/
make install

And then I've got:

openxs@suse:~/dbs/4.1> ls -l lib/mysql/
total 3290
-rw-r--r--  1 openxs users   15466 2006-02-07 13:41 libdbug.a
-rw-r--r--  1 openxs users   47488 2006-02-07 13:41 libheap.a
-rw-r--r--  1 openxs users   15020 2006-02-07 13:41 libmerge.a
-rw-r--r--  1 openxs users  364752 2006-02-07 13:41 libmyisam.a
-rw-r--r--  1 openxs users   27286 2006-02-07 13:41 libmyisammrg.a
-rwxr-xr-x  1 openxs users     942 2006-02-07 13:41 libmysqlclient.la
lrwxrwxrwx  1 openxs users      24 2006-02-07 13:41 libmysqlclient.so -> libmysqlclient.so.14.0.0
lrwxrwxrwx  1 openxs users      24 2006-02-07 13:41 libmysqlclient.so.14 -> libmysqlclient.so.14.0.0
-rwxr-xr-x  1 openxs users 1226873 2006-02-07 13:41 libmysqlclient.so.14.0.0
-rw-r--r--  1 openxs users 1074540 2006-02-07 13:41 libmystrings.a
-rw-r--r--  1 openxs users  275768 2006-02-07 13:41 libmysys.a
-rw-r--r--  1 openxs users  117356 2006-02-07 13:41 libnisam.a
-rw-r--r--  1 openxs users    6056 2006-02-07 13:41 libvio.a
-rw-r--r--  1 openxs users   85912 2006-02-07 13:41 libz.a
-rwxr-xr-x  1 openxs users     845 2006-02-07 13:41 libz.la
lrwxrwxrwx  1 openxs users      13 2006-02-07 13:41 libz.so -> libz.so.1.2.3
lrwxrwxrwx  1 openxs users      13 2006-02-07 13:41 libz.so.1 -> libz.so.1.2.3
-rwxr-xr-x  1 openxs users   81599 2006-02-07 13:41 libz.so.1.2.3

So, there is no libmysqlclient.a, exactly because I had used --disable-static. As for the other .a libs: yes, there are some, but why not.

So, please, try again, with a newer version, 4.1.18.
[13 Feb 2006 13:46] Valeriy Kravchuk
Sorry, in your case you got the same result - no libmysqlclient.a library. So, I had really repeated your test case. 

There is something like an explanation the manual (http://dev.mysql.com/doc/refman/4.1/en/configure-options.html):

"If the build fails and produces errors about your compiler or linker not being able to create the shared library libmysqlclient.so.N  (where N is a version number), you can work around this problem by giving the --disable-shared option to configure. In this case, configure does not build a shared libmysqlclient.so.N  library."

So, looks like shared/static is only about libmysqlclient* libraries, not about any others. That is why I marked it as not a bug.