Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V8 currency and Node.js 15 #931

Closed
targos opened this issue Sep 24, 2020 · 29 comments
Closed

V8 currency and Node.js 15 #931

targos opened this issue Sep 24, 2020 · 29 comments

Comments

@targos
Copy link
Member

targos commented Sep 24, 2020

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.

@mcollina
Copy link
Member

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.

@targos
Copy link
Member Author

targos commented Sep 24, 2020

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

@mcollina
Copy link
Member

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.

@devsnek
Copy link
Member

devsnek commented Sep 24, 2020

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.

@mcollina
Copy link
Member

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?

@bnb
Copy link
Contributor

bnb commented Sep 24, 2020

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

@targos
Copy link
Member Author

targos commented Sep 24, 2020

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

@MylesBorins
Copy link
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

@mmarchini
Copy link
Contributor

I can try to help over the weekend

@mhdawson
Copy link
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.

@mmarchini
Copy link
Contributor

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

@mmarchini
Copy link
Contributor

mmarchini commented Sep 25, 2020

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.

@targos
Copy link
Member Author

targos commented Sep 25, 2020

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

@mmarchini
Copy link
Contributor

mmarchini commented Sep 25, 2020

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).

@nschonni
Copy link
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

@mmarchini
Copy link
Contributor

Nice! Will definitely take a look.

@mmarchini
Copy link
Contributor

image

👀

(I might be derailing this issue, will open a tracking issue on nodejs/node)

@mmarchini
Copy link
Contributor

For anyone wanting to help:

https://github.com/mmarchini/node-arm-cross-builder

@gengjiawen
Copy link
Member

For anyone wanting to help:

mmarchini/node-arm-cross-builder

What's the minimal kernel ? 4.14 ?

image

@mmarchini
Copy link
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

@mmarchini
Copy link
Contributor

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

@gengjiawen
Copy link
Member

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

@mmarchini
Copy link
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.

@sxa
Copy link
Member

sxa commented Sep 29, 2020

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?

@gengjiawen
Copy link
Member

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

@gengjiawen
Copy link
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.

@mmarchini
Copy link
Contributor

I believe this issue can be closed? @targos

@targos targos closed this as completed Sep 29, 2020
@targos targos reopened this Oct 4, 2020
@targos
Copy link
Member Author

targos commented Oct 4, 2020

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

@targos
Copy link
Member Author

targos commented Oct 18, 2020

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

@targos targos closed this as completed Oct 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants