Skip to content

Commit

Permalink
Fix libtool sed cleanup on MacOS
Browse files Browse the repository at this point in the history
Convert sed -i line to sed > libtool.bak && mv libtool.bak libtool
to avoid non-portable -i option.
  • Loading branch information
derobins committed May 20, 2024
1 parent 13356d1 commit 6289822
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
3 changes: 2 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -4617,7 +4617,8 @@ fi
## linker flags: -l with no library name; -l <libname>, specifically gfortran or m.
## This sed script corrects "-l <libname>" first and then "-l " with no library name.
## If the order is not preserved, all instances of "-l " will be removed.
sed -e '/^postdeps/ s/-l \([a-zA-Z]\)/-l\1/g' -e '/^postdeps/ s/-l //g' -i libtool
sed -e '/^postdeps/ s/-l \([a-zA-Z]\)/-l\1/g' -e '/^postdeps/ s/-l //g' libtool > libtool.bak
mv -- libtool.bak libtool

## show the configure settings
cat src/libhdf5.settings
16 changes: 16 additions & 0 deletions release_docs/RELEASE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1674,6 +1674,22 @@ Bug Fixes since HDF5-1.14.0 release

Configuration
-------------
- Fixed/reverted an Autotools configure hack that causes problems on MacOS

A sed line in configure.ac was added in the past to paper over some
problems with older versions of the Autotools that would add incorrect
linker flags. This used the -i option in a way that caused silent
errors on MacOS that did not break the build.

The original fix for this problem (in 1.14.4) removed the sed line
entirely, but it turns out that the sed cleanup is still necessary
on some systems, where empty -l options will be added to the libtool
script.

This sed line has been restored and reworked to not use -i.

Fixes GitHub issues #3843 and #4448

- Fixed a list index out of range issue in the runTest.cmake file

Fixed an issue in config/cmake/runTest.cmake where the CMake logic
Expand Down

0 comments on commit 6289822

Please sign in to comment.