Opened 6 months ago
Closed 4 months ago
#70001 closed defect (fixed)
mysql8 @8.4.0: libmysqlclient install name and location changed; revbumps needed
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | herbygillot (Herby Gillot) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.9.3 |
Keywords: | Cc: | JDLH (Jim DeLaHunt), jhoyt4, radarhere (Andrew Murray), BjarneDMat, cooljeanius (Eric Gallager) | |
Port: | mysql8 |
Description
When mysql8 was updated from 8.0.37 to 8.4.0 the install name of libmysqlclient changed from
/opt/local/lib/mysql8/mysql/libmysqlclient.21.dylib
to
/opt/local/lib/mysql8/mysql/libmysqlclient.24.dylib
so everything that links with that library needs to be revbumped to be rebuilt, but before that's done, something needs to be fixed, because the library does not actually exist at that path:
% ls -l /opt/local/lib/mysql8/mysql/libmysqlclient.24.dylib ls: /opt/local/lib/mysql8/mysql/libmysqlclient.24.dylib: No such file or directory % port contents mysql8 | grep libmysqlclient.24.dylib /opt/local/lib/mysql8/lib/libmysqlclient.24.dylib
Either the install name needs to be fixed or the library needs to be moved or a symlink needs to be provided.
Change History (20)
comment:1 Changed 6 months ago by JDLH (Jim DeLaHunt)
Cc: | JDLH added |
---|
comment:2 Changed 6 months ago by jhoyt4
Cc: | jhoyt4 added |
---|
comment:3 Changed 5 months ago by radarhere (Andrew Murray)
Cc: | radarhere added |
---|
comment:4 Changed 5 months ago by ryandesign (Ryan Carsten Schmidt)
comment:5 follow-up: 7 Changed 5 months ago by BjarneDMat
further analysis
on my system (Catalina 10.15.7) the following ports fail to rev-upgrade:
- dovecot @2.3.21_0+ldap+mysql8 (active)
- p5.34-dbd-mysql @5.3.0_1+mysql8 (active)
- postfix @3.9.0_0+dovecot_sasl+mysql8+pcre (active)
They configure themselves w/ mysql8 in two (2) different ways:
- executing
/opt/local/lib/mysql8/bin/mysql_config
lappend CCARGS -DHAS_MYSQL -I${prefix}/include/mysql8/mysql
set ::named_auxlibs(AUXLIBS_MYSQL) "-L${prefix}/lib/mysql8/mysql -lmysqlclient -lz -lm"
This leads to two (2) possible solutions:
- modify the MACPORTS mysql8 layout in
patch-cmake-install_layout.cmake.diff
- modify BOTH
mysql_config
and all Portfiles that call thelibmysqlclient.dylib
directly
So, my proposed solution is to revert the changes made to patch-cmake-install_layout.cmake.diff
in commit [eeeb795e625ad50f416e8f69ff9dc520f7021c80/macports-ports]
comment:6 Changed 5 months ago by BjarneDMat
OK - I can see the process for changing Portfiles to the new layout has started.
comment:7 follow-up: 8 Changed 5 months ago by ryandesign (Ryan Carsten Schmidt)
Replying to BjarneDMat:
the changes made to
patch-cmake-install_layout.cmake.diff
in commit [eeeb795e625ad50f416e8f69ff9dc520f7021c80/macports-ports]
It seems like these changes make the mysql8 port's layout different from the mysql56 and earlier ports. If I'm correct in that, then this would seem to be undesirable. All the mysql/mariadb/percona ports were intentionally using the same layout and we should not break that now. If changes to the layout are needed, then all of those ports should be changed so that the layout remains consistent among all of them.
comment:8 Changed 5 months ago by BjarneDMat
Replying to ryandesign:
It seems like these changes make the mysql8 port's layout different from the mysql56 and earlier ports. If I'm correct in that, then this would seem to be undesirable. All the mysql/mariadb/percona ports were intentionally using the same layout and we should not break that now. If changes to the layout are needed, then all of those ports should be changed so that the layout remains consistent among all of them.
That's correct. All the other MySQL derivatives use the original layout.
comment:9 Changed 5 months ago by BjarneDMat
I tried to make the changes as suggested, which led to this :
Could not open /opt/local/lib/mysql8/bin/../lib/libcrypto.3.dylib: Error opening or reading file (referenced from /opt/local/lib/mysql8/bin/my_openssl) DEBUG: Marking /opt/local/lib/mysql8/bin/my_openssl as broken Could not open /opt/local/lib/mysql8/bin/../lib/libssl.3.dylib: Error opening or reading file (referenced from /opt/local/lib/mysql8/bin/my_openssl) DEBUG: Marking /opt/local/lib/mysql8/bin/my_openssl as broken ---> Found 2 broken files, matching files to ports ---> Found 1 broken port, determining rebuild order DEBUG: Broken: mysql8
so we'll need some more changes somewhere else.
For now, a WorkAround will be :
cd /opt/local/lib/mysql8 ln -s lib mysql
comment:10 Changed 5 months ago by BjarneDMat
Cc: | BjarneDMat added |
---|
comment:11 Changed 5 months ago by JDLH (Jim DeLaHunt)
FYI, I just let MacPorts upgrade mysql8 to @8.4.0_2. It was able to build successfully, in contrast to my experience on 2024-05-18, probably on @8.4.0_0. I have not checked what changed in the meantime.
comment:13 Changed 5 months ago by cooljeanius (Eric Gallager)
Cc: | cooljeanius added |
---|
comment:14 Changed 5 months ago by jhoyt4
Has there been any progress on this? It looks like the PR may be stuck in limbo?
comment:15 Changed 4 months ago by jhoyt4
Part of the p5-dbd-mysql issue is that it correctly uses mysql_config to find libmysqlclient, but libmysqlclient (installed with mysql8) still has a broken link dependency to itself.
otool -L /opt/local/lib/mysql8/lib/libmysqlclient.dylib
/opt/local/lib/mysql8/lib/libmysqlclient.dylib:
/opt/local/lib/mysql8/mysql/libmysqlclient.24.dylib (compatibility version 24.0.0, current version 24.0.0)
/opt/local/libexec/openssl3/lib/libssl.3.dylib (compatibility version 3.0.0, current version 3.0.0)
/opt/local/libexec/openssl3/lib/libcrypto.3.dylib (compatibility version 3.0.0, current version 3.0.0)
/usr/lib/libresolv.9.dylib (compatibility version 1.0.0, current version 1.0.0)
/opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.3.1)
/opt/local/lib/libzstd.1.dylib (compatibility version 1.0.0, current version 1.5.6)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1700.255.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1345.100.2)
When the p5-dbd-mysql's Makefile.pl calls assert_lib, assert_lib tries to find the missing dylib and errors out.
This may also be some of the cause of the continuous requests to rev-update ports that link to libmysqlclient
comment:16 Changed 4 months ago by jhoyt4
The reason for the libcrypto errors with the original macports lib path (/opt/local/lib/mysql8/mysql/) is that HOMEBREW logic in the ssl.cmake hardcodes this path to ../lib/.
comment:17 Changed 4 months ago by jhoyt4
Should we conform to Homebrew's structure or should we patch the cmake file(s) to correct this?
comment:18 Changed 4 months ago by jhoyt4
It looks like the main culprits are the ssl.cmake and copy_openssl_binary.cmake where things are hardcoded to the homebrew way.
I'm working up some new patches now to put things back to the original layout which conforms to the other MySQL variants.
comment:19 Changed 4 months ago by jhoyt4
New PR issues.
https://github.com/macports/macports-ports/pull/24615
PR 24232 is now obsolete.
New PRs / corrections will be required to roll back the QT6 / GDAL updates.
comment:20 Changed 4 months ago by jhoyt4
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Herby, any progress on fixing this issue?