Giter VIP home page Giter VIP logo

Comments (8)

rimmartin avatar rimmartin commented on July 3, 2024

Hi @paologf , you need the environment variable HDF5_HOME=/home/roger/NodeProjects/hdf5 set to your native hdf5 distribution. the include of their hdf5.h will then get picked up

the legacy folder isn't involved, compatible with v0.12.x or supported anymore.

Also check the #4 about building on darwin and getting the right gcc compiler version on your computer with homebrew. the version should be g++ 4.9 at least:
g++ --version

Some details at
http://rycole.com/hdf5.node/doc/install-setup.html

from hdf5.node.

paologf avatar paologf commented on July 3, 2024

Ok, thank you for the reply (and sorry for the delay..).

I follow the link instruction, I download and install the hdf5, then I set my HDF5_HOME variable to the installed hdf5 path.

I had some compiler error so I also do :

brew install gcc49
export CXX=/usr/local/bin/gcc-4.9

as suggest in #4 by @dasantonym .

Then I install hdf5 module using npm install hdf5 .

If I do a require from node the module works.
If I try to do the require from Electron I have the following message error :

Uncaught Error: dlopen(app/node_modules/hdf5/build/Release/hdf5.node, 1): Symbol not found: __ZNSs4_Rep20_S_empty_rep_storageE
Referenced from: app/node_modules/hdf5/build/Release/hdf5.node
Expected in: dynamic lookup

Referenced from: app/node_modules/hdf5/build/Release/hdf5.node
Expected in: dynamic lookup

at Error (native)
at Object.module.(anonymous function) (ATOM_SHELL_ASAR.js:134:20)
at Object.module.(anonymous function) as .node
at Module.load (module.js:343:32)
at Function.Module._load (module.js:298:12)
at Module.require (module.js:353:17)
at require (module.js:372:17)
at Object. (app/node_modules/hdf5/index.js:4:13)
at Module._compile (module.js:418:26)
at Object.Module._extensions..js (module.js:436:10)

Any (other) suggestion?

Thanks.

from hdf5.node.

duckontheweb avatar duckontheweb commented on July 3, 2024

I am also having trouble building on a Mac. I have tried using npm install hdf5 with HDF5_HOME=*path_to_hdf_directory*, which yields a fatal error due to too many errors being ommitted. The first error in the chain is:

In file included from ../src/file.h:14:
../src/attributes.hpp:24:40: error: no type named 'FunctionCallbackInfo' in namespace 'v8'
        static void Refresh (const v8::FunctionCallbackInfo<v8::Value>& args) {
                                   ~~~~^
../src/attributes.hpp:24:60: error: expected ')'
        static void Refresh (const v8::FunctionCallbackInfo<v8::Value>& args) {
                                                           ^
../src/attributes.hpp:24:29: note: to match this '('
        static void Refresh (const v8::FunctionCallbackInfo<v8::Value>& args) {
                            ^
../src/attributes.hpp:84:38: error: no type named 'FunctionCallbackInfo' in namespace 'v8'
        static void Flush (const v8::FunctionCallbackInfo<v8::Value>& args) {
                                 ~~~~^
../src/attributes.hpp:84:58: error: expected ')'
        static void Flush (const v8::FunctionCallbackInfo<v8::Value>& args) {
                                                         ^
../src/attributes.hpp:84:27: note: to match this '('
        static void Flush (const v8::FunctionCallbackInfo<v8::Value>& args) {
                          ^
../src/attributes.hpp:27:17: error: use of undeclared identifier 'args'; did you mean 'uv_process_options_s::args'?
            if (args.Length() >0 ) {
                ^~~~
                uv_process_options_s::args
/Users/jduckwor/.node-gyp/0.10.35/deps/uv/include/uv.h:1345:10: note: 'uv_process_options_s::args' declared here
  char** args;

I get the same errors when trying to build from the repo using node-gyp. I am a little unclear on what I should be setting my NODE_PATH variable too, since the example seems to suggest there should be a build directory in the main hdf5.node directory, but I don't see one, so this may be the root of the issue.

Any help is much appreciated. I am running OS Mavericks 10.9.5, node v0.10.35, node-gyp v2.0.2.

Thanks very much,

Jon

from hdf5.node.

paologf avatar paologf commented on July 3, 2024

Hi Jon,
you don't need to set the NODE_PATH as specify here http://rycole.com/hdf5.node/doc/install-setup.html .
I think I had the same problem before updating the gcc, try :

brew install gcc49
export CXX=/usr/local/bin/gcc-4.9

from hdf5.node.

duckontheweb avatar duckontheweb commented on July 3, 2024

Thanks for the help, that seemed to get me a bit farther along. It's now throwing an error related to the homebrew cellar:

make: /usr/local/Cellar/gcc/4.9.2_1: Permission denied
make: *** [Release/obj.target/h5ds/src/h5ds.o] Error 1

I tried using chmod to give read and write permissions to that directory, but still got the same error. I actually tried giving read and write permission to the whole chain up through /usr/local temporarily and changing the owner of /usr/local to my username, but still got the same thing.

I know this is kind of a separate issue from the node installation, but any thoughts?

Thanks a bunch,

Jon

from hdf5.node.

rimmartin avatar rimmartin commented on July 3, 2024

@jduckworth Hi, this project is nodejs v0.12.x based. v0.10.x isn't supported. Developer >=v0.11.14 will probably work but I would go to v0.13.x if in nodejs developer mode.

Your last is a permissions issue with the gcc install of course. At a terminal what does
which g++
g++ --version

give you?

from hdf5.node.

rimmartin avatar rimmartin commented on July 3, 2024

Note I am working on node-pre-gyp building yet for mac I'm not sure if all OS versions will get supported quickly seeing mac doesn't license well for developers on the cloud; but I'll try and also borrow some machines at work

from hdf5.node.

duckontheweb avatar duckontheweb commented on July 3, 2024

That's what I suspected for the gcc install...

The system I described above is my work setup, which I think is leading to the permission issues. I tried doing the install on my home computer (OS X Yosemite 10.10.4, Node v0.12.7, node-gyp v2.0.2) and it installed without an error. However, when I try to require it I get the error:

Error: dlopen(/Users/jduckwor/node_modules/hdf5/build/Release/hdf5.node, 1): Symbol not found: __ZN3MPI3Win4FreeEv
Referenced from: /Users/jduckwor/node_modules/hdf5/build/Release/hdf5.node
Expected in: dynamic lookup

It seems like others have had similar errors when installing Python modules and that it has to do with the MPI compiler being used. I'm going to play around with it and I'll let you know if I come up with a solution.

from hdf5.node.

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.