Giter VIP home page Giter VIP logo

Comments (13)

rimmartin avatar rimmartin commented on July 22, 2024

Let me look a bit; see if a switch can be added to make binding.gyp link either way. As yet I'm unsure what would be different with reading datasets or any h5 operation. Thanks for the experimental binding.gyp.zip

from hdf5.node.

rimmartin avatar rimmartin commented on July 22, 2024

Hi,

I put in a binding.gyp variable for choosing shared or static switch on the compilers

https://github.com/HDF-NI/hdf5.node/blob/master/binding.gyp#L6

only tested on linux so far; need to get access to a mac at work and test there.

Didn't work with the .dylib vs .a yet; want to see if it is possibly to do it with -l like linux so these wouldn't need direct paths.

Typical build line is:

npm install --fallback-to-build --link_type=static --hdf5_home_linux=$HDF5_HOME

from hdf5.node.

jprctr avatar jprctr commented on July 22, 2024

Thanks for digging into this! Using a switch does seem like a better solution.

I tried building with the line you provided on the mac (after pulling in the latest changes you referenced above), and while it does complete successfully it's still referencing the shared library.

This may be because the mac link settings still reference the dylibs explicitly (unlike linux which doesn't include an extension).

from hdf5.node.

rimmartin avatar rimmartin commented on July 22, 2024

Right, I have a mac at work; it just needed the security update to work again with github.

I built a special hdf5 native lib that had no shared libraries available and that helps debug the static build. Be trying on mac when it works hopefully later this week

from hdf5.node.

joshua-gould avatar joshua-gould commented on July 22, 2024

I tried on my Mac and it was unable to find the shared library when using Electron.

from hdf5.node.

rimmartin avatar rimmartin commented on July 22, 2024

set the path to –hdf5_home_mac= ?
I'll be testing tonight. Got delayed over the weekend

from hdf5.node.

joshua-gould avatar joshua-gould commented on July 22, 2024

from hdf5.node.

rimmartin avatar rimmartin commented on July 22, 2024

The work box I get to use uses the gcc compiler(or it's proprietary project) instead of clang; believe causing troubles with node-gyp project setup. Looking for some way thru this. The only mac people I know are too paranoid of changes to let me set up developer env for this:-) Still trying to find away. May publish for the other fixes and come back to this

from hdf5.node.

rimmartin avatar rimmartin commented on July 22, 2024

Successfully building for linux and mac on travis-ci-org https://travis-ci.org/HDF-NI/hdf5.node/

fixing some unit tests that only fail on travis-ci for me

from hdf5.node.

joshua-gould avatar joshua-gould commented on July 22, 2024

Works for me too.

from hdf5.node.

rimmartin avatar rimmartin commented on July 22, 2024

changed the binding.gyp; static builds with mac could now possibly work

from hdf5.node.

jprctr avatar jprctr commented on July 22, 2024

Finally had a chance to try this out - thanks for taking the time to make these updates.

I installed the latest version of hdf5.node from this repository to my project, edited the link_type% in the binding.gyp file to specify "static" rather than "shared", and finally, rebuilt the library.

The rebuild succeeds and runs fine on my local machine. However, when I move it to another mac and attempt to run I get the following error:

Library not loaded: /usr/local/opt/hdf5/lib/libhdf5.101.dylib

Have I missed a step somewhere here?

from hdf5.node.

rimmartin avatar rimmartin commented on July 22, 2024

I don't think you missed anything. I'll try with the travis build and learn more about mac static style

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.