Help with UsingTheRightCompiler
Christopher Jones
jonesc at hep.phy.cam.ac.uk
Thu Jul 23 16:53:49 UTC 2020
> Mojave 10.14 and later doesn't provide /usr/include anymore. System headers like <algorithm> are only in the SDK now. Note the -isystem flag with the path to the SDK isn't in that compile line. MacPorts put that flag into CFLAGS, CXXFLAGS, CPPFLAGS, and a comparable one into LDFLAGS for you, so this shows you that your build system isn't respecting those variables yet. Read the makefile portgroup to see if any of the options it provides can help you. Read your project's Makefile to see how it expects those values to be supplied. The Makefile may not provide a way. If not, you'll have to patch it to make it possible.
clang (and gcc) both respect the SDKROOT env. var. This is an easy way to by the right SDK root.
Add this to your login profile
export SDKROOT=`xcrun --show-sdk-path`
Note. you can also use xcrun directly with clang/gcc to do the same
> xcrun clang …..
but that requires the build commands to be patched, whereas setting SDKROOT, assuming the build system does not actively remove it, should work.
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20200723/ea13991f/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1930 bytes
Desc: not available
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20200723/ea13991f/attachment.bin>
More information about the macports-dev
mailing list