Bug 226049 - databases/mariadb102-client: "mysql_config --libs" lacks "-L/usr/local/lib"
Summary: databases/mariadb102-client: "mysql_config --libs" lacks "-L/usr/local/lib"
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Bernard Spil
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-19 17:24 UTC by François Charlier
Modified: 2018-11-10 16:38 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description François Charlier 2018-02-19 17:24:49 UTC
After switching default MySQL version from 101m to 102m, net-mgmt/collectd5 fails to build.

The configure step fails because `mysql_config --libs` does not include "-L/usr/local/lib" to find libs installed as ports.


See `mysql_config --libs` output from mariadb101-client /vs/ mariadb102-client installed in a fresh jail (detail in this paste: https://pastebin.com/1D8Dzd8P )


Build log from net-mgmt/collectd5:
 - http://loin.ploup.net/~naz/pub/collectd5-5.8.0_1.log
 - https://loin.ploup.net/~naz/pub/collectd_config.log


Interesting part: 

configure:35911: checking for library containing mysql_get_server_version
configure:35943: cc -o conftest -O2 -pipe  -fstack-protector -fno-strict-aliasing -I/usr/local/include  -Wl,-rpath,/usr/local/lib -fstack-protector conftest.c -L/usr/local/lib/mysql/ -lmariadb -lz -lm -liconv -lssl -lcrypto -liconv >&5
/usr/bin/ld: cannot find -liconv
Comment 1 Bernard Spil freebsd_committer freebsd_triage 2018-05-11 10:46:22 UTC
This has already been reported upstream in https://jira.mariadb.org/browse/MDEV-14439 back in November last year.
Comment 2 Bernard Spil freebsd_committer freebsd_triage 2018-05-11 11:15:21 UTC
Tracked down the error. The error is trying to link -liconv which is no longer needed on FreeBSD, it is part of libc on all supported versions of FreeBSD.

After fixing that I run into an error with collectd

> In file included from src/mysql.c:36:
> /usr/local/include/mysql/mysql.h:139:5: error: attempt to use a poisoned identifier
>     strcpy((a)->net.sqlstate, "00000");\
>     ^
> In file included from src/mysql.c:36:
> In file included from /usr/local/include/mysql/mysql.h:423:
> /usr/local/include/mysql/mariadb_stmt.h:47:3: error: attempt to use a poisoned identifier
>   strcpy((a)->sqlstate, "00000");\
>   ^
> 2 errors generated.
Comment 3 Bernard Spil freebsd_committer freebsd_triage 2018-05-11 11:29:45 UTC
(In reply to Bernard Spil from comment #2)
Scrap that... If either translit or w_chart are set it DOES depend on libiconv from ports.
Comment 4 Krzysztof 2018-05-11 11:39:43 UTC
As I can see that's the problem with mariadb-client, not collectd5? Am I right?
Comment 5 commit-hook freebsd_committer freebsd_triage 2018-05-11 12:26:23 UTC
A commit references this bug:

Author: brnrd
Date: Fri May 11 12:26:10 UTC 2018
New revision: 469632
URL: https://svnweb.freebsd.org/changeset/ports/469632

Log:
  databases/mariadb102-client: Fix mariadb_config output

   - While here, standardize on -pthread

  PR:		226049
  Reported by:	fcharlier ploup net

Changes:
  head/databases/mariadb102-client/Makefile
Comment 6 Bernard Spil freebsd_committer freebsd_triage 2018-05-11 12:27:58 UTC
(In reply to Krzysztof from comment #4)
Correct. Source code changes broke the REINPLACE_CMD.

Now you have a problem in collectd though. Suggest fcharlier opens a new PR so we separate these issues.
https://github.com/collectd/collectd/issues/2769
Comment 7 commit-hook freebsd_committer freebsd_triage 2018-10-31 17:35:32 UTC
A commit references this bug:

Author: brnrd
Date: Wed Oct 31 17:35:28 UTC 2018
New revision: 483598
URL: https://svnweb.freebsd.org/changeset/ports/483598

Log:
  databases/mariadb103-client: Fix mariadb_config output

   - port fix from mariadb102-client port

  PR:		226049, 230538
  Reported by:	flo

Changes:
  head/databases/mariadb103-client/Makefile
Comment 8 Krzysztof 2018-11-10 16:38:51 UTC
Hello,

Please check mariadb dependency once again. I've just upgraded collecd5 port to new version (releaseb ca 2 weeks ago).