[MacPorts] #70750: MacOS Sequoia: C++ headers are not found with CLTs installed
MacPorts
noreply at macports.org
Wed Sep 18 07:49:40 UTC 2024
#70750: MacOS Sequoia: C++ headers are not found with CLTs installed
-----------------------+---------------------
Reporter: SaintBol | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords: sequoia
Port: |
-----------------------+---------------------
Comment (by reneeotten):
Replying to [comment:5 neverpanic]:
> Looks to me like a bug in the Command Line Tools:
On Sequoia with updated XCode and CLT I see:
{{{
❯ cat testiostream.cc
#include <iostream>
using namespace std;
int main (int argc, char *argv[]) {
cout << "foooooo\n";
}
❯ export DEVELOPER_DIR='/Library/Developer/CommandLineTools'
❯ which clang++
/usr/bin/clang++
❯ clang++ -v testiostream.cc
Apple clang version 16.0.0 (clang-1600.0.26.3)
Target: x86_64-apple-darwin24.0.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
ignoring nonexistent directory
"/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1"
"/Library/Developer/CommandLineTools/usr/bin/clang" -cc1 -triple x86_64
-apple-macosx15.0.0 -Wundef-prefix=TARGET_OS_ -Wdeprecated-objc-isa-usage
-Werror=deprecated-objc-isa-usage -Werror=implicit-function-declaration
-emit-obj -mrelax-all -dumpdir a- -disable-free -clear-ast-before-backend
-disable-llvm-verifier -discard-value-names -main-file-name
testiostream.cc -mrelocation-model pic -pic-level 2 -mframe-pointer=all
-fno-strict-return -ffp-contract=on -fno-rounding-math -funwind-tables=2
-target-sdk-version=15.0 -fvisibility-inlines-hidden-static-local-var
-fno-modulemap-allow-subdirectory-search -target-cpu penryn -tune-cpu
generic -debugger-tuning=lldb -target-linker-version 1115.7.3 -v
-fcoverage-compilation-dir=/Users/renee -resource-dir
/Library/Developer/CommandLineTools/usr/lib/clang/16 -isysroot
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include
-internal-isystem
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1
-internal-isystem
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/local/include
-internal-isystem
/Library/Developer/CommandLineTools/usr/lib/clang/16/include -internal-
externc-isystem
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -internal-
externc-isystem /Library/Developer/CommandLineTools/usr/include -Wno-
reorder-init-list -Wno-implicit-int-float-conversion -Wno-c99-designator
-Wno-final-dtor-non-final-class -Wno-extra-semi-stmt -Wno-misleading-
indentation -Wno-quoted-include-in-framework-header -Wno-implicit-
fallthrough -Wno-enum-enum-conversion -Wno-enum-float-conversion -Wno-
elaborated-enum-base -Wno-reserved-identifier -Wno-gnu-folding-constant
-fdeprecated-macro -fdebug-compilation-dir=/Users/renee -ferror-limit 19
-stack-protector 1 -fstack-check -mdarwin-stkchk-strong-link -fblocks
-fencode-extended-block-signature -fregister-global-dtors-with-atexit
-fgnuc-version=4.2.1 -fno-cxx-modules -fcxx-exceptions -fexceptions -fmax-
type-align=16 -fcommon -fcolor-diagnostics -clang-vendor-
feature=+disableNonDependentMemberExprInCurrentInstantiation -fno-odr-
hash-protocols -clang-vendor-feature=+enableAggressiveVLAFolding -clang-
vendor-feature=+revert09abecef7bbf -clang-vendor-feature=+thisNoAlignAttr
-clang-vendor-feature=+thisNoNullAttr -clang-vendor-
feature=+disableAtImportPrivateFrameworkInImplementationError
-D__GCC_HAVE_DWARF2_CFI_ASM=1 -o
/var/folders/qn/5bwbztqn3kqd3sd888hb_llm0000gn/T/testiostream-21103f.o -x
c++ testiostream.cc
clang -cc1 version 16.0.0 (clang-1600.0.26.3) default target x86_64-apple-
darwin24.0.0
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory
"/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/local/include"
ignoring nonexistent directory
"/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1
/Library/Developer/CommandLineTools/usr/lib/clang/16/include
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
/Library/Developer/CommandLineTools/usr/include
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks
(framework directory)
End of search list.
"/Library/Developer/CommandLineTools/usr/bin/ld" -demangle -lto_library
/Library/Developer/CommandLineTools/usr/lib/libLTO.dylib -no_deduplicate
-dynamic -arch x86_64 -platform_version macos 15.0.0 15.0 -syslibroot
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -mllvm -enable-
linkonceodr-outlining -o a.out -L/usr/local/lib
/var/folders/qn/5bwbztqn3kqd3sd888hb_llm0000gn/T/testiostream-21103f.o
-lc++ -lSystem
/Library/Developer/CommandLineTools/usr/lib/clang/16/lib/darwin/libclang_rt.osx.a
}}}
the directory is present in the include and so far all ports are
installing just fine (the `port migrate` is still running as we speak).
As suggested by Josh in the e-mail thread here some additional info that
perhaps could be helpful:
{{{
❯ pkgutil --pkg-
info=com.apple.pkg.{CLTools_Executables,CLTools_Base,DeveloperToolsCLI,DeveloperToolsCLILeo}
2>/dev/null | sed -n 's/^version: //p'
16.0.0.0.1.1724870825
❯ sh -c 'echo "macOS $(sw_vers -productVersion) $(sw_vers -buildVersion)
$(uname -m)"; xcode=$(xcodebuild -version 2>/dev/null); if [ $? == 0 ];
then echo "$(echo "$xcode" | awk '\''NR==1{x=$0}END{print x" "$NF}'\'')";
else echo "Command Line Tools $(pkgutil --pkg-
info=com.apple.pkg.CLTools_Executables | awk '\''/version:/ {print
$2}'\'')"; fi' | tee /dev/tty
macOS 15.0 24A335 x86_64
Command Line Tools 16.0.0.0.1.1724870825
}}}
--
Ticket URL: <https://trac.macports.org/ticket/70750#comment:20>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list