Skip to content

V8 currency and Node.js 15 #931

Closed
Closed

Description

@targos

This issue is mainly about nodejs/node#34337

We are now one month after the stable upstream release of V8 8.5. Unfortunately, the PR is still not ready to be merged, and I'm afraid that we may not be able to fix it soon enough for the release of Node.js 15.0.0, which would still have the same V8 version as Node.js 14.

It is now mainly blocked on a cross-compilation issue with ARM on Linux and I do not know what to do anymore. I have no experience with cross-compilation myself. @gengjiawen has been very helpful so far with the other issues (especially on Windows, thanks a lot! 🙇 ) but also seems out of ideas.

We tried to ping the platform-arm team and nobody answered (it's a very small team).
I'm opening an issue here hoping it gets some visibility. We haven't been so late with V8 updates in a very long time.

Activity

  1. mcollina commented on Sep 24, 2020

    @mcollina
    SponsorMember

    I think we should ship without ARM on Linux if we do not have the capabilities to maintain it. Keeping V8 currency is a primary goal.

  2. targos commented on Sep 24, 2020

    @targos
    MemberAuthor

    @mcollina It's current a tier 1 platform:
    image

  3. mcollina commented on Sep 24, 2020

    @mcollina
    SponsorMember

    Either we reach out to ARM themselves or do a public call for help and we receive some help, or we downgrade it as our volunteers for supporting that platform are not there anymore.

  4. devsnek commented on Sep 24, 2020

    @devsnek
    Member

    I fear we may lock out a large number of students if we drop Linux arm. I'd love to assist but my arm hardware is currently across the country from me due to some annoying circumstances.

  5. mcollina commented on Sep 24, 2020

    @mcollina
    SponsorMember

    I fear we may lock out a large number of students if we drop Linux arm

    I 100% agree, I'm just reporting the current state of things - I'm just measuring the current state of affairs: we lack volunteers for ARM.


    @bnb maybe we can do a call to arms on twitter from the @nodejs account?

  6. bnb commented on Sep 24, 2020

    @bnb
    Contributor

    @mcollina I would be happy to. What specifically do we want to say?

  7. targos commented on Sep 24, 2020

    @targos
    MemberAuthor

    Note that probably no ARM hardware is needed to fix the build issue as it happens during cross-compilation on the host (x64).

  8. MylesBorins commented on Sep 24, 2020

    @MylesBorins
    Contributor

    I can maybe take a look. Have we pinged the V8 team at all? In the past I was able to get them to help with build issues

  9. mmarchini commented on Sep 24, 2020

    @mmarchini
    Contributor

    I can try to help over the weekend

  10. mhdawson commented on Sep 24, 2020

    @mhdawson
    Member

    I assume this would affect apple on arm as well ? Just want to understand so that we know what people/companies we might reach out to in respect to finding more people to help out on the arm platform.

  11. mmarchini commented on Sep 24, 2020

    @mmarchini
    Contributor

    Do we have instructions somewhere for cross-compilation? Couldn't find any on BUILDING.md

  12. mmarchini commented on Sep 25, 2020

    @mmarchini
    Contributor

    That's what I tried on Ubuntu (WSL2) on master:

    $ sudo apt install binutils-arm-linux-gnueabi gcc-arm-linux-gnueabi g++-arm-linux-gnueabi
    $ ./configure --dest-cpu=arm
    $ make
    ...
      cc -o /home/mmarchini/workspace/node/out/Release/obj.target/openssl/deps/openssl/openssl/crypto/asn1/a_int.o ../deps/openssl/openssl/crypto/asn1/a_int.c '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DOPENSSL_NO_HW' '-DOPENSSL_NO_QUIC=1' '-DNDEBUG' '-DOPENSSL_USE_NODELETE' '-DOPENSSL_PIC' '-DOPENSSL_CPUID_OBJ' '-DOPENSSL_BN_ASM_MONT' '-DOPENSSL_BN_ASM_GF2m' '-DSHA1_ASM' '-DSHA256_ASM' '-DSHA512_ASM' '-DKECCAK1600_ASM' '-DAES_ASM' '-DBSAES_ASM' '-DGHASH_ASM' '-DECP_NISTZ256_ASM' '-DPOLY1305_ASM' '-DOPENSSLDIR="/etc/ssl"' '-DENGINESDIR="/dev/null"' '-DTERMIOS' -I../deps/openssl/openssl -I../deps/openssl/openssl/include -I../deps/openssl/openssl/crypto -I../deps/openssl/openssl/crypto/include -I../deps/openssl/openssl/crypto/modes -I../deps/openssl/openssl/crypto/ec/curve448 -I../deps/openssl/openssl/crypto/ec/curve448/arch_32 -I../deps/openssl/config -I../deps/openssl/config/archs/linux-armv4/asm -I../deps/openssl/config/archs/linux-armv4/asm/include -I../deps/openssl/config/archs/linux-armv4/asm/crypto -I../deps/openssl/config/archs/linux-armv4/asm/crypto/include/internal  -pthread -Wall -Wextra -Wno-unused-parameter -Wa,--noexecstack -Wall -O3 -pthread -Wall -O3 -Wno-missing-field-initializers -Wno-old-style-declaration -O3 -fno-omit-frame-pointer  -MMD -MF /home/mmarchini/workspace/node/out/Release/.deps//home/mmarchini/workspace/node/out/Release/obj.target/openssl/deps/openssl/openssl/crypto/asn1/a_int.o.d.raw   -c
    In file included from ../deps/openssl/openssl/crypto/armcap.c:18:
    ../deps/openssl/openssl/crypto/arm_arch.h:55:6: error: #error "unsupported ARM architecture"
       55 | #    error "unsupported ARM architecture"
          |      ^~~~~
    make[1]: *** [deps/openssl/openssl.target.mk:850: /home/mmarchini/workspace/node/out/Release/obj.target/openssl/deps/openssl/openssl/crypto/armcap.o] Error 1
    make[1]: *** Waiting for unfinished jobs....
    make: *** [Makefile:104: node] Error 2

    I think I might be missing some dependency.

  13. targos commented on Sep 25, 2020

    @targos
    MemberAuthor

    @mmarchini There are some hints here: nodejs/node#35252

  14. mmarchini commented on Sep 25, 2020

    @mmarchini
    Contributor

    Ok, I think I got it building. Thank you @targos! Will share a gist with steps to build once I confirm it works.

    Will also try to use QEMU to test. If it works I might send a PR to add a test-linux-arm Action 🔥 (which will also serve as documentation, kind of).

  15. nschonni commented on Sep 25, 2020

    @nschonni
    Member

    @mmarchini you might want to take a look at nodejs/docker-node#1334 where there is an approach for using QEMU with GitHub Actions

  16. 2 remaining items

  17. mmarchini commented on Sep 25, 2020

    @mmarchini
    Contributor
  18. gengjiawen commented on Sep 26, 2020

    @gengjiawen
    Member

    For anyone wanting to help:

    mmarchini/node-arm-cross-builder

    What's the minimal kernel ? 4.14 ?

    image

  19. mmarchini commented on Sep 26, 2020

    @mmarchini
    Contributor

    No idea, I ran it on Ubuntu 20.04. I think in your case it's a mismatch between the docket image (Ubuntu 18.04) and the kernel versions (which is too old for Ubuntu 18.04).

    Either way, as long as it builds I guess it's fine? The problem we're having is on build time

  20. mmarchini commented on Sep 26, 2020

    @mmarchini
    Contributor

    In other words if you downgrade the docker image to 16.04 it should work

  21. gengjiawen commented on Sep 26, 2020

    @gengjiawen
    Member

    Docker image share kernel with host, should be the kernel being old. Anyway, I can test the build now :)

  22. mmarchini commented on Sep 26, 2020

    @mmarchini
    Contributor

    Yes, docker container will share kernel with host, but it will install packages based on the distro image, which could lead to mismatch between kernel and expected kernel by a package. I think it's likely that qemu is built for a specific kernel version or with a minimum kernel greater than 4.4. By using a Ubuntu 16.04 image instead qemu (or whatever is expecting a higher kernel version) should work.

  23. sxa commented on Sep 29, 2020

    @sxa
    Member

    I assume this would affect apple on arm as well ? Just want to understand so that we know what people/companies we might reach out to in respect to finding more people to help out on the arm platform.

    I assume this is specific to 32-bit arm and therefore would NOT affect aarch64?

  24. gengjiawen commented on Sep 29, 2020

    @gengjiawen
    Member

    The issue is fixed by me. And @targos start V8 8.6 for Node.js 15 in nodejs/node#35415.

  25. gengjiawen commented on Sep 29, 2020

    @gengjiawen
    Member

    The issue is fixed by me. And @targos start V8 8.6 for Node.js 15 in nodejs/node#35415.

    And great thanks @rvagg and @mmarchini for the cross-compile env setup.

  26. mmarchini commented on Sep 29, 2020

    @mmarchini
    Contributor

    I believe this issue can be closed? @targos

  27. reopened this on Oct 4, 2020
  28. targos commented on Oct 4, 2020

    @targos
    MemberAuthor

    I'm reopening for visibility because we hit other issues with V8 8.6: nodejs/node#35415

  29. targos commented on Oct 18, 2020

    @targos
    MemberAuthor

    Just need one more TSC review on nodejs/node#35415

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