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

Install fails on ARM (Raspberry Pi) #43

Closed
ghost opened this issue Jun 5, 2016 · 6 comments
Closed

Install fails on ARM (Raspberry Pi) #43

ghost opened this issue Jun 5, 2016 · 6 comments

Comments

@ghost
Copy link

ghost commented Jun 5, 2016

Steps to reproduce

  1. Install the latest version of node-gyp globally.
  2. Use Node 4.0.0+
  3. Attempt to install this module via npm: npm install argon2 --save in a project.

Actual behaviour

gyp verb command build []
gyp verb build type Release
gyp verb architecture arm
gyp verb node dev dir /home/pi/.node-gyp/4.2.1
gyp verb `which` succeeded for `make` /usr/bin/make
gyp info spawn make
gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/home/pi/node-test/node_modules/argon2/build'
  cc '-DNODE_GYP_MODULE_NAME=libargon2' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' -I/home/pi/.node-gyp/4.2.1/include/node -I/home/pi/.node-gyp/4.2.1/src -I/home/pi/.node-gyp/4.2.1/deps/uv/include -I/home/pi/.node-gyp/4.2.1/deps/v8/include -I../argon2/include  -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -march=native -pthread -Wno-type-limits -fvisibility=hidden -msse -msse2 -O3 -ffunction-sections -fdata-sections -fno-omit-frame-pointer  -MMD -MF ./Release/.deps/Release/obj.target/libargon2/argon2/src/argon2.o.d.raw  -c -o Release/obj.target/libargon2/argon2/src/argon2.o ../argon2/src/argon2.c
cc: error: unrecognized command line option ‘-msse’
cc: error: unrecognized command line option ‘-msse2’
libargon2.target.mk:103: recipe for target 'Release/obj.target/libargon2/argon2/src/argon2.o' failed
make: *** [Release/obj.target/libargon2/argon2/src/argon2.o] Error 1
make: Leaving directory '/home/pi/node-test/node_modules/argon2/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.4.9+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/node-test/node_modules/argon2
gyp ERR! node -v v4.2.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 

Environment

Operating system:
Raspbian GNU/Linux 8 (jessie) (Linux 4.4.9)
Node version:
v.4.2.1
Compiler version:
gcc version 4.9.2 (Raspbian 4.9.2-10)

Building argon2 itself without node-gyp works just fine, but I can't seem to get the library-file linked with the node-module. Maybe changing the bindings and build parameters for ARM (leaving out the msse and msse2 parameters) would solve this?

@ranisalt
Copy link
Owner

ranisalt commented Jun 6, 2016

This is because it defaults to the optimized (SSE2 enabled) version of argon2, yet only the reference one compiles on RPi. I've yet to find an easy way to detect and switch them, I'll focus on it now.

@ranisalt
Copy link
Owner

ranisalt commented Jun 6, 2016

Could you check that 0865b21 works for you? It's on branch rpi and it worked for me.

@ghost
Copy link
Author

ghost commented Jun 6, 2016

Ok, great, building it from source works, thanks!

One thing though, executing
npm install https://github.com/ranisalt/node-argon2.git#rpi in my project directory gives the following output:

> node-gyp rebuild
make: Entering directory '/home/pi/node-test/node_modules/argon2/build'
make: *** No rule to make target 'Release/obj.target/libargon2/argon2/src/ref.o', needed by 'Release/obj.target/argon2.a'.  Stop.
make: Leaving directory '/home/pi/node-test/node_modules/argon2/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2

Am I doing something wrong?

@ghost ghost closed this as completed Jun 6, 2016
@ghost ghost reopened this Jun 6, 2016
@ranisalt
Copy link
Owner

ranisalt commented Jun 6, 2016

Yes, I think the needed file is still in the npmignore, and I will fix it.

@ghost
Copy link
Author

ghost commented Jun 6, 2016

Great, gonna close this then (clicked wrong just before). Thanks for the help.

@ghost ghost closed this as completed Jun 6, 2016
@ranisalt
Copy link
Owner

ranisalt commented Jun 6, 2016

Thanks! If no more issues appear until Wednesday it will be launched as 0.12.0

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant