Comments (9)
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
andlibOSRM
will be copied into thelib/binding
directory besideosrm.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 thenosrm.node
will be broken. So, to ensure this never happens we could optionally rename the libraries to something unique before bundling.
from node-osrm.
@springmeyer lets do voice on this tomorrow or early next week. We should go for the low maintainance solution.
from node-osrm.
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.
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.
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.
👍
from node-osrm.
@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.
re-opened will investigate.
from node-osrm.
Closing again. Now working over at #58 #59
from node-osrm.
Related Issues (20)
- Odd failure on linux with coverage build HOT 1
- Architecture optimized binaries HOT 1
- Un-mute logging in debug mode HOT 1
- osrm-extract error - attempt to call global 'canonicalizeStringList' (a nil value) HOT 4
- Installing via npm fails to build from source HOT 16
- Bundle osrm-components with node-osrm HOT 5
- Bundle osrm-unlock-all and other tools HOT 4
- Add support for geometries parameter polyline6
- macOS compilation issue with current osrm-backend master HOT 3
- cannot build never than v5.3.3 node-osrm from source HOT 11
- Wrap: Trip with Fixed Start and End points (TFSE) HOT 1
- Can't install node-osrm after install osrm-backend HOT 5
- Failing `annotations` tests HOT 1
- Wrap: Allow annotations parameter to accept specific fields HOT 7
- Expose `generate_hints` Parameter
- Installation issues with node v4.2.6, npm v3.5.2 HOT 2
- Precompiled binaries fail on alpine linux HOT 3
- Deprecate repository HOT 1
- How to use it or run it HOT 2
- dlopen failed: "/node_modules/osrm/lib/binding/node_osrm.node" has bad ELF magic HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-osrm.