paixaop / node-sodium

Port of the lib sodium encryption library to Node.js
MIT License
351 stars 126 forks source link

Can not cross compile #113

Open shiretu opened 7 years ago

shiretu commented 7 years ago

Hi,

This is how ./configure is executed: https://github.com/paixaop/node-sodium/blob/f83467c7a3f8e28014561468deeca01c220f9ad0/Makefile#L64

It lacks the --host. So if I export all necessary vars (CC,CXX, CFLAGS, etc), it still doesn't work. Autohell mandates that --host is used for cross compilation.

I am trying to compile sodium for debian armhf on a debian 8 x86_64.

....
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... configure: error: in `/home/shiretu/work/node_modules/.staging/sodium-d37927f3/deps/libsodium':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
Makefile:61: recipe for target 'libsodium' failed
make: *** [libsodium] Error 1
/home/shiretu/work/node_modules/.staging/sodium-d37927f3/install.js:288
            throw new Error(cmdLine + ' exited with code ' + code);
paixaop commented 5 years ago

Can you submit a pull request?