Bug 219788 - databases/p5-DBD-mysql build fails when databases/mariadb102-client installed
Summary: databases/p5-DBD-mysql build fails when databases/mariadb102-client installed
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: patch-ready
Depends on:
Blocks:
 
Reported: 2017-06-04 22:39 UTC by Alexey
Modified: 2017-07-24 09:54 UTC (History)
3 users (show)

See Also:


Attachments
build log (14.44 KB, text/plain)
2017-06-04 22:39 UTC, Alexey
no flags Details
svn diff for databases/p5-DBD-mysql (2.09 KB, patch)
2017-06-06 08:33 UTC, Bernard Spil
no flags Details | Diff
svn diff for databases/p5-DBD-mysql (1.98 KB, patch)
2017-06-10 13:57 UTC, Bernard Spil
no flags Details | Diff
svn diff for databases/p5-DBD-mysql (1.60 KB, patch)
2017-06-10 15:33 UTC, Bernard Spil
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey 2017-06-04 22:39:33 UTC
Created attachment 183224 [details]
build log

Hello!

I tried to build port databases/p5-DBD-mysql  (using poudriede)
I have defined 
DEFAULT_VERSIONS+=mysql=102m
in make.conf  for suck port set

but building process failed with error:

Running Mkbootstrap for DBD::mysql ()
chmod 644 "mysql.bs"
cc -c  -I/usr/local/lib/perl5/site_perl/mach/5.24/auto/DBI -I/usr/local/include/mysql -I/usr/local/include/mysql/.. -DDBD_MYSQL_INSERT_ID_IS_GOOD -g  -O2 -pipe  -fstack-protector -fno-strict-aliasing -O2 -pipe -fstack-protector -fno-strict-aliasing    -DVERSION=\"4.042\"  -DXS_VERSION=\"4.042\" -DPIC -fPIC "-I/usr/local/lib/perl5/5.24/mach/CORE"   dbdimp.c
dbdimp.c:2158:15: error: no member named 'reconnect' in 'struct st_mysql'
      result->reconnect=0;
      ~~~~~~  ^
dbdimp.c:2994:19: error: use of undeclared identifier 'MYSQL_VERSION_ID'
                  MYSQL_VERSION_ID, statement);
                  ^
dbdimp.c:3568:19: error: use of undeclared identifier 'MYSQL_VERSION_ID'
                  MYSQL_VERSION_ID );
                  ^
3 errors generated.
*** Error code 1

full log attached
Comment 1 Bernard Spil freebsd_committer freebsd_triage 2017-06-06 06:53:21 UTC
Bug confirmed on my system.

MariaDB 10.2 replaces libmysqlclient with libmariadb. I guess this is the root of the error, will have to investigate.
Comment 2 Bernard Spil freebsd_committer freebsd_triage 2017-06-06 08:33:22 UTC
Created attachment 183259 [details]
svn diff for databases/p5-DBD-mysql

Hi,

Just added a patch to fix this. Can you please test and let me know if this fixes the build and does not introduce regressions at runtime?

Thanks! Bernard (maintainer MariaDB ports)
Comment 3 Alexey 2017-06-07 21:52:25 UTC
Hello!

I just checked your patch. Thank you!
Looks like build now success and small tests I made passed.

Best regards
/Alexey
Comment 4 Bernard Spil freebsd_committer freebsd_triage 2017-06-10 13:57:58 UTC
Created attachment 183383 [details]
svn diff for databases/p5-DBD-mysql
Comment 5 Bernard Spil freebsd_committer freebsd_triage 2017-06-10 13:59:27 UTC
Alexey,

Can you please test the modified patch? The previous one actually broke intended functionality. The new one uses the mysql_options method for newer versions of MySQL (>=5.5)
Comment 6 commit-hook freebsd_committer freebsd_triage 2017-06-10 15:22:57 UTC
A commit references this bug:

Author: brnrd
Date: Sat Jun 10 15:22:15 UTC 2017
New revision: 443100
URL: https://svnweb.freebsd.org/changeset/ports/443100

Log:
  databases/mariadb102-client: Fix dependencies checking MYSQL_VERSION_ID

   - Add upstream patch

  PR:		219788
  Reported by:	Alexey <fbsd98816551@avksrv.org>

Changes:
  head/databases/mariadb102-client/Makefile
  head/databases/mariadb102-client/files/patch-libmariadb_include_mariadb__version.h.in
Comment 7 Bernard Spil freebsd_committer freebsd_triage 2017-06-10 15:33:32 UTC
Created attachment 183387 [details]
svn diff for databases/p5-DBD-mysql

Use upstream patch/pull request
Fix for MYSQL_VERSION_ID committed to mariadb102-client_10.2.6_2
Comment 8 Alexey 2017-06-13 21:54:05 UTC
Thank you for your patch. I tried it also. at list build and simple test works for me.
Comment 9 Zane C. Bowers-Hadley 2017-06-24 13:35:13 UTC
Just tested this and it works for me.

Can we get this committed? This appears to affect any one using this version of mariadb.
Comment 10 commit-hook freebsd_committer freebsd_triage 2017-06-24 15:09:50 UTC
A commit references this bug:

Author: brnrd
Date: Sat Jun 24 15:08:52 UTC 2017
New revision: 444213
URL: https://svnweb.freebsd.org/changeset/ports/444213

Log:
  databases/p5-DBD-mysql: Fix issue with MariaDB 10.2

   - Use method, don't access struct

  PR:		219788
  Reported by:	Alexey <fbsd98816551@avksrv.org>

Changes:
  head/databases/p5-DBD-mysql/files/
  head/databases/p5-DBD-mysql/files/patch-dbdimp.c