Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 900513 - net-libs/nodejs-18.14, build failed with error, inlining failed in call to ‘always_inline’ ‘_mm256_madd_epi16’: target specific option mismatch
Summary: net-libs/nodejs-18.14, build failed with error, inlining failed in call to ‘a...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords: PATCH
: 907719 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-03-09 09:41 UTC by yves.caniou
Modified: 2023-07-09 05:56 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,76.38 KB, text/x-log)
2023-03-09 09:41 UTC, yves.caniou
Details
bug900513-simdutf.patch.xz (HblR.patch.xz,8.55 KB, application/x-xz)
2023-06-05 11:33 UTC, Sam James
Details

Note You need to log in before you can comment on or make changes to this bug.
Description yves.caniou 2023-03-09 09:41:10 UTC
Created attachment 856921 [details]
build.log

Seems similar to https://bugs.gentoo.org/893330

In the build.log:
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/immintrin.h:47,
                 from ../deps/base64/base64/lib/arch/avx2/codec.c:12:
/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/avx2intrin.h: In function ‘dec_reshuffle’:
/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/avx2intrin.h:1044:1: error: inlining failed in call to ‘always_inline’ ‘_mm256_permutevar8x32_epi32’: target specific option mismatch
 1044 | _mm256_permutevar8x32_epi32 (__m256i __X, __m256i __Y)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../deps/base64/base64/lib/arch/avx2/dec_reshuffle.c:33:16: note: called from here
   33 |         return _mm256_permutevar8x32_epi32(out, _mm256_setr_epi32(0, 1, 2, 4, 5, 6, -1, -1));
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/immintrin.h:43:
/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/avxintrin.h:1371:1: error: inlining failed in call to ‘always_inline’ ‘_mm256_setr_epi32’: target specific option mismatch
 1371 | _mm256_setr_epi32 (int __A, int __B, int __C, int __D,
      | ^~~~~~~~~~~~~~~~~
../deps/base64/base64/lib/arch/avx2/dec_reshuffle.c:33:16: note: called from here
   33 |         return _mm256_permutevar8x32_epi32(out, _mm256_setr_epi32(0, 1, 2, 4, 5, 6, -1, -1));
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/avx2intrin.h:588:1: error: inlining failed in call to ‘always_inline’ ‘_mm256_shuffle_epi8’: target specific option mismatch
  588 | _mm256_shuffle_epi8 (__m256i __X, __m256i __Y)
etc.

# emerge --info '=net-libs/nodejs-18.14.2::gentoo'
[niced emerge]
Portage 3.0.44 (python 3.10.10-final-0, default/linux/amd64/17.1/desktop/plasma, gcc-12, glibc-2.36-r5, 4.19.270-x86_64 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.19.270-x86_64-x86_64-Intel-R-_Pentium-R-_CPU_G2030_@_3.00GHz-with-glibc2.36
KiB Mem:    16356960 total,    688396 free
KiB Swap:   10485756 total,  10484980 free
Timestamp of repository gentoo: Thu, 09 Mar 2023 08:30:01 +0000
Head commit of repository gentoo: 2eda3a800b8757159d398ece9fc28c79847cb63c
sh bash 5.1_p16-r2
ld GNU ld (Gentoo 2.39 p5) 2.39.0
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.1_p16-r2::gentoo
dev-lang/perl:             5.36.0-r1::gentoo
dev-lang/python:           3.9.16_p2::gentoo, 3.10.10_p2::gentoo, 3.11.2_p1::gentoo
dev-lang/rust:             1.66.1::gentoo
dev-util/cmake:            3.25.2::gentoo
dev-util/meson:            1.0.0::gentoo
sys-apps/baselayout:       2.13-r1::gentoo
sys-apps/openrc:           0.45.2-r2::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-devel/autoconf:        2.71-r5::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.39-r4::gentoo
sys-devel/binutils-config: 5.4.1::gentoo
sys-devel/gcc:             12.2.1_p20230121-r1::gentoo
sys-devel/gcc-config:      2.8::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/llvm:            15.0.7::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  6.1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.36-r5::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    volatile: True
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: yes

MyLocalOverlay
    location: /var/db/repos/MyLocalOverlay
    masters: gentoo
    volatile: True

crossdev-armv7a
    location: /var/db/repos/localrepo-crossdev-armv7a
    masters: gentoo
    priority: 10
    volatile: True

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=ivybridge -mno-avx -mno-aes -mno-rdrnd -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /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 /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=ivybridge -mno-avx -mno-aes -mno-rdrnd -O2 -pipe"
DISTDIR="/var/cache/distfiles"
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="-march=ivybridge -mno-avx -mno-aes -mno-rdrnd -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=ivybridge -mno-avx -mno-aes -mno-rdrnd -O2 -pipe"
GENTOO_MIRRORS="ftp://ftp.free.fr/mirrors/ftp.gentoo.org/ http://ftp.free.fr/mirrors/ftp.gentoo.org/ http://gentoo.mirrors.ovh.net/gentoo-distfiles/"
LANG="fr_FR.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
MAKEOPTS="-j2"
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"
SHELL="/bin/bash"
USE="X a52 aac acl acpi activities alsa amd64 anthy bash-completion berkdb branding bzip2 cairo cdda cdr cli cpudetection crypt cups dbus declarative dri dts dvd dvdr elogind emboss encode exif fbcon ffmpeg flac fortran gdbm gif gpm gtk gui h224 h281 h323 ibus iconv icu ipv6 jpeg kde kipi kwallet lcms libglvnd libnotify libtirpc mad mng mp3 mp4 mpeg mpi multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds qml qt5 readline sdl seccomp semantic-desktop sip sound spell split-usr srtp ssl startup-notification svg tcpd test-rust tiff truetype udev udisks unicode upower usb vorbis widgets wxwidgets x264 xattr xcb xft xinerama xml xv xvid zlib" 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="mmx mmxext sse sse2" ELIBC="glibc" 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" INPUT_DEVICES="libinput" KERNEL="linux" L10N="fr en" 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="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10" RUBY_TARGETS="ruby27 ruby30" USERLAND="GNU" 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:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS


# emerge -pqv '=net-libs/nodejs-18.14.2::gentoo'
[ebuild  N    ] net-libs/nodejs-18.14.2  USE="icu npm snapshot ssl system-icu system-ssl -debug -doc -inspector -lto -pax-kernel -systemtap -test" CPU_FLAGS_X86="sse2"
Comment 1 yves.caniou 2023-05-28 18:21:16 UTC
The bug is still present within net-libs/nodejs-20.2.0:

[1467/1666] x86_64-pc-linux-gnu-gcc -MMD -MF obj/deps/base64/base64/lib/arch/avx2/base64_avx2.codec.o.d -DV8_DEPRECATION_WARNINGS -DV8_IMMINENT_DEPRECATION_WARNINGS -D_GLIBCXX_USE_CXX11_ABI=1 -DNODE_OPENSSL_CONF_NAME=nodejs_conf -DNODE_OPENSSL_CERT_STORE -DICU_NO_USER_DATA_OVERRIDE -D__STDC_FORMAT_MACROS -DBASE64_STATIC_DEFINE -DHAVE_AVX2=1 -I../../deps/base64/base64/include -I../../deps/base64/base64/lib -pthread -Wall -Wextra -Wno-unused-parameter -m64 -mavx2 -fno-omit-frame-pointer -march=ivybridge -mno-avx -mno-aes -mno-rdrnd -O2 -pipe  -c ../../deps/base64/base64/lib/arch/avx2/codec.c -o obj/deps/base64/base64/lib/arch/avx2/base64_avx2.codec.o
FAILED: obj/deps/base64/base64/lib/arch/avx2/base64_avx2.codec.o 
x86_64-pc-linux-gnu-gcc -MMD -MF obj/deps/base64/base64/lib/arch/avx2/base64_avx2.codec.o.d -DV8_DEPRECATION_WARNINGS -DV8_IMMINENT_DEPRECATION_WARNINGS -D_GLIBCXX_USE_CXX11_ABI=1 -DNODE_OPENSSL_CONF_NAME=nodejs_conf -DNODE_OPENSSL_CERT_STORE -DICU_NO_USER_DATA_OVERRIDE -D__STDC_FORMAT_MACROS -DBASE64_STATIC_DEFINE -DHAVE_AVX2=1 -I../../deps/base64/base64/include -I../../deps/base64/base64/lib -pthread -Wall -Wextra -Wno-unused-parameter -m64 -mavx2 -fno-omit-frame-pointer -march=ivybridge -mno-avx -mno-aes -mno-rdrnd -O2 -pipe  -c ../../deps/base64/base64/lib/arch/avx2/codec.c -o obj/deps/base64/base64/lib/arch/avx2/base64_avx2.codec.o
In file included from ../../deps/base64/base64/lib/arch/avx2/codec.c:14:
../../deps/base64/base64/lib/arch/avx2/dec_reshuffle.c: In function ‘dec_reshuffle’:
../../deps/base64/base64/lib/arch/avx2/dec_reshuffle.c:3:1: warning: AVX vector return without AVX enabled changes the ABI [-Wpsabi]
    3 | {
      | ^
In file included from ../../deps/base64/base64/lib/arch/avx2/codec.c:17:
../../deps/base64/base64/lib/arch/avx2/enc_reshuffle.c: In function ‘enc_reshuffle’:
../../deps/base64/base64/lib/arch/avx2/enc_reshuffle.c:2:1: note: the ABI for passing parameters with 32-byte alignment has changed in GCC 4.6
    2 | enc_reshuffle (const __m256i input)
      | ^~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/immintrin.h:47,
                 from ../../deps/base64/base64/lib/arch/avx2/codec.c:12:
/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/avx2intrin.h: In function ‘dec_reshuffle’:
/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/avx2intrin.h:1044:1: error: inlining failed in call to ‘always_inline’ ‘_mm256_permutevar8x32_epi32’: target specific option mismatch
 1044 | _mm256_permutevar8x32_epi32 (__m256i __X, __m256i __Y)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../../deps/base64/base64/lib/arch/avx2/dec_reshuffle.c:33:16: note: called from here
   33 |         return _mm256_permutevar8x32_epi32(out, _mm256_setr_epi32(0, 1, 2, 4, 5, 6, -1, -1));
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/immintrin.h:43:
/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/avxintrin.h:1380:1: error: inlining failed in call to ‘always_inline’ ‘_mm256_setr_epi32’: target specific option mismatch
 1380 | _mm256_setr_epi32 (int __A, int __B, int __C, int __D,
      | ^~~~~~~~~~~~~~~~~
../../deps/base64/base64/lib/arch/avx2/dec_reshuffle.c:33:16: note: called from here
   33 |         return _mm256_permutevar8x32_epi32(out, _mm256_setr_epi32(0, 1, 2, 4, 5, 6, -1, -1));
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/avx2intrin.h:588:1: error: inlining failed in call to ‘always_inline’ ‘_mm256_shuffle_epi8’: target specific option mismatch
  588 | _mm256_shuffle_epi8 (__m256i __X, __m256i __Y)
      | ^~~~~~~~~~~~~~~~~~~
../../deps/base64/base64/lib/arch/avx2/dec_reshuffle.c:24:15: note: called from here
   24 |         out = _mm256_shuffle_epi8(out, _mm256_setr_epi8(
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   25 |                 2, 1, 0, 6, 5, 4, 10, 9, 8, 14, 13, 12, -1, -1, -1, -1,
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   26 |                 2, 1, 0, 6, 5, 4, 10, 9, 8, 14, 13, 12, -1, -1, -1, -1));
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/avxintrin.h:1399:1: error: inlining failed in call to ‘always_inline’ ‘_mm256_setr_epi8’: target specific option mismatch
 1399 | _mm256_setr_epi8  (char __q31, char __q30, char __q29, char __q28,
      | ^~~~~~~~~~~~~~~~
../../deps/base64/base64/lib/arch/avx2/dec_reshuffle.c:24:15: note: called from here
   24 |         out = _mm256_shuffle_epi8(out, _mm256_setr_epi8(
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   25 |                 2, 1, 0, 6, 5, 4, 10, 9, 8, 14, 13, 12, -1, -1, -1, -1,
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   26 |                 2, 1, 0, 6, 5, 4, 10, 9, 8, 14, 13, 12, -1, -1, -1, -1));
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/avx2intrin.h:341:1: error: inlining failed in call to ‘always_inline’ ‘_mm256_madd_epi16’: target specific option mismatch
  341 | _mm256_madd_epi16 (__m256i __A, __m256i __B)
      | ^~~~~~~~~~~~~~~~~
../../deps/base64/base64/lib/arch/avx2/dec_reshuffle.c:17:23: note: called from here
   17 |         __m256i out = _mm256_madd_epi16(merge_ab_and_bc, _mm256_set1_epi32(0x00011000));
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/avxintrin.h:1335:1: error: inlining failed in call to ‘always_inline’ ‘_mm256_set1_epi32’: target specific option mismatch
 1335 | _mm256_set1_epi32 (int __A)
      | ^~~~~~~~~~~~~~~~~
../../deps/base64/base64/lib/arch/avx2/dec_reshuffle.c:17:23: note: called from here
   17 |         __m256i out = _mm256_madd_epi16(merge_ab_and_bc, _mm256_set1_epi32(0x00011000));
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/avx2intrin.h:333:1: error: inlining failed in call to ‘always_inline’ ‘_mm256_maddubs_epi16’: target specific option mismatch
  333 | _mm256_maddubs_epi16 (__m256i __X, __m256i __Y)
      | ^~~~~~~~~~~~~~~~~~~~
../../deps/base64/base64/lib/arch/avx2/dec_reshuffle.c:11:41: note: called from here
   11 |         const __m256i merge_ab_and_bc = _mm256_maddubs_epi16(in, _mm256_set1_epi32(0x01400140));
      |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/avxintrin.h:1335:1: error: inlining failed in call to ‘always_inline’ ‘_mm256_set1_epi32’: target specific option mismatch
 1335 | _mm256_set1_epi32 (int __A)
      | ^~~~~~~~~~~~~~~~~
../../deps/base64/base64/lib/arch/avx2/dec_reshuffle.c:11:41: note: called from here
   11 |         const __m256i merge_ab_and_bc = _mm256_maddubs_epi16(in, _mm256_set1_epi32(0x01400140));
      |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[1468/1666] x86_64-pc-linux-gnu-g++ -MMD -MF obj/deps/googletest/src/gtest.gtest.o.d -DV8_DEPRECATION_WARNINGS -DV8_IMMINENT_DEPRECATION_WARNINGS -D_GLIBCXX_USE_CXX11_ABI=1 -DNODE_OPENSSL_CONF_NAME=nodejs_conf -DNODE_OPENSSL_CERT_STORE -DICU_NO_USER_DATA_OVERRIDE -D__STDC_FORMAT_MACROS -DGTEST_HAS_POSIX_RE=0 -DGTEST_LANG_CXX11=1 -I../../deps/googletest -I../../deps/googletest/include -pthread -Wall -Wextra -Wno-unused-parameter -m64 -fno-omit-frame-pointer -march=ivybridge -mno-avx -mno-aes -mno-rdrnd -O2 -pipe -fno-rtti -fno-exceptions -std=gnu++17  -c ../../deps/googletest/src/gtest.cc -o obj/deps/googletest/src/gtest.gtest.o
ninja: build stopped: subcommand failed.
make: *** [Makefile:149: node] Error 1
 * ERROR: net-libs/nodejs-20.2.0::gentoo failed (compile phase):
 *   emake failed
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-02 18:25:03 UTC
*** Bug 907719 has been marked as a duplicate of this bug. ***
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-02 18:25:19 UTC
See https://bugs.gentoo.org/907719#c1 for another case too where we have SSE4.1 but *not* popcnt.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-02 18:30:17 UTC
Reported upstream at https://github.com/nodejs/node/issues/48305.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-03 00:54:41 UTC
simdutf upstream say SSE4.2 is needed for the Westmere kernels: https://github.com/simdutf/simdutf/issues/251#issuecomment-1574494941.

They've patched it as https://github.com/simdutf/simdutf/commit/f9c791186ef2367bdceceeedcd1f4052967e7813 (3.2.13) and that fix is working its way into nodejs: https://github.com/nodejs/node/pull/48308.
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-03 00:57:42 UTC
Could someone hitting this issue please try https://github.com/nodejs/node/pull/48308 as a patch?

You _might_ need to hand-apply it, or apply some of the previous "bump simdutf" upstream PRs to nodejs.
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-05 11:33:11 UTC
Created attachment 863329 [details]
bug900513-simdutf.patch.xz
Comment 8 Viktor Yu. Kovalskii 2023-06-07 04:02:34 UTC
(In reply to Sam James from comment #7)
> Created attachment 863329 [details]
> bug900513-simdutf.patch.xz

Thanks a lot for patch.

I should add some modifications to your patch. After adding these strings I can compile net-libs/nodejs-20.2.0:

--- a/deps/simdutf/simdutf.cpp
+++ b/deps/simdutf/simdutf.cpp
@@ -1143,5 +1143,5 @@
 #define SIMDUTF_TARGET_ICELAKE
 #else
-#define SIMDUTF_TARGET_ICELAKE SIMDUTF_TARGET_REGION("avx512f,avx512dq,avx512cd,avx512bw,avx512vbmi,avx512vbmi2,avx512vl,avx2,bmi,bmi2,pclmul,lzcnt")
+#define SIMDUTF_TARGET_ICELAKE SIMDUTF_TARGET_REGION("avx512f,avx512dq,avx512cd,avx512bw,avx512vbmi,avx512vbmi2,avx512vl,avx2,bmi,bmi2,pclmul,lzcnt,popcnt")
 #endif
 

emerge --info 
Portage 3.0.48 (python 3.11.3-final-0, default/linux/amd64/17.1/no-multilib, gcc-12, glibc-2.36-r8, 5.15.115-gentoo-x86_64 x86_64)
=================================================================
System uname: Linux-5.15.115-gentoo-x86_64-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q9550_@_2.83GHz-with-glibc2.36
KiB Mem:     8138684 total,   1507136 free
KiB Swap:    8388604 total,   8384216 free
Timestamp of repository gentoo: Tue, 06 Jun 2023 05:46:58 +0000
Head commit of repository gentoo: 5041482ef41654a05dd57ea6bd9d1c017c73d146

Timestamp of repository flying: Tue, 07 Mar 2023 06:33:45 +0000
Head commit of repository guru: 3e8755236b250e99e377a57ea7fc799712770ff2

Head commit of repository mozilla: 7f09fc95b402bdbfaee8156bda2187bdbf634018

Head commit of repository pf4public: b55afd17b8d7738341a5f277b3328a6215f79c35

Head commit of repository science: e5dcc90b7da028bb7939ab58425b0ef5c92246e8

sh bash 5.2_p15-r3
ld GNU ld (Gentoo 2.40 p5) 2.40.0
ccache version 4.8 [enabled]
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p15-r3::gentoo
dev-lang/perl:             5.36.1-r2::gentoo
dev-lang/python:           3.11.3::gentoo
dev-lang/rust:             1.69.0-r1::gentoo
dev-util/ccache:           4.8-r2::gentoo
dev-util/cmake:            3.26.4-r1::gentoo
dev-util/meson:            1.1.1::gentoo
sys-apps/baselayout:       2.13-r1::gentoo
sys-apps/openrc:           0.47.1::gentoo
sys-apps/sandbox:          2.30-r1::gentoo
sys-devel/autoconf:        2.13-r8::gentoo, 2.71-r6::gentoo
sys-devel/automake:        1.16.5-r1::gentoo
sys-devel/binutils:        2.40-r5::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           15.0.7-r3::gentoo, 16.0.5::gentoo
sys-devel/gcc:             12.3.1_p20230526::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/llvm:            15.0.7-r3::gentoo, 16.0.5::gentoo
sys-devel/make:            4.4.1-r1::gentoo
sys-kernel/linux-headers:  5.15-r3::gentoo (virtual/os-headers)
sys-libs/glibc:            2.36-r8::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/repo/sync/gentoo.git
    priority: -1000
    volatile: False

flying
    location: /var/db/repos/flying
    masters: gentoo
    volatile: False

guru
    location: /var/db/repos/guru
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/repo/proj/guru.git
    masters: gentoo
    priority: 50
    volatile: False

mozilla
    location: /var/db/repos/mozilla
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/proj/mozilla.git
    masters: gentoo
    priority: 50
    volatile: False

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

science
    location: /var/db/repos/science
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/proj/sci.git
    masters: gentoo
    priority: 50
    volatile: False

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native -mtune=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/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 /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=native -mtune=native"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=y --with-bdeps=y"
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="-O2 -pipe -march=native -mtune=native"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg buildpkg-live ccache compress-build-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms split-elog split-log strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=native -mtune=native"
GENTOO_MIRRORS="http://mirror.yandex.ru/gentoo-distfiles/ http://gentoo.bloodhost.ru/"
LANG="ru_RU.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
MAKEOPTS="-j5"
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"
SHELL="/bin/bash"
USE="7zip X acl alsa amd64 avif blake2 branding bzip2 cairo caps cli crypt cups custom-cflags custom-optimization dbus djvu dri drm egl elogind eps exif expat ffmpeg fftw firmware fortran gdbm gegl gif gnuplot heif hwloc iconv icu jpeg jpeg2k kde kwallet latex lcms libinput libtirpc lm-sensors lto lz4 lzma lzo mtp ncurses nls nptl opengl openmp osmesa pam pango pcre pdf pgo phonon pipewire plasma png policykit postscript pulseaudio qml qt5 readline seccomp sensord spell split-usr ssl svg system-av1 system-bootstrap system-ffmpeg system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-llvm system-png system-ssl system-webp system-zlib test-rust tiff truetype udev unicode usb v4l vdpau wayland webengine webp wmf x264 x265 xattr xinerama xml xxhash zip 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="mmx mmxext sse sse2 sse3 sse4_1 ssse3" ELIBC="glibc" 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="pc" INPUT_DEVICES="libinput evdev" KERNEL="linux" L10N="ru en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="NVPTX" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" QEMU_SOFTMMU_TARGETS="x86_64 i386" QEMU_USER_TARGETS="x86_64 i386" RUBY_TARGETS="ruby31" VIDEO_CARDS="nouveau" 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:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-07 04:18:32 UTC
Thanks! https://github.com/nodejs/node/pull/48344 includes that change as well.
Comment 10 Larry the Git Cow gentoo-dev 2023-06-10 19:32:13 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cd2dce6119036b41fd57b8196c4841cc6b3d5423

commit cd2dce6119036b41fd57b8196c4841cc6b3d5423
Author:     William Hubbs <williamh@gentoo.org>
AuthorDate: 2023-06-10 19:31:03 +0000
Commit:     William Hubbs <williamh@gentoo.org>
CommitDate: 2023-06-10 19:31:40 +0000

    net-libs/nodejs: add 20.3.0
    
    Closes: https://bugs.gentoo.org/900513
    Signed-off-by: William Hubbs <williamh@gentoo.org>

 net-libs/nodejs/Manifest                           |    1 +
 net-libs/nodejs/files/nodejs-20.3.0-gcc14.patch    |   31 +
 .../files/nodejs-20.3.0-simdutf-2.3.14.patch       | 1550 ++++++++++++++++++++
 net-libs/nodejs/nodejs-20.3.0.ebuild               |  255 ++++
 4 files changed, 1837 insertions(+)
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-10 22:35:40 UTC
Note that I think I actually ended up hijacking this bug for the simdutf issue (bug 893330), but we'll see if the base64 issue is gone here.

There's some relevant discussion nonetheless in bug 893330 about the nature of these sorts of bugs.
Comment 12 yves.caniou 2023-06-11 10:14:24 UTC
Tried to emerge the package after a eix-sync.
I still have errors, but a bit later in the compilation.

In the build.log:
[1467/1666] x86_64-pc-linux-gnu-gcc -MMD -MF obj/deps/base64/base64/lib/arch/avx2/base64_avx2.codec.o.d -DV8_DEPRECATION_WARNINGS -DV8_IMMINENT_DEPRECATION_WARNINGS -D_GLIBCXX_USE_CXX11_ABI=1 -DNODE_OPENSSL_CONF_NAME=nodejs_conf -DNODE_OPENSSL_CERT_STORE -DICU_NO_USER_DATA_OVERRIDE -D__STDC_FORMAT_MACROS -DBASE64_STATIC_DEFINE -DHAVE_AVX2=1 -I../../deps/base64/base64/include -I../../deps/base64/base64/lib -pthread -Wall -Wextra -Wno-unused-parameter -m64 -mavx2 -fno-omit-frame-pointer -march=ivybridge -mno-avx -mno-aes -mno-rdrnd -O2 -pipe  -c ../../deps/base64/base64/lib/arch/avx2/codec.c -o obj/deps/base64/base64/lib/arch/avx2/base64_avx2.codec.o
FAILED: obj/deps/base64/base64/lib/arch/avx2/base64_avx2.codec.o 
x86_64-pc-linux-gnu-gcc -MMD -MF obj/deps/base64/base64/lib/arch/avx2/base64_avx2.codec.o.d -DV8_DEPRECATION_WARNINGS -DV8_IMMINENT_DEPRECATION_WARNINGS -D_GLIBCXX_USE_CXX11_ABI=1 -DNODE_OPENSSL_CONF_NAME=nodejs_conf -DNODE_OPENSSL_CERT_STORE -DICU_NO_USER_DATA_OVERRIDE -D__STDC_FORMAT_MACROS -DBASE64_STATIC_DEFINE -DHAVE_AVX2=1 -I../../deps/base64/base64/include -I../../deps/base64/base64/lib -pthread -Wall -Wextra -Wno-unused-parameter -m64 -mavx2 -fno-omit-frame-pointer -march=ivybridge -mno-avx -mno-aes -mno-rdrnd -O2 -pipe  -c ../../deps/base64/base64/lib/arch/avx2/codec.c -o obj/deps/base64/base64/lib/arch/avx2/base64_avx2.codec.o
In file included from ../../deps/base64/base64/lib/arch/avx2/codec.c:14:
../../deps/base64/base64/lib/arch/avx2/dec_reshuffle.c: In function ‘dec_reshuffle’:
../../deps/base64/base64/lib/arch/avx2/dec_reshuffle.c:3:1: warning: AVX vector return without AVX enabled changes the ABI [-Wpsabi]
    3 | {
      | ^
In file included from ../../deps/base64/base64/lib/arch/avx2/codec.c:17:
../../deps/base64/base64/lib/arch/avx2/enc_reshuffle.c: In function ‘enc_reshuffle’:
../../deps/base64/base64/lib/arch/avx2/enc_reshuffle.c:2:1: note: the ABI for passing parameters with 32-byte alignment has changed in GCC 4.6
    2 | enc_reshuffle (const __m256i input)
      | ^~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/immintrin.h:47,
                 from ../../deps/base64/base64/lib/arch/avx2/codec.c:12:
/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/avx2intrin.h: In function ‘dec_reshuffle’:
/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/avx2intrin.h:1044:1: error: inlining failed in call to ‘always_inline’ ‘_mm256_permutevar8x32_epi32’: target specific option mismatch
 1044 | _mm256_permutevar8x32_epi32 (__m256i __X, __m256i __Y)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../../deps/base64/base64/lib/arch/avx2/dec_reshuffle.c:33:16: note: called from here
   33 |         return _mm256_permutevar8x32_epi32(out, _mm256_setr_epi32(0, 1, 2, 4, 5, 6, -1, -1));
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/immintrin.h:43:
/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/avxintrin.h:1380:1: error: inlining failed in call to ‘always_inline’ ‘_mm256_setr_epi32’: target specific option mismatch
 1380 | _mm256_setr_epi32 (int __A, int __B, int __C, int __D,
      | ^~~~~~~~~~~~~~~~~
../../deps/base64/base64/lib/arch/avx2/dec_reshuffle.c:33:16: note: called from here
   33 |         return _mm256_permutevar8x32_epi32(out, _mm256_setr_epi32(0, 1, 2, 4, 5, 6, -1, -1));
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/avx2intrin.h:588:1: error: inlining failed in call to ‘always_inline’ ‘_mm256_shuffle_epi8’: target specific option mismatch
  588 | _mm256_shuffle_epi8 (__m256i __X, __m256i __Y)
      | ^~~~~~~~~~~~~~~~~~~
../../deps/base64/base64/lib/arch/avx2/dec_reshuffle.c:24:15: note: called from here
   24 |         out = _mm256_shuffle_epi8(out, _mm256_setr_epi8(
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   25 |                 2, 1, 0, 6, 5, 4, 10, 9, 8, 14, 13, 12, -1, -1, -1, -1,
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   26 |                 2, 1, 0, 6, 5, 4, 10, 9, 8, 14, 13, 12, -1, -1, -1, -1));
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/avxintrin.h:1399:1: error: inlining failed in call to ‘always_inline’ ‘_mm256_setr_epi8’: target specific option mismatch
 1399 | _mm256_setr_epi8  (char __q31, char __q30, char __q29, char __q28,
      | ^~~~~~~~~~~~~~~~
../../deps/base64/base64/lib/arch/avx2/dec_reshuffle.c:24:15: note: called from here
   24 |         out = _mm256_shuffle_epi8(out, _mm256_setr_epi8(
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   25 |                 2, 1, 0, 6, 5, 4, 10, 9, 8, 14, 13, 12, -1, -1, -1, -1,
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   26 |                 2, 1, 0, 6, 5, 4, 10, 9, 8, 14, 13, 12, -1, -1, -1, -1));
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/avx2intrin.h:341:1: error: inlining failed in call to ‘always_inline’ ‘_mm256_madd_epi16’: target specific option mismatch
  341 | _mm256_madd_epi16 (__m256i __A, __m256i __B)
      | ^~~~~~~~~~~~~~~~~
../../deps/base64/base64/lib/arch/avx2/dec_reshuffle.c:17:23: note: called from here
   17 |         __m256i out = _mm256_madd_epi16(merge_ab_and_bc, _mm256_set1_epi32(0x00011000));
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/avxintrin.h:1335:1: error: inlining failed in call to ‘always_inline’ ‘_mm256_set1_epi32’: target specific option mismatch
 1335 | _mm256_set1_epi32 (int __A)
      | ^~~~~~~~~~~~~~~~~
../../deps/base64/base64/lib/arch/avx2/dec_reshuffle.c:17:23: note: called from here
   17 |         __m256i out = _mm256_madd_epi16(merge_ab_and_bc, _mm256_set1_epi32(0x00011000));
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/avx2intrin.h:333:1: error: inlining failed in call to ‘always_inline’ ‘_mm256_maddubs_epi16’: target specific option mismatch
  333 | _mm256_maddubs_epi16 (__m256i __X, __m256i __Y)
      | ^~~~~~~~~~~~~~~~~~~~
../../deps/base64/base64/lib/arch/avx2/dec_reshuffle.c:11:41: note: called from here
   11 |         const __m256i merge_ab_and_bc = _mm256_maddubs_epi16(in, _mm256_set1_epi32(0x01400140));
      |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/avxintrin.h:1335:1: error: inlining failed in call to ‘always_inline’ ‘_mm256_set1_epi32’: target specific option mismatch
 1335 | _mm256_set1_epi32 (int __A)
      | ^~~~~~~~~~~~~~~~~
../../deps/base64/base64/lib/arch/avx2/dec_reshuffle.c:11:41: note: called from here
   11 |         const __m256i merge_ab_and_bc = _mm256_maddubs_epi16(in, _mm256_set1_epi32(0x01400140));
      |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[1468/1666] x86_64-pc-linux-gnu-g++ -MMD -MF obj/deps/googletest/src/gtest.gtest.o.d -DV8_DEPRECATION_WARNINGS -DV8_IMMINENT_DEPRECATION_WARNINGS -D_GLIBCXX_USE_CXX11_ABI=1 -DNODE_OPENSSL_CONF_NAME=nodejs_conf -DNODE_OPENSSL_CERT_STORE -DICU_NO_USER_DATA_OVERRIDE -D__STDC_FORMAT_MACROS -DGTEST_HAS_POSIX_RE=0 -DGTEST_LANG_CXX11=1 -I../../deps/googletest -I../../deps/googletest/include -pthread -Wall -Wextra -Wno-unused-parameter -m64 -fno-omit-frame-pointer -march=ivybridge -mno-avx -mno-aes -mno-rdrnd -O2 -pipe -fno-rtti -fno-exceptions -std=gnu++17  -c ../../deps/googletest/src/gtest.cc -o obj/deps/googletest/src/gtest.gtest.o
ninja: build stopped: subcommand failed.
make: *** [Makefile:149: node] Error 1

# emerge --info '=net-libs/nodejs-20.2.0::gentoo'
Portage 3.0.45.3 (python 3.11.3-final-0, default/linux/amd64/17.1/desktop/plasma, gcc-12, glibc-2.36-r8, 4.19.283-x86_64 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.19.283-x86_64-x86_64-Intel-R-_Pentium-R-_CPU_G2030_@_3.00GHz-with-glibc2.36
KiB Mem:    16356964 total,   2358560 free
KiB Swap:   10485756 total,  10484980 free
Timestamp of repository gentoo: Sun, 11 Jun 2023 06:30:01 +0000
Head commit of repository gentoo: f855eb72f29b937d2d5388b2c56c8979ad38683a
sh bash 5.1_p16-r4
ld GNU ld (Gentoo 2.39 p6) 2.39.0
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.1_p16-r4::gentoo
dev-lang/perl:             5.36.0-r2::gentoo
dev-lang/python:           3.10.11::gentoo, 3.11.3::gentoo
dev-lang/rust:             1.69.0-r1::gentoo
dev-util/cmake:            3.26.3::gentoo
dev-util/meson:            1.1.1::gentoo
sys-apps/baselayout:       2.13-r1::gentoo
sys-apps/openrc:           0.46::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-devel/autoconf:        2.71-r5::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.39-r5::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/gcc:             12.2.1_p20230428-r1::gentoo
sys-devel/gcc-config:      2.10::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/llvm:            15.0.7::gentoo
sys-devel/make:            4.4.1-r1::gentoo
sys-kernel/linux-headers:  6.1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.36-r8::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    volatile: False
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts: 
    sync-rsync-verify-jobs: 1

MyLocalOverlay
    location: /var/db/repos/MyLocalOverlay
    masters: gentoo
    volatile: False

crossdev-armv7a
    location: /var/db/repos/localrepo-crossdev-armv7a
    masters: gentoo
    priority: 10
    volatile: False

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=ivybridge -mno-avx -mno-aes -mno-rdrnd -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /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 /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=ivybridge -mno-avx -mno-aes -mno-rdrnd -O2 -pipe"
DISTDIR="/var/cache/distfiles"
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="-march=ivybridge -mno-avx -mno-aes -mno-rdrnd -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=ivybridge -mno-avx -mno-aes -mno-rdrnd -O2 -pipe"
GENTOO_MIRRORS="ftp://ftp.free.fr/mirrors/ftp.gentoo.org/ http://ftp.free.fr/mirrors/ftp.gentoo.org/ http://gentoo.mirrors.ovh.net/gentoo-distfiles/"
LANG="fr_FR.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
MAKEOPTS="-j2"
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"
SHELL="/bin/bash"
USE="X a52 aac acl acpi activities alsa amd64 anthy bash-completion berkdb branding bzip2 cairo cdda cdr cli cpudetection crypt cups dbus declarative dri dts dvd dvdr elogind emboss encode exif fbcon ffmpeg flac fortran gdbm gif gpm gtk gui h224 h281 h323 ibus iconv icu ipv6 jpeg kde kipi kwallet lcms libglvnd libnotify libtirpc mad mng mp3 mp4 mpeg mpi multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf phonon pipewire plasma png policykit ppds pulseaudio qml qt5 readline screencast sdl seccomp semantic-desktop sip sound spell split-usr srtp ssl startup-notification svg tcpd test-rust tiff truetype udev udisks unicode upower usb vorbis vulkan wayland widgets wxwidgets x264 xattr xcb xft xinerama xml xv xvid zlib" 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="mmx mmxext sse sse2" ELIBC="glibc" 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" INPUT_DEVICES="libinput" KERNEL="linux" L10N="fr en" 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="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby30 ruby31" 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:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS

# emerge -pqv '=net-libs/nodejs-20.2.0::gentoo'
[ebuild  N    ] net-libs/nodejs-20.2.0  USE="icu npm snapshot ssl system-icu system-ssl -debug -doc -inspector -lto -pax-kernel -test" CPU_FLAGS_X86="sse2"
Comment 13 yves.caniou 2023-06-11 10:18:54 UTC
Correction: later than =net-libs/nodejs-18.14.2 from original msg, but the same location than =net-libs/nodejs-20.2.0 from msg 2023/05/28
Comment 14 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-12 21:26:38 UTC
(In reply to yves.caniou from comment #13)
> Correction: later than =net-libs/nodejs-18.14.2 from original msg, but the
> same location than =net-libs/nodejs-20.2.0 from msg 2023/05/28

Thanks! Would you mind filing an upstream bug and linking it here?