[MacPorts] #72503: nodejs22 doesn't build with Xcode 13.2 tools installed: clang++ never updates to clang++-mp-17
MacPorts
noreply at macports.org
Mon May 19 03:21:46 UTC 2025
#72503: nodejs22 doesn't build with Xcode 13.2 tools installed: clang++ never
updates to clang++-mp-17
------------------------+--------------------
Reporter: mhjacobson | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Keywords: | Port:
------------------------+--------------------
On macOS Big Sur 11.7.10 20G1427, with the Xcode 13.2 command-line tools
installed, nodejs22 fails to build. AFAICT, here is what happens:
0. `configure.compiler` initially resolves to `clang`
1. In the Portfile, line 73 says:
# suppress a warning-as-error that shows up with newer clang compilers
if {[string match *clang* ${configure.compiler}]} {
configure.cxx-append -Wno-error=enum-constexpr-conversion
#the ventura buildbot will fail because it doesn't recognise this
flag
#so we disable unknown warnings as errors for older compilers
configure.cxx-append -Wno-error=unknown-warning-option
}
which goes ahead and resolves `configure.cxx` to `/usr/bin/clang`
2. Later in the Portfile, line 161 does:
# The Node.js docs says it requires "Xcode >= 13 (Apple LLVM >= 12)" [1]
# and accordingly the compile fails on macOS 11.7 Big Sur with Xcode's
# clang. However, bumping the requirement for clang 1400 or greater
# gets it to successfully compile.
# [1] https://github.com/nodejs/node/blob/v22.x/BUILDING.md#supported-
toolchains
compiler.blacklist-append {clang < 1400}
This causes `configure.compiler` to be re-evaluated to `macports-
clang-17`.
3. However, it's too late: step #2 already baked in `/usr/bin/clang++`.
4. Node.js 22 fails to build with the clang++ from Xcode 13.2, because its
libc++ headers don't support std::shared_ptr of array type (since fixed
here: <https://reviews.llvm.org/D80882>).
I suspect this was broken by commit
eb8d9a670797a8f6b569675576844aaba007356f.
--
Ticket URL: <https://trac.macports.org/ticket/72503>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list