The accepted answer doesn't seem to work for me, but this did:
cd /Library/Developer/CommandLineTools/Packages/
open .
and double clicking the pkg file.
Answer from Anti Earth on Stack OverflowThe accepted answer doesn't seem to work for me, but this did:
cd /Library/Developer/CommandLineTools/Packages/
open .
and double clicking the pkg file.
Problem solved by reinstalling gcc. Location of headers has probably changed between High Sierra and Mojave.
I suggest to anyone encountering the same problem to do the same and also to (re)install the xcode line command tools with xcode-select --install
If you are on an amd64 installation, you can try to install the package libc6-dev-i386. This helped me solve the same issue you encountered while trying to compile smm from i8kutils.
On my machine, where I've probably screwed around too much with 32 and 64 bit architecture files, I resolved this issue by installing g++-multilib.
install errors: fatal error: sys/cdefs.h: No such file or directory
Error on mac when compiling certain packages in R - fatal error: sys/cdefs.h: No such file or directory - Stack Overflow
Cdefs.h not found during compile on some packages, but file exists on system
fatal error: sys/cdefs.h: No such file or directory
To compile 32 bit binaries on 64 bit Linux version, you have to Install libx32gcc development package and 32 bit GNU C Library
try this
sudo apt-get install libx32gcc-4.8-dev
and
sudo apt-get install libc6-dev-i386
You need gcc multilib support. Install the package gcc-multilib. E.g.:
sudo apt-get install gcc-multilib