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

Add arm64-glibc-217 recipe #83

Closed
wants to merge 1 commit into from

Conversation

watson
Copy link
Member

@watson watson commented Jun 13, 2023

Create a copy of the x64-glibc-217 recipe (introduced in PR #69) targeting arm64 instead of x64.

I tried to build the Docker image on a ARM CPU running on GCP and it compiled without any issues, so as far as I can see this should work

@watson watson force-pushed the add-arm64-glibc-217-recipe branch from 515d7b4 to 70c83f3 Compare June 14, 2023 05:10
@watson watson force-pushed the add-arm64-glibc-217-recipe branch from 70c83f3 to 4b0fcba Compare June 14, 2023 09:20
@watson watson marked this pull request as ready for review June 14, 2023 09:21
@rvagg
Copy link
Member

rvagg commented Jun 14, 2023

have you been able to (roughly) test this in some form to verify that it ~builds?

@watson
Copy link
Member Author

watson commented Jun 14, 2023

@rvagg as I also just added to the PR description, I tried to build the Docker image on a ARM CPU running on GCP and it compiled without any issues, so as far as I can see this should work. I also ran the resulting node binary and entered the REPL. So the initial testing was ok.

Obviously I've not been able to test on the hardware that the Node.js build group uses, so I'm not sure if my usage of arm64 as the architecture is going to work for that setup. But I think it should. If you like I can do some more testing of the resulting binary, or if you're comfortable that as long as it's able to run the REPL then we can just say that's ok?

@watson
Copy link
Member Author

watson commented Jun 14, 2023

Btw, when building Node.js, I'm getting the warning switch ‘-msign-return-address=all’ is no longer supported, which has also been reported here: nodejs/build#3319

As far as I understand, this is a general "issue" that also affects the official builds, and hence shouldn't be something to worry about for this specific PR

@rvagg
Copy link
Member

rvagg commented Jun 15, 2023

Since we're building this on an x64 machine, I suspect we might need some arm64 arch libraries in the toolchain dependencies for this? I imagine those come automatically if you're running arm native.
Unfortunately someone's going to have to try and either deploy this, test and be prepared to roll it back, or confirm on an x64 machine that it work as is.

@watson
Copy link
Member Author

watson commented Jun 15, 2023

Ah ok, I actually thought that it was running on ARM hardware based on what I saw in the nodejs/build repo. But I guess it's different for the unofficial builds of course. I'm pretty sure this PR will not compile on x64 hardware as it is right now. But it should be possible to update it to cross compile - however that will increase the compile time quite significantly I assume. But I guess you have the same issue for the other non x64/x84 recipes in this repo.

I'll see what I can do to update this PR accordingly.

@csuich2
Copy link

csuich2 commented Jun 29, 2023

We've got an internal repo based on the x64-glibc-217 recipe and I attempted to add arm64 support in a similar fashion as this PR. The changes are nearly identical but when attempting to build on our x64 GHA workers we get:

   CC(target) /home/node/node-v18.0.0/out/Release/obj.target/openssl/deps/openssl/openssl/crypto/core_algorithm.o
In file included from ../deps/openssl/openssl/crypto/armcap.c:21:
../deps/openssl/openssl/crypto/arm_arch.h:55:6: error: #error "unsupported ARM architecture"
 #    error "unsupported ARM architecture"
      ^~~~~
make[2]: *** [/home/node/node-v18.0.0/out/Release/obj.target/openssl/deps/openssl/openssl/crypto/armcap.o] Error 1

Just as @rvagg suspected it seems like some additional libs are needed to build on x64. I tried adding gcc-arm-linux-gnu gcc-c++-arm-linux-gnu to the list of yum installed packages to no avail.

@theofficialgman
Copy link

this PR doesn't work in the slightest. you don't even set the cross compilers
see #91 for a working recipe for building arm64/armhf bionic

please close this PR

@rvagg rvagg closed this Jan 18, 2024
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.

4 participants