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

feat: Add support for building javet native libraries for linux-arm64 #235

Merged
merged 1 commit into from Mar 28, 2023

Conversation

bakjos
Copy link
Contributor

@bakjos bakjos commented Mar 27, 2023

Thank you for putting this library together, it works really well, but I was trying to run it inside an arm64 machine and it was not finding the binaries because they were not generated. This PR adds support for generating all the binaries for arm64

@caoccao
Copy link
Owner

caoccao commented Mar 28, 2023

Thank you for the great work. It looks good to me.

Quick question: have you tried that?

  1. Node.js arm64 needs few patches, but I don't see the patching process.
  2. I wonder if the unit test can pass.

@bakjos
Copy link
Contributor Author

bakjos commented Mar 28, 2023

Thank you for the great work. It looks good to me.

Quick question: have you tried that?

  1. Node.js arm64 needs few patches, but I don't see the patching process.
  2. I wonder if the unit test can pass.

I have and worked well I did not have to make any additional changes to the patches you already have, just update the CMakefile to use the right libraries, what unit test are you referring to?

@caoccao
Copy link
Owner

caoccao commented Mar 28, 2023

what unit test are you referring to?

Basically, the docker image is x86_64 based though arm64 binaries can be cross-compiled. However, the unit test (gradle test) is not able to verify the arm64 binaries. I wonder if you have tested it on a physical arm64 box.

@bakjos
Copy link
Contributor Author

bakjos commented Mar 28, 2023

Got it, yes I ran a container on a silicon mac and the test ran fine, if you want I can try to create an action to run the test on arm64 with https://github.com/uraimo/run-on-arch-action, it’s a bit slow, but works well

Copy link
Owner

@caoccao caoccao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me.

@caoccao caoccao merged commit 7cbebda into caoccao:main Mar 28, 2023
1 check failed
@caoccao
Copy link
Owner

caoccao commented Nov 20, 2023

Hi @bakjos , I've confirmed in #286 that V8 v12 no longer works with this hack. This is for your info only. I've officially supported Linux arm64 since v3.0.0 via another way of building the binaries. So, there's no other impacts. Please let me know if you have any questions.

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

Successfully merging this pull request may close these issues.

None yet

2 participants