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

Does not compile on Linux ARM. #175

Open
iSuslov opened this issue Jan 26, 2022 · 6 comments
Open

Does not compile on Linux ARM. #175

iSuslov opened this issue Jan 26, 2022 · 6 comments

Comments

@iSuslov
Copy link

iSuslov commented Jan 26, 2022

This package has source of libsodium v1.0.16. This version does not compile on Linux ARM. To be precise, it compiles, but fails on test pwhash_scrypt. See jedisct1/libsodium#721
I can confirm that issue is NOT related to memory. libsodium v1.0.17 and libsodium v1.0.18 has this test fixed.
This package needs to be updated to contain updated version of libsodium.. Or archived

@alexsoyes
Copy link

Same here... Did you manage to find a solution? 😕

@iSuslov
Copy link
Author

iSuslov commented Feb 13, 2022

@alexsoyes yes, unfortunately I can not change dependencies in the project, so I downloaded this package to a folder outside my of project, substituted libsodium sources with the latest version and created a link to this package with 'yarn link'. It works now on my M1 computer.

@jedisct1
Copy link
Contributor

@paixaop Any chance you could release an updated version using libsodium-2.0.18-stable?

If not, I guess the only option left is to fork the project.

@alexsoyes
Copy link

@iSuslov , pretty cool solution I was not thinking about... clever! Thank you!

I used the same approach but without updating libsodium, I would rather use the one from the OS.

Here is an extract from my Dockerfile if it can help someone.

RUN apt install -y libsodium-dev

RUN mkdir -vp /app/pre-build-node_modules/sodium/deps/build/lib/
RUN mkdir -vp /app/pre-build-node_modules/sodium/deps/build/lib/

RUN ln -s /usr/lib/aarch64-linux-gnu/libsodium.so.23.3.0 /app/pre-build-node_modules/sodium/deps/build/lib/libsodium.so
RUN ln -s /usr/lib/aarch64-linux-gnu/libsodium.a /app/pre-build-node_modules/sodium/deps/build/lib/libsodium.a

RUN cd pre-build-node_modules/sodium && yarn link && cd ../..
RUN yarn link sodium
RUN yarn install

@RubenNL
Copy link

RubenNL commented Nov 21, 2022

I just got the same error. No idea if related, but this is my workaround, also in Docker:

RUN mkdir node_modules
RUN git clone https://github.com/paixaop/node-sodium.git node_modules/sodium
RUN sed -i '/make -j3 check/d' node_modules/sodium/Makefile
#Do not use NPM ci here, only install.
RUN npm install

Warning: This disables the tests, which might not be what you want.

@jedisct1
Copy link
Contributor

I still would highly recommend using libsodium-1.0.18-stable instead of an obsolete version.

If only because performance is much better.

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

No branches or pull requests

4 participants