GithubHelp home page GithubHelp logo

Errors when building ibm_db about node-ibm_db HOT 13 CLOSED

ibmdb avatar ibmdb commented on July 3, 2024
Errors when building ibm_db

from node-ibm_db.

Comments (13)

praveend avatar praveend commented on July 3, 2024

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.
http://www-01.ibm.com/support/docview.wss?uid=swg27016878
http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/com.ibm.swg.im.dbclient.install.doc/doc/t0054799.html

Thanks

Praveen

from node-ibm_db.

ethanwillis avatar ethanwillis commented on July 3, 2024

I set my IBM_DB_HOME to be the install directory for the Data Server Client and I still get the same errors.

echo $IBM_DB_HOME
/opt/ibm/db2/V9.7

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"

ls /home/mint/db2user
bin db2cshrc installDSDriver license db2_cli_odbc_driver db2profile installDSDriver.log tools
echo $IBM_DB_HOME
/home/mint/db2user

from node-ibm_db.

praveend avatar praveend commented on July 3, 2024

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
adm bin bnd cfgcache db2cshrc db2dump db2profile32 installDSDriver java lib license php rdf tools
adm32 bin32 cfg conv db2cshrc32 db2profile include installDSDriver.log json lib32 msg python ruby

Thanks

Praveen

from node-ibm_db.

ethanwillis avatar ethanwillis commented on July 3, 2024

I reinstalled the Dataserver Driver packages and now I have the correct folder structure

$ ls ~/db2user
adm bin bnd cfg cfgcache conv db2cshrc db2dump db2profile include installDSDriver installDSDriver.log java lib license msg odbc_cli_driver php security64 tools

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

from node-ibm_db.

ethanwillis avatar ethanwillis commented on July 3, 2024

Here is a screenshot of the the install log file, installDSDriver.log
screenshot from 2014-03-10 15 17 32

from node-ibm_db.

ethanwillis avatar ethanwillis commented on July 3, 2024

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.

screenshot from 2014-03-10 16 06 07

If this is the case, I will create and send a pull request.

from node-ibm_db.

praveend avatar praveend commented on July 3, 2024

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

from node-ibm_db.

ethanwillis avatar ethanwillis commented on July 3, 2024

NodeJS version is 0.10.15

from node-ibm_db.

praveend avatar praveend commented on July 3, 2024

could you update your node to latest stable v0.10.26 and give a try

from node-ibm_db.

ethanwillis avatar ethanwillis commented on July 3, 2024

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.

from node-ibm_db.

praveend avatar praveend commented on July 3, 2024

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?

from node-ibm_db.

ethanwillis avatar ethanwillis commented on July 3, 2024

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.

from node-ibm_db.

ethanwillis avatar ethanwillis commented on July 3, 2024

Hello Praveen, I have been able to successfully build and install this module.

I...

1.) switched to ubuntu 12.04LTS
2.) Downloaded the correct DataServerDriver package for my architecture and installed it.
3.) Set environment variables IBM_DB_HOME and CPATH to the root directory of my dsdriver install and the include folder within my dsdriver folder respectively.
4.) successfully issued node-gyp configure build command

from node-ibm_db.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.