Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 893330 - net-libs/nodejs-18.14.0: build fails with -O1: error: inlining failed in call to 'always_inline' 'int _mm_popcnt_u32(unsigned int)': target specific option mismatch
Summary: net-libs/nodejs-18.14.0: build fails with -O1: error: inlining failed in call...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-06 04:27 UTC by Matt Whitlock
Modified: 2023-06-10 22:34 UTC (History)
6 users (show)

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


Attachments
build.log (build.log,107.93 KB, text/plain)
2023-02-06 04:27 UTC, Matt Whitlock
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Whitlock 2023-02-06 04:27:30 UTC
Created attachment 849942 [details]
build.log

Note: I build net-libs/nodejs with -O1 since it's only a build-time dependency (of dev-qt/qtwebengine and www-client/chromium) on my system, and I prefer to sacrifice a tiny bit of runtime speed for faster upgrades of NodeJS.


In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/x86gprintrin.h:71,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/x86intrin.h:27,
                 from ../deps/simdutf/simdutf.cpp:1180:
/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/popcntintrin.h: In function 'size_t simdutf::icelake::{anonymous}::utf16_to_utf8_avx512i(const char16_t*, size_t, unsigned char*, size_t*) [with simdutf::endianness big_endian = simdutf::LITTLE]':
/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/popcntintrin.h:35:1: error: inlining failed in call to 'always_inline' 'int _mm_popcnt_u32(unsigned int)': target specific option mismatch
   35 | _mm_popcnt_u32 (unsigned int __X)
      | ^~~~~~~~~~~~~~
../deps/simdutf/simdutf.cpp:17884:36: note: called from here
17884 |       outbuf += 31 + _mm_popcnt_u32(_cvtmask32_u32(is234byte));
      |                      ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/popcntintrin.h:35:1: error: inlining failed in call to 'always_inline' 'int _mm_popcnt_u32(unsigned int)': target specific option mismatch
   35 | _mm_popcnt_u32 (unsigned int __X)
      | ^~~~~~~~~~~~~~
../deps/simdutf/simdutf.cpp:17884:36: note: called from here
17884 |       outbuf += 31 + _mm_popcnt_u32(_cvtmask32_u32(is234byte));
      |                      ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/popcntintrin.h:42:1: error: inlining failed in call to 'always_inline' 'long long int _mm_popcnt_u64(long long unsigned int)': target specific option mismatch
   42 | _mm_popcnt_u64 (unsigned long long __X)
      | ^~~~~~~~~~~~~~
../deps/simdutf/simdutf.cpp:17990:36: note: called from here
17990 |     uint64_t advhi = _mm_popcnt_u64(wanthi_uint64);
      |                      ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/popcntintrin.h:42:1: error: inlining failed in call to 'always_inline' 'long long int _mm_popcnt_u64(long long unsigned int)': target specific option mismatch
   42 | _mm_popcnt_u64 (unsigned long long __X)
      | ^~~~~~~~~~~~~~
../deps/simdutf/simdutf.cpp:17989:36: note: called from here
17989 |     uint64_t advlo = _mm_popcnt_u64(wantlo_uint64);
      |                      ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/popcntintrin.h:42:1: error: inlining failed in call to 'always_inline' 'long long int _mm_popcnt_u64(long long unsigned int)': target specific option mismatch
   42 | _mm_popcnt_u64 (unsigned long long __X)
      | ^~~~~~~~~~~~~~
../deps/simdutf/simdutf.cpp:17990:36: note: called from here
17990 |     uint64_t advhi = _mm_popcnt_u64(wanthi_uint64);
      |                      ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/popcntintrin.h:42:1: error: inlining failed in call to 'always_inline' 'long long int _mm_popcnt_u64(long long unsigned int)': target specific option mismatch
   42 | _mm_popcnt_u64 (unsigned long long __X)
      | ^~~~~~~~~~~~~~
../deps/simdutf/simdutf.cpp:17989:36: note: called from here
17989 |     uint64_t advlo = _mm_popcnt_u64(wantlo_uint64);
      |                      ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
make: *** [deps/simdutf/simdutf.target.mk:82: /var/tmp/portage/net-libs/nodejs-18.14.0/work/node-v18.14.0/out/Release/obj.target/simdutf/deps/simdutf/simdutf.o] Error 1


# emerge --info '=net-libs/nodejs-18.14.0::gentoo'
Portage 3.0.44 (python 3.10.9-final-0, default/linux/amd64/17.1/desktop/plasma, gcc-12, glibc-2.36-r7, 5.15.88-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.15.88-gentoo-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q6600_@_2.40GHz-with-glibc2.36
KiB Mem:     8153212 total,    246528 free
KiB Swap:   12582908 total,  11155964 free
Timestamp of repository gentoo: Sun, 05 Feb 2023 14:00:01 +0000
Head commit of repository gentoo: e5862e0cebb03110a03b15002720d77392ef450a
Head commit of repository 4nykey: 58a009c41544ca3c40f71211e9e5aaf084fea5c0

Head commit of repository bitcoin: f541bec0236e81b054ec8e1dd4ab3a30d4f4cf8d

Head commit of repository eigenlay: 5d6ea6270bb171af43d1fd2d3d97e3c115ae5cc8

Head commit of repository gentoo-bootstrap: fb042d582eb14fec87d04286eb8b8f0f1e6e9238

Head commit of repository kde: 5d68dac31b404ca9e350954b42b08d71156cf2a3

Timestamp of repository pg_overlay: Sat, 04 Feb 2023 16:01:57 +0000
Head commit of repository pg_overlay: b22aebab92dab7e7adf2d0423dc8af4f95a716ff

Head commit of repository science: 806c356ddf61116360999d86fcc3387eec3e1376

sh dash 0.5.12
ld GNU ld (Gentoo 2.40 p1) 2.40
distcc 3.4 x86_64-pc-linux-gnu [disabled]
ccache version 4.7.4 [enabled]
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p15-r1::gentoo
dev-java/java-config:      2.3.1::gentoo
dev-lang/perl:             5.36.0-r2::gentoo
dev-lang/python:           3.9.16-r1::gentoo, 3.10.9-r1::gentoo, 3.11.1-r1::gentoo
dev-lang/rust:             1.67.0::gentoo
dev-util/ccache:           4.7.4::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.46::gentoo
sys-apps/sandbox:          2.30-r1::gentoo
sys-devel/autoconf:        2.71-r5::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.40::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           15.0.7-r1::gentoo
sys-devel/gcc:             12.2.1_p20230121-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::gentoo
sys-kernel/linux-headers:  6.1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.36-r7::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: no

4nykey
    location: /var/db/repos/4nykey
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/4nykey.git
    masters: gentoo
    volatile: True

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

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

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

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

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

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

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

local
    location: /var/db/repos/local
    masters: gentoo
    priority: 1000
    volatile: True

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O3 -ggdb -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/X11/xkb /usr/share/config /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /usr/share/i18n/locales/en_US /usr/share/sddm/scripts/Xsetup /usr/share/themes/oxygen-gtk/gtk-2.0 /usr/share/themes/oxygen-gtk/gtk-3.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dbus-1 /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php8.2/ext-active/ /etc/php/cgi-php8.2/ext-active/ /etc/php/cli-php8.2/ext-active/ /etc/php/fpm-php8.2/ext-active/ /etc/php/phpdbg-php8.2/ext-active/ /etc/revdep-rebuild /etc/sandbox.d"
CXXFLAGS="-march=native -O3 -ggdb -pipe"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--nospinner --unordered-display --backtrack=100 --verbose-conflicts --usepkg --load-average=8"
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"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live ccache cgroup compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="        http://mirror.leaseweb.com/gentoo/      http://mirrors.rit.edu/gentoo/  http://mirror.csclub.uwaterloo.ca/gentoo-distfiles/ "
INSTALL_MASK="/etc/grub.d /etc/pm       /etc/systemd /lib/systemd /usr/lib/systemd/system /usr/lib/sysusers.d   /usr/share/bash-completion /usr/share/fish /usr/share/zsh   /usr/share/cmake/Help /usr/share/gtk-doc        /usr/share/locale/*/ -/usr/share/locale/en -/usr/share/locale/en_US"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O2 -Wl,--as-needed"
LEX="flex"
LINGUAS="en_US en"
MAKEOPTS="-j5 -l8"
PKGDIR="/var/cache/binpkgs"
PORTAGE_COMPRESS="xz"
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 --exclude=/CACHEDIR.TAG"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="X a52 aac acpi alsa amd64 branding bzip2 cairo cdda cdparanoia cdr cli crypt cups curl dbus declarative dri dts dvd dvdr elogind encode evdev exif ffmpeg flac fontconfig gif git gmp gtk gui iconv icu id3tag ipv6 jpeg kde kwallet lame lcms libglvnd libnotify libsamplerate libtirpc lzma mad matroska mng mp3 mp4 mpeg multilib ncurses nptl ogg opengl openmp opus pam pango pcre pdf php plasma png policykit ppds qml qt5 quicktime readline sctp sdl seccomp smp sound spell ssl startup-notification subversion svg taglib tcmalloc test-rust theora threads tiff truetype udev udisks unicode upower usb v4l vaapi vdpau vnc vorbis vpx webkit webp widgets x264 xcb xft xml xv xvid xvmc zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2021" ALSA_CARDS="hda-intel" 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 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" INPUT_DEVICES="evdev libinput" KERNEL="linux" L10N="en-US en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="AMDGPU" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10" QEMU_SOFTMMU_TARGETS="arm" RUBY_TARGETS="ruby27 ruby30" SANE_BACKENDS="genesys" USERLAND="GNU" VIDEO_CARDS="amdgpu radeonsi" 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, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS


# emerge -pqv '=net-libs/nodejs-18.14.0::gentoo'
[ebuild     U ] net-libs/nodejs-18.14.0 [18.13.0] USE="icu inspector npm snapshot ssl system-icu system-ssl -debug -doc -lto -pax-kernel -systemtap -test" CPU_FLAGS_X86="sse2"
Comment 1 Viktor Yu. Kovalskii 2023-02-21 03:02:12 UTC
I have the same problem with -O0 and -O2.

emerge --info '=net-libs/nodejs-18.14.0::gentoo'
Portage 3.0.44 (python 3.10.10-final-0, default/linux/amd64/17.1/no-multilib, gcc-12, glibc-2.36-r7, 5.15.94-gentoo-x86_64 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.15.94-gentoo-x86_64-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q9550_@_2.83GHz-with-glibc2.36
KiB Mem:     8138680 total,    279968 free
KiB Swap:    8388604 total,   8230992 free
Timestamp of repository gentoo: Mon, 20 Feb 2023 01:02:01 +0000
Head commit of repository gentoo: d792b3ddf55ff1b77f00887f8c6dfc9f515a804f

Timestamp of repository flying: Tue, 26 Jul 2022 08:30:06 +0000
Head commit of repository guru: 47936a0f50468cce092fabcdb2caa18104792835

Head commit of repository mozilla: 7f09fc95b402bdbfaee8156bda2187bdbf634018

Head commit of repository pf4public: daec97311defc251a9bff1aeaeef996f80aca620

Head commit of repository science: 307e9fc6df28cae1f1bb5e53219ae537256c16a9

sh bash 5.2_p15-r2
ld GNU ld (Gentoo 2.40 p2) 2.40.0
ccache version 4.7.4 [enabled]
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p15-r2::gentoo
dev-lang/perl:             5.36.0-r2::gentoo
dev-lang/python:           3.10.10_p1::gentoo
dev-lang/rust:             1.67.1::gentoo
dev-util/ccache:           4.7.4::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.46::gentoo
sys-apps/sandbox:          2.30-r1::gentoo
sys-devel/autoconf:        2.13-r7::gentoo, 2.71-r5::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.40-r1::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           15.0.7-r1::gentoo
sys-devel/gcc:             12.2.1_p20230121-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::gentoo
sys-kernel/linux-headers:  5.15-r3::gentoo (virtual/os-headers)
sys-libs/glibc:            2.36-r7::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: True

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

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: True

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

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

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

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 libglvnd libinput libtirpc lm-sensors lto lz4 lzma lzo mtp ncurses nls nptl opengl openmp osmesa pam pango pcre pdf pgo phonon 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_10" PYTHON_TARGETS="python3_10" QEMU_SOFTMMU_TARGETS="x86_64 i386" QEMU_USER_TARGETS="x86_64 i386" RUBY_TARGETS="ruby31" USERLAND="GNU" 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 2 Alexander Bezrukov 2023-03-06 09:08:28 UTC
I faced the same problem with nodejs-18.14.2 and -O2.
Comment 3 Alexander Bezrukov 2023-03-06 10:16:42 UTC
One possible workaround is to replace -march=native and -mtune=native with a concrete target specification (in my case it is opteron-sse3). Then build completes successfully.
Comment 4 Matt Whitlock 2023-03-07 23:13:16 UTC
(In reply to Alexander Bezrukov from comment #3)
> One possible workaround is to replace -march=native and -mtune=native with a
> concrete target specification (in my case it is opteron-sse3). Then build
> completes successfully.

Thanks. That did work around the problem for me too. ("-march=core2" in my case.)

Does this seem more like a bug in GCC? If my native CPU architecture is "core2", then shouldn't the options "-march=native" and "-march=core2" be indistinguishable from each other, both in the set of defined preprocessor symbols and in the compiled code that they effect?
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-10 22:32:41 UTC
I suspect this was fixed by the change in bug 900513.

(In fact, the original report in bug 900513 may have been something else, but I've seen no other instances of it, and other reports in *that* bug ended up being simdutf, so...).
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-10 22:33:51 UTC
(In reply to Matt Whitlock from comment #4)
> (In reply to Alexander Bezrukov from comment #3)
> > One possible workaround is to replace -march=native and -mtune=native with a
> > concrete target specification (in my case it is opteron-sse3). Then build
> > completes successfully.
> 
> Thanks. That did work around the problem for me too. ("-march=core2" in my
> case.)
> 
> Does this seem more like a bug in GCC? If my native CPU architecture is
> "core2", then shouldn't the options "-march=native" and "-march=core2" be
> indistinguishable from each other, both in the set of defined preprocessor
> symbols and in the compiled code that they effect?

I think I must be missing something obvious, but I don't fully get it either. In principle, I get the problem, but then when I try reproduce it on a more capable machine, I can't, even when trying to use exactly the same -march=native-resolved-settings. See e.g. https://github.com/simdutf/simdutf/issues/251#issuecomment-1576796950.

If you have some insight, I'd appreciate it. But it does feel like -march=native is surely doing something that isn't visible and it's a GCC bug.