Error in namespace_loader.cc:18:58 if I try to build node-gir
Closed this issue · 6 comments
JumpLink commented
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 node path : not found
Checking for node prefix : not found
Checking for gobject-introspection-1.0 : yes
Checking for glib-2.0 : yes
'configure' finished successfully (0.060s)
node-waf build
Waf: Entering directory `/my-node-gir-path/build'
[ 3/10] cxx: src/namespace_loader.cc -> build/Release/src/namespace_loader_1.o
[ 6/10] cxx: src/values.cc -> build/Release/src/values_1.o
[ 7/10] cxx: src/types/object.cc -> build/Release/src/types/object_1.o
[ 8/10] cxx: src/types/struct.cc -> build/Release/src/types/struct_1.o
../src/namespace_loader.cc: In static elementfunction »static void gir::NamespaceLoader::Initialize(v8::Handle<v8::Object>)«:
../src/namespace_loader.cc:18:58: Error: »NODE_SET_METHOD« not defined
Waf: Leaving directory `/my-node-gir-path/build'
Build failed: -> task failed (err #1):
{task: cxx namespace_loader.cc -> namespace_loader_1.o}
What's wrong?
piotras commented
Did you install node dev package? No idea why configure doesn't throw error. In your case node is not found.
JumpLink commented
Yes I use Ubuntu 12.04 and I've installed nodejs-dev and nodejs v0.8.11 over this ppa: https://launchpad.net/~chris-lea/+archive/node.js . Is it possible to define the node path and node prefix as an option for node-waf or something like that?
piotras commented
Do you build node-gir with node-gyp?
node-gyp rebuild
JumpLink commented
Yes I've run
node-gyp rebuild
and it build fine, I have also run
npm install
but that does not work
piotras commented
Install with node-gyp as that one built module.
node-gyp install
JumpLink commented
Ah okay works, thank you!