Skip to content

Commit

Permalink
Fix Github Actions for macos system update (CICE-Consortium#948)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
apcraig authored May 1, 2024
1 parent 29c7bcf commit 3e30553
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/test-cice.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)"
Expand Down
3 changes: 2 additions & 1 deletion configuration/scripts/machines/Macros.conda_macos
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 3e30553

Please sign in to comment.