Skip to content
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

hdf5: Fix build with Xcode/CLT 15.0 #20572

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion science/hdf5/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ use_bzip2 yes
depends_lib port:zlib port:libaec
use_parallel_build yes

patchfiles patch-tools-src-misc-h5cc.in.diff
# Remove patch-no-commons.diff when resolved in a future version.
# Expected for HDF5-1.14.3.

patchfiles patch-no-commons.diff \
patch-tools-src-misc-h5cc.in.diff

# llvm-gcc-4.2 produced code fails type conversion tests
# Upstream suggestion is use -O0. Clang-produced code passes all tests.
Expand Down
22 changes: 22 additions & 0 deletions science/hdf5/files/patch-no-commons.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
--- configure.orig 2023-08-10 16:57:56.000000000 -0600
+++ configure 2023-09-24 08:05:13.000000000 -0600
@@ -11228,14 +11228,11 @@
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if shared Fortran libraries are supported" >&5
printf %s "checking if shared Fortran libraries are supported... " >&6; }
H5_FORTRAN_SHARED="yes"
- ## tell libtool to do the right thing with COMMON symbols, this fixes
- ## corrupt values with COMMON and EQUIVALENCE when building shared
- ## Fortran libraries on OSX with gnu and Intel compilers (HDFFV-2772).
- case "`uname`" in
- Darwin*)
- H5_LDFLAGS="$H5_LDFLAGS -Wl,-commons,use_dylibs"
- ;;
- esac
+
+## REMOVED HERE FOR MACPORTS, 2023 SEPT 24:
+## case Darwin ... H5_LDFLAGS="$H5_LDFLAGS -Wl,-commons,use_dylibs"
+## Xcode/CLT 15.0 does not accept "-commons".
+## See upstream PR: https://github.com/HDFGroup/hdf5/pull/3581

## Report results of check(s)