#69359 closed defect (fixed)
p5-dbd-mysql: Most MariaDB variants build with wrong MariaDB versions
Reported by: | joostdekeijzer (joost de keijzer) | Owned by: | jhoyt4 |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | jhoyt4 | |
Port: | p5-dbd-mysql |
Description
Only +mariadb10_4 and +mariadb10_5 are configured to build with their corresponding MariaDB versions, all above 10.5 are configured to build with MariaDB 10.5.
Change History (16)
comment:1 Changed 9 months ago by joostdekeijzer (joost de keijzer)
comment:2 Changed 9 months ago by jmroot (Joshua Root)
Cc: | jhoyt4 added |
---|---|
Port: | p5-dbd-mysql added; p5.34-dbd-mysql removed |
Summary: | Most MariaDB variants of DBD::MySQL build with wrong MariaDB versions → p5-dbd-mysql: Most MariaDB variants build with wrong MariaDB versions |
comment:3 Changed 9 months ago by jmroot (Joshua Root)
Looks like this goes all the way back to [8cf4c3a4f2084e8dca588e2aed91ed186e8a20d0/macports-ports].
comment:4 Changed 9 months ago by jhoyt4
looking into this now. Should have a PR up relatively soon.
comment:5 Changed 9 months ago by jhoyt4
I think I have this resolved, PR to follow shortly. Sorry for the issue.
comment:6 Changed 9 months ago by jhoyt4
comment:7 Changed 9 months ago by jhoyt4
Owner: | set to jhoyt4 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:8 Changed 9 months ago by joostdekeijzer (joost de keijzer)
Maybe MariaDB versions > 10.5 just aren't supported by the DBD::mysql code?
When I run port install -vvv p5.34-dbd-mysql +mariadb10_6
the build fails with:
DBD::mysql requires MySQL 8.x for building. Version reported by /opt/local/lib/mariadb-10.6/bin/mysql_config --version: 10.6.11 at Makefile.PL line 451, <PIPE> line 3. Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_perl_p5-dbd-mysql/p5.34-dbd-mysql/work/DBD-mysql-5.003" && /opt/local/bin/perl5.34 Makefile.PL INSTALLDIRS=vendor CC="/usr/bin/clang" LD="/usr/bin/clang" --mysql_config=/opt/local/lib/mariadb-10.6/bin/mysql_config Exit code: 255 Error: Failed to configure p5.34-dbd-mysql: configure failure: command execution failed Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_perl_p5-dbd-mysql/p5.34-dbd-mysql/main.log for details. Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug. Error: Processing of port p5.34-dbd-mysql failed
In DBD::mysql Makefile.PL line 451 there is a check forcing MySQL 8.x. When I disable that line (no version check at all) and try to build I get many compile errors :(
dbdimp.c:1244:31: error: use of undeclared identifier 'MYSQL_OPT_COMPRESSION_ALGORITHMS' mysql_options(sock, MYSQL_OPT_COMPRESSION_ALGORITHMS, calg); ^ dbdimp.c:1415:31: error: use of undeclared identifier 'MYSQL_OPT_GET_SERVER_PUBLIC_KEY'; did you mean 'MYSQL_SERVER_PUBLIC_KEY'? mysql_options(sock, MYSQL_OPT_GET_SERVER_PUBLIC_KEY, &server_get_pubkey); <snip> dbdimp.c:1479:22: error: use of undeclared identifier 'SSL_MODE_PREFERRED' ssl_mode = SSL_MODE_PREFERRED; ^ dbdimp.c:1481:19: error: use of undeclared identifier 'SSL_MODE_VERIFY_IDENTITY' ssl_mode = SSL_MODE_VERIFY_IDENTITY; ^ dbdimp.c:1483:19: error: use of undeclared identifier 'SSL_MODE_VERIFY_CA' ssl_mode = SSL_MODE_VERIFY_CA; ^ dbdimp.c:1485:19: error: use of undeclared identifier 'SSL_MODE_REQUIRED' ssl_mode = SSL_MODE_REQUIRED; ^ dbdimp.c:1486:30: error: use of undeclared identifier 'MYSQL_OPT_SSL_MODE' if (mysql_options(sock, MYSQL_OPT_SSL_MODE, &ssl_mode) != 0) { ^ dbdimp.c:1495:30: error: use of undeclared identifier 'SSL_MODE_DISABLED' unsigned int ssl_mode = SSL_MODE_DISABLED; ^ dbdimp.c:1496:26: error: use of undeclared identifier 'MYSQL_OPT_SSL_MODE' mysql_options(sock, MYSQL_OPT_SSL_MODE, &ssl_mode);
comment:9 Changed 9 months ago by jhoyt4
Crud it worked my my system since I have mysql8 installed and it found it somehow.
I'll take another look when I have time. I'm also revamping the portfile to be easier to update reducing the recurrence of the initial problem masking this one.
comment:10 Changed 9 months ago by jhoyt4
Well, it looks like p5-dbd-mysql now only supports mysql. Are you able to use p5-dbd-mariadb?
comment:11 Changed 9 months ago by joostdekeijzer (joost de keijzer)
Oh well, good to have that clear.
I need DBD:mysql (the software I use requires it) but compiled with MySQLv8 it connects fine to my MariaDB server.
So I'm fine. I was just hoping to limit the amount of libraries installed :)
comment:12 Changed 9 months ago by jhoyt4
There still hope. I'm trying to figure out a way to pin mariadb based installs to the older version. I just put out a cry for help on the users list.
I also started a draft PR here https://github.com/macports/macports-ports/pull/22718
comment:13 Changed 9 months ago by jhoyt4
OK - that last commit should have fixed it so that mariadb / percona variants install v4.052 and mysql8 installs v5.003
Hoping this gets through the CI chain and can be committed.
comment:14 Changed 9 months ago by joostdekeijzer (joost de keijzer)
I've manually updated my Portfile based on https://github.com/macports/macports-ports/blob/56b36f85dc7af4a38f76c6737a27fd7bd9e50b49/perl/p5-dbd-mysql/Portfile and then port install p5.34-dbd-mysql +mariadb10_6
builds and runs without errors.
comment:15 Changed 9 months ago by jhoyt4
Thank you for checking back in; very glad its working for you now.
Given the substantial re-write of the portfile, I suspect it's going to get a more in depth review (with some requested revisions) and will take some time before getting into the port tree.
comment:16 Changed 9 months ago by jhoyt4
The update just got merged today. Please let me know if there's any issues with it.
Tried to create a PR but building DBD::MySQL fails using Mariadb-10.6 with message "Build needs MySQL8 library"...
https://github.com/joostdekeijzer/macports-ports/blob/p5-dbd-mysql/perl/p5-dbd-mysql/Portfile