Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 784995 - net-libs/nodejs-16.0.0: "deps/v8/src/heap/base/stack.cc:132: undefined reference to `PushAllRegistersAndIterateStack'" with LTO enabled
Summary: net-libs/nodejs-16.0.0: "deps/v8/src/heap/base/stack.cc:132: undefined refere...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: William Hubbs
URL: https://github.com/nodejs/node/pull/3...
Whiteboard:
Keywords:
Depends on:
Blocks: lto
  Show dependency tree
 
Reported: 2021-04-22 07:33 UTC by Patrick Lauer
Modified: 2025-05-06 02:40 UTC (History)
2 users (show)

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


Attachments
build log (build.log.bz2,49.18 KB, application/x-bzip2)
2021-04-23 13:05 UTC, Andreas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Lauer gentoo-dev 2021-04-22 07:33:53 UTC
In member function âResizeâ,
    inlined from âpush_backâ at ../deps/v8/src/utils/detachable-vector.h:58:0,
    inlined from âSaveContextâ at ../deps/v8/src/api/api.h:448:0,
    inlined from â__ct_base â at ../deps/v8/src/api/api-inl.h:158:0:
../deps/v8/src/utils/detachable-vector.h:92:20: warning: argument 1 value â18446744073709551615â exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
   92 |     T* new_data_ = new T[new_capacity];
      |                    ^
../deps/v8/src/utils/detachable-vector.h: In member function â__ct_base â:
/usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/include/g++-v10/new:128:26: note: in a call to allocation function âoperator new []â declared here
  128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                          ^
/usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/net-libs/nodejs-16.0.0/temp/mksnapshot.WzTihA.ltrans51.ltrans.o: in function `cppgc::internal::MarkerBase::VisitRoots(cppgc::EmbedderStackState)':
/var/tmp/portage/net-libs/nodejs-16.0.0/work/node-v16.0.0/out/../deps/v8/src/heap/base/stack.cc:132: undefined reference to `PushAllRegistersAndIterateStack'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/net-libs/nodejs-16.0.0/temp/mksnapshot.WzTihA.ltrans52.ltrans.o: in function `heap::base::Stack::IteratePointers(heap::base::StackVisitor*) const':
/var/tmp/portage/net-libs/nodejs-16.0.0/work/node-v16.0.0/out/../deps/v8/src/heap/base/stack.cc:132: undefined reference to `PushAllRegistersAndIterateStack'
collect2: error: ld returned 1 exit status
make: *** [tools/v8_gypfiles/mksnapshot.target.mk:191: /var/tmp/portage/net-libs/nodejs-16.0.0/work/node-v16.0.0/out/Release/mksnapshot] Error 1
rm 8013d80599959dd37ed084fe5c16764da9fdb0f2.intermediate c1866ab1739b265623d83d9caaeb64479e3aea52.intermediate 1945048cb27a07cf070ac366d15b92af6c8d9b81.intermediate
make: Leaving directory '/var/tmp/portage/net-libs/nodejs-16.0.0/work/node-v16.0.0/out'
 * ERROR: net-libs/nodejs-16.0.0::gentoo failed (compile phase):
 *   emake failed

Portage 3.0.18 (python 3.8.9-final-0, !../../var/db/repos/gentoo/profiles/default/linux/amd64/17.1, gcc-10.3.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,  39448640 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-lang/rust-bin:        1.50.0::gentoo
dev-util/cmake:           3.20.1::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:            9.3.0-r2::gentoo, 10.3.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.11::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-extra-opts:
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-metamanifest: no
    sync-rsync-verify-jobs: 1

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 amd64 berkdb bzip2 cli crypt dri fortran gdbm iconv ipv6 libglvnd libtirpc multilib ncurses nls nptl openmp pam pcre readline seccomp split-usr ssl system-llvm tcpd unicode xattr 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 Larry the Git Cow gentoo-dev 2021-04-22 15:27:31 UTC
The bug has been closed via the following commit(s):

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

commit 5b43e0081fcb5059fc9e68a0aa7d2993a8805643
Author:     Marek Szuba <marecki@gentoo.org>
AuthorDate: 2021-04-22 13:47:11 +0000
Commit:     Marek Szuba <marecki@gentoo.org>
CommitDate: 2021-04-22 15:27:12 +0000

    net-libs/nodejs-16.0.0: implement IUSE=lto
    
    Note that the upstream patch which for the time being is required to
    make LTO work only has an effect if the aforementioned USE flag is set.
    
    Closes: https://bugs.gentoo.org/784995
    Signed-off-by: Marek Szuba <marecki@gentoo.org>

 net-libs/nodejs/files/nodejs-16.0.0-v8_lto.patch   | 39 ++++++++++++++++++++++
 net-libs/nodejs/metadata.xml                       |  1 +
 ...odejs-16.0.0.ebuild => nodejs-16.0.0-r1.ebuild} | 12 +++++--
 3 files changed, 50 insertions(+), 2 deletions(-)
Comment 2 Mike Lothian 2021-04-22 23:37:52 UTC
I think you've forced the nodejs ebuild not to build with Clang & LTO, which was working fine with Nodejs 16 after switching due to this bug

Is there a known issue with Clang or is it just unsupported?
Comment 3 Marek Szuba (RETIRED) archtester gentoo-dev 2021-04-23 07:58:45 UTC
(In reply to Mike Lothian from comment #2)

> I think you've forced the nodejs ebuild not to build with Clang & LTO, which
> was working fine with Nodejs 16 after switching due to this bug
> 
> Is there a known issue with Clang or is it just unsupported?

Unsupported by upstream - there is a snippet in upstream configure.py of all three branches currently in Gentoo, which at least in case of 16.0.0 caused src_configure to abort for me with  USE=lto and Clang.
Comment 4 Andreas 2021-04-23 10:54:19 UTC
It doesn't seem to have solved the issue for me, I'm still seeing the same error.
Comment 5 Andreas 2021-04-23 12:57:32 UTC
I tried attaching the build log but I'm getting an internal error from the webserver.
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-04-23 13:01:34 UTC
(In reply to Andreas from comment #5)
> I tried attaching the build log but I'm getting an internal error from the
> webserver.

Usually that's when your user doesn't have access to it (instead owned by e.g. Portage).
Comment 7 Andreas 2021-04-23 13:05:14 UTC
Created attachment 701892 [details]
build log
Comment 8 Andreas 2021-04-23 13:05:45 UTC
(In reply to Sam James from comment #6)
> (In reply to Andreas from comment #5)
> > I tried attaching the build log but I'm getting an internal error from the
> > webserver.
> 
> Usually that's when your user doesn't have access to it (instead owned by
> e.g. Portage).

doh, yes you were right permission problem
Comment 9 Marek Szuba (RETIRED) archtester gentoo-dev 2021-04-23 14:07:51 UTC
It seems Node doesn't like user-defined LTO compiler/linker flags... Try it now, I've added an appropriate filter to the ebuilds.
Comment 10 Andreas 2021-04-23 16:19:26 UTC
(In reply to Marek Szuba from comment #9)
> It seems Node doesn't like user-defined LTO compiler/linker flags... Try it
> now, I've added an appropriate filter to the ebuilds.

Thanks, that solved it.