When upgrading to macOS Catalina from Mojave, users have encountered an error when compiling programs using the
error: no member named 'signbit' in the global namespace
This error stems from the fact that Catalina purges and protects /usr/include with System Integrity Protection (SIP). Therefore, any projects that expect to find C headers in this directory will fail to compile.
Solution:
To resolve this issue, it is necessary to direct the build system to the appropriate headers:
Set CMAKE_OSX_SYSROOT: Set this variable to the result of xcrun --show-sdk-path using one of the following methods:
If these steps resolve the problem, consider exploring better approaches for setting these flags in CMake. Additionally, disabling SIP (although adventurous) may provide a temporary solution. However, it is recommended to report bugs to projects that still expect C headers in /usr/include.
The above is the detailed content of 'Error: 'no member named 'signbit' in the global namespace' After Catalina Upgrade: What's the Solution?'. For more information, please follow other related articles on the PHP Chinese website!