Opened 6 weeks ago
Closed 6 weeks ago
#71061 closed defect (duplicate)
Cmake-boostrap is not finding proper compiler on system -> LLVM Clang cmake failind to build
Reported by: | Behinder (behinder) | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.10.2 |
Keywords: | sonoma | Cc: | |
Port: | cmake-bootstrap |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
Trying to build cmake I encountered lot of errors as the compiler was not able to find includes. I used https://cmichel.io/fixing-cpp-compilation-bugs-for-the-mac-os-catalina-upgrade/ trying to solve the problem and I added necessary paths however without llvm because I don't have it installed yet and I cannot install it because cmake build is failing.
I am attaching debug.log for reference. Key parts are IMO:
cmake-bootstrap has no conflicts DEBUG: Executing org.macports.main (cmake-bootstrap) DEBUG: dropping privileges: euid changed to 502, egid changed to 501. DEBUG: Privilege de-escalation not attempted as not running as root. DEBUG: archivefetch phase started at Tue Oct 8 15:29:52 CEST 2024
how can I run something not as root if I did sudo
? Misleading.. AND
CMake 3.9.6, Copyright 2000-2017 Kitware, Inc. and Contributors C compiler on this system is: /usr/bin/clang -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch arm64 -std=gnu11 --------------------------------------------- Error when bootstrapping CMake: Cannot find appropriate C++ compiler on this system. Please specify one using environment variable CXX. See cmake_bootstrap.log for compilers attempted.
How can it not find proper C++ compiler on this system if in the log variable is set CXX='/usr/bin/clang++'
and clang++ --version
gives:
/usr/bin/clang++ --version Apple clang version 15.0.0 (clang-1500.3.9.4) Target: arm64-apple-darwin23.6.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
I set up MacPorts to always compile from source everything. And I was able to install few packages without problems. Here the list:
apr @1.7.4_0 (active) argon2 @20190702_1 (active) autoconf @2.72_0 (active) automake @1.17_0 (active) bison @3.8.2_2 (active) bison-runtime @3.8.2_0 (active) bzip2 @1.0.8_0 (active) cctools @949.0.1_3+xcode (active) clang_select @2.4_0 (active) curl-ca-bundle @8.10.1_0 (active) expat @2.6.3_0 (active) fzf @0.55.0_0 (active) gdbm @1.24_0 (active) gettext @0.22.5_0 (active) gettext-runtime @0.22.5_0 (active) gettext-tools-libs @0.22.5_0 (active) go @1.23.1_0 go @1.23.2_0 (active) gperf @3.1_0 (active) ld64 @3_6+ld64_xcode (active) ld64-xcode @2_6 (active) libcxx @5.0.1_5 (active) libedit @20240808-3.1_0 (active) libffi @3.4.6_1 (active) libiconv @1.17_0 (active) libtextstyle @0.22.5_0 (active) libtool @2.4.7_4 libtool @2.5.3_0 (active) llvm_select @2_1 (active) lzo2 @2.10_0 (active) m4 @1.4.19_1 (active) mhash @0.9.9.9_1 (active) nasm @2.16.03_0 (active) ncurses @6.5_0 (active) nghttp2 @1.63.0_0 (active) openssl @3_20 (active) openssl3 @3.3.2_0 (active) pcre2 @10.44_0 (active) php_select @1.0_1 (active) pkgconfig @0.29.2_0 (active) python3_select @0.1_0 (active) python3_select-312 @0.1_1 (active) python312 @3.12.6_0+lto+optimizations python312 @3.12.7_0+lto+optimizations (active) python_select @0.3_10 (active) python_select-312 @0.3_1 (active) readline @8.2.013_0 (active) sqlite3 @3.46.1_0 (active) vim @9.1.0000_0+huge (active) x264 @20191217_0 (active) xz @5.4.7_0 (active) zlib @1.3.1_0 (active) zsh @5.9_3 (active
Attachments (1)
Change History (5)
Changed 6 weeks ago by Behinder (behinder)
comment:1 Changed 6 weeks ago by jmroot (Joshua Root)
Keywords: | cmake clang llvm removed |
---|
comment:2 Changed 6 weeks ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|---|
Keywords: | sonoma added |
Priority: | High → Normal |
The log shows you have command line tools 16 so this sounds like #70750. Try the solution at ProblemHotlist#clts16.
comment:3 follow-up: 4 Changed 6 weeks ago by Behinder (behinder)
Problem is solved for now.
Apparently something scary is done during migration after upgrade to another OS version.
I had to remove from .zshrc lines
`
export CPLUS_INCLUDE_PATH=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
export LIBRARY_PATH=$LIBRARY_PATH:/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib
`
that alone did not solve the problem so I removed xcode-command line tools and reinstalled them again, next back and fort selected not command line tools folder but Xcode.app/ , removed symlink to SDK 14.4 changed to 14.5 and then first simple test program compiled without errors and later cmake and clang and llvm went without problem. I have no idea what was wrong.
Anyway when installing cmake, one dependecy libpsl still relies on python 3.10 which is not necessary. I committed change to 3.12
comment:4 Changed 6 weeks ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Replying to Behinder:
I have no idea what was wrong.
Probably ProblemHotlist#clts16, as I mentioned above.
libpsl still relies on python 3.10 which is not necessary.
That's unrelated and already filed as #70998.
Please also attach the cmake_bootstrap.log.