[debian-mysql] Bug#742172: "mysql_config --libs" doesn't list all required libs

Kevin Mitchell kevmitch at math.sfu.ca
Thu Mar 20 07:43:48 UTC 2014


Package: libmariadbclient-dev
Version: 5.5.36-1
Severity: normal

$ cat > mysql_version.c <<EOF
> #include <stdio.h>
> #include <mysql.h>
> int main(int argc, char **argv)
> {
> printf("MySQL client version: %s\n", mysql_get_client_info());
> return 0;
> }
> EOF
$ gcc mysql_version.c $(mysql_config --libs --cflags)
$ gcc mysql_version.c $(mysql_config --libs --cflags)
/usr/lib/x86_64-linux-gnu/libmariadbclient.a(libmysql.c.o): In function `fetch_float_with_conversion':
(.text+0xb0d): undefined reference to `floor'
. . . and many more

On the other hand,
$ gcc mysql_version.c $(mysql_config --libs_r --cflags)
$ ./a.out
MySQL client version: 5.5.36-MariaDB

The difference is
$ mysql_config --libs
-L/usr/lib/x86_64-linux-gnu -lmariadbclient
$ mysql_config --libs_r
-L/usr/lib/x86_64-linux-gnu -lmariadbclient_r -lpthread -lz -lm -lssl -lcrypto -ldl

On Arch Linux, --libs and --libs_r include the same list of libraries except for mysqlclient/mysqlclient_r



-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (600, 'unstable'), (500, 'testing'), (300, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.14.0-rc7.00+ (SMP w/4 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libmariadbclient-dev depends on:
ii  libmariadbclient18  5.5.36-1
ii  zlib1g-dev          1:1.2.8.dfsg-1

libmariadbclient-dev recommends no packages.

libmariadbclient-dev suggests no packages.

-- no debconf information



More information about the pkg-mysql-maint mailing list