Your message dated Mon, 20 Mar 2017 10:51:57 +0100
with message-id 
<1490003517.1064009.916886440.19aa7...@webmail.messagingengine.com>
and subject line Re: Bug#855244: libmariadbclient-dev: hardcoded -lmysqlclient, 
package not providing it though
has caused the Debian Bug report #855244,
regarding libmariadbclient-dev: hardcoded -lmysqlclient, package not providing 
it though
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
855244: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=855244
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: libmariadbclient-dev
Version: 10.1.21-5
Severity: serious

% dpkg --list | grep mariadb
ii  libmariadbclient-dev     10.1.21-5            amd64        MariaDB database 
development files
ii  libmariadbclient18:amd64 10.1.21-5            amd64        MariaDB database 
client library

% grep Libs /usr/share/pkgconfig/mariadb.pc
Libs: -L${libdir} -lmysqlclient -lpthread -lz -lm -ldl
% grep mysqlclient /usr/bin/mysql_config
libs="-L$pkglibdir  -lmysqlclient -lpthread -lz -lm -ldl"

The hardcoded -lmysqlclient is wrong in this situation though:

% cat > demo.c << EOF
#include <stdio.h>
#include <mysql.h>

MYSQL  *conn;

void main(int argc, char *argv[])
{
  conn = mysql_init(NULL);
  mysql_close(conn);
}
EOF
% gcc -o demo demo.c $(pkg-config --cflags mariadb) $(pkg-config --libs mariadb)
/usr/bin/ld: cannot find -lmysqlclient
collect2: error: ld returned 1 exit status

% gcc -o demo demo.c $(mysql_config --cflags) $(mysql_config --libs)
/usr/bin/ld: cannot find -lmysqlclient
collect2: error: ld returned 1 exit status

If invoked with manually provided -lmariadbclient it's fine though:

% gcc -o demo demo.c $(pkg-config --cflags mariadb) -lmariadbclient
% gcc -o demo demo.c $(mysql_config --cflags) -lmariadbclient

As an alternative/workaround installing the
default-libmysqlclient-dev + libmariadbclient-dev-compat packages
also fixes the problem with -lmysqlclient usage.

This clearly shouldn't reach the stable stretch release as is, IMO.

regards,
-mika-

--- End Message ---
--- Begin Message ---
Version: 10.1.22-1

Hi,

this should be fixed and nothing broke (I tested most of the build
rdeps) and all build failures were not related to
mariadbclient/mysqlclient linking

Full changelog entry for reference:

mariadb-10.1 (10.1.22-1) unstable; urgency=high

  [ Otto Kekäläinen ]
  * New upstream release 10.1.22. Includes fixes for the following
    security vulnerabilities:
    - CVE-2017-3313
    - CVE-2017-3302
  * New upstream also includes fix to logrotate so that it no longer
    risks interrupting binary/relay log processing on the server.
    https://github.com/MariaDB/server/commit/156cf86defdc59353f37f6
  * Add a NEWS.Debian item with same contents as the Stretch release
  notes

  [ Ondřej Surý ]
  * Add myself to Uploaders
  * Use https URI for Homepage
  * Use /usr/share/dpkg/default.mk to define dpkg-architecture and other
    build variables
  * Install and use non-versioned symbols files for kFreeBSD and Hurd
    architectures
  * Make mysql_config and mariadb.pc return -lmariadbclient instead of
    missing -lmysqlclient
  * Add mysqlclient.pc -> mariadb.pc symlink into
    libmariadbclient-dev-compat package
  * MDEV-11884: Fix logrotate failing if mysqld is not running (Closes:
  #830976)

 -- Ondřej Surý <ond...@debian.org>  Sun, 19 Mar 2017 15:23:26 +0100

Cheers,
-- 
Ondřej Surý <ond...@sury.org>
Knot DNS (https://www.knot-dns.cz/) – a high-performance DNS server
Knot Resolver (https://www.knot-resolver.cz/) – secure, privacy-aware,
fast DNS(SEC) resolver
Vše pro chleba (https://vseprochleba.cz) – Mouky ze mlýna a potřeby pro
pečení chleba všeho druhu

--- End Message ---

Reply via email to