Skip to content

Build of v8/tools/gyp/mksnapshot fails with -fuse-ld=gold with binutils 2.25.1 #6603

Closed
@BlackYoup

Description

@BlackYoup

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 !

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildIssues and PRs related to build files or the CI.v8 engineIssues and PRs related to the V8 dependency.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions