Giter VIP home page Giter VIP logo

Comments (9)

springmeyer avatar springmeyer commented on June 19, 2024

Yes, I think this is what we'll need to do. It will make offering portable node-osrm binaries slightly more complicated but should be doable. What I see happening is:

  • libtbb and libOSRM become built as shared libraries (dylib/so).
  • They are still linked to static libraries for all dependencies (liblua, libboost, etc)
  • After node-osrm binaries are built libtbb and libOSRM will be copied into the lib/binding directory beside osrm.node
  • On OSX we can use @loader_path to ensure relative loading works
  • On Linux we can link osrm.node with -Wl,$ORIGIN to ensure relative loading works
  • If the user has set LD_LIBRARY_PATH to a directory that includes an externally built libtbb or libOSRM and it is binary incompatible then osrm.node will be broken. So, to ensure this never happens we could optionally rename the libraries to something unique before bundling.

from node-osrm.

DennisOSRM avatar DennisOSRM commented on June 19, 2024

@springmeyer lets do voice on this tomorrow or early next week. We should go for the low maintainance solution.

from node-osrm.

springmeyer avatar springmeyer commented on June 19, 2024

Summary of chat with @DennisOSRM

tl;dr: - I'm going to get travis builds working with shared TBB - shooting to have this working by early next week.

Overall notes:

  • The approach of travis + mapnik-packaging + node-pre-gyp + static libraries makes it easy to install node-osrm for non developers but can make it more painful to get releases out.
  • The introduction of the need for TBB being a shared lib is blocking things
  • Luckily @springmeyer recently made a concession and started packaging libgdal as a shared lib, so along the way figured out how to get this working within node-pre-gyp binaries.
  • We should consider using debian packaging for OSRM/node-osrm in the future if node-pre-gyp approach introduces more pain points
  • But for now, just packaging TBB as a shared lib should get things unblocked and working well again

from node-osrm.

springmeyer avatar springmeyer commented on June 19, 2024

First build up with TBB shared, and travis is passing again: https://travis-ci.org/DennisOSRM/node-osrm/builds/28076849. I'm building TBB from source like so: https://github.com/mapnik/mapnik-packaging/blob/master/osx/scripts/build_tbb.sh. Their Makefiles are totally unconventional so it took some time to figure out how to work with them.

Next actions:

  • test binaries on linux
  • get an alpha package out with shared tbb to make sure it can be installed on 14.04 without trouble
  • test whether having an externally apt-get installed TBB breaks then node packaged version

from node-osrm.

springmeyer avatar springmeyer commented on June 19, 2024

All done here - workflow is now using shared tbb and packaged binaries work. Next action would be to make an official tag against an updated HASH of OSRM.

from node-osrm.

DennisOSRM avatar DennisOSRM commented on June 19, 2024

👍

from node-osrm.

DennisOSRM avatar DennisOSRM commented on June 19, 2024

@springmeyer where does it drop the shared object and the header files? It's not yet picked up:

ERROR: Intel TBB NOT found!
-- Looked for Threading Building Blocks in /tmp/gjs4FeTgSZM/mapnik-packaging/osx/out/build-cpp11-libstdcpp-gcc-x86_64-linux
CMake Error at cmake/FindTBB.cmake:272 (message):
  Could NOT find TBB library.
Call Stack (most recent call first):
  CMakeLists.txt:168 (find_package)

from node-osrm.

springmeyer avatar springmeyer commented on June 19, 2024

re-opened will investigate.

from node-osrm.

springmeyer avatar springmeyer commented on June 19, 2024

Closing again. Now working over at #58 #59

from node-osrm.

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.