Skip to content

nodejs 24.0.1 tries and fails to link v8's maglev on s390x #58954

Closed

Description

@khardix

Version

24.0.1

Platform

Linux ce914293929347cba01065b95f8f20e8 6.15.4-200.fc42.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jun 27 15:32:46 UTC 2025 s390x GNU/Linux

Subsystem

No response

What steps will reproduce the bug?

Try to build nodejs 24.0.1 on s390x without touching any configure options specifically mentioning v8 or it's maglev subsystem.

How often does it reproduce? Is there a required condition?

Always.

What is the expected behavior? Why is that the expected behavior?

Node compiles and links into usable artifacts.

What do you see instead?

The compilation proceeds up until trying to link v8, at which point ld fails with bunch of duplicate definitions in maglev. One example for all:

/usr/bin/ld: obj/tools/v8_gypfiles/../../deps/v8/src/maglev/v8_compiler.maglev-compilation-info.o (symbol from plugin): in function `v8::internal::maglev::MaglevCompilationInfo::ReopenAndCanonicalizeHandlesInNewScope(v8::internal::Isolate*)':
(.text+0x0): multiple definition of `v8::internal::maglev::MaglevCompilationInfo::ReopenAndCanonicalizeHandlesInNewScope(v8::internal::Isolate*)'; obj/tools/v8_gypfiles/../../deps/v8/src/maglev/v8_base_without_compiler.maglev-compilation-info.o:/builddir/build/BUILD/nodejs24-24.0.1-build/node-v24.0.1/out/Release/../../deps/v8/src/maglev/maglev-compilation-info.cc:162: first defined here

The full build log: nodejs24-s390x-maglev-builder-live.log.gz

Additional information

  • The issue does not manifest on x86_64.
  • The issue does not manifest on v22, namely version 22.17.0 compiles and links successfully in the same environment and with the same configuration options.
  • According to configure.py output, 'v8_enable_maglev': 0, but the sources are still compiled and attempted to be linked.
  • I don't need maglev to work on s390x; disabling it's compilation properly is acceptable outcome.

Activity

  1. khardix commented on Jul 4, 2025

    @khardix
    ContributorAuthor

    @richardlau FYI; not sure if you are the right person to pull in.

  2. changed the title [-]nodejs 24.0.1 tries and fails to link maglev on s390x[/-] [+]nodejs 24.0.1 tries and fails to link v8's maglev on s390x[/+] on Jul 4, 2025
  3. richardlau commented on Jul 4, 2025

    @richardlau
    Member

    @khardix Would you be able to see if #58861 changes anything since it concerns "duplicate symbols during linking if maglev is disabled or not available for the target"?

    Also we're not seeing this on the builds here -- differences between our builds and the Fedora build log that could cause a difference:

    builds here Fedora
    gcc 12.2.1 gcc 15.1.1
    built with make built with ninja
    no LTO LTO enabled

    @miladfarca have we hit anything similar in upstream V8 on s390x?

  4. khardix commented on Jul 4, 2025

    @khardix
    ContributorAuthor

    no LTO / LTO enabled

    We did try disabling (not enabling) LTO previously, it looks like it has no impact on this. Results are the same in both cases.

    I'll test whether the linker PR will have an impact.

  5. miladfarca commented on Jul 4, 2025

    @miladfarca
    Contributor

    No we haven't hit anything similar, keep in mind we build with maglev enabled on s390x by default.
    Some files do get built even with maglev disabled and maglev-compilation-info.cc is one of them:
    https://github.com/v8/v8/blob/abe8d490e99a33e707e129a6a69dbd44917e95f7/BUILD.gn#L5225
    That specific symbol should also only be defined here: https://github.com/v8/v8/blob/abe8d490e99a33e707e129a6a69dbd44917e95f7/src/maglev/maglev-compilation-info.cc#L152

  6. richardlau commented on Jul 4, 2025

    @richardlau
    Member

    I've reproduced this on test-ibm-rhel8-s390x-4 with gcc 12 and

    python3 ./configure.py --verbose --ninja --shared
    ninja -v -j4 -C out/Release
    

    It did not happen with

    python3 ./configure.py --verbose --ninja
    ninja -v -j4 -C out/Release
    

    I'm going to check with --shared but without ninja.

  7. richardlau commented on Jul 4, 2025

    @richardlau
    Member

    Reproduces with

    python3 ./configure.py --verbose --shared
    make -j4
    

    i.e. it's something to do with --shared and not related to make/ninja.

  8. richardlau commented on Jul 4, 2025

    @richardlau
    Member

    It does appear that #58861 should fix this. @khardix it would be great if you're able to confirm.

  9. khardix commented on Jul 7, 2025

    @khardix
    ContributorAuthor

    Confirming that #58861 seems to fix this. Thanks for the pointer!

    I would like to leave this open until the PR lands, but I'm not sure whether someone will notice and close it then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions