christkv/node-mongodb-native — Issue #528: Unable to load shared library bson.node when building C++ parser
Author: mansona
Created: 2012-03-03 17:19:17+00:00
State: open

I'm trying to install the c++ bson parser but I keep getting an error when its running the test after the build:

Error: Unable to load shared library /Users/mansona/testModule/node_modules/mongodb/external-libs/bson/bson.node

I've attached the output to my shell during the process so that you might be able to see the issue. I'm running Mac OSX Lion btw ;)

===============

chestnut:testModule mansona$ node -v
v0.6.11
chestnut:testModule mansona$ npm install mongodb --mongodb:native
npm http GET https://registry.npmjs.org/mongodb
npm http 304 https://registry.npmjs.org/mongodb

> mongodb@0.9.9-4 install /Users/mansona/testModule/node_modules/mongodb
> node install.js

================================================================================
= =
= To install with C++ bson parser do =
= =
================================================================================
make -C ./external-libs/bson all
rm -rf build .lock-wscript bson.node
node-waf configure build
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 node path : not found
Checking for node prefix : ok /usr/local
'configure' finished successfully (0.045s)
Waf: Entering directory `/Users/mansona/testModule/node_modules/mongodb/external-libs/bson/build'
[1/2] cxx: bson.cc -> build/Release/bson_1.o
[2/2] cxx_link: build/Release/bson_1.o -> build/Release/bson.node
Waf: Leaving directory `/Users/mansona/testModule/node_modules/mongodb/external-libs/bson/build'
'build' finished successfully (1.176s)
cp -R ./build/Release/bson.node . || true

node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Unable to load shared library /Users/mansona/testModule/node_modules/mongodb/external-libs/bson/bson.node
at Object..node (module.js:472:11)
at Module.load (module.js:348:31)
at Function._load (module.js:308:12)
at Module.require (module.js:354:17)
at require (module.js:370:17)
at Object. (/Users/mansona/testModule/node_modules/mongodb/external-libs/bson/test/test_bson.js:5:10)
at Module._compile (module.js:441:26)
at Object..js (module.js:459:10)
at Module.load (module.js:348:31)
at Function._load (module.js:308:12)
make[1]: *** [all] Error 1
make: *** [build_native] Error 2
child process exited with code 2
mongodb@0.9.9-4 ./node_modules/mongodb
chestnut:testModule mansona$