is /usr/include a link ?
is /usr/include a link ?
is /usr/include a link ?
smaragd77 wrote:
is /usr/include a link ?
No. That directory is also not used.
Clang (used with Xcode) and gcc supports SDKROOT, unsure about icc.
Here’s a sometimes-recommended shortcut for teaching (other) compilers about each other:
export SDKROOT="`xcrun --show-sdk-path`"
Or here’s some code showing the location of the Xcode-embedded include directory::
% xcrun --show-sdk-path
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
% ls "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include"
For help with Xcode, there’s an Apple Developer forum for it, as well as for some other developer-focused forums:
Xcode | Apple Developer Forums
While looking for Intel info, it seems Intel requires a signup-in to view postings in their forums, but they allow those same forums to be crawled by the search engines. That means you can search for pointers to answers in the Intel icc forums, but not read them. Not without creating an Intel account. Go figure. 🙄
Intel icc also appears deprecated as of 2024. “Intel® C++ Compiler Classic (icc) is deprecated and was discontinued in the oneAPI 2024.0 release. Intel recommends that customers transition now to using the LLVM-based Intel® oneAPI DPC++/C++ Compiler (icx) for continued Windows* and Linux* support, new language support, new language features, and optimizations.”
smaragd77 wrote:
is /usr/include a link ?
No. That directory is also not used.
Clang (used with Xcode) and gcc supports SDKROOT, unsure about icc.
Here’s a sometimes-recommended shortcut for teaching (other) compilers about each other:
export SDKROOT="`xcrun --show-sdk-path`"
Or here’s some code showing the location of the Xcode-embedded include directory::
% xcrun --show-sdk-path
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
% ls "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include"
For help with Xcode, there’s an Apple Developer forum for it, as well as for some other developer-focused forums:
Xcode | Apple Developer Forums
While looking for Intel info, it seems Intel requires a signup-in to view postings in their forums, but they allow those same forums to be crawled by the search engines. That means you can search for pointers to answers in the Intel icc forums, but not read them. Not without creating an Intel account. Go figure. 🙄
Intel icc also appears deprecated as of 2024. “Intel® C++ Compiler Classic (icc) is deprecated and was discontinued in the oneAPI 2024.0 release. Intel recommends that customers transition now to using the LLVM-based Intel® oneAPI DPC++/C++ Compiler (icx) for continued Windows* and Linux* support, new language support, new language features, and optimizations.”
in OS Monterey
I'm making the #include <> tree in SDK available to another compiler, intel icc
I have found a solution in https://apple.stackexchange.com/questions/337940/why-is-usr-include-missing-i-have-xcode-and-command-line-tools-installed-moja:
which is identify the SDK include tree and supply it to each icc compile with option -isysroot
% xcrun --show-sdk-path
/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk
% icc -isysroot icc -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk -o binary source.c
If you have an old Xcode /usr/include is a directory
If you have a recent Xcode include is not in /usr. It's in SDK/usr
icc compiler can be opted to find it
icc -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk -o binary source.c
many thanks
Could you provide some context? Where are you seeing this? In what application? On what device?
the reason I asked is: icc requires requires /usr/include or a work-around
and ../include is not in /usr in recent Xcode present but in SDK
the fix is an option icc -"-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk"
where 13.1 is an example
many thanks
smaragd77 wrote:
the reason I asked is: icc requires requires /usr/include or a work-around
and ../include is not in /usr in recent Xcode present but in SDK
the fix is an option icc -"-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk"
where 13.1 is an example
many thanks
That’s what the xcrun command gets, and what Xcode and clang and gcc tools can use.
The simple approach will break whenever Xcode shifts, which is fairly often.
Suggest Intel add support for SDKROOT, if their llvm-based compiler does not already provide that.
Glad you have it figured out.
ls -ld /usr /usr/include
drwxr-xr-x. 17 root root 255 Sep 21 2021 /usr/
drwxr-xr-x. 98 root root 12288 Dec 11 03:50 /usr/include/
The 'd' in column 1 says it is a directory, NOT a Symbolic Link
is /usr/include a link ?