Skip to content
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

IBM_DB does not support Node JS v4.0.0 #64

Closed
elkorep opened this issue Sep 10, 2015 · 33 comments
Closed

IBM_DB does not support Node JS v4.0.0 #64

elkorep opened this issue Sep 10, 2015 · 33 comments

Comments

@elkorep
Copy link
Contributor

elkorep commented Sep 10, 2015

IBM_DB does not install on Node JS v4.0.0 64-bit and 32-bit on linux machines.
It installs on windows 7 with the 64-bit version of Node JS v4.0.0 but fails to run the tests.

@adr1anav
Copy link

I was able to install ibm_db on Node js v4.0 64-bit but like the user above, also ran into issues when running the code. What are the plans to get ibm_db supported on Node js v4.0?

@smartmouse
Copy link

Yes, not a surprise, see this nodejs/node#2798

@ibmdb
Copy link
Collaborator

ibmdb commented Oct 4, 2015

Try it: npm install git+https://[email protected]/ibmdb/node-ibm_db.git#v4_support
Also, it requires gcc version > 4.8 on linux. If installation fails, check gcc --version.

@elkorep
Copy link
Contributor Author

elkorep commented Oct 6, 2015

The issue seems to persist, even with gcc version > 4.8
I was unable to install it on xLinux, zLinux, and Power BE

@bimalkjha
Copy link
Member

I verified it on Mac using node.js V 4.1.1. It seems working fine now. All test cases are working fine.
npm install git+https://[email protected]/ibmdb/node-ibm_db.git#v4_support

But, I see a problem here. It does not seem to work with older node.js. I check with v0.12.4 on linux. Not sure how it behaves for you. Thanks.

@neurotech
Copy link

Thanks @bimalkjha that worked for me. 👍

@bimalkjha
Copy link
Member

@elkorep Since, it is working on all zLinux except one, I suspect some system issue and not ibm_db issue. I would suggest to copy ibm_db installed from some other zLinux to the failing system and run below command to get the exact cause of the issue:

node-gyp configure build --IBM_DB_HOME=$IBM_DB_HOME --IS_DOWNLOADED=true

node-gyp should be in your system path and run this command from ibm_db folder. Thanks.

@elkorep
Copy link
Contributor Author

elkorep commented Oct 9, 2015

Thanks @bimalkjha I will look into it

@rperlas
Copy link

rperlas commented Oct 26, 2015

@bimalkjha I am having problems installing ibm_db on zLinux SLES 11.

This is my current environment:

64-bit zLinux SLES 11
v4.2.1-IBMBuild-4.2.1.0-201510191435
gcc version 4.8.3 20140627 [gcc-4_8-branch revision 212064](SUSE Linux)

This is the steps I took to install:

npm install git+https://[email protected]/ibmdb/node-ibm_db.git#v4_support

This is the full error message I get:

[email protected] install /home/nodebot1/test-421/node_modules/ibm_db
node installer/driverInstall.js

Downloading DB2 ODBC CLI Driver from http://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/s390x64_odbc_cli.tar.gz...
Download and extraction of DB2 ODBC CLI Driver completed successfully ...
make: Entering directory /home/nodebot1/test-421/node_modules/ibm_db/build' CXX(target) Release/obj.target/odbc_bindings/src/odbc.o make: Leaving directory/home/nodebot1/test-421/node_modules/ibm_db/build'

{ [Error: Command failed: /bin/sh -c node-gyp configure build --IBM_DB_HOME=$IBM_DB_HOME --IS_DOWNLOADED=true
In file included from ../src/odbc.cpp:19:
/home/nodebot1/.node-gyp/4.2.1/include/node/v8.h:336: error: expected unqualified-id before ‘using’
/home/nodebot1/.node-gyp/4.2.1/include/node/v8.h: In constructor ‘v8::MaybeLocal::MaybeLocal()’:
/home/nodebot1/.node-gyp/4.2.1/include/node/v8.h:353: error: ‘nullptr’ was not declared in this scope
/home/nodebot1/.node-gyp/4.2.1/include/node/v8.h: In member function ‘bool v8::MaybeLocal::IsEmpty() const’:
/home/nodebot1/.node-gyp/4.2.1/include/node/v8.h:360: error: ‘nullptr’ was not declared in this scope
/home/nodebot1/.node-gyp/4.2.1/include/node/v8.h: In member function ‘bool v8::MaybeLocal::ToLocal(v8::Local< S >*) const’:
/home/nodebot1/.node-gyp/4.2.1/include/node/v8.h:364: error: ‘nullptr’ was not declared in this scope
/home/nodebot1/.node-gyp/4.2.1/include/node/v8.h: In member function ‘bool v8::WeakCallbackInfo::IsFirstPass() const’:
/home/nodebot1/.node-gyp/4.2.1/include/node/v8.h:430: error: ‘nullptr’ was not declared in this scope
/home/nodebot1/.node-gyp/4.2.1/include/node/v8.h: At global scope:
/home/nodebot1/.node-gyp/4.2.1/include/node/v8.h:469: error: expected unqualified-id before ‘using’
/home/nodebot1/.node-gyp/4.2.1/include/node/v8.h:472: error: expected identifier before ‘class’
/home/nodebot1/.node-gyp/4.2.1/include/node/v8.h:472: error: ISO C++ forbids declaration of ‘kParameter’ with no type
/home/nodebot1/.node-gyp/4.2.1/include/node/v8.h:472: error: ISO C++ forbids declaration of ‘kInternalFields’ with no type
/home/nodebot1/.node-gyp/4.2.1/include/node/v8.h:472: error: expected ‘;’ before ‘}’ token
/home/nodebot1/.node-gyp/4.2.1/include/node/v8.h:472: error: expected ;' before ‘}’ token /home/nodebot1/.node-gyp/4.2.1/include/node/v8.h:472: error: multiple types in one declaration /home/nodebot1/.node-gyp/4.2.1/include/node/v8.h:637: error: invalid pure specifier (only= 0' is allowed) before ‘;’ token
/home/nodebot1/.node-gyp/4.2.1/include/node/v8.h:638: error: invalid pure specifier (only = 0' is allowed) before ‘;’ token /home/nodebot1/.node-gyp/4.2.1/include/node/v8.h:844: error: invalid pure specifier (only= 0' is allowed) before ‘;’ token
/home/nodebot1/.node-gyp/4.2.1/include/node/v8.h:845: error: invalid pure specifier (only = 0' is allowed) before ‘;’ token /home/nodebot1/.node-gyp/4.2.1/include/node/v8.h: In constructor ‘v8::Global<T>::Global()’: /home/nodebot1/.node-gyp/4.2.1/include/node/v8.h:790: error: ‘nullptr’ was not declared in this scope /home/nodebot1/.node-gyp/4.2.1/include/node/v8.h: In constructor ‘v8::Global<T>::Global(v8::Global<T>&&)’: /home/nodebot1/.node-gyp/4.2.1/include/node/v8.h:815: error: ‘nullptr’ was not declared in this scope /home/nodebot1/.node-gyp/4.2.1/include/node/v8.h: In member function ‘v8::Global<T>& v8::Global<T>::operator=(v8::Global<S>&&)’: /home/nodebot1/.node-gyp/4.2.1/include/node/v8.h:827: error: ‘nullptr’ was not declared in this scope /home/nodebot1/.node-gyp/4.2.1/include/node/v8.h: At global scope: /home/nodebot1/.node-gyp/4.2.1/include/node/v8.h:852: error: expected unqualified-id before ‘using’ /home/nodebot1/.node-gyp/4.2.1/include/node/v8.h:1089: error: ‘nullptr’ was not declared in this scope /home/nodebot1/.node-gyp/4.2.1/include/node/v8.h:1095: error: ‘nullptr’ was not declared in this scope /home/nodebot1/.node-gyp/4.2.1/include/node/v8.h:2075: error: expected identifier before ‘class’ /home/nodebot1/.node-gyp/4.2.1/include/node/v8.h:2075: error: ISO C++ forbids declaration of ‘kNormal’ with no type /home/nodebot1/.node-gyp/4.2.1/include/node/v8.h:2075: error: ISO C++ forbids declaration of ‘kInternalized’ with no type /home/nodebot1/.node-gyp/4.2.1/include/node/v8.h:2075: error: expected ‘;’ before ‘}’ token /home/nodebot1/.node-gyp/4.2.1/include/node/v8.h:2075: error: expected;' before ‘}’ token
/home/nodebot1/.node-gyp/4.2.1/include/node/v8.h:2075: error: multiple types in one declaration
/home/nodebot1/.node-gyp/4.2.1/include/node/v8.h:2075: error: ‘int v8::NewStringType::kNormal’ is private
/home/nodebot1/.node-gyp/4.2.1/include/node/v8.h:2283: error: within this context
/home/nodebot1/.node-gyp/4.2.1/include/node/v8.h:2283: error: ‘v8::NewStringType::kNormal’ cannot appear in a constant-expression
/home/nodebot1/.node-gyp/4.2.1/include/node/v8.h:2284: error: ‘kInternalized’ is not a member of ‘v8::NewStringType’
/home/nodebot1/.node-gyp/4.2.1/include/node/v8.h: In instantiation of ‘v8::PersistentBasev8::Object’:
/home/nodebot1/.node-gyp/4.2.1/include/node/v8.h:2769: instantiated from here
/home/nodebot1/.node-gyp/4.2.1/include/node/v8.h:637: error: initializer specified for non-virtual method ‘v8::PersistentBase::PersistentBase(v8::PersistentBase&) [with T = v8::Object]’
/home/nodebot1/.node-gyp/4.2.1/include/node/v8.h:638: error: initializer specified for non-virtual method ‘void v8::PersistentBase::operator=(v8::PersistentBase&) [with T = v8::Object]’
/home/nodebot1/.node-gyp/4.2.1/include/node/v8.h: In member function ‘v8::MaybeLocalv8::Object v8::Function::NewInstance(v8::Localv8::Context) const’:
/home/nodebot1/.node-gyp/4.2.1/include/node/v8.h:3205: error: ‘nullptr’ was not declared in this scope
/home/nodebot1/.node-gyp/4.2.1/include/node/v8.h: At global scope:
/home/nodebot1/.node-gyp/4.2.1/include/node/v8.h:3350: error: expected identifier before ‘class’
/home/nodebot1/.node-gyp/4.2.1/include/node/v8.h:3350: error: ISO C++ forbids declaration of ‘kInternalized’ with no type
/home/nodebot1/.node-gyp/4.2.1/include/node/v8.h:3350: error: ISO C++ forbids declaration of ‘kExternalized’ with no typenpm ERR! Linux 3.0.101-65-default
npm ERR! argv "/home/nodebot1/IBMSVT64_42/bin/node" >"/home/nodebot1/IBMSVT64_42/bin/npm" "install" "git+https://[email protected]/ibmdb/node-ibm_db.git#v4_support"
npm ERR! node v4.2.1
npm ERR! npm v2.14.7
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node installer/driverInstall.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node installer/driverInstall.js'.
npm ERR! This is most likely a problem with the ibm_db package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node installer/driverInstall.js
npm ERR! You can get their info via:
npm ERR! npm owner ls ibm_db
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/nodebot1/test-421/npm-debug.log

@rperlas
Copy link

rperlas commented Oct 26, 2015

@bimalkjha Hi, I have a different issue testing ibm_db on a different machine. I am not sure, but this could be an issue with missing libraries in the environment I am using, can you confirm?

The environment:

xLinux Ubuntu 12 64-bit
gcc version 4.8.1 (Ubuntu 4.8.1-2ubuntu1~12.04)
v4.2.1-IBMBuild-4.2.1.0-201510191435

The steps I took to test:

npm install git+https://[email protected]/ibmdb/node-ibm_db.git#v4_support
npm install async
npm install moment
npm test

The error I get:

Error: libxml2.so.2: cannot open shared object file: No such file or directory
at Error (native)
at Object.Module._extensions..node (module.js:460:18)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at bindings (/home/ivyho2/test-421/node_modules/ibm_db/node_modules/bindings/bindings.js:74:15)
at Object. (/home/ivyho2/test-421/node_modules/ibm_db/lib/odbc.js:27:31)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)

Thank you!

@bimalkjha
Copy link
Member

@rperlas For you second issue, you need to install OS library libxml2.so.2. I don't see any other issue.

Your first reported issue is compiler issue. See the start of the error and it is about v8 header file.

/home/nodebot1/.node-gyp/4.2.1/include/node/v8.h:336: error: expected unqualified-id before ‘using’

The current installed compiler is not able to compile the node.js header file. Try with latest compiler. This issue is not related with ibm_db code.

Thanks.

@rperlas
Copy link

rperlas commented Oct 27, 2015

Thanks @bimalkjha. I will look into it.

@smartmouse
Copy link

@rperlas ,any updates on your issues? I think everything is working for Node 4.0 except windows?

@csaroff
Copy link

csaroff commented Nov 19, 2015

npm install git+https://[email protected]/ibmdb/node-ibm_db.git#v4_support
works for me in node 5.1.0, but not 0.12.7.

Is there anyway to make this update reverse compatible?

@rperlas
Copy link

rperlas commented Nov 19, 2015

@smartmouse Yes, everything works fine except windows.

@bimalkjha
Copy link
Member

@csaroff We are looking into code to make single branch available for all versions of node. Yes, currently for node v0.10.x or v0.12.x, you need to run npm install ibm_db while for nodejs v4.x onwards, use npm install git+https://[email protected]/ibmdb/node-ibm_db.git#v4_support command. We have documented it. Thanks for confirming that it is working fine with node.js 5.x too.

@Lonniebiz
Copy link

In Ubuntu 15.10, I was able to successfully run node 4.2.2 with the ibmdb version here:
git+https://[email protected]/ibmdb/node-ibm_db.git#v4_support

However, in Windows 2008 R2, it has issue with the git+ portion of this version-specification (when specified in the package.json file). Is this version also for Windows? If so, how should it show in the package.json file. Windows don't like "git".

How can I run node 4.2.2 with the ibmdb module in Windows 2008 R2?

@Lonniebiz
Copy link

Ah, "Note: Currently, node-ibm_db is not supported on Windows using NodeJS V4.x." --Source: https://github.com/ibmdb/node-ibm_db

@smartmouse
Copy link

If you are using IBM SDK node.js 4.x,
Here are the supported platforms:
http://www.ibm.com/developerworks/web/nodesdk/version4.html

On older distribution like RH 6.x , you can upgrade the gcc level to 4.8.x but this is not an officially supported platforms

This should be useful info
http://www-01.ibm.com/support/docview.wss?uid=swg21968931

@bimalkjha
Copy link
Member

"npm install ibm_db" works with all versions of node.js on Windows platform only. Thanks.

@bimalkjha
Copy link
Member

ibm_db supports Node.js V4.x. On windows use "npm install ibm_db" with v4 node.js.
For non-windows platform, use below command for node.js v4.x:
npm install git+https://[email protected]/ibmdb/node-ibm_db.git#v4_support

@qpresley
Copy link
Contributor

When will npm install ibm_db support V4 on all platforms?

@bimalkjha
Copy link
Member

We are working on it.

@bimalkjha
Copy link
Member

We have released a new version of ibm_db 0.0.18.
Now npm install ibm_db works with all versions of node.js on all platforms. Thanks.

@sharethemagics
Copy link

I am getting the below error when trying to use IBM_DB for db2 access from windows.

$ node nodetest.js
C:\Users\workspace\nodetest\node_modules\bindings\bindings.js:79
throw e
^

Error: Module version mismatch. Expected 47, got 46.
at Error (native)
at Object.Module._extensions..node (module.js:440:18)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at bindings (C:\Users\workspace\nodetest\node_modules\bindings\bindings.js:74:15)
at Object. (C:\Users\workspace\nodetest\node_modules\ibm_db\lib\odbc.js:27:31)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)

@rhtpandeyIN
Copy link
Contributor

@sharethemagics ,
Please share following details with us:

  1. Which node.js version you are using?
  2. How you installing node-ibm_db (from git or npm)?
  3. easy steps for reproducing above exception?

thanks

@sharethemagics
Copy link

@rhtpandeyIN Please find the answers below

  1. Which node.js version you are using? - v5.7.0
  2. How you installing node-ibm_db (from git or npm)? - Npm
  3. easy steps for reproducing above exception? - It just throws error whenever I include "ibm_db"

var http = require("http");
var ibmdb = require("ibm_db");

console.log("Test program to access DB2 sample database");

http.createServer(function (request, response) {

response.writeHead(200, {'Content-Type': 'text/plain'});

response.end('Hello World\n');
}).listen(8081);

console.log('Server running at http://127.0.0.1:8081/');

thanks

@rhtpandeyIN
Copy link
Contributor

Hi @sharethemagics,
The error you are getting is obvious, because you are installing from "npm", and it do not have support for node.js V5.x, and you are using V5.x.
so you have two options:

  1. Use node.js V4.x if Installing node-ibm_db from npm.
    or
  2. Install node-ibm_db from github repo(supports node.js V5.x), if you want to use node.js V5.x

you can use following command for Installing from github directly :
npm install git+https://[email protected]/ibmdb/node-ibm_db.git

@sharethemagics
Copy link

@rhtpandeyIN Thanks a lot. It worked fine.

@rhtpandeyIN
Copy link
Contributor

Thanks & Welcome

@neurotech
Copy link

Will node-ibm_db support >= v5 soon?

@bimalkjha
Copy link
Member

Yes, within 2 weeks. Currently it is supported using npm install
git+https://[email protected]/ibmdb/node-ibm_db.git command.

Thanks and Regards,
Bimal Jha

From: Tim Douglas [email protected]
To: ibmdb/node-ibm_db [email protected]
Cc: Bimal K Jha/India/IBM@IBMIN, State change
[email protected]
Date: 02/06/2016 04:23 am
Subject: Re: [ibmdb/node-ibm_db] IBM_DB does not support Node JS
v4.0.0 (#64)

Will node-ibm_db support >= v5 soon?

You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or mute the thread.

@neurotech
Copy link

Great, thanks @bimalkjha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests