I found out that I needed to set up my LD_LIBRARY_PATH env variable 
otherwise it will not find the path to the shared library.  set it up like 
this:  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/hdf5/lib

Then rebuild the project.  Once rebuilt type: ldd build/Release/hdf5.node 
(or whatever your module name is) and see if your HDF5 shared library you 
trying to link to is listed. If not than it didn't link correctly.

Roy

On Monday, April 23, 2012 12:57:44 AM UTC-4, Ryan Cole wrote:
>
> I have adjusted the binding.gyp file to include the linker settings 
> required for including the HDF5 libs I need. I believe that the current gyp 
> file mirrors a Makefile that I am able to get working, for HDF5's stand 
> alone compile. The only difference is that you're supposed to run the HDF5 
> Makefile with this custom binary, h5c++, that I think does some additional 
> build configurations for you.
>
> I only see two options here, I think. One option would be to compile this 
> node lib using that h5c++ binary. The other option would be to figure out 
> what that h5c++ binary does, and reproduce it within the binding.gyp file.
>
> Currently, using this binding.gyp file, my node lib will compile and I 
> assume it also links with hdf5 lib now. (
> https://github.com/ryancole/node-hdf5/blob/master/binding.gyp) I have 
> updated to a node version 0.7+, and can see the error message when I try to 
> require my node lib, now. It looks like this:
>
> ryan@ryan-server:~/repos/node-hdf5$ node
>>
>> > require('./build/Release/hdf5')
>>
>> Error: libhdf5.so.7: cannot open shared object file: No such file or 
>>> directory
>>
>>     at Object..node (module.js:475:11)
>>
>>     at Module.load (module.js:351:32)
>>
>>     at Function._load (module.js:309:12)
>>
>>     at Module.require (module.js:357:17)
>>
>>     at require (module.js:373:17)
>>
>>     at repl:1:2
>>
>>     at REPLServer.eval (repl.js:110:21)
>>
>>     at Interface.<anonymous> (repl.js:249:12)
>>
>>     at Interface.emit (events.js:87:17)
>>
>>     at Interface._onLine (readline.js:178:10)
>>
>>
> That's with my .gyp file as-is. When I try to run this command, "node-gyp 
> build CXX=/path/to/h5c++", I get an error saying that I need to try again 
> using the -fPIC parameter. No matter where I specify that parameter, it 
> just seems to tell me to try again using -fPIC. I think I may be heading 
> down the wrong path with that -fPIC, though.
>
> Anyway, just wanted to document my leaving-off-spot so that I can pick up 
> with it tomorrow. Also, so that if anybody has any suggestions they could 
> share them too! :)
>
> Thanks all,
> Ryan
>

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to