From 9d1b70b04bffe974380a0cad3400334e86702a38 Mon Sep 17 00:00:00 2001 From: Samuel Audet Date: Fri, 22 Nov 2024 12:42:49 +0900 Subject: [PATCH] Fix builds for ARPACK-NG on Mac --- .github/actions/deploy-macosx/action.yml | 1 + arpack-ng/cppbuild.sh | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/actions/deploy-macosx/action.yml b/.github/actions/deploy-macosx/action.yml index f03e99edee..c8d028ecb1 100644 --- a/.github/actions/deploy-macosx/action.yml +++ b/.github/actions/deploy-macosx/action.yml @@ -116,6 +116,7 @@ runs: git --version clang --version + /opt/homebrew/bin/gcc-* --version || true /usr/local/bin/gcc-* --version || true cmake --version gradle --version diff --git a/arpack-ng/cppbuild.sh b/arpack-ng/cppbuild.sh index f8b4c1fb8d..2c5018eca3 100755 --- a/arpack-ng/cppbuild.sh +++ b/arpack-ng/cppbuild.sh @@ -85,9 +85,9 @@ case $PLATFORM in ;; macosx-arm64) sed -i="" 's/install_name \\$rpath/install_name @rpath/g' configure m4/libtool.m4 - export CC="$(compgen -cX '!gcc*')" - export CXX="$(compgen -cX '!g++*')" - export FC="$(compgen -cX '!gfortran*') -Wl,-rpath,@loader_path/ -Wl,-rpath,$(ls -1d /opt/homebrew/opt/gcc*/lib/gcc/*/ | head -n 1)" + export CC="$(ls -1 /opt/homebrew/bin/gcc-* | head -n 1)" + export CXX="$(ls -1 /opt/homebrew/bin/g++-* | head -n 1)" + export FC="$(ls -1 /opt/homebrew/bin/gfortran-* | head -n 1) -Wl,-rpath,@loader_path/ -Wl,-rpath,$(ls -1d /opt/homebrew/opt/gcc*/lib/gcc/*/ | head -n 1)" export F77="$FC" export FLIBS="-lgfortran" ./configure --prefix=$INSTALL_PATH --enable-icb --with-blas=openblas --with-lapack=openblas