ncb000gt/node.bcrypt.js — Issue #56: npm install fails on make build command (too few arguments to function)
Author: ryancole
Created: 2012-01-08 04:23:04+00:00
State: open

I'm attempting an `npm install bcrypt`. I'm unable to compile, it appears. I'm seeing an error that states the following:

```
[3/4] cxx: src/bcrypt_node.cc -> build/Release/src/bcrypt_node_1.o
../src/bcrypt_node.cc: In function ‘v8::Handle {anonymous}::GenerateSalt(const v8::Arguments&)’:
../src/bcrypt_node.cc:274:69: error: too few arguments to function ‘eio_req* eio_custom(void (*)(eio_req*), int, eio_cb, void*, eio_channel*)’
/usr/local/include/node/uv-private/eio.h:361:10: note: declared here
../src/bcrypt_node.cc: In function ‘v8::Handle {anonymous}::Encrypt(const v8::Arguments&)’:
../src/bcrypt_node.cc:370:69: error: too few arguments to function ‘eio_req* eio_custom(void (*)(eio_req*), int, eio_cb, void*, eio_channel*)’
/usr/local/include/node/uv-private/eio.h:361:10: note: declared here
../src/bcrypt_node.cc: In function ‘v8::Handle {anonymous}::Compare(const v8::Arguments&)’:
../src/bcrypt_node.cc:475:69: error: too few arguments to function ‘eio_req* eio_custom(void (*)(eio_req*), int, eio_cb, void*, eio_channel*)’
/usr/local/include/node/uv-private/eio.h:361:10: note: declared here
Waf: Leaving directory `/home/ryan/node_modules/bcrypt/build'
Build failed: -> task failed (err #1):
{task: cxx bcrypt_node.cc -> bcrypt_node_1.o}
make: *** [compile] Error 1
```

I'm on Ubuntu, using GNU Make 3.81, with the libssl-dev headers installed. I am using Nodejs v0.7.0-pre with NPM 1.1.0-alpha-6. Entire npm log below:

```
λ ~/sites/litigance/lib/ master* npm install bcrypt

> bcrypt@0.4.1 install /home/ryan/node_modules/bcrypt
> make build

rm -f bcrypt_lib.node
rm -Rf build
node-waf configure
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for program gcc or cc : /usr/bin/gcc
Checking for gcc : ok
Checking for node path : not found
Checking for node prefix : ok /usr/local
Checking for function RAND_bytes : not found
'configure' finished successfully (0.196s)
node-waf build
Waf: Entering directory `/home/ryan/node_modules/bcrypt/build'
[1/4] cxx: src/blowfish.cc -> build/Release/src/blowfish_1.o
[2/4] cxx: src/bcrypt.cc -> build/Release/src/bcrypt_1.o
[3/4] cxx: src/bcrypt_node.cc -> build/Release/src/bcrypt_node_1.o
../src/bcrypt_node.cc: In function ‘v8::Handle {anonymous}::GenerateSalt(const v8::Arguments&)’:
../src/bcrypt_node.cc:274:69: error: too few arguments to function ‘eio_req* eio_custom(void (*)(eio_req*), int, eio_cb, void*, eio_channel*)’
/usr/local/include/node/uv-private/eio.h:361:10: note: declared here
../src/bcrypt_node.cc: In function ‘v8::Handle {anonymous}::Encrypt(const v8::Arguments&)’:
../src/bcrypt_node.cc:370:69: error: too few arguments to function ‘eio_req* eio_custom(void (*)(eio_req*), int, eio_cb, void*, eio_channel*)’
/usr/local/include/node/uv-private/eio.h:361:10: note: declared here
../src/bcrypt_node.cc: In function ‘v8::Handle {anonymous}::Compare(const v8::Arguments&)’:
../src/bcrypt_node.cc:475:69: error: too few arguments to function ‘eio_req* eio_custom(void (*)(eio_req*), int, eio_cb, void*, eio_channel*)’
/usr/local/include/node/uv-private/eio.h:361:10: note: declared here
Waf: Leaving directory `/home/ryan/node_modules/bcrypt/build'
Build failed: -> task failed (err #1):
{task: cxx bcrypt_node.cc -> bcrypt_node_1.o}
make: *** [compile] Error 1
npm ERR! error installing bcrypt@0.4.1 Error: bcrypt@0.4.1 install: `make build`
npm ERR! error installing bcrypt@0.4.1 `sh "-c" "make build"` failed with 2
npm ERR! error installing bcrypt@0.4.1 at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/exec.js:49:20)
npm ERR! error installing bcrypt@0.4.1 at ChildProcess.emit (events.js:70:17)
npm ERR! error installing bcrypt@0.4.1 at maybeExit (child_process.js:367:16)
npm ERR! error installing bcrypt@0.4.1 at Process.onexit (child_process.js:403:5)
npm ERR! bcrypt@0.4.1 install: `make build`
npm ERR! `sh "-c" "make build"` failed with 2
npm ERR!
npm ERR! Failed at the bcrypt@0.4.1 install script.
npm ERR! This is most likely a problem with the bcrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! make build
npm ERR! You can get their info via:
npm ERR! npm owner ls bcrypt
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Linux 3.0.0-12-server
npm ERR! command "node" "/usr/local/bin/npm" "install" "bcrypt"
npm ERR! cwd /home/ryan/sites/litigance/lib
npm ERR! node -v v0.7.0-pre
npm ERR! npm -v 1.1.0-alpha-6
npm ERR! code ELIFECYCLE
npm ERR! message bcrypt@0.4.1 install: `make build`
npm ERR! message `sh "-c" "make build"` failed with 2
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/ryan/sites/litigance/lib/npm-debug.log
npm not ok
```