[Bug 291374] Re: Library "ulogd_MYSQL.so" should be linked to "libmysqlclient.so"
Victor Stinner
victor.stinner at haypocalc.com
Thu Jan 22 16:03:29 UTC 2009
I have the same problem (ulogd.c... load_plugins... ulogd_MYSQL.so...
undefined symbol: mysql_fetch_field).
Ubuntu source package contains a patch specific to Ubuntu about the MySQL module:
--------------------------- 8< ------------------------
--- ulogd-1.24/mysql/Makefile.in 2005-11-25 20:58:27.000000000 +0100
(...)
SHARED_LIBS=ulogd_MYSQL.so
+# fix the LDFLAGS included in MYSQL_LDFLAGS
+MYSQL_LDFLAGS:=$(shell echo $(MYSQL_LDFLAGS) | sed s/-Wl,//;s/-rpath//)
+
(...)
--------------------------- 8< ------------------------
First remark: I don't understand how the sed can work because ";" is the
separator for shell commands. It should be >sed 's/-Wl,//;s/-rpath//'<.
The command "mysql_config --libs" creates arguments for gcc, not for ld program:
--------------------------- 8< ------------------------
$ mysql_config --libs
-Wl,-Bsymbolic-functions -rdynamic -L/usr/lib/mysql -lmysqlclient
--------------------------- 8< ------------------------
It looks like -rdynamic causes a link problem (bad -rpath option).
I don't know ld/gcc/dlopen options very well, but I'm sure that ulogd_MYSQL.so have to linked to libmysqlclient.so.15. Example on Ubuntu Ibex :
$ ldd /usr/lib/ulogd/ulogd_MYSQL.so
linux-gate.so.1 => (0xb7f48000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7dd5000)
/lib/ld-linux.so.2 (0xb7f49000)
Example on Debian Lenny:
$ ldd /usr/lib/ulogd/ulogd_MYSQL.so
linux-gate.so.1 => (0xb7f98000)
libmysqlclient.so.15 => /usr/lib/libmysqlclient.so.15 (0xb7db4000)
The bug is still open since 3 months, why? Do you need more
informations? The package is compiled correctly on Debian.
--
Library "ulogd_MYSQL.so" should be linked to "libmysqlclient.so"
https://bugs.launchpad.net/bugs/291374
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
ubuntu-bugs at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
More information about the universe-bugs
mailing list