-
Notifications
You must be signed in to change notification settings - Fork 200
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
Linux arm64 support? #529
Comments
I was able to get this to work on arm64. I was completely unable to build the v8 library on an arm64 machine though. I was forced to cross-compile from an x64 machine. When doing so the script that builds the gn arguments unfortunately sets the target_cpu to x64 while the v8_target_cpu is set correctly to arm64. I didn't catch this until trying to figure out why the v8js library wouldn't configure. So you have to manually edit the generated files to use the correct architecture. I also had to modify the unit tests in the v8 library because there's some compilation failure specific to arm64. Essentially I just commented out every test that referenced a removed class and then every function those tests referenced. Then I just copied over my newly compiled v8 library to the arm64 machine and completed the rest of the steps there. Seems to be working. This was performed on the latest 12.0 release which at the moment of this writing is 12.0.267.27. I performed this on Ubuntu 24.04. |
@rydan313 I've got Macbook Pro with M1 on it. It uses arm64 as well.
Here's a gist that works for me with libnode available in the package manager. Feel free to look around and check if it works for you as well: No tests are failing, one is being skipped - because it's a non-zts build and pthreads is not available. If you need pthreads, you could base off
|
@rydan313 I hope this worked for you. Let me know if there's something I could improve in the gist. 🙂 |
I'm trying to migrate to Amazon Graviton processors based on arm64. But I'm running into issues compiling this library when following the instructions at https://github.com/phpv8/v8js/blob/php8/README.Linux.md#compile-v8-56-and-newer-using-gn . I've done it successfully multiple times with x64 over the years but simply replacing with arm64 doesn't work and it seems there is very limited support from the v8 project itself to compile their library for this architecture. For instance the third instruction at https://v8.dev/docs/compile-arm64 indicates an option '--gcc-toolchain' that doesn't exist.
Do we have updated instructions on compiling this for this particular architecture? Are there any reports of anyone successfully doing this? I've tried versions 12.0.267.14, 8.9.255 (my current working x64 version), and 8.0.426.30.
The text was updated successfully, but these errors were encountered: