Bug 230839 - databases/mariadb100-client creates invalid mysql_config script
Summary: databases/mariadb100-client creates invalid mysql_config script
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Dag-Erling Smørgrav
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-23 10:11 UTC by wolfgang
Modified: 2018-10-15 08:22 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (brnrd)


Attachments
patch for the port Makefile (394 bytes, patch)
2018-08-30 10:20 UTC, wolfgang
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description wolfgang 2018-08-23 10:11:22 UTC
mariadb100-client creates a script /usr/local/bin/mysql_config which is used by other ports to find out how to link to the database client. This file defines variables libs and libs_r as containing "-l-pthread". This should be "-lpthread" instead; the current version results in other ports failing to build, e.g. databases/py-mysqlclient, databases/py-MySQLdb, databases/py-mysqlclient@py36, databases/rubygem-mysql2 and databases/py-MySQLdb56.
Comment 1 wolfgang 2018-08-30 10:20:10 UTC
Created attachment 196701 [details]
patch for the port Makefile

As a workaround I added a post-build entry to the ports Makefile to patch the generated mysql_config script, see attached patch
Comment 2 Dag-Erling Smørgrav freebsd_committer 2018-09-22 14:48:59 UTC
I have successfully reproduced the bug and confirmed that it does not affect other MariaDB ports.  I spent quite some time trying to figure out why it happens, but have had no luck.  Everything I can think of to check looks the same in 10.0 and 10.1, which does not have this bug.

The patch looks fine, except that the correct target to modify is post-configure, and PORTREVISION needs to be bumped.
Comment 3 commit-hook freebsd_committer 2018-09-22 15:05:23 UTC
A commit references this bug:

Author: des
Date: Sat Sep 22 15:05:06 UTC 2018
New revision: 480390
URL: https://svnweb.freebsd.org/changeset/ports/480390

Log:
  Fix up the mysql_config script after running configure.

  PR:		230839
  Submitted by:	wolfgang@lyxys.ka.sub.org
  MFH:		2018Q3

Changes:
  head/databases/mariadb100-server/Makefile