-
Notifications
You must be signed in to change notification settings - Fork 151
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
Errors when building ibm_db #1
Comments
Hi, Could you let us know what your IBM_DB_HOME variable is set to. Before installing you will need to set the IBM_DB_HOME variable to the installation directory of IBM DataServer Driver package. Coming to the DB2 client, it is recommended that you use the Data Server Driver package instead of Data Server Client with node-ibm_db. Thanks Praveen |
I set my IBM_DB_HOME to be the install directory for the Data Server Client and I still get the same errors.
I then installed the Data Server Driver Package in /home/mint/db2user, and updated my IBM_DB_HOME to be that install folder. I still get the same errors when trying to run "node-gyp configure build"
|
Hi, I don't see the lib and include folders under the install folder.....after installation the folder should look like below, to which IBM_DB_HOME is to be set......check under db2_cli_odbc_driver, might be the necessary libraries have got installed there. Once all these are ensured and still error is seen....I would next look at if you node is 32-bit or 64-bit if node is 32-bit and the DB2 client u downloaded is 64-bit or vice versa then you would still your installation could fail....hence ensure that you have both the packages for same architecture.... Folder structure$ ls Thanks Praveen |
I reinstalled the Dataserver Driver packages and now I have the correct folder structure
I also checked to see which architecture my nodejs and Data Server driver packages have. NodeJS is x64, version is 0.10.15, And my Data Server Driver package is x64 as well. Thanks |
I believe I have found the issue. I think that my config.gyp is being generated incorrectly. This might be due to the binding.gyp in the project being out of date for the latest version of node-gyp. Here is a screenshot of my config.gyp under node-ibm_db/build/ and my binding.gyp under node-bim_db/ Notice in my config.gyp (on the left side) that the variables "include_dirs" and "libraries" are empty. If this is the case, I will create and send a pull request. |
Hi, What version of node.js are you on? One thing to note is if config.gyp was not generated properly how were the include files under instal_dir/include detected. The reason I say this is the failure is seen at the link step while the compile is gone through fine. Thanks Praveen |
NodeJS version is 0.10.15 |
could you update your node to latest stable v0.10.26 and give a try |
I updated to v0.10.26 and I still get the error "/usr/bin/ld: cannot find -ldb2o" after running node-gyp configure and node-gyp build. |
Not sure what is that piece we are missing....I tried to repro by following the steps you mentioned....it goes through fine on my system and config.gypi is as in your case.... Only thing I see is you are on mint....does mint have any particular binary format? If yes, then might be DB2 client libraries and node libraries are of different format. Would it be possible for you to give a try on ubuntu box and see if you hit the same error? |
Yes, I will try this on a regular ubuntu box and update this comment with my findings. It will be a few hours before I can try this, because I have some meetings I have to prepare for. |
Hello Praveen, I have been able to successfully build and install this module. I... 1.) switched to ubuntu 12.04LTS |
Hello, I'm receiving errors when trying to build ibm_db.
System: I'm using the latest release of 64 bit linux mint.
Steps:
1.) I installed node and npm.
2.) I created my project directory + the node modules folder
3.) I downloaded and installed installed Data Server Client v9.7. I've verified that all the files installed in the correct default folder under /opt/ibm/db2.
4.) I've cloned ibm_db into my project's node_modules folder and issues "node-gyp configure"
5.) On "node-gyp build" I get the following output...
sudo node-gyp build > debug.txt
gyp info it worked if it ends with ok
gyp info using node-gyp@0.13.0
gyp info using node@0.10.15 | linux | x64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
/usr/bin/ld: cannot find -ldb2o
collect2: error: ld returned 1 exit status
make: *** [Release/obj.target/odbc_bindings.node] Error 1
gyp ERR! build error
gyp ERR! stack Error:
make
failed with exit code: 2gyp ERR! stack at ChildProcess.onExit (/usr/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 3.11.0-12-generic
gyp ERR! command "node" "/usr/bin/node-gyp" "build"
gyp ERR! cwd /home/mint/Programming/CCP/node_modules/node-ibm_db
gyp ERR! node -v v0.10.15
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok
What steps do I need to take to ensure that this builds correctly, or is this an actual issue?
The text was updated successfully, but these errors were encountered: