[MacPorts] #69053: libjxl @0.9.0+tests does not build on macOS Sonoma, 14.2.1, because of problems with dylibs?
MacPorts
noreply at macports.org
Tue Feb 20 04:41:00 UTC 2024
#69053: libjxl @0.9.0+tests does not build on macOS Sonoma, 14.2.1, because of
problems with dylibs?
------------------------+----------------------
Reporter: ballapete | Owner: jmroot
Type: defect | Status: accepted
Priority: Normal | Milestone:
Component: ports | Version: 2.8.1
Resolution: | Keywords: sonoma
Port: libjxl |
------------------------+----------------------
Comment (by kencu):
Yeah -- if you install it first, and then run the tests, you don't need
that extra bit.
{{{-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON}}} tells cmake to use the full,
final library paths during the build.
If the software has been installed already to the final location, then it
finds the libraries and the test can build.
If you have not installed the software yet, then all the libraries exist
only in the build tree. And as the build is looking for them in their
final locations, the linker can't find them.
{{{
configure.args-replace -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
-DCMAKE_BUILD_WITH_INSTALL_RPATH=OFF
}}}
tells cmake to build it the normal, default way -- with rpaths referencing
the build tree -- so that the build can find the libraries.
Now my recollection is that somehow this still works even on Tiger (which
doesn't use rpaths) -- I think by using the full path to the libraries in
the build tree. But it's been a long while since I tested that specific
point, so someone will have to re-verify it.
At any rate, that block is the fix we use in many, many portfiles that use
cmake to fix testing.
We should change the cmake portgroups to stop forcing the wrong build
strategy I think. If that change breaks some things, those things should
be properly fixed instead of going back to the current default.
--
Ticket URL: <https://trac.macports.org/ticket/69053#comment:7>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list