I'm trying to set up a macos-latest build for my project using github actions, but after installing gcc & libcheck via brew, gcc is throwing fatal error: check.h: No such file or directory
.
I've ensured that I'm actually using gcc rather than the clang install (gcc --version
returns gcc (Homebrew GCC 9.2.0_1) 9.2.0
, and I've tried export CPATH=/usr/local/include
to point gcc to /usr/local/include
after verifying that check.h
is there with ls /usr/local/include | grep check
.
I'm intilising the envionment using the following commands, before I try and build the project with make:
brew install autoconf automake libtool check gcc
ln -s /usr/local/Cellar/gcc/9.2.0_1/bin/gcc-9 /usr/local/bin/gcc
ln -s /usr/local/Cellar/gcc/9.2.0_1/bin/g++-9 /usr/local/bin/g++
export PATH=/usr/local/bin:$PATH
hash -r
gcc --version
export CPATH=/usr/local/include
gcc -xc -E -v -
The output of gcc -xc -E -v -
contains the following:
#include <...> search starts here:
/usr/local/include
/usr/local/Cellar/gcc/9.2.0_1/lib/gcc/9/gcc/x86_64-apple-darwin19/9.2.0/include
/usr/local/Cellar/gcc/9.2.0_1/lib/gcc/9/gcc/x86_64-apple-darwin19/9.2.0/include-fixed
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks
The expected result is a successful build, since the project builds successfuly on both my Arch Linux machine (with libcheck installed via pacman) and the ubuntu-latest image (with libcheck built from source)
Any help would be greatly appreciated!