From 3e30553fad3bbc637acc9f58ef3dc5889dbdfc68 Mon Sep 17 00:00:00 2001 From: Tony Craig Date: Wed, 1 May 2024 12:56:21 -0700 Subject: [PATCH] Fix Github Actions for macos system update (#948) Github Actions broke again after default macos system update. Clang was not picking up the C system files. Had to change the implementation and add -isysroot to the CFLAGS option. At the same time, removed prior implementation where the system files were linked into /usr/local/include, this was no longer working. --- .github/workflows/test-cice.yml | 3 +-- configuration/scripts/machines/Macros.conda_macos | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-cice.yml b/.github/workflows/test-cice.yml index e7e41de11..20d944d88 100644 --- a/.github/workflows/test-cice.yml +++ b/.github/workflows/test-cice.yml @@ -46,7 +46,6 @@ jobs: run: | sudo xcode-select -r sudo xcode-select -s /Library/Developer/CommandLineTools - sudo ln -s /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/* /usr/local/include/ echo "xcrun --show-sdk-path: $(xcrun --show-sdk-path)" echo "xcode-select -p: $(xcode-select -p)" - name: system info @@ -55,7 +54,7 @@ jobs: type wget type curl type csh - echo "readlink \$(which csh): $(python -c 'import os, sys; print os.path.realpath(sys.argv[1])' $(which csh))" + echo "readlink \$(which csh): $(python -c 'import os, sys; print(os.path.realpath(sys.argv[1]))' $(which csh))" echo "csh --version: $(csh --version)" echo "uname -a: $(uname -a)" echo "sw_vers: $(sw_vers)" diff --git a/configuration/scripts/machines/Macros.conda_macos b/configuration/scripts/machines/Macros.conda_macos index 6f26da0fc..f8b95aa76 100644 --- a/configuration/scripts/machines/Macros.conda_macos +++ b/configuration/scripts/machines/Macros.conda_macos @@ -47,7 +47,8 @@ SDKPATH = $(shell xcrun --show-sdk-path) ifeq ($(strip $(SDKPATH)),) CFLAGS_HOST := else - CFLAGS_HOST = -isysroot $(SDKPATH) + CFLAGS_HOST := -isysroot $(SDKPATH) + CFLAGS += -isysroot $(SDKPATH) LD += -L$(SDKPATH)/usr/lib endif