Repository navigation
Closed
Description
- Version: at least 4.2.4 and above
- Platform: Linux exherbo 4.5.1+ The relationship to node.js is confusing #3 SMP x86_64 GNU/Linux - Using Paludis (package manager)
- Subsystem: v8 / mksnapshot
Hi everyone,
I'm building node from source but I'm getting a gold error at linking phase of v8/tools/gyp/mksnapshot:
x86_64-pc-linux-gnu-c++ -pthread -rdynamic -m64 -fuse-ld=gold -B/var/tmp/paludis/build/dev-lang-node-5.4.1/work/node-v5.4.1/third_party/binutils/Linux_x64/Release/bin -m64 -o /var/tmp/paludis/build/dev-lang-node-5.4.1/work/node-v5.4.1/out/Release/mksnapshot -Wl,--start-group /var/tmp/paludis/build/dev-lang-node-5.4.1/work/node-v5.4.1/out/Release/obj.target/mksnapshot/deps/v8/src/snapshot/mksnapshot.o /var/tmp/paludis/build/dev-lang-node-5.4.1/work/node-v5.4.1/out/Release/obj.target/deps/v8/tools/gyp/libv8_base.a /var/tmp/paludis/build/dev-lang-node-5.4.1/work/node-v5.4.1/out/Release/obj.target/deps/v8/tools/gyp/libv8_nosnapshot.a /var/tmp/paludis/build/dev-lang-node-5.4.1/work/node-v5.4.1/out/Release/obj.target/deps/v8/tools/gyp/libv8_libplatform.a /var/tmp/paludis/build/dev-lang-node-5.4.1/work/node-v5.4.1/out/Release/obj.target/deps/v8/tools/gyp/libv8_libbase.a -Wl,--end-group -lz -licui18n -licuuc -licudata -ldl -lrt
/usr/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ld.gold: internal error in sized_finalize_symbol, at /var/tmp/paludis/build/sys-devel-binutils-2.25.1-r5/work/binutils-2.25.1/gold/symtab.cc:2768
collect2: error: ld returned 1 exit status
deps/v8/tools/gyp/mksnapshot.target.mk:145: recipe for target '/var/tmp/paludis/build/dev-lang-node-5.4.1/work/node-v5.4.1/out/Release/mksnapshot' failed
make[1]: *** [/var/tmp/paludis/build/dev-lang-node-5.4.1/work/node-v5.4.1/out/Release/mksnapshot] Error 1
make[1]: Leaving directory '/var/tmp/paludis/build/dev-lang-node-5.4.1/work/node-v5.4.1/out'
Makefile:45: recipe for target 'node' failed
make: *** [node] Error 2
My gold version: GNU gold (GNU Binutils 2.25.1) 1.11
I do not have this error with binutils 2.26 or if I set 'linux_use_gold_flags%': 0 in deps/v8/build/toolchain.gypi
I wanted to know if there was a more global flag to disable -fuse-ld ? I checked #4212 but didn't really help.
If I set --without-snapshot it builds too but I'm not a fan of disabling a feature because it doesn't build.
Binutils 2.26 is not yet fully available on my platform, hence my question.
Here is the result of the configure:
./configure --prefix=/usr/x86_64-pc-linux-gnu --shared-zlib --with-intl=system-icu
creating ./icu_config.gypi
{ 'target_defaults': { 'cflags': [],
'default_configuration': 'Release',
'defines': [],
'include_dirs': [],
'libraries': [ '-lz',
'-licui18n',
'-licuuc',
'-licudata']},
'variables': { 'asan': 0,
'gas_version': '2.25',
'host_arch': 'x64',
'icu_gyp_path': 'tools/icu/icu-system.gyp',
'icu_small': 'false',
'node_byteorder': 'little',
'node_enable_v8_vtunejit': 'false',
'node_install_npm': 'true',
'node_prefix': '/usr/x86_64-pc-linux-gnu',
'node_release_urlbase': '',
'node_shared_http_parser': 'false',
'node_shared_libuv': 'false',
'node_shared_openssl': 'false',
'node_shared_zlib': 'true',
'node_tag': '',
'node_use_dtrace': 'false',
'node_use_etw': 'false',
'node_use_lttng': 'false',
'node_use_openssl': 'true',
'node_use_perfctr': 'false',
'openssl_fips': '',
'openssl_no_asm': 0,
'python': '/usr/bin/python2',
'target_arch': 'x64',
'uv_parent_path': '/deps/uv/',
'uv_use_dtrace': 'false',
'v8_enable_gdbjit': 0,
'v8_enable_i18n_support': 1,
'v8_no_strict_aliasing': 1,
'v8_optimized_debug': 0,
'v8_random_seed': 0,
'v8_use_snapshot': 'true',
'want_separate_host_toolset': 0}}
creating ./config.gypi
creating ./config.mk
Thanks for your help !
Activity
mscdex commentedon May 5, 2016
'linux_use_gold_flags%': 0was added recently in 3cdb506 by @bnoordhuis. Perhaps it should be backported to v4.x and v5.x as well?bnoordhuis commentedon May 6, 2016
#6393 is labeled lts-watch-v4.x so it's scheduled for v4.x and v5.x I'll close, there is nothing left to do except release.
@BlackYoup You can apply https://github.com/nodejs/node/commit/3cdb506.patch for now to work around the issue.
BlackYoup commentedon May 6, 2016
@bnoordhuis Well, I didn't explicitly said it but I tried this patch first and still have the same build issue. But it builds by directly setting the value to 0 in
deps/v8/build/toolchain.gypibnoordhuis commentedon May 6, 2016
I'll reopen, perhaps recent changes broke something. With master,
-Bis used (again) but-fuse-ld=goldis not.BlackYoup commentedon May 6, 2016
@bnoordhuis do you want me to try with current master then ?
bnoordhuis commentedon May 6, 2016
You can if you want to, there's a decent chance it'll work for you. I still need to look into why it's only partially disabled, though.
mhart commentedon May 8, 2016
FWIW I've had to overwrite
linux_use_gold_flags%to 0 to get it compile on Alpine on Docker Hub too (this was the only change that seemed to work – it also, obviously, didn't require installing binutils-gold anymore). Trying to setGYP_DEFINEShad no effect unfortunately (edit: it does work actually, just need to make sure you export it! Duh.export GYP_DEFINES="linux_use_gold_flags=0")@bnoordhuis the patch you linked to sets
linux_use_bundled_gold%to 0, but notlinux_use_gold_flags%, which seems to be the magic lever.Manually override linux_use_gold_flags in toolchain.gypi
mhart commentedon May 8, 2016
@bnoordhuis could it be that these flags in
toolchain.gypiaren't overridden by setting them incommon.gypi?bnoordhuis commentedon May 9, 2016
@mhart Yes, it appears that no longer works. PR: #6650
build: don't compile with -B, redux
build: don't compile with -B, redux
Manually override linux_use_gold_flags in toolchain.gypi