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

Bug 787158

Summary: net-libs/nodejs[lto]: test and runtime errors when built with gcc-11
Product: Gentoo Linux Reporter: Patrick Lauer <patrick>
Component: Current packagesAssignee: William Hubbs <williamh>
Status: RESOLVED FIXED    
Severity: normal CC: alex, bertrand, captaincrutches, dev, dharding, doug.hunley, gentoo, hanno, herrtimson, marcoep, marek.bartosiewicz, mozilla, petronio, sam, vityokster, voyageur, wgh
Priority: Normal Keywords: PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://github.com/nodejs/node/issues/38501
See Also: https://github.com/gentoo/gentoo/pull/25418
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 618550, 732706    

Description Patrick Lauer gentoo-dev 2021-04-30 15:55:16 UTC
14:59.60 Executing "/usr/bin/node /var/tmp/portage/www-client/firefox-88.0-r1/work/firefox-88.0/devtools/client/shared/build/build.js /var/tmp/portage/www-client/firefox-88.0-r1/work/firefox-88.0/devtools/client/debugger/src/context-menu/menu.js /var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build/dist/bin/browser/chrome/devtools/modules/devtools/client/debugger/src/context-menu"
14:59.73 Executing "/usr/bin/node /var/tmp/portage/www-client/firefox-88.0-r1/work/firefox-88.0/devtools/client/shared/build/build.js /var/tmp/portage/www-client/firefox-88.0-r1/work/firefox-88.0/devtools/client/debugger/src/selectors/breakpointAtLocation.js /var/tmp/portage/www-client/firefox-88.0-r1/work/firefox-88.0/devtools/client/debugger/src/selectors/breakpoints.js /var/tmp/portage/www-client/firefox-88.0-r1/work/firefox-88.0/devtools/client/debugger/src/selectors/breakpointSources.js /var/tmp/portage/www-client/firefox-88.0-r1/work/firefox-88.0/devtools/client/debugger/src/selectors/getCallStackFrames.js /var/tmp/portage/www-client/firefox-88.0-r1/work/firefox-88.0/devtools/client/debugger/src/selectors/inComponent.js /var/tmp/portage/www-client/firefox-88.0-r1/work/firefox-88.0/devtools/client/debugger/src/selectors/index.js /var/tmp/portage/www-client/firefox-88.0-r1/work/firefox-88.0/devtools/client/debugger/src/selectors/isLineInScope.js /var/tmp/portage/www-client/firefox-88.0-r1/work/firefox-88.0/devtools/client/debugger/src/selectors/isSelectedFrameVisible.js /var/tmp/portage/www-client/firefox-88.0-r1/work/firefox-88.0/devtools/client/debugger/src/selectors/pause.js /var/tmp/portage/www-client/firefox-88.0-r1/work/firefox-88.0/devtools/client/debugger/src/selectors/visibleBreakpoints.js /var/tmp/portage/www-client/firefox-88.0-r1/work/firefox-88.0/devtools/client/debugger/src/selectors/visibleColumnBreakpoints.js /var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build/dist/bin/browser/chrome/devtools/modules/devtools/client/debugger/src/selectors"
15:07.65 b''
15:07.65 gmake[3]: *** [backend.mk:903: devtools/client/debugger/src/actions/utils/.deps/node.stub.stub] Error 245
15:07.65 gmake[3]: *** Waiting for unfinished jobs....
15:07.66 b''
15:07.67 gmake[3]: *** [backend.mk:839: devtools/client/debugger/src/actions/ast/.deps/node.stub.stub] Error 245
15:07.71 b''
15:07.72 gmake[3]: *** [backend.mk:806: devtools/client/debugger/src/.deps/node.stub.stub] Error 245
15:07.73 b''
15:07.74 b''
15:07.74 gmake[3]: *** [backend.mk:926: devtools/client/debugger/src/client/.deps/node.stub.stub] Error 245
15:07.74 gmake[3]: *** [backend.mk:917: devtools/client/debugger/src/actions/utils/middleware/.deps/node.stub.stub] Error 245
15:07.79 b''
15:07.80 gmake[3]: *** [backend.mk:990: devtools/client/debugger/src/components/Editor/menus/.deps/node.stub.stub] Error 245
15:07.86 b''
15:07.86 b''
15:07.86 gmake[3]: *** [backend.mk:1059: devtools/client/debugger/src/components/SecondaryPanes/Frames/.deps/node.stub.stub] Error 245
15:07.86 b''
15:07.87 gmake[3]: *** [backend.mk:1001: devtools/client/debugger/src/components/Editor/Preview/.deps/node.stub.stub] Error 245
15:07.87 b''
15:07.88 gmake[3]: *** [backend.mk:1100: devtools/client/debugger/src/components/shared/Button/styles/.deps/node.stub.stub] Error 245
15:07.88 gmake[3]: *** [backend.mk:936: devtools/client/debugger/src/client/firefox/.deps/node.stub.stub] Error 245
15:07.94 b''
15:07.94 gmake[3]: *** [backend.mk:894: devtools/client/debugger/src/actions/sources/.deps/node.stub.stub] Error 245
15:07.95 b''
15:07.96 b''
15:07.96 b''
15:07.96 gmake[3]: *** [backend.mk:852: devtools/client/debugger/src/actions/breakpoints/.deps/node.stub.stub] Error 245
15:07.97 gmake[3]: *** [backend.mk:1092: devtools/client/debugger/src/components/shared/Button/.deps/node.stub.stub] Error 245
15:07.97 gmake[3]: *** [backend.mk:1046: devtools/client/debugger/src/components/SecondaryPanes/Breakpoints/.deps/node.stub.stub] Error 245
15:07.98 b''
15:07.99 b''
15:07.99 gmake[3]: *** [backend.mk:1109: devtools/client/debugger/src/context-menu/.deps/node.stub.stub] Error 245
15:07.99 b''
15:08.00 gmake[3]: *** [backend.mk:878: devtools/client/debugger/src/actions/pause/.deps/node.stub.stub] Error 245
15:08.00 gmake[3]: *** [backend.mk:1014: devtools/client/debugger/src/components/PrimaryPanes/.deps/node.stub.stub] Error 245
15:08.01 b''
15:08.02 gmake[3]: *** [backend.mk:829: devtools/client/debugger/src/actions/.deps/node.stub.stub] Error 245
15:08.04 b''
15:08.04 gmake[3]: *** [backend.mk:950: devtools/client/debugger/src/components/.deps/node.stub.stub] Error 245
15:08.12 b''
15:08.13 gmake[3]: *** [backend.mk:1032: devtools/client/debugger/src/components/SecondaryPanes/.deps/node.stub.stub] Error 245
15:08.18 b''
15:08.18 gmake[3]: *** [backend.mk:1080: devtools/client/debugger/src/components/shared/.deps/node.stub.stub] Error 245
15:08.22 b''
15:08.22 gmake[3]: *** [backend.mk:1155: devtools/client/debugger/src/selectors/.deps/node.stub.stub] Error 245
15:08.29 b''
15:08.29 gmake[3]: *** [backend.mk:979: devtools/client/debugger/src/components/Editor/.deps/node.stub.stub] Error 245
15:08.32 b''
15:08.32 gmake[3]: *** [backend.mk:1136: devtools/client/debugger/src/reducers/.deps/node.stub.stub] Error 245
15:08.32 gmake[3]: Leaving directory '/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build'
15:08.32 gmake[2]: *** [/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox-88.0/config/recurse.mk:34: misc] Error 2
15:08.32 gmake[2]: Leaving directory '/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build'
15:08.32 gmake[1]: *** [/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox-88.0/config/rules.mk:355: default] Error 2
15:08.32 gmake[1]: Leaving directory '/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build'
15:08.32 gmake: *** [client.mk:65: build] Error 2
15:08.32 155 compiler warnings present.
 * ERROR: www-client/firefox-88.0-r1::gentoo failed (compile phase):
 *   (no error message)

Portage 3.0.18 (python 3.8.9-final-0, !../../var/db/repos/gentoo/profiles/default/linux/amd64/17.1, gcc-11.1.0, glibc-2.33, 5.11.12-gentoo-x86_64 x86_64)
=================================================================
System uname: Linux-5.11.12-gentoo-x86_64-x86_64-AMD_Ryzen_9_3900X_12-Core_Processor-with-glibc2.2.5
KiB Mem:    65848276 total,  15348176 free
KiB Swap:          0 total,         0 free
sh bash 5.1_p4
ld GNU ld (Gentoo 2.35.2 p1) 2.35.2
app-shells/bash:          5.1_p4::gentoo
dev-java/java-config:     2.3.1::gentoo
dev-lang/perl:            5.32.1::gentoo
dev-lang/python:          2.7.18_p8::gentoo, 3.8.9::gentoo, 3.9.4::gentoo
dev-lang/rust:            1.51.0-r2::gentoo
dev-util/cmake:           3.20.2::gentoo
sys-apps/baselayout:      2.7-r2::gentoo
sys-apps/openrc:          0.42.1-r1::gentoo
sys-apps/sandbox:         2.23::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.3-r1::gentoo
sys-devel/binutils:       2.35.2::gentoo, 2.36.1-r1::gentoo
sys-devel/gcc:            10.3.0::gentoo, 11.1.0::gentoo
sys-devel/gcc-config:     2.4::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.12::gentoo (virtual/os-headers)
sys-libs/glibc:           2.33::gentoo
Repositories:

gentoo
    location: /home/me/code/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-metamanifest: no
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts:

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native -flto=8 -fuse-linker-plugin -ggdb3"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /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 -flto=8 -fuse-linker-plugin -ggdb3"
DISTDIR="/chroot/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY 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"
FCFLAGS="-O2 -pipe -march=native -flto=8 -fuse-linker-plugin -ggdb3"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg 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 splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=native -flto=8 -fuse-linker-plugin -ggdb3"
GENTOO_MIRRORS="http://ftp.uni-erlangen.de/pub/mirrors/gentoo"
INSTALL_MASK="/etc/X11/xinit/xinitrc.d/80-dbus /usr/bin/dbus-launch"
LANG="C.UTF8"
LDFLAGS="-O2 -flto=8"
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"
RUSTFLAGS="-C target-cpu=native"
USE="X acl alsa amd64 apng berkdb bzip2 cli crypt cups dri ffmpeg fortran gdbm glamor gmp gpo iconv icu ipv6 lapack libglvnd libtirpc lto minizip multilib ncurses nls nptl opencl opengl openmp pam pcre pgo readline seccomp split-usr sqlite ssl system-llvm tcpd truetype udev unicode vdpau vulkan xattr xvmc zlib" ABI_X86="64 32" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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 sha sse sse2 sse3 sse4_1 sse4_2 sse4a 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="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="php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_8" PYTHON_TARGETS="python3_8" RUBY_TARGETS="ruby26" USERLAND="GNU" VIDEO_CARDS="radeon r600 radeonsi amdgpu" 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:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Thomas Deutschmann (RETIRED) gentoo-dev 2021-04-30 17:53:43 UTC
Please attach complete build.log, thanks.
Comment 2 Thomas Deutschmann (RETIRED) gentoo-dev 2021-05-01 00:37:54 UTC
I can reproduce with net-libs/nodejs[lto]. Patrick, can you confirm you also tried with net-libs/nodejs[lto]?

For me, net-libs/nodejs[lto] looks like totally broken. Assigning to to nodejs maintainer.
Comment 3 Thomas Deutschmann (RETIRED) gentoo-dev 2021-05-01 00:38:39 UTC
> net-libs/nodejs-16.0.0-r1::gentoo was built with the following:
> USE="icu lto npm snapshot ssl system-ssl -debug -doc -inspector -pax_kernel -system-icu -systemtap -test" ABI_X86="(64)" CPU_FLAGS_X86="sse2"
> FEATURES="downgrade-backup strict news binpkg-logs network-sandbox sandbox userfetch binpkg-docompress sfperms unknown-features-warn xattr binpkg-multi-instance unmerge-orphans assume-digests pid-sandbox fixlafiles usersync config-protect-if-modified splitdebug preserve-libs qa-unresolved-soname-deps cgroup ebuild-locks ipc-sandbox binpkg-dostrip protect-owned userpriv ccache parallel-fetch merge-sync compressdebug multilib-strict distlocks usersandbox unmerge-logs"
>
Comment 4 Thomas Deutschmann (RETIRED) gentoo-dev 2021-05-01 00:59:49 UTC
*** Bug 787170 has been marked as a duplicate of this bug. ***
Comment 5 Marek Szuba archtester gentoo-dev 2021-05-01 01:03:09 UTC
(In reply to Thomas Deutschmann from comment #3)
> > net-libs/nodejs-16.0.0-r1::gentoo was built with the following:

Is this v16-specific or does this also happen with LTS branches?
Comment 6 Petronio Coelho 2021-05-01 01:10:45 UTC
(In reply to Marek Szuba from comment #5)
> (In reply to Thomas Deutschmann from comment #3)
> > > net-libs/nodejs-16.0.0-r1::gentoo was built with the following:
> 
> Is this v16-specific or does this also happen with LTS branches?

Not Thomas, but I was unable to reproduce on net-libs/nodejs-14.16.1-r1 with +lto (further details in duplicate ticket).
Comment 7 Thomas Deutschmann (RETIRED) gentoo-dev 2021-05-01 01:25:45 UTC
net-libs/nodejs-14.16.1-r1[lto] is failing for me the same.
Comment 8 Thomas Deutschmann (RETIRED) gentoo-dev 2021-05-01 01:34:04 UTC
net-libs/nodejs-14.16.1-r1[-lto] works.
Comment 9 Thomas Deutschmann (RETIRED) gentoo-dev 2021-05-01 01:47:54 UTC
net-libs/nodejs-12.22.1-r1[lto] shows same problem so I am declaring entire nodejs[lto] broken at this point. Sorry :)
Comment 10 Marek Bartosiewicz 2021-05-01 06:12:54 UTC
I have gcc-11.1.0

After recompiling nodejs with -lto now I get this:

14:02.03 gmake[6]: Nothing to be done for 'libs'.
14:02.03 gmake[6]: Leaving directory '/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build/instrumented/browser/branding/official/locales'
14:02.03 gmake[6]: Entering directory '/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build/instrumented/browser/branding/official/locales'
14:02.03 gmake[6]: Nothing to be done for 'tools'.
14:02.03 gmake[6]: Leaving directory '/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build/instrumented/browser/branding/official/locales'
14:02.03 gmake[5]: Leaving directory '/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build/instrumented/browser/branding/official/locales'
14:02.03 gmake[4]: Leaving directory '/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build/instrumented/browser/locales'
14:02.04 gmake[4]: Entering directory '/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build/instrumented/browser/locales'
14:02.04 ../../config/nsinstall -D ../../dist/linux-x86_64/xpi/
14:02.04 /var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build/instrumented/_virtualenvs/init_py3/bin/python -m mozbuild.action.langpack_manifest --locales en-US --min-app-ver 88.0 --max-app-ver 88.* --app-name 'Firefox' --l10n-basedir '/var/tmp/portage/www-client/firefox-88.0-r1/homedir/.mozbuild/l10n-central' --defines /var/tmp/portage/www-client/firefox-88.0-r1/work/firefox-88.0/toolkit/locales/en-US/defines.inc /var/tmp/portage/www-client/firefox-88.0-r1/work/firefox-88.0/browser/locales/en-US/defines.inc  --langpack-eid 'langpack-en-US@firefox.mozilla.org' --input ../../dist/xpi-stage/locale-en-US
14:02.26 /var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build/instrumented/_virtualenvs/init_py3/bin/python -m mozbuild.action.zip -C ../../dist/xpi-stage/locale-en-US -x **/*.manifest -x **/*.js -x **/*.ini /var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build/instrumented/dist/linux-x86_64/xpi/firefox-88.0.en-US.langpack.xpi chrome localization browser manifest.json
14:02.44 gmake[4]: Leaving directory '/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build/instrumented/browser/locales'
14:02.44 gmake[3]: Leaving directory '/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build/instrumented/browser/locales'
14:02.44 gmake[2]: Leaving directory '/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build/instrumented/browser/installer'
14:02.45 gmake[2]: Entering directory '/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build/instrumented/browser/installer'
14:02.45 gmake[2]: Nothing to be done for 'tools'.
14:02.45 gmake[2]: Leaving directory '/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build/instrumented/browser/installer'
14:02.45 gmake[1]: Leaving directory '/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build/instrumented/browser/installer'
14:02.45 gmake: Leaving directory '/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build/instrumented'
console.warn: SearchSettings: "get: No settings file exists, new profile?" (new Error("", "(unknown module)"))

###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost


###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost

Crash Annotation GraphicsCriticalError: |[C0][GFX1-]: Failed to connect WebRenderBridgeChild. (t=0.146603) [GFX1-]: Failed to connect WebRenderBridgeChild.

###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost


###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost

jarlog: /var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build/jarlog/en-US.log
JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory.
JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory.
JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory.
JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory.
Comment 11 Marek Bartosiewicz 2021-05-01 06:13:55 UTC
www-client/firefox-88.0-r1:0/88::gentoo [88.0:0/88::gentoo] USE="clang dbus gmp-autoupdate hwaccel lto openh264 pgo pulseaudio system-av1 system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-webp wayland -debug -eme-free -geckodriver -hardened -jack -screencast (-selinux) -sndio% -wifi"
Comment 12 Thomas Deutschmann (RETIRED) gentoo-dev 2021-05-01 13:31:11 UTC
Just to be clear, comment #10 doesn't show a build error (these are warning from running firefox during profile guided optimization run).

@Marek: Could you please confirm that you now have a working firefox-88.0-r1 with nodejs[-lto]?
Comment 13 Marek Bartosiewicz 2021-05-01 16:58:22 UTC
Yes, but I had to USE="-lto -pgo" for firefox.

I'm not sure about -lto, but I set it that way just in case.

With USE="pgo" firefox compilation just hanged indefinetly on that message, I waited for about an hour with no activity seen in htop.
Comment 14 Marek Bartosiewicz 2021-05-01 17:54:21 UTC
I tried again, this time with "lto pgo" enabled. Compilation hanged for few minutes on 

JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory.

and then continued for some more time and failed again:

27:19.24     Finished release [optimized] target(s) in 5m 08s
27:19.41 gmake[4]: Leaving directory '/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build/toolkit/library/rust'
27:19.41 gmake[3]: Leaving directory '/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build'
27:19.41 gmake[2]: *** [/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox-88.0/config/recurse.mk:34: compile] Error 2
27:19.41 gmake[2]: Leaving directory '/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build'
27:19.42 gmake[1]: *** [/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox-88.0/config/rules.mk:355: default] Error 2
27:19.42 gmake[1]: Leaving directory '/var/tmp/portage/www-client/firefox-88.0-r1/work/firefox_build'
27:19.42 gmake: *** [client.mk:65: build] Error 2
27:19.44 13 compiler warnings present.
 * ERROR: www-client/firefox-88.0-r1::gentoo failed (compile phase):
 *   Failed to run './mach build --verbose'
 *
 * Call stack:
 *     ebuild.sh, line  125:  Called src_compile
 *   environment, line 4518:  Called virtx './mach' 'build' '--verbose'
 *   environment, line 5846:  Called die
 * The specific snippet of code:
 *       [[ ${retval} -ne 0 ]] && die "Failed to run '$@'";


Buuut I have this in dmesg:

[ 2076.886087] traps: rustc[58196] trap invalid opcode ip:7fb1bb842cf2 sp:7fb1b220c008 error:0 in librustc_driver-9e1a55d25b886146.so[7fb1b8a63000+437d000]
[ 2077.427056] BUG: Bad page map in process rustc  pte:0744d025 pmd:33314e067
[ 2077.427065] page:000000009d579181 refcount:0 mapcount:-1 mapping:0000000000000000 index:0x0 pfn:0x744d
[ 2077.427069] flags: 0x200000000000002(referenced)
[ 2077.427073] raw: 0200000000000002 fffff05d801d1348 fffff05d801d1348 0000000000000000
[ 2077.427075] raw: 0000000000000000 0000000000000000 00000000fffffffe 0000000000000000
[ 2077.427076] page dumped because: bad pte
[ 2077.427076] addr:00007fb1bb842000 vm_flags:00000075 anon_vma:0000000000000000 mapping:ffff8b3794a69ce8 index:2ddf
[ 2077.427079] file:librustc_driver-9e1a55d25b886146.so fault:xfs_filemap_fault mmap:xfs_file_mmap readpage:xfs_vm_readpage
[ 2077.427089] CPU: 22 PID: 58195 Comm: rustc Not tainted 5.12.0-gentoo-x86_64 #2
[ 2077.427091] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./X570M Pro4, BIOS P3.50 04/15/2021
[ 2077.427092] Call Trace:
[ 2077.427098]  dump_stack+0x64/0x7c
[ 2077.427102]  print_bad_pte.cold+0x7d/0xfe
[ 2077.427105]  unmap_page_range+0x6e6/0xc00
[ 2077.427109]  unmap_vmas+0x6a/0xd0
[ 2077.427110]  exit_mmap+0x84/0x1a0
[ 2077.427113]  mmput+0x52/0x110
[ 2077.427116]  do_exit+0x2ef/0xa00
[ 2077.427118]  do_group_exit+0x33/0x90
[ 2077.427120]  get_signal+0x166/0x840
[ 2077.427123]  ? default_send_IPI_single_phys+0x26/0x30
[ 2077.427127]  ? check_preempt_curr+0x2f/0x70
[ 2077.427129]  arch_do_signal_or_restart+0xfc/0x6d0
[ 2077.427131]  ? kernel_clone+0xf3/0x3a0
[ 2077.427133]  ? __x64_sys_futex+0x125/0x190
[ 2077.427136]  exit_to_user_mode_prepare+0xc2/0x150
[ 2077.427138]  syscall_exit_to_user_mode+0x1d/0x40
[ 2077.427142]  entry_SYSCALL_64_after_hwframe+0x44/0xae
[ 2077.427145] RIP: 0033:0x7fb1b438e6c2
[ 2077.427147] Code: Unable to access opcode bytes at RIP 0x7fb1b438e698.
[ 2077.427148] RSP: 002b:00007ffce72aa0f0 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
[ 2077.427150] RAX: fffffffffffffe00 RBX: 0000000000000000 RCX: 00007fb1b438e6c2
[ 2077.427151] RDX: 00000000000087c6 RSI: 0000000000000109 RDI: 00007fb1b2220910
[ 2077.427152] RBP: 0000000000000000 R08: 0000000000000000 R09: 00000000ffffffff
[ 2077.427154] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000000087c6
[ 2077.427154] R13: 0000000000000000 R14: 00007fb1b2220910 R15: 00007fb1b2220640

This is Ryzen 3900X.

I recompiled my system twice (~amd64) after gcc-11.1.0 was released, but I had to skip some failures (like qtwebengine, llvm-roc-4.1.1, llvm-12 I think) so there's something funny going on.

Is this even relevant now? https://github.com/rust-lang/rust/issues/49751
Comment 15 Marek Szuba archtester gentoo-dev 2021-05-01 18:54:24 UTC
It would appear that the situation here is more complicated than simply "net-libs/nodejs[lto] is broken" - on my test system (up to date amd64, USE=lto in make.conf, ACCEPT_KEYWORDS=~amd64 defined only for net-libs/nodejs and www-client/firefox), *none* of the four combination I tried today (nodejs: 14.16.1-r1, 16.0.0-r1, firefox: 78.10.0, 88.0-r1) has failed to build and install.
Comment 16 Marek Szuba archtester gentoo-dev 2021-05-01 21:34:06 UTC
Having just run some tests using gcc-11 builds of nodejs-14.16.1-r1, I can now confirm that having set USE=lto for that ebuild subsequently causes Firefox build failures as described by the others. Moreover, having manually run the Node test suite (I really should figure out some day how to make this play nicely with the sandbox...) an LTO-enabled build, it too fails (with a segfault). Both problems do not occur with USE=-lto.
Comment 17 Larry the Git Cow gentoo-dev 2021-05-01 21:56:31 UTC
The bug has been referenced in the following commit(s):

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

commit 295d9880d9cd001ebc35c1e2cb35884ccc0f7f59
Author:     Marek Szuba <marecki@gentoo.org>
AuthorDate: 2021-05-01 21:52:51 +0000
Commit:     Marek Szuba <marecki@gentoo.org>
CommitDate: 2021-05-01 21:52:51 +0000

    net-libs/nodejs: disallow USE=lto with gcc-11+
    
    Runtime errors + a segfault in the test suite.
    
    Bug: https://bugs.gentoo.org/787158
    Signed-off-by: Marek Szuba <marecki@gentoo.org>

 net-libs/nodejs/nodejs-12.22.1-r1.ebuild | 10 +++++++++-
 net-libs/nodejs/nodejs-14.16.1-r1.ebuild | 10 +++++++++-
 net-libs/nodejs/nodejs-16.0.0-r1.ebuild  | 10 +++++++++-
 3 files changed, 27 insertions(+), 3 deletions(-)
Comment 18 Marek Bartosiewicz 2021-05-02 05:45:45 UTC
I reemerged llvm:11 llvm:12 and rust and this time firefox-88.0-r1 compilation with lto, pgo went OK, no more "invalid opcode" in dmesg.
Comment 19 Andreas K. Hüttel archtester gentoo-dev 2021-09-18 20:12:21 UTC
Looks like this is actually "worked around" now.
Comment 20 Jae Hak Kim 2022-01-23 06:52:27 UTC
Just synced portage and I am not able to build nodejs with lto.
Build fails during pretend phase and is asking to unset lto USEflag:

 * ERROR: net-libs/nodejs-14.17.6::gentoo failed (pretend phase):
 *   LTO builds of nodejs using gcc-11+ currently fail tests and produce runtime errors. Either switch to gcc-10 or unset USE=lto for this ebuild
 *
 * Call stack:
 *               ebuild.sh, line 127:  Called pkg_pretend
 *   nodejs-14.17.6.ebuild, line  69:  Called die
Comment 21 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-23 17:31:33 UTC
(In reply to Jae Hak Kim from comment #20)
> Just synced portage and I am not able to build nodejs with lto.
> Build fails during pretend phase and is asking to unset lto USEflag:
> 
>  * ERROR: net-libs/nodejs-14.17.6::gentoo failed (pretend phase):
>  *   LTO builds of nodejs using gcc-11+ currently fail tests and produce
> runtime errors. Either switch to gcc-10 or unset USE=lto for this ebuild
>  *
>  * Call stack:
>  *               ebuild.sh, line 127:  Called pkg_pretend
>  *   nodejs-14.17.6.ebuild, line  69:  Called die

We can't really do much for this in Gentoo given the upstream issue has had no attention. We could mask the flag though given GCC 11 is now stable.
Comment 22 nE0sIghT 2022-02-04 16:57:38 UTC
It looks like this was fixed in 12.22.9, 14.19.0 and will be fixed soon in 16.14.0
Comment 23 sphakka 2022-02-09 20:26:52 UTC
(In reply to nE0sIghT from comment #22)
> It looks like this was fixed in 12.22.9, 14.19.0 and will be fixed soon in
> 16.14.0

I installed nodejs-16.13.2 with GCC11 and LTO (simply commented out the check in the ebuild). Firefox-96.0.3 and 97.0, and Thunderbird-91.5.0 build and run fine, so far :-)
Comment 24 Larry the Git Cow gentoo-dev 2022-06-03 18:44:04 UTC
The bug has been referenced in the following commit(s):

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

commit 23f4cffb98b5e0f3fdd35c93f4e3307de8fbb701
Author:     William Hubbs <williamh@gentoo.org>
AuthorDate: 2022-06-03 18:33:37 +0000
Commit:     William Hubbs <williamh@gentoo.org>
CommitDate: 2022-06-03 18:43:55 +0000

    net-libs/nodejs: add 14.19.3, 16.15.1, 18.3.0, sync live
    
    Closes: https://bugs.gentoo.org/848777
    Bug: https://bugs.gentoo.org/845261
    Closes: https://bugs.gentoo.org/843296
    Closes: https://github.com/gentoo/gentoo/pulls/25418
    Bug: https://bugs.gentoo.org/787158
    Signed-off-by: William Hubbs <williamh@gentoo.org>

 net-libs/nodejs/Manifest               |   3 +
 net-libs/nodejs/nodejs-14.19.3.ebuild  | 227 +++++++++++++++++++++++++++++++++
 net-libs/nodejs/nodejs-16.15.1.ebuild  | 219 +++++++++++++++++++++++++++++++
 net-libs/nodejs/nodejs-18.3.0.ebuild   | 219 +++++++++++++++++++++++++++++++
 net-libs/nodejs/nodejs-99999999.ebuild |  13 +-
 5 files changed, 669 insertions(+), 12 deletions(-)