joeferner / node-oracle

node.js driver to connect with an oracle database.
MIT License
270 stars 99 forks source link

no release file generated after node-gyp build #176

Open vincent-kx opened 10 years ago

vincent-kx commented 10 years ago

I am trying to start up a oracle connection between node and oracle DB,I install all stuff exactly as the INSTALL.MD says,when i run my test case,the following error occurred: module.js:340 throw err; ^ Error: Cannot find module '../build/Release/oracle_bindings' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at Object. (/home/hotalk/node_modules/oracle/lib/oracle.js:2:16) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17)

I checked the environment with the pre_install_check.sh,it said everything was fine,then i checked the oracle module,i found there was no Release directory under build dir just like the error information told.then i uninstalled the oracle module,clone the source code from git,compiled and built with node-gyp by myself,but the error still occurred and there was no Release dir under build still. I can not figure out why,any clue about this is fine,thanks!

node version 0.10.26 oracle module version:0.3.6 SUSE Linux Enterprise Server 10 SP3 (x86_64) 2.6.16.60-0.54.5-xen

kontrafiktion commented 10 years ago

can you please paste the output of npm install oracle

vincent-kx commented 10 years ago

npm http GET https://registry.npmjs.org/oracle npm http 304 https://registry.npmjs.org/oracle

oracle@0.3.6 install /home/hotalk/node_modules/oracle node-gyp rebuild

make: Entering directory /home/hotalk/node_modules/oracle/build' make: Nothing to be done forall'. make: Leaving directory `/home/hotalk/node_modules/oracle/build' oracle@0.3.6 oracle

vincent-kx commented 10 years ago

i got the reason myself,it's about the gcc and gun make.For me,I have the lower version then requried.But now i got another problem,Both compile node-oralce by myself and use "npm install oracle" got an node-gyp error: npm http GET https://registry.npmjs.org/oracle npm http 304 https://registry.npmjs.org/oracle

oracle@0.3.6 install /home/hotalk/node_modules/oracle node-gyp rebuild

make: Entering directory '/home/hotalk/node_modules/oracle/build' CXX(target) Release/obj.target/oracle_bindings/src/connection.o CXX(target) Release/obj.target/oracle_bindings/src/oracle_bindings.o CXX(target) Release/obj.target/oracle_bindings/src/executeBaton.o CXX(target) Release/obj.target/oracle_bindings/src/reader.o CXX(target) Release/obj.target/oracle_bindings/src/statement.o CXX(target) Release/obj.target/oracle_bindings/src/outParam.o SOLINK_MODULE(target) Release/obj.target/oracle_bindings.node ./Release/linker.lock: No such file or directory oracle_bindings.target.mk:120: recipe for target 'Release/obj.target/oracle_bindings.node' failed make: *\ [Release/obj.target/oracle_bindings.node] Error 3 make: Leaving directory '/home/hotalk/node_modules/oracle/build' gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/home/hotalk/node-v0.10.26-linux-x64/lib/node_modules/npm/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:797:12) gyp ERR! System Linux 2.6.16.60-0.54.5-xen gyp ERR! command "node" "/home/hotalk/node-v0.10.26-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/hotalk/node_modules/oracle gyp ERR! node -v v0.10.26 gyp ERR! node-gyp -v v0.12.2 gyp ERR! not ok npm ERR! oracle@0.3.6 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the oracle@0.3.6 install script. npm ERR! This is most likely a problem with the oracle package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get their info via: npm ERR! npm owner ls oracle npm ERR! There is likely additional logging output above.

npm ERR! System Linux 2.6.16.60-0.54.5-xen npm ERR! command "/home/hotalk/node-v0.10.26-linux-x64/bin/node" "/home/hotalk/node-v0.10.26-linux-x64/bin/npm" "install" "oracle" "--python=/home/hotalk/python/bin/python2.7" npm ERR! cwd /home/hotalk/node_modules npm ERR! node -v v0.10.26 npm ERR! npm -v 1.4.3 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /home/hotalk/node_modules/npm-debug.log npm ERR! not ok code 0

SOLINK_MODULE(target) Release/obj.target/oracle_bindings.node /home/hotalk/instantclient_12_1_oracle/libocci.so: file not recognized: File format not recognized collect2: error: ld returned 1 exit status oracle_bindings.target.mk:120: recipe for target 'Release/obj.target/oracle_bindings.node' failed make: *\ [Release/obj.target/oracle_bindings.node] Error 1 make: Leaving directory '/home/hotalk/node_modules/oracle1/build' gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/home/hotalk/node-v0.10.26-linux-x64/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:797:12) gyp ERR! System Linux 2.6.16.60-0.54.5-xen gyp ERR! command "node" "/home/hotalk/node-v0.10.26-linux-x64/bin/node-gyp" "build" gyp ERR! cwd /home/hotalk/node_modules/oracle1 gyp ERR! node -v v0.10.26 gyp ERR! node-gyp -v v0.13.0 gyp ERR! not ok

gcc 4.8.2 make 4.0

kontrafiktion commented 10 years ago

The following line looks suspicious:

/home/hotalk/instantclient_12_1_oracle/libocci.so: file not recognized: File format not recognized

Please check whether the libocci.so link points to a valid file

vincent-kx commented 10 years ago

i guess the problem was caused by the soft link libocci.so(original file is libocci.12.1.so in OCI_HOME).maybe the gcc 4.8 has some problem when compile a file linked by a soft link.

vincent-kx commented 10 years ago

I changed my instantclient from 12 to 11,then problem solved.