You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 4, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 4, 2023. It is now read-only.
Also, when I tried to crosscompile for ARM, the CFLAGS included -march=x86-64 so I stopped it. This warrants more investigation but at this point I cannot spare the time. I would appreciate any hints ❤
Hi, I managed to build v8 version 6.7.288 on ARM64 (natively on Amazon's Graviton). Is there a way to contribute the binaries?
For the record, the patches were quite involved:
infra/mb/mb_config.pyl had to be patched for arm64.release not to cross compile (achieved by replacing the target_cpu of simulate_arm64);
gn had to be replaced/rebuilt to work on ARM64;
clang had to be replaced with version 7, which is not in the repos yet;
A clang plugin (libFindBadConstructs.so) had to be recompiled based on this code and built manually using the following line clang++ *.cpp -c -I /home/ubuntu/clang+llvm-7.0.1-aarch64-linux-gnu/include/ -fPIC -Wall -std=c++14 -fno-rtti -fno-omit-frame-pointer and clang -shared *.o -o libFindBadConstructs.so;
We ran into issues right and left with the build system so I ended up calling ninja and the few commands before manually.
At long last however, we finally managed to get those .a!
A script implementing this logic within the context of our project is available here, but is likely very brittle.
Reacted by Colin
Reacted by Martynas M, Alex Evers, Qasim Mehmood, Jeremy Boy, Miguel Angel Ajo Pelayo, Andrey, Fabio Mazarotto and __sidthyant.roy__
Hi everyone! I also managed to compile v8 for this gem for fully working rails application on AWS's Graviton c6g instance.
As said before the main problem is that binaries (clang, gn & ninja) that gonna be used to compile v8 libraries have been built for x86 architecture. i've just tried to recompile them and substitute with original ones.
I've consolidated all my work in Dockerfile in this repo: https://github.com/hypersleep/rails-on-arm That gives you fully-functional ruby on rails app with mini_racer on board.
Hope it helps everybody! I think this process should to be fixed soon on gem build level or in v8 build system due to rising popularity of ARM servers.
Reacted by BenSandeen, Colin and Nikolai Zhivotenko
Hi everybody. Are there any updates on this issue? I came across this when assembling a mini_racer for M2 Pro. The solution from @hypersleep didn't help, the vanilla version is not building. Added an error message to the discussion.
Activity
thalyssra commentedon Jul 7, 2018
Is this due to the GN change? because it should build on both. An upstream issue link?
ignisf commentedon Jul 7, 2018
@thalyssra, have not dug down enough to find out. The build fails due to missing
gnbinary for ARM.ignisf commentedon Jul 7, 2018
Also, when I tried to crosscompile for ARM, the CFLAGS included
-march=x86-64so I stopped it. This warrants more investigation but at this point I cannot spare the time. I would appreciate any hints ❤ignisf commentedon Jul 10, 2018
@thalyssra, I've linked the upstream issue above.
thalyssra commentedon Jul 10, 2018
Let me poke someone I know who knows a bit more, I know he was looking into this a long time ago.
steev commentedon Oct 12, 2018
@ignisf so, there were some upstream changes to gn (which is good!);
I'm not sure how easy it would be to script to replace, however, you should be able to do the following to build a working binary.
The resulting binary
out/gncould then be replaced in whatever location the build scripts are looking for it.I've only tested the build itself on arm64, I haven't tried to build libv8.
ignisf commentedon Oct 12, 2018
Hello @steev, thank you for the ping
Taiki-San commentedon Jan 28, 2019
Hi, I managed to build v8 version 6.7.288 on ARM64 (natively on Amazon's Graviton). Is there a way to contribute the binaries?
For the record, the patches were quite involved:
infra/mb/mb_config.pylhad to be patched forarm64.releasenot to cross compile (achieved by replacing thetarget_cpuofsimulate_arm64);gnhad to be replaced/rebuilt to work on ARM64;clanghad to be replaced with version 7, which is not in the repos yet;libFindBadConstructs.so) had to be recompiled based on this code and built manually using the following lineclang++ *.cpp -c -I /home/ubuntu/clang+llvm-7.0.1-aarch64-linux-gnu/include/ -fPIC -Wall -std=c++14 -fno-rtti -fno-omit-frame-pointerandclang -shared *.o -o libFindBadConstructs.so;ninjaand the few commands before manually.At long last however, we finally managed to get those
.a!A script implementing this logic within the context of our project is available here, but is likely very brittle.
hypersleep commentedon Aug 7, 2020
Hi everyone! I also managed to compile v8 for this gem for fully working rails application on AWS's Graviton c6g instance.
As said before the main problem is that binaries (clang, gn & ninja) that gonna be used to compile v8 libraries have been built for x86 architecture. i've just tried to recompile them and substitute with original ones.
I've consolidated all my work in Dockerfile in this repo: https://github.com/hypersleep/rails-on-arm That gives you fully-functional ruby on rails app with mini_racer on board.
Hope it helps everybody! I think this process should to be fixed soon on gem build level or in v8 build system due to rising popularity of ARM servers.
niko-zvt commentedon Nov 2, 2023
Hi everybody. Are there any updates on this issue? I came across this when assembling a
mini_racerfor M2 Pro. The solution from @hypersleep didn't help, the vanilla version is not building. Added an error message to the discussion.lloeki commentedon Dec 4, 2023
Closing as this issue is completely sidestepped in libv8-node, which does have aarch64-linux and arm64-darwin builds.
Also there is no chance in freezing hell this v8 version ever supports Apple Silicon, and we're not going to update this gem's v8 version.