Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 913474

Summary: net-libs/nodejs-20.5.1: fails to compile (MUSL-CLANG18): implicit instantiation of undefined template 'std::char_traits<unsigned short>'
Product: Gentoo Linux Reporter: hugegameartgd
Component: Current packagesAssignee: William Hubbs <williamh>
Status: RESOLVED FIXED    
Severity: normal CC: herrtimson, hugegameartgd
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
See Also: https://chromium-review.googlesource.com/c/v8/v8/+/4823404
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log

Description hugegameartgd 2023-09-01 19:50:59 UTC
net-libs/nodejs-20.5.1 fails to compile with LLVM 18 (musl/clang/merged-usr)


Reproducible: Always

Steps to Reproduce:
- Compile with `emerge --ask --oneshot =nodejs-20.5.1::gentoo --usepkg=n`
(or unofficial clang-musl overlay https://github.com/clang-musl-overlay/clang-musl-overlay/tree/master/net-libs/nodejs )
Actual Results:  
See build.log

Expected Results:  
Not reproducible with LLVM 16

Portage 3.0.51 (python 3.11.5-final-0, default/linux/amd64/23.0/musl/llvm, gcc-14, musl-1.2.4, 6.4.7-gentoo-dist x86_64)
=================================================================
System uname: Linux-6.4.7-gentoo-dist-x86_64-Intel-R-_Core-TM-_i5-7200U_CPU_@_2.50GHz-with-libc
KiB Mem:     8009532 total,    713120 free
KiB Swap:   41943036 total,  35137020 free
Timestamp of repository gentoo: Fri, 01 Sep 2023 09:31:51 +0000
Head commit of repository gentoo: d2fb49244efb170bba4a8a123bc67070eba83303

Head commit of repository 12101111-overlay: 501f25f9aa55dc9a0d82501deea12dc373e06085

Timestamp of repository Miezhiko: Fri, 01 Sep 2023 06:31:47 +0000
Head commit of repository Miezhiko: 98cce3b756a986f56b7b70ab3d9eca511e79d74a

Timestamp of repository booboo: Thu, 31 Aug 2023 13:46:45 +0000
Head commit of repository booboo: 9ac97ee48c9b857eb7d5f0addc0edeff63382a5b

Head commit of repository clang-musl: c23b04a8690e1a5d8b19050f1199e01f29136488

Timestamp of repository crossdev: Sun, 20 Jun 2021 21:41:33 +0000
Head commit of repository crossdev: 7c86f8ca262ff27fe4fb1965d8f8fef19f77a3bb

Timestamp of repository guru: Wed, 30 Aug 2023 05:50:03 +0000
Head commit of repository guru: 60584733ba11b2cb28f7e7c2c89185f033456427

Timestamp of repository haskell: Wed, 30 Aug 2023 08:31:48 +0000
Head commit of repository haskell: efcee59fa244a86a5fd9d865ed746dc829e6719a

Timestamp of repository kde: Sun, 27 Aug 2023 21:02:23 +0000
Head commit of repository kde: 0584a0495be19f6205284eefbbf443e4a4014c36

Timestamp of repository liftm: Tue, 29 Aug 2023 15:50:57 +0000
Head commit of repository liftm: 5e29dbbc6def523eca839066c0eea09e0b6ac31a

Timestamp of repository musl: Wed, 30 Aug 2023 08:01:49 +0000
Head commit of repository musl: aebb3748a3d9d20cc155e5bb2ef720936e3dcc86

Timestamp of repository mv: Sat, 26 Aug 2023 15:31:38 +0000
Head commit of repository mv: a86fa27543b760de27b9cb642e00980468248182

Timestamp of repository mva: Wed, 23 Aug 2023 07:46:39 +0000
Head commit of repository mva: f5894850db5a1e0fbc6fa135bca06cb3eaf3ff4f

Timestamp of repository piniverlay: Wed, 23 Aug 2023 07:46:47 +0000
Head commit of repository piniverlay: 8794dca69e37fa982974dfb9e0ab0429e76b44e0

Timestamp of repository qt: Sun, 27 Aug 2023 11:31:29 +0000
Head commit of repository qt: 7bc7e29896da53f248bbf9e6e7218c36efd75785

Timestamp of repository reagentoo: Sat, 25 Feb 2023 06:47:18 +0000
Head commit of repository reagentoo: 54e947ecc261d96225ff710da98a5a74a0cebdaa

Timestamp of repository src_prepare-overlay: Thu, 31 Aug 2023 17:16:51 +0000
Head commit of repository src_prepare-overlay: d997d8e416b5bee18129c5c4c8433680d9cc10f6

Timestamp of repository stefantalpalaru: Wed, 30 Aug 2023 15:01:52 +0000
Head commit of repository stefantalpalaru: 8d91598ee7aaba8415ce2bcba5538bac08ecb100

Timestamp of repository tatsh-overlay: Fri, 25 Aug 2023 09:16:30 +0000
Head commit of repository tatsh-overlay: a0b49fe404c4dc50b904160fc5fd40b4e4dfb125

Head commit of repository toolchain-clang: eb2a48b8ac462b0d93a1fb66e1373d1c35b9761d

Timestamp of repository torbrowser: Wed, 30 Aug 2023 10:01:52 +0000
Head commit of repository torbrowser: 34a36ed7e305ec6774c85c4bb5c5a3970e92f413

Head commit of repository vimproved: 885d1433b407c3adec4ea72c86149e5ad3c60c77

Head commit of repository vimproved-exp: f2a162167e333ebf34f3ca938411602fd12caa74

sh bash 5.2_p15-r6
ld LLD 16.0.6 (compatible with GNU linkers)
ccache version 4.8.3 [enabled]
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p15-r6::gentoo
dev-lang/perl:             5.38.0-r1::gentoo
dev-lang/python:           2.7.18_p112::stefantalpalaru, 3.10.13::gentoo, 3.11.5::gentoo, 3.12.0_rc1_p6::gentoo
dev-lang/rust:             1.72.0::clang-musl
dev-util/ccache:           4.8.3::gentoo
dev-util/cmake:            3.27.4::gentoo
dev-util/meson:            1.2.1-r1::gentoo
sys-apps/baselayout:       2.14::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-apps/systemd:          253.7::12101111-overlay
sys-devel/autoconf:        2.13-r8::gentoo, 2.71-r7::gentoo
sys-devel/automake:        1.16.5-r1::gentoo
sys-devel/binutils:        2.41-r1::12101111-overlay
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           15.0.7-r3::gentoo, 16.0.6::gentoo, 18.0.0_pre20230829::gentoo
sys-devel/gcc:             14.0.0_pre20230820::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/lld:             16.0.6::gentoo, 18.0.0_pre20230829::gentoo
sys-devel/llvm:            15.0.7-r3::12101111-overlay, 16.0.6::clang-musl, 18.0.0_pre20230829::gentoo
sys-devel/make:            4.4.1-r1::gentoo
sys-kernel/linux-headers:  6.5::gentoo (virtual/os-headers)
sys-libs/musl:             1.2.4::12101111-overlay
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: -1000
    volatile: False

12101111-overlay
    location: /var/db/repos/12101111-overlay
    sync-type: git
    sync-uri: https://github.com/12101111/overlay.git
    masters: gentoo
    volatile: False

Miezhiko
    location: /var/db/repos/Miezhiko
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/Miezhiko.git
    masters: gentoo
    volatile: False

booboo
    location: /var/db/repos/booboo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/booboo.git
    masters: gentoo
    volatile: False

clang-musl
    location: /var/db/repos/clang-musl
    sync-type: git
    sync-uri: https://github.com/clang-musl-overlay/clang-musl-overlay.git
    masters: gentoo
    volatile: False

crossdev
    location: /var/db/repos/crossdev
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/crossdev.git
    masters: gentoo
    volatile: False

guru
    location: /var/db/repos/guru
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/guru.git
    masters: gentoo
    volatile: False

haskell
    location: /var/db/repos/haskell
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/haskell.git
    masters: gentoo
    volatile: False

kde
    location: /var/db/repos/kde
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/kde.git
    masters: gentoo
    volatile: False

liftm
    location: /var/db/repos/liftm
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/liftm.git
    masters: gentoo
    volatile: False

musl
    location: /var/db/repos/musl
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/musl.git
    masters: gentoo
    volatile: False

mv
    location: /var/db/repos/mv
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/mv.git
    masters: gentoo
    volatile: False

mva
    location: /var/db/repos/mva
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/mva.git
    masters: gentoo
    volatile: False

piniverlay
    location: /var/db/repos/piniverlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/piniverlay.git
    masters: gentoo
    volatile: False

qt
    location: /var/db/repos/qt
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/qt.git
    masters: gentoo
    volatile: False

reagentoo
    location: /var/db/repos/reagentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/reagentoo.git
    masters: gentoo
    volatile: False

src_prepare-overlay
    location: /var/db/repos/src_prepare-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/src_prepare-overlay.git
    masters: gentoo
    volatile: False

stefantalpalaru
    location: /var/db/repos/stefantalpalaru
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/stefantalpalaru.git
    masters: gentoo
    volatile: False

tatsh-overlay
    location: /var/db/repos/tatsh-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/tatsh-overlay.git
    masters: gentoo
    volatile: False

toolchain-clang
    location: /var/db/repos/toolchain-clang
    sync-type: git
    sync-uri: https://github.com/LinuxUserGD/toolchain-clang.git
    masters: gentoo
    volatile: False

torbrowser
    location: /var/db/repos/torbrowser
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/torbrowser.git
    masters: gentoo
    volatile: False

vimproved
    location: /var/db/repos/vimproved
    sync-type: git
    sync-uri: https://codeberg.org/vimproved/overlay
    masters: gentoo
    volatile: False

vimproved-exp
    location: /var/db/repos/vimproved-exp
    sync-type: git
    sync-uri: https://codeberg.org/vimproved/overlay-exp.git
    masters: gentoo guru haskell vimproved
    volatile: False

Installed sets: @kde-plasma
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE"
ADDR2LINE="llvm-addr2line"
AR="llvm-ar"
AS="clang -c"
CBUILD="x86_64-gentoo-linux-musl"
CC="clang"
CFLAGS="-O3 -pipe -march=native -mtune=native -D_FORTIFY_SOURCE=3 -g0 -flto -D_LARGEFILE64_SOURCE"
CHOST="x86_64-gentoo-linux-musl"
CONFIG_PROTECT="/etc /usr/lib/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d"
CPP="clang-cpp"
CXX="clang++"
CXXFLAGS="-O3 -pipe -march=native -mtune=native -D_FORTIFY_SOURCE=3 -g0 -flto -D_LARGEFILE64_SOURCE -stdlib=libc++"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS=" --buildpkg --usepkg"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O3 -pipe -march=native -mtune=native -D_FORTIFY_SOURCE=3 -g0 -flto -D_LARGEFILE64_SOURCE"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg buildpkg-live ccache config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync news parallel-fetch preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O3 -pipe -march=native -mtune=native -D_FORTIFY_SOURCE=3 -g0 -flto -D_LARGEFILE64_SOURCE"
GENTOO_MIRRORS="http://ftp.gwdg.de/pub/linux/gentoo/     http://ftp.uni-stuttgart.de/gentoo-distfiles/     http://ftp.uni-hannover.de/gentoo/"
INSTALL_MASK="charset.alias /usr/share/locale/locale.alias"
LANG="C.UTF8"
LD="ld.mold"
LDFLAGS="-O3 -pipe -march=native -mtune=native -D_FORTIFY_SOURCE=3 -g0 -flto -D_LARGEFILE64_SOURCE  -Wl,-O3 -Wl,--as-needed -Wl,--thread-count=4 -Wl,--strip-debug -Wl,--undefined-version -Wl,--icf=safe -Wl,--compress-debug-sections=zstd -fuse-ld=mold -rtlib=compiler-rt -unwindlib=libunwind"
LEX="flex"
LINGUAS="de"
MAKEOPTS="-j4"
NM="llvm-nm"
OBJCOPY="llvm-objcopy"
OBJDUMP="llvm-objdump"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
RANLIB="llvm-ranlib"
READELF="llvm-readelf"
SHELL="/bin/bash"
STRINGS="llvm-strings"
STRIP="llvm-strip"
USE="X acl alsa amd64 apparmor binutils-plugin bzip2 cairo cet clang compiler-rt compress crossdev-mingw crypt dbus default-clang default-compiler-rt default-libcxx default-libunwind default-lld default-llvm eds egl gles2 graphite gstreamer gtk gtk3 hardened iconv icu ipv6 jemalloc libcxx liblc3 libtirpc libunwind lld llvm llvm-libunwind lto lzip lzma mingw modula2 mold ncurses networkmanager nls nptl opencl opengl openh264 openmp opus pam panel-plugin pcre pic pipewire pipewire-alsa policykit portmidi portsmf pulseaudio qt6 readline rust sanitize sdl seccomp sound-server ssl static-user svg system-bootstrap system-llvm systemd test-rust threads tpm udev unicode upower vaapi verify-sig vulkan wasi wasm wayland wifi xattr xvid zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="musl" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_12 python3_11" QEMU_SOFTMMU_TARGETS="x86_64 aarch64 ppc" QEMU_USER_TARGETS="x86_64 aarch64 ppc" RUBY_TARGETS="ruby32" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ARFLAGS, ASFLAGS, CCLD, CONFIG_SHELL, CPPFLAGS, CTARGET, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, LC_ALL, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS, SIZE, YACC, YFLAGS
Comment 1 hugegameartgd 2023-09-01 19:54:39 UTC
Created attachment 869173 [details]
build.log
Comment 2 hugegameartgd 2023-09-14 00:32:22 UTC
Should be temporarily fixed by https://github.com/llvm/llvm-project/commit/cce062d226ba91c634f52ef00e1086f38c829d3a for next llvm-18 snapshot
Comment 3 hugegameartgd 2024-02-05 16:31:16 UTC
Seems to be fixed upstream with nodejs-21.6.1 (pg_overlay) and clang-19.0.0_pre20240203 (https://github.com/llvm/llvm-project/commit/c3668779c13596e223c26fbd49670d18cd638c40).
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-02-05 16:32:30 UTC
(In reply to hugegameartgd from comment #3)
> Seems to be fixed upstream with nodejs-21.6.1 (pg_overlay) and
> clang-19.0.0_pre20240203
> (https://github.com/llvm/llvm-project/commit/
> c3668779c13596e223c26fbd49670d18cd638c40).

It's not really fixed for our purposes until it's fixed in ::Gentoo.
Comment 5 hugegameartgd 2024-02-05 23:53:22 UTC
For <nodejs-21.0.0 applying https://github.com/nodejs/node/commit/4ad3479ba7f01415c3cbdcbec0e617c6085002d8 might fix the build errors