Library "ulogd_MYSQL.so" should be linked to "libmysqlclient.so"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ulogd (Ubuntu) |
Confirmed
|
Undecided
|
usergray | ||
Bug Description
Binary package hint: ulogd-mysql
I know "ulogd" is a software from Universe, but... I need it. And I think this bug can be easily fixed by a package developer...
I just upgraded an server from Ubuntu Hardy to Ubuntu Intrepid and now, MySQL plugin in ULOG does not work because of an undefined symbol:
# invoke-rc.d ulogd start
Starting netfilter userspace log daemon: Fri Oct 31 00:32:09 2008 <3> ulogd.c:308 registering interpreter `raw'
Fri Oct 31 00:32:09 2008 <3> ulogd.c:308 registering interpreter `oob'
Fri Oct 31 00:32:09 2008 <3> ulogd.c:308 registering interpreter `ip'
Fri Oct 31 00:32:09 2008 <3> ulogd.c:308 registering interpreter `tcp'
Fri Oct 31 00:32:09 2008 <3> ulogd.c:308 registering interpreter `icmp'
Fri Oct 31 00:32:09 2008 <3> ulogd.c:308 registering interpreter `udp'
Fri Oct 31 00:32:09 2008 <3> ulogd.c:308 registering interpreter `ahesp'
Fri Oct 31 00:32:09 2008 <3> ulogd.c:308 registering interpreter `local'
Fri Oct 31 00:32:09 2008 <3> ulogd.c:363 registering output `syslogemu'
Fri Oct 31 00:32:09 2008 <7> ulogd.c:462 load_plugins: '/usr/lib/
ulogd.
--------------
When preloading /usr/lib/
# env LD_PRELOAD=
Starting netfilter userspace log daemon: Fri Oct 31 00:32:18 2008 <3> ulogd.c:308 registering interpreter `raw'
Fri Oct 31 00:32:18 2008 <3> ulogd.c:308 registering interpreter `oob'
Fri Oct 31 00:32:18 2008 <3> ulogd.c:308 registering interpreter `ip'
Fri Oct 31 00:32:18 2008 <3> ulogd.c:308 registering interpreter `tcp'
Fri Oct 31 00:32:18 2008 <3> ulogd.c:308 registering interpreter `icmp'
Fri Oct 31 00:32:18 2008 <3> ulogd.c:308 registering interpreter `udp'
Fri Oct 31 00:32:18 2008 <3> ulogd.c:308 registering interpreter `ahesp'
Fri Oct 31 00:32:18 2008 <3> ulogd.c:308 registering interpreter `local'
Fri Oct 31 00:32:18 2008 <3> ulogd.c:363 registering output `syslogemu'
Fri Oct 31 00:32:18 2008 <3> ulogd.c:363 registering output `mysql'
ulogd.
Changed in ulogd: | |
assignee: | nobody → surtaevm |
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< ------- ------- ------- --- 24/mysql/ Makefile. in 2005-11-25 20:58:27.000000000 +0100 LIBS=ulogd_ MYSQL.so
-------
--- ulogd-1.
(...)
SHARED_
+# fix the LDFLAGS included in MYSQL_LDFLAGS LDFLAGS: =$(shell echo $(MYSQL_LDFLAGS) | sed s/-Wl,/ /;s/-rpath/ /)
+MYSQL_
+
(...) ------- ------- ------ 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< ------- ------- ------- --- functions -rdynamic -L/usr/lib/mysql -lmysqlclient ------- ------- ------ 8< ------- ------- ------- ---
-------
$ mysql_config --libs
-Wl,-Bsymbolic-
-------
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 : ulogd/ulogd_ MYSQL.so i686/cmov/ libc.so. 6 (0xb7dd5000)
$ ldd /usr/lib/
linux-gate.so.1 => (0xb7f48000)
libc.so.6 => /lib/tls/
/lib/ld-linux.so.2 (0xb7f49000)
Example on Debian Lenny: ulogd/ulogd_ MYSQL.so .so.15 => /usr/lib/ libmysqlclient. so.15 (0xb7db4000)
$ ldd /usr/lib/
linux-gate.so.1 => (0xb7f98000)
libmysqlclient
The bug is still open since 3 months, why? Do you need more informations? The package is compiled correctly on Debian.