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
Cannot compile with Apple M1 #3632
Comments
this is interesting. @omar-saadoun was trying to run the new node versions in our development tool aeproject and he also faced problems with his Apple M1. he isn't able to run the docker-image of the node due to this issue: docker/for-mac#5148 cc @mradkov |
Thanks @marc0olo like you said this is related to aeternity/aeproject#376 |
The simplest workaround I found was to enable Rosetta for the Terminal and then compile the project (of course without Docker). |
May be it will work for the node itself but I think it won't for aeproject |
I played with this a bit. Updating the git submodule in emcl so its mcl points to the latest version allows the build process to complete. Unfortunately this wasn't enough to get the node up and running. The enacl build is not linking libsodium.so to its nif. I tried changing the enacl rebar.config to explicitly build arm64 instead of x86-64, but the link step then complained about linking incompatible architectures. Possibly my libsodium.so was built wrong. More work needed |
@earlyriser99 What about re-installing the arm64 libsodium? this might resolve the |
Support and publishing docker image for platform arm64 is important as arm64 becomes mainstream. |
An update: I now have a native build running locally on my machine. Next step is to incorporate all the manual steps into the proper build of the node and document the process. After that I can take a look at an arm64 docker build. |
@seanhinde Thanks for the quick update. I know the current native build fix is not documented, can you guide us on running the native build? |
I know such question is sometimes hard to answer 😅 - do you have a rough estimate for this? |
I'm planning to have a go at tidying this up this weekend. At the moment I only have evening and weekend access to the m1 machine.. |
There are some changes needed to aeminer so it's not just documenting a process. It should be seamless when I'm done.
This I have not tried. |
Darn. I lose the m1 machine this weekend. Will be next week now. |
@seanhinde I have M1. Can I help you somehow? |
Not right now, but I'll see if I can find a way to use you as the test subject - a few branches need to come together across a few of our repos as well. |
There is a branch at https://github.com/aeternity/aeternity/tree/gh-3632-apple-arm-m1-support Right now for me it all builds cleanly so long as the normal dependencies libsodium, libgmp etc are available as native arm libs I'd appreciate it if a few more folks could try this branch on their machine before pushing to the mainline. @omar-saadoun ? There is one failing unit test for me at the moment
|
I'm getting this error after make command: env: escript: No such file or directory |
You need to have erlang installed as well |
Hmm...I'm supposed to have it already any particular procedure? |
More investigations led to this procedure: Following the instructions at Build from Source with the following differences:
Then before running
|
@seanhinde since the FIX is in master, I was trying to pull the latest master tagged docker image from the hub and try running it. Encountered the same error where the container exited in a few seconds. Native binary I am able to build. |
Closing this one with a final PR to update the docs with details from this ticket #3820 |
I'm trying to build the project on Mac M1, but NIFs fail to compile. I cannot pass through compiling the emcl dependency, so I'm not sure if there's any other dependency having the same issue. However, herumi/mcl@b0abe61 has added support for M1 which is not included in emcl.
The text was updated successfully, but these errors were encountered: