Opened 3 months ago
Last modified 3 months ago
#71551 assigned defect
nodejs22 @22.12.0_0: error: invalid value 'gnu++20' in '-std=gnu++20'
Reported by: | axoide (cborg) | Owned by: | ci42 |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.10.5 |
Keywords: | mojave | Cc: | Schamschula (Marius Schamschula), akimd (Akim Demaille), contextnerror |
Port: | nodejs22 |
Description
After running the command "sudo port upgrade outdated", nodejs port update failed.
-nR upgade --force, clean, uninstall and re-install nodejs22 did not solve the problem. Here is the error message in the terminal:
Error: Failed to build nodejs22: command execution failed
See the attached log file
- macOS Mojave 10.14.6
- Xcode 11.3.1 (11C505)
Attachments (1)
Change History (10)
Changed 3 months ago by axoide (cborg)
Attachment: | main.log.zip added |
---|
comment:1 Changed 3 months ago by jmroot (Joshua Root)
Owner: | set to ci42 |
---|---|
Status: | new → assigned |
comment:2 Changed 3 months ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | mojave added |
---|---|
Summary: | nodejs22 @22.12.0_0 : Failed to build nodejs22: command execution failed → nodejs22 @22.12.0_0: error: invalid value 'gnu++20' in '-std=gnu++20' |
The error in the log is:
:info:build error: invalid value 'gnu++20' in '-std=gnu++20' :info:build note: use 'c++98' or 'c++03' for 'ISO C++ 1998 with amendments' standard :info:build note: use 'gnu++98' or 'gnu++03' for 'ISO C++ 1998 with amendments and GNU extensions' standard :info:build note: use 'c++11' for 'ISO C++ 2011 with amendments' standard :info:build note: use 'gnu++11' for 'ISO C++ 2011 with amendments and GNU extensions' standard :info:build note: use 'c++14' for 'ISO C++ 2014 with amendments' standard :info:build note: use 'gnu++14' for 'ISO C++ 2014 with amendments and GNU extensions' standard :info:build note: use 'c++17' for 'ISO C++ 2017 with amendments' standard :info:build note: use 'gnu++17' for 'ISO C++ 2017 with amendments and GNU extensions' standard :info:build note: use 'c++2a' for 'Working draft for ISO C++ 2020' standard :info:build note: use 'gnu++2a' for 'Working draft for ISO C++ 2020 with GNU extensions' standard
This is surprising. MacPorts has chosen MacPorts clang 17 and according to CompilerSelection MacPorts clang 16 and later (and Apple clang 15 and later) support C++20.
The port says compiler.cxx_standard 2017
. If it now requires C++20 that line should change to 2020
but that won't fix this problem.
The log shows that it is using MacPorts clang 17 as the C compiler but Xcode clang as the C++ compiler. Fixing that should fix the problem.
comment:3 Changed 3 months ago by Schamschula (Marius Schamschula)
Cc: | Schamschula added |
---|
comment:4 Changed 3 months ago by akimd (Akim Demaille)
I have a different issue. I don't understand why it's looking for cstring with a C compiler.
:info:build /usr/bin/clang -o /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_nodejs22/nodejs22/work/node-v22.12.0/out/Release/obj.target/libuv/deps/uv/src/timer.o ../deps/uv/src/timer.c '-D_GLIBCXX_USE_CXX11_ABI=1' '-DNODE_OPENSSL_CONF_NAME=nodejs_conf' '-DNODE_OPENSSL_HAS_QUIC' '-DICU_NO_USER_DATA_OVERRIDE' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_DARWIN_C_SOURCE=1' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D_DARWIN_UNLIMITED_SELECT=1' -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_nodejs22/nodejs22/work/zlib-inc -I../deps/uv/include -I../deps/uv/src -O3 -gdwarf-2 -fno-strict-aliasing -fvisibility=hidden -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -Wall -Wextra -Wno-unused-parameter -Wstrict-prototypes -g --std=gnu89 -MMD -MF /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_nodejs22/nodejs22/work/node-v22.12.0/out/Release/.deps//opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_nodejs22/nodejs22/work/node-v22.12.0/out/Release/obj.target/libuv/deps/uv/src/timer.o.d.raw -I/opt/local/include -Os -I/opt/local/include -c :info:build In file included from ../deps/simdutf/simdutf.cpp:3: :info:build ../deps/simdutf/simdutf.h:5:10: fatal error: 'cstring' file not found :info:build 5 | #include <cstring> :info:build | ^~~~~~~~~ :info:build 1 error generated.
comment:5 Changed 3 months ago by akimd (Akim Demaille)
(I'm on Sonoma 14.7.1, with mac ports 2.10.5)
comment:6 Changed 3 months ago by akimd (Akim Demaille)
I fully reinstalled Xcode, and it fixed all my issues (with boost176, nodejs22, mysql8).
comment:7 Changed 3 months ago by ryandesign (Ryan Carsten Schmidt)
Cc: | akimd added |
---|
@akimd, your problem was ProblemHotlist#clts16, unrelated to this ticket.
comment:9 Changed 3 months ago by contextnerror
Cc: | contextnerror added |
---|
Log file