ncb000gt/node.bcrypt.js — Issue #59: Build Issues on CentOS 6.2
Author: masteinhauser
Created: 2012-01-29 08:24:55+00:00
State: open

Well, after spending the last few hours following tons of rabbit holes I was finally able to push to my test server and hit a large snag. When installing via npm or building from source bcrypt blows up at the same spot.

Env:
CentOS 6.2
Node: 0.6.8
Npm: 1.1.0-2
Python: 2.6.6

Any help and thoughts are appreciated!

Log trace:

```
# 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 program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for gcc : ok
Checking for node path : not found
Checking for node prefix : ok /usr/local
Checking for function RAND_bytes : Traceback (most recent call last):
File "/usr/local/bin/node-waf", line 16, in
Scripting.prepare(t, os.getcwd(), VERSION, wafdir)
File "/usr/local/bin/../lib/node/wafadmin/Scripting.py", line 145, in prepare
prepare_impl(t, cwd, ver, wafdir)
File "/usr/local/bin/../lib/node/wafadmin/Scripting.py", line 135, in prepare_impl
main()
File "/usr/local/bin/../lib/node/wafadmin/Scripting.py", line 188, in main
fun(ctx)
File "/usr/local/bin/../lib/node/wafadmin/Scripting.py", line 241, in configure
conf.sub_config([''])
File "/usr/local/bin/../lib/node/wafadmin/Configure.py", line 221, in sub_config
self.recurse(k, name='configure')
File "/usr/local/bin/../lib/node/wafadmin/Utils.py", line 634, in recurse
f(self)
File "/usr/src/node.bcrypt.js/wscript", line 28, in configure
uselib_store='OPENSSL')
File "/usr/local/bin/../lib/node/wafadmin/Tools/config_c.py", line 444, in check
ret = self.run_c_code(*k, **kw)
File "/usr/local/bin/../lib/node/wafadmin/Tools/config_c.py", line 530, in run_c_code
bld.compile()
File "/usr/local/bin/../lib/node/wafadmin/Build.py", line 273, in compile
self.generator.start()
File "/usr/local/bin/../lib/node/wafadmin/Runner.py", line 220, in start
TaskConsumer.consumers = [TaskConsumer() for i in xrange(self.numjobs)]
File "/usr/local/bin/../lib/node/wafadmin/Runner.py", line 33, in __init__
self.start()
File "/usr/lib/python2.6/threading.py", line 474, in start
_start_new_thread(self.__bootstrap, ())
thread.error: can't start new thread
```

Via NPM:

```
# npm install bcrypt
npm http GET https://registry.npmjs.org/bcrypt
npm http 304 https://registry.npmjs.org/bcrypt

> bcrypt@0.5.0 install /usr/src/math_clinic/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 program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for gcc : ok
Checking for node path : not found
Checking for node prefix : ok /usr/local
Checking for function RAND_bytes : Traceback (most recent call last):
File "/usr/local/bin/node-waf", line 16, in
Scripting.prepare(t, os.getcwd(), VERSION, wafdir)
File "/usr/local/bin/../lib/node/wafadmin/Scripting.py", line 145, in prepare
prepare_impl(t, cwd, ver, wafdir)
File "/usr/local/bin/../lib/node/wafadmin/Scripting.py", line 135, in prepare_impl
main()
File "/usr/local/bin/../lib/node/wafadmin/Scripting.py", line 188, in main
fun(ctx)
File "/usr/local/bin/../lib/node/wafadmin/Scripting.py", line 241, in configure
conf.sub_config([''])
File "/usr/local/bin/../lib/node/wafadmin/Configure.py", line 221, in sub_config
self.recurse(k, name='configure')
File "/usr/local/bin/../lib/node/wafadmin/Utils.py", line 634, in recurse
f(self)
File "/usr/src/math_clinic/node_modules/bcrypt/wscript", line 28, in configure
uselib_store='OPENSSL')
File "/usr/local/bin/../lib/node/wafadmin/Tools/config_c.py", line 444, in check
ret = self.run_c_code(*k, **kw)
File "/usr/local/bin/../lib/node/wafadmin/Tools/config_c.py", line 530, in run_c_code
bld.compile()
File "/usr/local/bin/../lib/node/wafadmin/Build.py", line 273, in compile
self.generator.start()
File "/usr/local/bin/../lib/node/wafadmin/Runner.py", line 220, in start
TaskConsumer.consumers = [TaskConsumer() for i in xrange(self.numjobs)]
File "/usr/local/bin/../lib/node/wafadmin/Runner.py", line 33, in __init__
self.start()
File "/usr/lib/python2.6/threading.py", line 474, in start
_start_new_thread(self.__bootstrap, ())
thread.error: can't start new thread
make: *** [configure] Error 1
npm ERR! error installing bcrypt@0.5.0
npm ERR! bcrypt@0.5.0 install: `make build`
npm ERR! `sh "-c" "make build"` failed with 2
npm ERR!
npm ERR! Failed at the bcrypt@0.5.0 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 2.6.35
npm ERR! command "node" "/usr/local/bin/npm" "install" "bcrypt"
npm ERR! cwd /usr/src/math_clinic
npm ERR! node -v v0.6.8
npm ERR! npm -v 1.1.0-2
npm ERR! code ELIFECYCLE
npm ERR! message bcrypt@0.5.0 install: `make build`
npm ERR! message `sh "-c" "make build"` failed with 2
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /usr/src/math_clinic/npm-debug.log
npm not ok
```