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

MacPorts noreply at macports.org
Tue Oct 8 17:29:46 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):

 FYI, I've since discovered it's not just the headers it can't find.  If I
 compile a trivial program that includes nothing, e.g.

 {{{
 int main() {
 }
 }}}

 I get:

 {{{
 $ clang foo.c
 ld: library 'System' not found
 clang: error: linker command failed with exit code 1 (use -v to see
 invocation)
 }}}

 The output with {{{-v}}} is:

 {{{
 clang version 19.1.1
 Target: x86_64-apple-darwin22.6.0
 Thread model: posix
 InstalledDir: /opt/local/libexec/llvm-19/bin
  "/opt/local/libexec/llvm-19/bin/clang" -cc1 -triple x86_64-apple-
 macosx13.0.0 -Wundef-prefix=TARGET_OS_ -Werror=undef-prefix -Wdeprecated-
 objc-isa-usage -Werror=deprecated-objc-isa-usage -emit-obj -dumpdir a-
 -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-
 value-names -main-file-name foo.c -mrelocation-model pic -pic-level 2
 -mframe-pointer=all -ffp-contract=on -fno-rounding-math -funwind-tables=2
 -fcompatibility-qualified-id-block-type-checking -fvisibility-inlines-
 hidden-static-local-var -fbuiltin-headers-in-system-modules -fdefine-
 target-os-macros -target-cpu penryn -tune-cpu generic -debugger-
 tuning=lldb -fdebug-compilation-dir=/tmp -target-linker-version 1022.1 -v
 -fcoverage-compilation-dir=/tmp -resource-dir
 /opt/local/libexec/llvm-19/lib/clang/19 -internal-isystem
 /usr/local/include -internal-isystem
 /opt/local/libexec/llvm-19/lib/clang/19/include -internal-externc-isystem
 /usr/include -std=c23 -ferror-limit 19 -stack-protector 1 -fblocks
 -fencode-extended-block-signature -fregister-global-dtors-with-atexit
 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -fmax-type-align=16 -fcolor-
 diagnostics -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o
 /var/folders/1z/zglqg15d0v1ccgml070ydxs00000gn/T/foo-d381f6.o -x c foo.c
 clang -cc1 version 19.1.1 based upon LLVM 19.1.1 default target x86_64
 -apple-darwin22.6.0
 ignoring nonexistent directory "/usr/include"
 #include "..." search starts here:
 #include <...> search starts here:
  /usr/local/include
  /opt/local/libexec/llvm-19/lib/clang/19/include
  /System/Library/Frameworks (framework directory)
  /Library/Frameworks (framework directory)
 End of search list.
  "/opt/local/libexec/llvm-19/bin/ld" -demangle -lto_library
 /opt/local/libexec/llvm-19/lib/libLTO.dylib -no_deduplicate -dynamic -arch
 x86_64 -platform_version macos 13.0.0 13.0.0 -mllvm -enable-linkonceodr-
 outlining -o a.out /var/folders/1z/zglqg15d0v1ccgml070ydxs00000gn/T/foo-
 d381f6.o -lSystem
 /opt/local/libexec/llvm-19/lib/clang/19/lib/darwin/libclang_rt.osx.a}}}

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


More information about the macports-tickets mailing list