New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to install the module #8
Comments
I tried removing the std=c++11 flag from byndings.gyp and wscipt. Now I get In file included from ../src/connection.cxx:1:0: |
I think there are a few issues going on. First, node-waf was removed starting from version 0.8 and replaced with node-gyp. See here and here. I tried replacing the node-waf calls with node-gyp, and then got the unrecognized command line issue that selvaa89 reported above. That however, has to do with your gcc version. I got past that by following the directions here. Now though I'm just getting weird compile errors (see below) so my guess is the c++ code just needs updating for the newer versions of node. I may try downgrading node, but I hope amitkr takes a look into this! $ node-gyp build
gyp info it worked if it ends with ok
gyp info using node-gyp@0.10.10
gyp info using node@0.10.10 | linux | x64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory `/home/djh/repos/nodejs-db-informix/build'
CXX(target) Release/obj.target/informix_bindings/lib/nodejs-db/binding.o
In file included from ../lib/nodejs-db/binding.h:11:0,
from ../lib/nodejs-db/binding.cxx:1:
../lib/nodejs-db/query.h:96:20: error: 'eio_req' has not been declared
../lib/nodejs-db/query.h:97:39: error: 'eio_req' has not been declared
In file included from ../lib/nodejs-db/binding.cxx:1:0:
../lib/nodejs-db/binding.h:41:20: error: 'eio_req' has not been declared
../lib/nodejs-db/binding.h:44:39: error: 'eio_req' has not been declared
../lib/nodejs-db/binding.cxx: In static member function 'static v8::Handle<v8::Value> nodejs_db::Binding::Connect(const v8::Arguments&)':
../lib/nodejs-db/binding.cxx:98:32: error: 'EIO_PRI_DEFAULT' was not declared in this scope
../lib/nodejs-db/binding.cxx:98:76: error: 'eio_custom' was not declared in this scope
../lib/nodejs-db/binding.cxx:99:16: error: 'EV_DEFAULT_UC' was not declared in this scope
../lib/nodejs-db/binding.cxx:99:29: error: 'ev_ref' was not declared in this scope
../lib/nodejs-db/binding.cxx: At global scope:
../lib/nodejs-db/binding.cxx:155:32: error: variable or field 'eioConnect' declared void
../lib/nodejs-db/binding.cxx:155:32: error: 'eio_req' was not declared in this scope
../lib/nodejs-db/binding.cxx:155:41: error: 'eioRequest' was not declared in this scope
../lib/nodejs-db/binding.cxx:165:44: error: 'int nodejs_db::Binding::eioConnectFinished' is not a static member of 'class nodejs_db::Binding'
../lib/nodejs-db/binding.cxx:165:44: error: 'eio_req' was not declared in this scope
../lib/nodejs-db/binding.cxx:165:53: error: 'eioRequest' was not declared in this scope
../lib/nodejs-db/binding.cxx:165:65: error: expected ',' or ';' before '{' token
make: *** [Release/obj.target/informix_bindings/lib/nodejs-db/binding.o] Error 1
make: Leaving directory `/home/djh/repos/nodejs-db-informix/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Linux 2.6.32-358.6.2.el6.x86_64
gyp ERR! command "node" "/usr/local/bin/node-gyp" "build"
gyp ERR! cwd /home/djh/repos/nodejs-db-informix
gyp ERR! node -v v0.10.10
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok |
I am aware of the node-waf issue. I have raised a ticket in the
|
Downgrading node to 0.6.18 and updating the GCC as I described enabled me to compile the module. I'm having some weird issues getting it to connect to the DB though - it says everything is connecting but it's not returning any data. I'm not sure if it's my code or the module code. I am trying to figure it out. |
Hi guys, cheers! |
Thanks amitkr that'd be great if it this will work on latest versions of node! Regarding my earlier comment, I got selects working, but calling sprocs is not working for unknown reasons. |
Hi amitkr - have you been able to look into this yet? I really hope to be able to use this with the latest version of node! |
Hi delemach, |
The package.json still tries to build with node-waf. So I'm getting the following: $ npm install https://github.com/amitkr/nodejs-db-informix/archive/v0.0.9.tar.gz --save
npm http GET https://github.com/amitkr/nodejs-db-informix/archive/v0.0.9.tar.gz
npm http 200 https://github.com/amitkr/nodejs-db-informix/archive/v0.0.9.tar.gz
npm WARN package.json nodejs-db-informix@0.0.8 'repositories' (plural) Not supported.
npm WARN package.json Please pick one as the 'repository' field
> nodejs-db-informix@0.0.8 install WORKINGDIRECTORY/node_modules/nodejs-db-informix
> node-waf configure build
sh: node-waf: command not found
> nodejs-db-informix@0.0.8 preuninstall WORKINGDIRECTORY/node_modules/nodejs-db-informix
> rm -rf build/*
npm ERR! weird error 127
npm ERR! not ok code 0 I'm going to try putting it manually into node_modules and doing a node-gyp build, but this needs fixing as well for it to work seamlessly. |
I downloaded the tar, unzipped and tried to manually use node-gyp: $ node-gyp clean configure build
gyp info it worked if it ends with ok
gyp info using node-gyp@0.10.10
gyp info using node@0.10.10 | linux | x64
gyp info spawn python
gyp info spawn args [ '/usr/local/lib/node_modules/node-gyp/gyp/gyp',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args 'WORKINGDIRECTORY/node_modules/nodejs-db-informix/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/djh/.node-gyp/0.10.10/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/home/djh/.node-gyp/0.10.10',
gyp info spawn args '-Dmodule_root_dir=WORKINGDIRECTORY/node_modules/nodejs-db-informix',
gyp info spawn args '--depth=.',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory `WORKINGDIRECTORY/node_modules/nodejs-db-informix/build'
CXX(target) Release/obj.target/informix_bindings/lib/nodejs-db/binding.o
In file included from ../lib/nodejs-db/binding.h:11:0,
from ../lib/nodejs-db/binding.cxx:1:
../lib/nodejs-db/query.h:97:20: error: 'eio_req' has not been declared
../lib/nodejs-db/query.h:98:39: error: 'eio_req' has not been declared
In file included from ../lib/nodejs-db/binding.cxx:1:0:
../lib/nodejs-db/binding.h:42:20: error: 'eio_req' has not been declared
../lib/nodejs-db/binding.h:43:39: error: 'eio_req' has not been declared
../lib/nodejs-db/binding.cxx: In static member function 'static v8::Handle<v8::Value> nodejs_db::Binding::Connect(const v8::Arguments&)':
../lib/nodejs-db/binding.cxx:104:32: error: 'EIO_PRI_DEFAULT' was not declared in this scope
../lib/nodejs-db/binding.cxx:104:76: error: 'eio_custom' was not declared in this scope
../lib/nodejs-db/binding.cxx:105:16: error: 'EV_DEFAULT_UC' was not declared in this scope
../lib/nodejs-db/binding.cxx:105:29: error: 'ev_ref' was not declared in this scope
../lib/nodejs-db/binding.cxx: At global scope:
../lib/nodejs-db/binding.cxx:173:32: error: variable or field 'eioConnect' declared void
../lib/nodejs-db/binding.cxx:173:32: error: 'eio_req' was not declared in this scope
../lib/nodejs-db/binding.cxx:173:41: error: 'eioRequest' was not declared in this scope
../lib/nodejs-db/binding.cxx:183:44: error: 'int nodejs_db::Binding::eioConnectFinished' is not a static member of 'class nodejs_db::Binding'
../lib/nodejs-db/binding.cxx:183:44: error: 'eio_req' was not declared in this scope
../lib/nodejs-db/binding.cxx:183:53: error: 'eioRequest' was not declared in this scope
../lib/nodejs-db/binding.cxx:183:65: error: expected ',' or ';' before '{' token
make: *** [Release/obj.target/informix_bindings/lib/nodejs-db/binding.o] Error 1
make: Leaving directory `WORKINGDIRECTORY/node_modules/nodejs-db-informix/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Linux 2.6.32-358.6.2.el6.x86_64
gyp ERR! command "node" "/usr/local/bin/node-gyp" "clean" "configure" "build"
gyp ERR! cwd WORKINGDIRECTORY/node_modules/nodejs-db-informix
gyp ERR! node -v v0.10.10
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok
|
This should be fixed now. Try again. |
Works!! Thanks. You'll merge and update npm? |
I already published v0.0.9 earlier. Will merge later. |
There does seem to be one issue I cannot figure out. I'm sometimes getting the error below when building the library and it seems to related to the location of the informix csdk, but I cannot figure out why or how exactly. > nodejs-db-informix@0.0.9 install WORKINGDIRECTORY/node_modules/nodejs-db-informix
> node-gyp configure build
make: Entering directory `WORKINGDIRECTORY/node_modules/nodejs-db-informix/build'
CXX(target) Release/obj.target/informix_bindings/src/connection.o
In file included from ../src/connection.cxx:1:0:
../src/connection.h:4:16: fatal error: it.h: No such file or directory
compilation terminated.
make: *** [Release/obj.target/informix_bindings/src/connection.o] Error 1 |
where does your it.h lives? |
OK, thanks that helped me figure it out. I had a relative path setup to the bundled csdk which worked before but now for whatever reason does not. Changing to a fully qualified path starting from "/" fixed it. |
I just install the nodejs-db-informix, build it and prepare to test it follow your guide. But I found there will be an error called:Could not load default informix_bindings when I try to use the test.js. Could you help me? thanks |
hi @mikeseaversu, could you please open a new issue with more details? like build logs and command line outputs/logs? cheers. |
Hi amitkr, Thanks for your reply. Below is my procedure to build and test
npm http GET https://registry.npmjs.org/nodejs-db-informix
make: Entering directory
gyp info it worked if it ends with ok 4 $ node-gyp rebuild gyp info it worked if it ends with ok 5 $ node tests/tests.js Could not load default informix_bindings This is what I did and I didn't find any error happen and no build log Xiang Su 苏翔 From: Amit Kumar notifications@github.com hi @mikeseaversu, could you please open a new issue with more details? like cheers. — |
i've replied to your question at #15 On Wednesday, 19 March 2014 1:45 PM, mikeseaversu notifications@github.com wrote: Hi amitkr, Thanks for your reply. Below is my procedure to build and test
npm http GET https://registry.npmjs.org/nodejs-db-informix
make: Entering directory
gyp info it worked if it ends with ok 4 $ node-gyp rebuild gyp info it worked if it ends with ok 5 $ node tests/tests.js Could not load default informix_bindings This is what I did and I didn't find any error happen and no build log Xiang Su 苏翔 From: Amit Kumar notifications@github.com hi @mikeseaversu, could you please open a new issue with more details? like cheers. — — |
When I execute npm install nodejs-db-informix, I get the following error.
Waf: Entering directory
/root/test_app/node_modules/nodejs-db-informix/build' [ 1/12] cxx: lib/nodejs-db/binding.cxx -> build/Release/lib/nodejs-db/binding_1.o cc1plus: error: unrecognized command line option â-std=c++11â Waf: Leaving directory
/root/test_app/node_modules/nodejs-db-informix/build'Build failed: -> task failed (err #1):
{task: cxx binding.cxx -> binding_1.o}
Node version: 0.8.22
client sdk version: 4.10
The text was updated successfully, but these errors were encountered: