-
-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build breaks with libszip-2.1.1: undefined reference due to --no-allow-shlib-undefined: SZ_encoder_enabled #4949
Comments
@yurivict , thank you so much for supporting HDF5 on FreeBSD! It seems that
Are you adding the new port because How can I install the new libszip port on FreeBSD so that I can reproduce error? Regards, |
Yes. I wasn't sure what libaec is, and added libszip.
This is a very new port, and its packages aren't yet built. In order to install it you need to run this command on the updated ports tree: |
Than you, @yurivict , for answering my questions! I installed the new port and could duplicate your error: https://my.cdash.org/viewBuildError.php?buildid=2688292 Yes, I also noticed that |
Here are a few hacks for FreeBSD community. For libszip package, run
For libaec package, run
Run the above before you run |
This appears to be caused by #4567 (included in 1.14.5 via 95fa8f1) which dropped support for EDIT: Noting that restoring
EDIT 2: Trying some workarounds but pkg-config file ends up broken:
|
Maybe the best solution is if hdf5 would either auto-detect libaec and libszip, or to detect each of them based on special cmake variables instructing cmake to look for one or the other library? |
@cho-m , thank you for identifying the root cause related to Your comment helped me to find another hack for FreeBSD community:
This can eliminate:
However, users will get a warning:
Yet, build and test succeeds: https://my.cdash.org/viewTest.php?onlypassed&buildid=2689761 |
Personally would recommend re-adding I'm guessing this change was an untested breakage as CI doesn't run this combination. Especially so given CI runs on Ubuntu which doesn't have CMake files https://packages.ubuntu.com/jammy/amd64/libaec-dev/filelist hdf5/.github/workflows/main-auto.yml Line 42 in 97420ea
hdf5/.github/workflows/main-cmake-par.yml Line 34 in 97420ea
Build issue (failing to find libsz) should be reproducible with other Linux distros as most will not provide SZip (due to license, e.g. https://fedoraproject.org/wiki/Forbidden_items#szip) and
Only thing for Linux distros is that they use Autotools to build HDF5 so won't see problem in CMake. |
Is my understanding correct that libaec provides a superset of functionality compared to libszip? |
The most commonly used API is drop-in compatible but libszip does expose a few more functions as part of its public API (various |
Any hope to fix this and to make a release with the fix? |
In Homebrew, I've been trying out a patch. Opened PR #5010 which works for me with Note that Footnotes |
@cho-m , thank you for your hard effort fixing HDF5 You may find these also helpful for making your patch portable & usable for Windows
I don't know when |
The package doesn't have to have .cmake or .pc files to be discoverable by cmake. hdf5 can use cmake's find_library to discover libaec. |
EDIT: I checked FreeBSD and they are available: https://github.com/freebsd/freebsd-ports/blob/main/science/libaec/pkg-plist
|
Yes, libaec's cmake scripts work on FreeBSD. |
Problem looks like Windows support. I do think my changes are backwards compatible with whatever was previously running as I retained all fallbacks. However, the previously running logic may already be broken on 1.14.5 for vcpkg. Don't have a setup readily available to test this. |
Looks like this patch is related to root cause of regression. Seems like only Windows was tested and the patched-behavior was assumed to be the default. Also noted this in #5010 (comment). |
Describe the bug
Expected behavior
n/a
Platform (please complete the following information)
Additional context
libszip is discovered by cmake, but then this error occurs.
The text was updated successfully, but these errors were encountered: