[MacPorts] #71053: clang @19.1.1_0+analyzer: can't find standard headers
MacPorts
noreply at macports.org
Sat Oct 12 20:17:58 UTC 2024
#71053: clang @19.1.1_0+analyzer: can't find standard headers
---------------------------+---------------------
Reporter: paul-j-lucas | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.10.2
Resolution: | Keywords: ventura
Port: clang-19 |
---------------------------+---------------------
Comment (by paul-j-lucas):
> I realize you think that the headers in Xcode or the SDK in the CLTs
should not be used ...
That's not what I said. I only hypothesized as to why clang/llvm ''might''
be installing their own full set of headers. I never said anything about
''use'' of headers.
> Now, I have no idea how you built clang-19 exactly to force it to ignore
the SDK
I didn't do anything to force anything. I just did `port install
clang-19`. FYI, the CLT's clang-as-gcc can find the headers and build
working executables just fine.
FYI:
{{{
$ cd /Library/Developer/CommandLineTools/SDKs
$ ls -l
lrwxr-xr-x 1 root wheel 14 Oct 12 09:47 MacOSX.sdk -> MacOSX14.2.sdk/
drwxr-xr-x 7 root wheel 224 Oct 12 09:47 MacOSX13.3.sdk/
lrwxr-xr-x 1 root wheel 14 Oct 12 09:46 MacOSX13.sdk -> MacOSX13.3.sdk/
drwxr-xr-x 7 root wheel 224 Oct 12 09:48 MacOSX14.2.sdk/
lrwxr-xr-x 1 root wheel 14 Oct 12 09:45 MacOSX14.sdk -> MacOSX14.2.sdk/
}}}
From experience, on a system such as mine that's running a macOS (13.7)
older that the SDK to which the `MacOSX.sdk` symlink points (14.2), it can
sometimes matter. (I guess my kind-of-old Intel iMac is running the latest
supported OS for its hardware; otherwise, I would have been prompted to
upgrade.)
When you build, do you build against ''only'' when CLT is installed? Or
the full Xcode? Also from experience, it can make a difference.
Just for the heck of it, I reinstalled CLT 15.1, but now that the clang-19
binaries have been built, I get those installed instead --- which work. So
I guess I'm personally fine for now.
--
Ticket URL: <https://trac.macports.org/ticket/71053#comment:14>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list