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

Can't build on Linux 3.2.0-23-generic-pae #34

Closed
bezreyhan opened this issue Feb 17, 2015 · 10 comments
Closed

Can't build on Linux 3.2.0-23-generic-pae #34

bezreyhan opened this issue Feb 17, 2015 · 10 comments

Comments

@bezreyhan
Copy link

I'm getting this error when I try to 'npm install sodium'. I do have libsodium installed and other applications are able to use it.

npm ERR! sodium@1.0.13 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sodium@1.0.13 install script.
npm ERR! This is most likely a problem with the sodium package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls sodium
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.2.0-23-generic-pae
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "sodium"

any ideas?

@bezreyhan
Copy link
Author

I just cloned node-sodium, ran:
node-gyp clean
node-gyp configure
node-gyp build

I got the pretty much the sam error:
make: Entering directory /home/vagrant/projects/round-node/node_modules/node-sodium/build' CC(target) Release/obj.target/libsodium/deps/libsodium-1.0.0/src/libsodium/crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.o CC(target) Release/obj.target/libsodium/deps/libsodium-1.0.0/src/libsodium/crypto_auth/crypto_auth.o CC(target) Release/obj.target/libsodium/deps/libsodium-1.0.0/src/libsodium/crypto_auth/hmacsha256/auth_hmacsha256_api.o CC(target) Release/obj.target/libsodium/deps/libsodium-1.0.0/src/libsodium/crypto_auth/hmacsha256/cp/hmac_hmacsha256.o CC(target) Release/obj.target/libsodium/deps/libsodium-1.0.0/src/libsodium/crypto_auth/hmacsha256/cp/verify_hmacsha256.o CC(target) Release/obj.target/libsodium/deps/libsodium-1.0.0/src/libsodium/crypto_auth/hmacsha512/auth_hmacsha512_api.o CC(target) Release/obj.target/libsodium/deps/libsodium-1.0.0/src/libsodium/crypto_auth/hmacsha512/cp/hmac_hmacsha512.o CC(target) Release/obj.target/libsodium/deps/libsodium-1.0.0/src/libsodium/crypto_auth/hmacsha512/cp/verify_hmacsha512.o CC(target) Release/obj.target/libsodium/deps/libsodium-1.0.0/src/libsodium/crypto_auth/hmacsha512256/auth_hmacsha512256_api.o CC(target) Release/obj.target/libsodium/deps/libsodium-1.0.0/src/libsodium/crypto_auth/hmacsha512256/cp/hmac_hmacsha512256.o CC(target) Release/obj.target/libsodium/deps/libsodium-1.0.0/src/libsodium/crypto_auth/hmacsha512256/cp/verify_hmacsha512256.o CC(target) Release/obj.target/libsodium/deps/libsodium-1.0.0/src/libsodium/crypto_box/crypto_box.o CC(target) Release/obj.target/libsodium/deps/libsodium-1.0.0/src/libsodium/crypto_box/crypto_box_easy.o CC(target) Release/obj.target/libsodium/deps/libsodium-1.0.0/src/libsodium/crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305_api.o CC(target) Release/obj.target/libsodium/deps/libsodium-1.0.0/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/after_curve25519xsalsa20poly1305.o CC(target) Release/obj.target/libsodium/deps/libsodium-1.0.0/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/before_curve25519xsalsa20poly1305.o CC(target) Release/obj.target/libsodium/deps/libsodium-1.0.0/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/box_curve25519xsalsa20poly1305.o CC(target) Release/obj.target/libsodium/deps/libsodium-1.0.0/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/keypair_curve25519xsalsa20poly1305.o CC(target) Release/obj.target/libsodium/deps/libsodium-1.0.0/src/libsodium/crypto_core/hsalsa20/ref2/core_hsalsa20.o CC(target) Release/obj.target/libsodium/deps/libsodium-1.0.0/src/libsodium/crypto_core/hsalsa20/core_hsalsa20_api.o CC(target) Release/obj.target/libsodium/deps/libsodium-1.0.0/src/libsodium/crypto_core/salsa20/ref/core_salsa20.o CC(target) Release/obj.target/libsodium/deps/libsodium-1.0.0/src/libsodium/crypto_core/salsa20/core_salsa20_api.o CC(target) Release/obj.target/libsodium/deps/libsodium-1.0.0/src/libsodium/crypto_generichash/crypto_generichash.o CC(target) Release/obj.target/libsodium/deps/libsodium-1.0.0/src/libsodium/crypto_generichash/blake2/generichash_blake2_api.o CC(target) Release/obj.target/libsodium/deps/libsodium-1.0.0/src/libsodium/crypto_generichash/blake2/ref/blake2b-ref.o CC(target) Release/obj.target/libsodium/deps/libsodium-1.0.0/src/libsodium/crypto_generichash/blake2/ref/generichash_blake2b.o CC(target) Release/obj.target/libsodium/deps/libsodium-1.0.0/src/libsodium/crypto_hash/crypto_hash.o CC(target) Release/obj.target/libsodium/deps/libsodium-1.0.0/src/libsodium/crypto_hash/sha256/hash_sha256_api.o CC(target) Release/obj.target/libsodium/deps/libsodium-1.0.0/src/libsodium/crypto_hash/sha256/cp/hash_sha256.o CC(target) Release/obj.target/libsodium/deps/libsodium-1.0.0/src/libsodium/crypto_hash/sha512/hash_sha512_api.o CC(target) Release/obj.target/libsodium/deps/libsodium-1.0.0/src/libsodium/crypto_hash/sha512/cp/hash_sha512.o CC(target) Release/obj.target/libsodium/deps/libsodium-1.0.0/src/libsodium/crypto_onetimeauth/crypto_onetimeauth.o CC(target) Release/obj.target/libsodium/deps/libsodium-1.0.0/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.o CC(target) Release/obj.target/libsodium/deps/libsodium-1.0.0/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305_api.o CC(target) Release/obj.target/libsodium/deps/libsodium-1.0.0/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305_try.o CC(target) Release/obj.target/libsodium/deps/libsodium-1.0.0/src/libsodium/crypto_onetimeauth/poly1305/donna/auth_poly1305_donna.o In file included from ../deps/libsodium-1.0.0/src/libsodium/crypto_onetimeauth/poly1305/donna/auth_poly1305_donna.c:5:0: ../deps/libsodium-1.0.0/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna64.h:10:1: error: unable to emulate 'TI' ../deps/libsodium-1.0.0/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna64.h: In function 'poly1305_blocks': ../deps/libsodium-1.0.0/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna64.h:123:31: warning: right shift count >= width of type [enabled by default] ../deps/libsodium-1.0.0/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna64.h:124:17: warning: right shift count >= width of type [enabled by default] ../deps/libsodium-1.0.0/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna64.h:125:17: warning: right shift count >= width of type [enabled by default] make: *** [Release/obj.target/libsodium/deps/libsodium-1.0.0/src/libsodium/crypto_onetimeauth/poly1305/donna/auth_poly1305_donna.o] Error 1 make: Leaving directory/home/vagrant/projects/round-node/node_modules/node-sodium/build'
gyp ERR! build error
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Linux 3.2.0-23-generic-pae
gyp ERR! command "node" "/usr/bin/node-gyp" "build"
gyp ERR! node -v v0.10.32
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok

@paixaop
Copy link
Owner

paixaop commented Feb 19, 2015

can you try the develop branch?

@paixaop paixaop closed this as completed Feb 19, 2015
@bezreyhan
Copy link
Author

I'm getting this:

gyp: /home/vagrant/node-sodium/deps/libsodium.gyp not found (cwd: /home/vagrant/node-sodium) while loading dependencies of binding.gyp while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/lib/node_modules/node-gyp/lib/configure.js:343:16)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Linux 3.2.0-23-generic-pae
gyp ERR! command "node" "/usr/bin/node-gyp" "configure"
gyp ERR! cwd /home/vagrant/node-sodium
gyp ERR! node -v v0.10.32
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok

In the develop branch node-sodium/deps has libsodium.gyp.in but not libsodium.gyp

@bezreyhan
Copy link
Author

I copy and pasted libsodium.gyp from master just to give it a shot:

make: Entering directory /home/vagrant/projects/round-node/node_modules/sodium/build' make: Warning: Filesodium.target.mk' has modification time 7.5e+02 s in the future
make: *** No rule to make target Release/obj.target/libsodium/deps/libsodium-1.0.0/src/libsodium/crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.o', needed byRelease/obj.target/deps/sodium.a'. Stop.
make: Leaving directory /home/vagrant/projects/round-node/node_modules/sodium/build' gyp ERR! build error gyp ERR! stack Error:make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Linux 3.2.0-23-generic-pae
gyp ERR! command "node" "/usr/bin/node-gyp" "build"
gyp ERR! cwd /home/vagrant/projects/round-node/node_modules/sodium
gyp ERR! node -v v0.10.32
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
vagrant@precise32:~/projects/round-node/node_modules/sodium$

@paixaop
Copy link
Owner

paixaop commented Feb 19, 2015

Please run make configure to create the necessary files

On 2/18/15 8:46 PM, bezreyhan wrote:

I'm getting this:

gyp: /home/vagrant/node-sodium/deps/libsodium.gyp not found (cwd:
/home/vagrant/node-sodium) while loading dependencies of binding.gyp
while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: |gyp| failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit
(/usr/lib/node_modules/node-gyp/lib/configure.js:343:16)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit
(child_process.js:810:12)
gyp ERR! System Linux 3.2.0-23-generic-pae
gyp ERR! command "node" "/usr/bin/node-gyp" "configure"
gyp ERR! cwd /home/vagrant/node-sodium
gyp ERR! node -v v0.10.32
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok

In the develop branch node-sodium/deps has libsodium.gyp.in but not
libsodium.gyp


Reply to this email directly or view it on GitHub
#34 (comment).

@bezreyhan
Copy link
Author

That's the error I got when I ran node-gyp configure

when I run make configure I get: ./autogen.sh: 13: ./autogen.sh: libtoolize: not found

When I copy and pasted the libsodium.gyp file from master I was able to configure but then I got the last error that I posted in my last comment.

@bezreyhan
Copy link
Author

Ok, I got it to build but I had to first download libtoolize and automake.

Is there a way to list those packages in the dependencies so that they download automatically?
Also, do you know how I can get this to work with NPM?

Thanks

@paixaop
Copy link
Owner

paixaop commented Feb 19, 2015

You need to install autotools and autoconf in your system. This is a
requirement of libsodium itself

on mac you can run

|brew install automake|

or

|sudo port install automake autoconf libtool

|
|

On 2/18/15 10:19 PM, bezreyhan wrote:

That's the error I got when I ran node-gyp configure

when I run make configure I get: ./autogen.sh: 13: ./autogen.sh:
libtoolize: not found

When I copy and pasted the libsodium.gyp file from master I was able
to configure but then I got the last error that I posted in my last
comment.


Reply to this email directly or view it on GitHub
#34 (comment).

@paixaop
Copy link
Owner

paixaop commented Feb 19, 2015

Should work with npm now.

On 2/18/15 10:48 PM, bezreyhan wrote:

Ok, I got it to build but I had to first download libtoolize and automake.

Is there a way to list those packages in the dependencies so that they
download automatically?
Also, do you know how I can get this to work with NPM?

Thanks


Reply to this email directly or view it on GitHub
#34 (comment).

@bezreyhan
Copy link
Author

I had compiled libsodium from source so I was missing those packages.

npm install does work now. Thanks for the help!

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

2 participants