[MacPorts] #71053: clang @19.1.1_0+analyzer: can't find standard headers

MacPorts noreply at macports.org
Thu Oct 10 18:37:56 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 ryandesign):

 Replying to [comment:7 paul-j-lucas]:
 > >> Apple's bastardized clang-as-gcc version
 > > That's not a thing.
 > I don't know about you, but when I do:
 >
 > {{{
 > $ gcc --version
 > Apple clang version 15.0.0 (clang-1500.1.0.2.5)
 > Target: x86_64-apple-darwin22.6.0
 > Thread model: posix
 > InstalledDir: /Library/Developer/CommandLineTools/usr/bin
 > }}}
 >
 > I'd normally expect to see what version of **gcc** is installed, not
 clang. It even says "Apple clang." But I really don't care since this
 isn't the issue.

 There were many software projects out there prior the creation of clang
 (and after) that checked to make sure they were being compiled with gcc.
 The intention of those projects was to ensure they were not being compiled
 with older pre-gcc compilers; they could not have anticipated that clang
 would later be created. So as not to break these programs, the developers
 of clang decided to have it pretend to be gcc in a variety of ways. And
 yes, on macOS, Apple also provides `gcc` as an alternative name for
 calling clang, again for the benefit of old software, or software written
 for other systems where gcc is the system compiler, that inadvisedly
 hardcode the name `gcc` in their build systems.

 The preceding does not make anything "bastardized". It is for
 interoperability.

 If you want gcc on macOS, you can install it using MacPorts. If you want
 it to be accessible by typing `gcc`, you can do that by running `sudo port
 select gcc`.

-- 
Ticket URL: <https://trac.macports.org/ticket/71053#comment:11>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list