Closed angelocavallet closed 7 years ago
Yep, can reproduce in a fresh docker run -it debian:jessie /bin/bash
container:
apt update
apt install git curl g++ make zlib1g-dev
git clone https://github.com/Project-OSRM/osrm-backend.git
cd osrm-backend
mkdir build
cd build
curl https://cmake.org/files/v3.8/cmake-3.8.0-Linux-x86_64.tar.gz -o cmake-3.8.0-Linux-x86_64.tar.gz
tar xf cmake-3.8.0-Linux-x86_64.tar.gz
./cmake-3.8.0-Linux-x86_64/bin/cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_NODE_BINDINGS=On -DENABLE_MASON=On
make
Seems like Debian comes with stdlibc++ version 3.4.20 but Mason packages require 3.4.21:
curl https://mason-binaries.s3.amazonaws.com/linux-x86_64/cmake/3.7.2.tar.gz -o cmake-3.7.2.tar.gz
tar xf cmake-3.7.2.tar.gz
./bin/cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_NODE_BINDINGS=On -DENABLE_MASON=On
./bin/cmake: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by ./bin/cmake)
Trusty:
strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6
GLIBCXX_3.4.22
Debian Jessie:
strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6
GLIBCXX_3.4.20
I suspect that's the reason we see undefined references to some stdlib internals. @angelocavallet can you install pre-built binaries via npm install osrm
and use that as a workaround?
@springmeyer this effectively means we can't build osrm and / or the node bindings with Mason on latest Debian. In contrast running pre-build packages (e.g. the node bindings via npm install osrm
) in latest Debian seem to work fine, because of compatibility guarantees I guess?
@daniel-j-h the pre-built seems to work fine on debian Jessie.
root@srvopenstreetmap:/home/osm/osrm/osrm-node# npm install osrm
> osrm@5.7.0 install /home/osm/osrm/osrm-node/node_modules/osrm
> node-pre-gyp install --fallback-to-build=false || ./scripts/node_install.sh
node-pre-gyp ERR! install error
node-pre-gyp ERR! stack Error: 403 status code downloading tarball https://mapbox-node-binary.s3.amazonaws.com/osrm/v5.7.0/Release/node-v51-linux-x64.tar.gz
node-pre-gyp ERR! stack at Request.<anonymous> (/home/osm/osrm/osrm-node/node_modules/osrm/node_modules/node-pre-gyp/lib/install.js:120:27)
node-pre-gyp ERR! stack at emitOne (events.js:101:20)
node-pre-gyp ERR! stack at Request.emit (events.js:191:7)
node-pre-gyp ERR! stack at Request.onRequestResponse (/home/osm/osrm/osrm-node/node_modules/osrm/node_modules/node-pre-gyp/node_modules/request/request.js:1074:10)
node-pre-gyp ERR! stack at emitOne (events.js:96:13)
node-pre-gyp ERR! stack at ClientRequest.emit (events.js:191:7)
node-pre-gyp ERR! stack at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:522:21)
node-pre-gyp ERR! stack at HTTPParser.parserOnHeadersComplete (_http_common.js:99:23)
node-pre-gyp ERR! stack at TLSSocket.socketOnData (_http_client.js:411:20)
node-pre-gyp ERR! stack at emitOne (events.js:96:13)
node-pre-gyp ERR! System Linux 3.16.0-4-amd64
node-pre-gyp ERR! command "/usr/bin/nodejs" "/home/osm/osrm/osrm-node/node_modules/osrm/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build=false"
node-pre-gyp ERR! cwd /home/osm/osrm/osrm-node/node_modules/osrm
node-pre-gyp ERR! node -v v7.9.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.34
node-pre-gyp ERR! not ok
403 status code downloading tarball https://mapbox-node-binary.s3.amazonaws.com/osrm/v5.7.0/Release/node-v51-linux-x64.tar.gz
/home/osm/osrm/osrm-node/node_modules/osrm/build /home/osm/osrm/osrm-node/node_modules/osrm
-- The C compiler identification is GNU 4.9.2
-- The CXX compiler identification is GNU 4.9.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building on a 64 bit system
-- Using GNU gold as linker.
-- Configuring OSRM in release mode
-- Configuring release mode optimizations
-- Performing Test LTO_AVAILABLE
-- Performing Test LTO_AVAILABLE - Success
-- Performing Test HAS_COLOR_FLAG
-- Performing Test HAS_COLOR_FLAG - Success
-- Adding -fpermissive for GCC version < 5 bug (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51048). See #3603.
-- Setting linker optimizations
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Boost version: 1.63.0
-- Found the following Boost libraries:
-- date_time
-- chrono
-- filesystem
-- iostreams
-- program_options
-- regex
-- system
-- thread
-- unit_test_framework
-- atomic
-- Found Intel TBB
-- TBB interface version: 7003
-- Found EXPAT: /usr/lib/x86_64-linux-gnu/libexpat.so (found version "2.2.0")
-- Looking for STXXL...
-- Found STXXL: /usr/lib/libstxxl.so
-- Found STXXL: /usr/lib/libstxxl.so
-- Found BZip2: /usr/lib/x86_64-linux-gnu/libbz2.so (found version "1.0.6")
-- Looking for BZ2_bzCompressInit
-- Looking for BZ2_bzCompressInit - found
-- Found Lua: /usr/lib/x86_64-linux-gnu/liblua5.2.so;/usr/lib/x86_64-linux-gnu/libm.so (found suitable exact version "5.2.4")
-- Using Lua 5.2.4
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8")
-- Looking for protozero
-- Looking for protozero - found
-- Found Osmium: /home/osm/osrm/osrm-node/node_modules/osrm/third_party/libosmium/include
-- OpenMP support found. Linking just in case for stxxl
-- Building node_osrm
-- Downloading: https://nodejs.org/download/release/v7.9.0/SHASUMS256.txt
-- NodeJS: Using node, version v7.9.0
-- Downloading: https://nodejs.org/download/release/v7.9.0/node-v7.9.0-headers.tar.gz
-- Configuring node_osrm bindings for NodeJs v7.9.0
-- node_osrm artifacts will be copied to: /home/osm/osrm/osrm-node/node_modules/osrm/lib/binding
-- Configuring done
-- Generating done
-- Build files have been written to: /home/osm/osrm/osrm-node/node_modules/osrm/build
Scanning dependencies of target UPDATER
[ 0%] Building CXX object CMakeFiles/UPDATER.dir/src/updater/csv_source.cpp.o
[ 3%] Building CXX object CMakeFiles/UPDATER.dir/src/updater/updater.cpp.o
[ 3%] Built target UPDATER
Scanning dependencies of target UTIL
[ 3%] Building CXX object CMakeFiles/UTIL.dir/src/util/assert.cpp.o
[ 3%] Building CXX object CMakeFiles/UTIL.dir/src/util/coordinate.cpp.o
[ 3%] Building CXX object CMakeFiles/UTIL.dir/src/util/coordinate_calculation.cpp.o
[ 3%] Building CXX object CMakeFiles/UTIL.dir/src/util/exception.cpp.o
[ 7%] Building CXX object CMakeFiles/UTIL.dir/src/util/fingerprint.cpp.o
[ 7%] Building CXX object CMakeFiles/UTIL.dir/src/util/geojson_debug_policies.cpp.o
[ 7%] Building CXX object CMakeFiles/UTIL.dir/src/util/log.cpp.o
[ 7%] Building CXX object CMakeFiles/UTIL.dir/src/util/name_table.cpp.o
[ 11%] Building CXX object CMakeFiles/UTIL.dir/src/util/guidance/bearing_class.cpp.o
[ 11%] Building CXX object CMakeFiles/UTIL.dir/src/util/guidance/entry_class.cpp.o
[ 11%] Building CXX object CMakeFiles/UTIL.dir/src/util/guidance/turn_bearing.cpp.o
[ 11%] Building CXX object CMakeFiles/UTIL.dir/src/util/guidance/turn_lanes.cpp.o
[ 11%] Built target UTIL
Scanning dependencies of target osrm_update
[ 11%] Linking CXX static library libosrm_update.a
[ 11%] Built target osrm_update
Scanning dependencies of target CONTRACTOR
[ 11%] Building CXX object CMakeFiles/CONTRACTOR.dir/src/contractor/contractor.cpp.o
[ 11%] Building CXX object CMakeFiles/CONTRACTOR.dir/src/contractor/contractor_dijkstra.cpp.o
[ 11%] Building CXX object CMakeFiles/CONTRACTOR.dir/src/contractor/graph_contractor.cpp.o
[ 11%] Built target CONTRACTOR
Scanning dependencies of target osrm_contract
[ 11%] Building CXX object CMakeFiles/osrm_contract.dir/src/osrm/contractor.cpp.o
[ 11%] Linking CXX static library libosrm_contract.a
[ 11%] Built target osrm_contract
Scanning dependencies of target SERVER
[ 11%] Building CXX object CMakeFiles/SERVER.dir/src/server/connection.cpp.o
[ 14%] Building CXX object CMakeFiles/SERVER.dir/src/server/request_handler.cpp.o
[ 14%] Building CXX object CMakeFiles/SERVER.dir/src/server/request_parser.cpp.o
[ 14%] Building CXX object CMakeFiles/SERVER.dir/src/server/service_handler.cpp.o
[ 14%] Building CXX object CMakeFiles/SERVER.dir/src/server/api/parameters_parser.cpp.o
[ 14%] Building CXX object CMakeFiles/SERVER.dir/src/server/api/url_parser.cpp.o
[ 18%] Building CXX object CMakeFiles/SERVER.dir/src/server/http/reply.cpp.o
[ 18%] Building CXX object CMakeFiles/SERVER.dir/src/server/service/match_service.cpp.o
[ 18%] Building CXX object CMakeFiles/SERVER.dir/src/server/service/nearest_service.cpp.o
[ 18%] Building CXX object CMakeFiles/SERVER.dir/src/server/service/route_service.cpp.o
[ 18%] Building CXX object CMakeFiles/SERVER.dir/src/server/service/table_service.cpp.o
[ 22%] Building CXX object CMakeFiles/SERVER.dir/src/server/service/tile_service.cpp.o
[ 22%] Building CXX object CMakeFiles/SERVER.dir/src/server/service/trip_service.cpp.o
[ 22%] Built target SERVER
Scanning dependencies of target PARTITIONER
[ 25%] Building CXX object CMakeFiles/PARTITIONER.dir/src/partition/annotated_partition.cpp.o
[ 25%] Building CXX object CMakeFiles/PARTITIONER.dir/src/partition/bisection_to_partition.cpp.o
[ 25%] Building CXX object CMakeFiles/PARTITIONER.dir/src/partition/dinic_max_flow.cpp.o
[ 25%] Building CXX object CMakeFiles/PARTITIONER.dir/src/partition/graph_view.cpp.o
[ 25%] Building CXX object CMakeFiles/PARTITIONER.dir/src/partition/inertial_flow.cpp.o
[ 29%] Building CXX object CMakeFiles/PARTITIONER.dir/src/partition/partitioner.cpp.o
[ 29%] Building CXX object CMakeFiles/PARTITIONER.dir/src/partition/recursive_bisection.cpp.o
[ 29%] Building CXX object CMakeFiles/PARTITIONER.dir/src/partition/recursive_bisection_state.cpp.o
[ 29%] Building CXX object CMakeFiles/PARTITIONER.dir/src/partition/tarjan_graph_wrapper.cpp.o
[ 29%] Built target PARTITIONER
Scanning dependencies of target STORAGE
[ 29%] Building CXX object CMakeFiles/STORAGE.dir/src/storage/storage.cpp.o
[ 29%] Building CXX object CMakeFiles/STORAGE.dir/src/storage/storage_config.cpp.o
[ 29%] Built target STORAGE
Scanning dependencies of target EXTRACTOR
[ 33%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/compressed_edge_container.cpp.o
[ 33%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/edge_based_graph_factory.cpp.o
[ 33%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/extraction_containers.cpp.o
[ 33%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/extractor.cpp.o
[ 33%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/extractor_callbacks.cpp.o
[ 37%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/graph_compressor.cpp.o
[ 37%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/raster_source.cpp.o
[ 37%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/restriction_map.cpp.o
[ 37%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/restriction_parser.cpp.o
[ 37%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/scripting_environment_lua.cpp.o
[ 40%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/suffix_table.cpp.o
[ 40%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/guidance/coordinate_extractor.cpp.o
[ 40%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/guidance/intersection.cpp.o
[ 40%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/guidance/intersection_generator.cpp.o
[ 40%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/guidance/intersection_handler.cpp.o
[ 44%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/guidance/intersection_normalizer.cpp.o
[ 44%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/guidance/mergable_road_detector.cpp.o
[ 44%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/guidance/motorway_handler.cpp.o
[ 44%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/guidance/node_based_graph_walker.cpp.o
[ 44%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/guidance/roundabout_handler.cpp.o
[ 48%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/guidance/sliproad_handler.cpp.o
[ 48%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/guidance/suppress_mode_handler.cpp.o
[ 48%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/guidance/turn_analysis.cpp.o
[ 48%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/guidance/turn_classification.cpp.o
[ 48%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/guidance/turn_discovery.cpp.o
[ 51%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/guidance/turn_handler.cpp.o
[ 51%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/guidance/turn_lane_augmentation.cpp.o
[ 51%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/guidance/turn_lane_data.cpp.o
[ 51%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/guidance/turn_lane_handler.cpp.o
[ 51%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/guidance/turn_lane_matcher.cpp.o
[ 51%] Built target EXTRACTOR
Scanning dependencies of target osrm_extract
[ 51%] Building CXX object CMakeFiles/osrm_extract.dir/src/osrm/extractor.cpp.o
[ 55%] Linking CXX static library libosrm_extract.a
[ 55%] Built target osrm_extract
Scanning dependencies of target osrm-extract
[ 59%] Building CXX object CMakeFiles/osrm-extract.dir/src/tools/extract.cpp.o
[ 59%] Linking CXX executable osrm-extract
[ 59%] Built target osrm-extract
Scanning dependencies of target osrm-components
[ 59%] Building CXX object CMakeFiles/osrm-components.dir/src/tools/components.cpp.o
[ 59%] Linking CXX executable osrm-components
[ 59%] Built target osrm-components
Scanning dependencies of target osrm_store
[ 59%] Linking CXX static library libosrm_store.a
[ 59%] Built target osrm_store
Scanning dependencies of target osrm-datastore
[ 59%] Building CXX object CMakeFiles/osrm-datastore.dir/src/tools/store.cpp.o
[ 59%] Linking CXX executable osrm-datastore
[ 59%] Built target osrm-datastore
Scanning dependencies of target CUSTOMIZER
[ 59%] Building CXX object CMakeFiles/CUSTOMIZER.dir/src/customize/customizer.cpp.o
[ 59%] Built target CUSTOMIZER
Scanning dependencies of target osrm_partition
[ 59%] Linking CXX static library libosrm_partition.a
[ 59%] Built target osrm_partition
Scanning dependencies of target osrm-partition
[ 59%] Building CXX object CMakeFiles/osrm-partition.dir/src/tools/partition.cpp.o
[ 59%] Linking CXX executable osrm-partition
[ 59%] Built target osrm-partition
Scanning dependencies of target ENGINE
[ 62%] Building CXX object CMakeFiles/ENGINE.dir/src/engine/douglas_peucker.cpp.o
[ 62%] Building CXX object CMakeFiles/ENGINE.dir/src/engine/engine_config.cpp.o
[ 62%] Building CXX object CMakeFiles/ENGINE.dir/src/engine/hint.cpp.o
[ 62%] Building CXX object CMakeFiles/ENGINE.dir/src/engine/polyline_compressor.cpp.o
[ 62%] Building CXX object CMakeFiles/ENGINE.dir/src/engine/search_engine_data.cpp.o
[ 66%] Building CXX object CMakeFiles/ENGINE.dir/src/engine/api/json_factory.cpp.o
[ 66%] Building CXX object CMakeFiles/ENGINE.dir/src/engine/datafacade/process_memory_allocator.cpp.o
[ 66%] Building CXX object CMakeFiles/ENGINE.dir/src/engine/datafacade/shared_memory_allocator.cpp.o
[ 66%] Building CXX object CMakeFiles/ENGINE.dir/src/engine/guidance/assemble_overview.cpp.o
[ 66%] Building CXX object CMakeFiles/ENGINE.dir/src/engine/guidance/assemble_route.cpp.o
[ 70%] Building CXX object CMakeFiles/ENGINE.dir/src/engine/guidance/assemble_steps.cpp.o
[ 70%] Building CXX object CMakeFiles/ENGINE.dir/src/engine/guidance/collapse_scenario_detection.cpp.o
[ 70%] Building CXX object CMakeFiles/ENGINE.dir/src/engine/guidance/collapse_turns.cpp.o
/home/osm/osrm/osrm-node/node_modules/osrm/src/engine/guidance/collapse_turns.cpp:56:5: warning: multi-line comment [-Wcomment]
// \
^
[ 70%] Building CXX object CMakeFiles/ENGINE.dir/src/engine/guidance/lane_processing.cpp.o
[ 70%] Building CXX object CMakeFiles/ENGINE.dir/src/engine/guidance/post_processing.cpp.o
[ 74%] Building CXX object CMakeFiles/ENGINE.dir/src/engine/guidance/verbosity_reduction.cpp.o
[ 74%] Building CXX object CMakeFiles/ENGINE.dir/src/engine/plugins/match.cpp.o
[ 74%] Building CXX object CMakeFiles/ENGINE.dir/src/engine/plugins/nearest.cpp.o
[ 74%] Building CXX object CMakeFiles/ENGINE.dir/src/engine/plugins/table.cpp.o
[ 74%] Building CXX object CMakeFiles/ENGINE.dir/src/engine/plugins/tile.cpp.o
[ 77%] Building CXX object CMakeFiles/ENGINE.dir/src/engine/plugins/trip.cpp.o
[ 77%] Building CXX object CMakeFiles/ENGINE.dir/src/engine/plugins/viaroute.cpp.o
[ 77%] Building CXX object CMakeFiles/ENGINE.dir/src/engine/routing_algorithms/alternative_path.cpp.o
[ 77%] Building CXX object CMakeFiles/ENGINE.dir/src/engine/routing_algorithms/direct_shortest_path.cpp.o
[ 77%] Building CXX object CMakeFiles/ENGINE.dir/src/engine/routing_algorithms/many_to_many.cpp.o
[ 81%] Building CXX object CMakeFiles/ENGINE.dir/src/engine/routing_algorithms/map_matching.cpp.o
[ 81%] Building CXX object CMakeFiles/ENGINE.dir/src/engine/routing_algorithms/routing_base.cpp.o
[ 81%] Building CXX object CMakeFiles/ENGINE.dir/src/engine/routing_algorithms/routing_base_ch.cpp.o
[ 81%] Building CXX object CMakeFiles/ENGINE.dir/src/engine/routing_algorithms/shortest_path.cpp.o
[ 81%] Building CXX object CMakeFiles/ENGINE.dir/src/engine/routing_algorithms/tile_turns.cpp.o
[ 81%] Built target ENGINE
Scanning dependencies of target osrm_customize
[ 81%] Linking CXX static library libosrm_customize.a
[ 81%] Built target osrm_customize
Scanning dependencies of target osrm-customize
[ 81%] Building CXX object CMakeFiles/osrm-customize.dir/src/tools/customize.cpp.o
[ 81%] Linking CXX executable osrm-customize
[ 81%] Built target osrm-customize
Scanning dependencies of target osrm-contract
[ 81%] Building CXX object CMakeFiles/osrm-contract.dir/src/tools/contract.cpp.o
[ 85%] Linking CXX executable osrm-contract
[ 85%] Built target osrm-contract
Scanning dependencies of target osrm
[ 88%] Building CXX object CMakeFiles/osrm.dir/src/osrm/osrm.cpp.o
[ 88%] Linking CXX static library libosrm.a
[ 88%] Built target osrm
Scanning dependencies of target osrm-routed
[ 88%] Building CXX object CMakeFiles/osrm-routed.dir/src/tools/routed.cpp.o
[ 92%] Linking CXX executable osrm-routed
[ 92%] Built target osrm-routed
Scanning dependencies of target node_osrm
[ 92%] Building CXX object src/nodejs/CMakeFiles/node_osrm.dir/node_osrm.cpp.o
In file included from /home/osm/osrm/osrm-node/node_modules/osrm/build/src/nodejs/node/v7.9.0/include/node.h:42:0,
from /home/osm/osrm/osrm-node/node_modules/nan/nan.h:49,
from /home/osm/osrm/osrm-node/node_modules/osrm/include/nodejs/node_osrm.hpp:6,
from /home/osm/osrm/osrm-node/node_modules/osrm/src/nodejs/node_osrm.cpp:15:
/home/osm/osrm/osrm-node/node_modules/osrm/build/src/nodejs/node/v7.9.0/include/v8.h:5549:20: warning: unused parameter 'isolate' [-Wunused-parameter]
v8::Isolate* isolate, v8::Local<v8::String> name) {
^
/home/osm/osrm/osrm-node/node_modules/osrm/build/src/nodejs/node/v7.9.0/include/v8.h:5549:51: warning: unused parameter 'name' [-Wunused-parameter]
v8::Isolate* isolate, v8::Local<v8::String> name) {
^
/home/osm/osrm/osrm-node/node_modules/osrm/build/src/nodejs/node/v7.9.0/include/v8.h:6077:50: warning: unused parameter 'string' [-Wunused-parameter]
virtual void VisitExternalString(Local<String> string) {}
^
/home/osm/osrm/osrm-node/node_modules/osrm/build/src/nodejs/node/v7.9.0/include/v8.h:6087:57: warning: unused parameter 'value' [-Wunused-parameter]
virtual void VisitPersistentHandle(Persistent<Value>* value,
^
/home/osm/osrm/osrm-node/node_modules/osrm/build/src/nodejs/node/v7.9.0/include/v8.h:6088:47: warning: unused parameter 'class_id' [-Wunused-parameter]
uint16_t class_id) {}
^
/home/osm/osrm/osrm-node/node_modules/osrm/build/src/nodejs/node/v7.9.0/include/v8.h:6142:66: warning: unused parameter 'reporter' [-Wunused-parameter]
virtual void TracePrologue(EmbedderReachableReferenceReporter* reporter) {}
^
/home/osm/osrm/osrm-node/node_modules/osrm/build/src/nodejs/node/v7.9.0/include/v8.h:8258:55: warning: unused parameter 'isolate' [-Wunused-parameter]
V8_INLINE static void CheckInitialized(v8::Isolate* isolate) {
^
In file included from /home/osm/osrm/osrm-node/node_modules/osrm/src/nodejs/node_osrm.cpp:16:0:
/home/osm/osrm/osrm-node/node_modules/osrm/include/nodejs/node_osrm_support.hpp:78:45: warning: unused parameter 'result_status' [-Wunused-parameter]
inline void ParseResult(const osrm::Status &result_status, const std::string & /*unused*/) {}
^
[ 92%] Linking CXX shared library Release/node_osrm.node
[ 92%] Built target node_osrm
Scanning dependencies of target copy_artifacts
[ 92%] Generating ../../../lib/binding/osrm-extract
[ 96%] Generating ../../../lib/binding/osrm-contract
[ 96%] Generating ../../../lib/binding/osrm-routed
[ 96%] Generating ../../../lib/binding/osrm-datastore
[ 96%] Generating ../../../lib/binding/osrm-components
[ 96%] Generating ../../../lib/binding/osrm-partition
[100%] Generating ../../../lib/binding/osrm-customize
[100%] Generating ../../../lib/binding/node_osrm.node
[100%] Built target copy_artifacts
/home/osm/osrm/osrm-node/node_modules/osrm
/home/osm/osrm/osrm-node
└─┬ osrm@5.7.0
├── nan@2.6.2
├─┬ node-cmake@2.3.2
│ ├─┬ which@1.2.14
│ │ └── isexe@2.0.0
│ └─┬ yargs@7.1.0
│ ├── camelcase@3.0.0
│ ├─┬ cliui@3.2.0
│ │ ├─┬ strip-ansi@3.0.1
│ │ │ └── ansi-regex@2.1.1
│ │ └── wrap-ansi@2.1.0
│ ├── decamelize@1.2.0
│ ├── get-caller-file@1.0.2
│ ├─┬ os-locale@1.4.0
│ │ └─┬ lcid@1.0.0
│ │ └── invert-kv@1.0.0
│ ├─┬ read-pkg-up@1.0.1
│ │ ├─┬ find-up@1.1.2
│ │ │ ├── path-exists@2.1.0
│ │ │ └─┬ pinkie-promise@2.0.1
│ │ │ └── pinkie@2.0.4
│ │ └─┬ read-pkg@1.1.0
│ │ ├─┬ load-json-file@1.1.0
│ │ │ ├── graceful-fs@4.1.11
│ │ │ ├─┬ parse-json@2.2.0
│ │ │ │ └─┬ error-ex@1.3.1
│ │ │ │ └── is-arrayish@0.2.1
│ │ │ ├── pify@2.3.0
│ │ │ └─┬ strip-bom@2.0.0
│ │ │ └── is-utf8@0.2.1
│ │ ├─┬ normalize-package-data@2.3.8
│ │ │ ├── hosted-git-info@2.4.2
│ │ │ ├─┬ is-builtin-module@1.0.0
│ │ │ │ └── builtin-modules@1.1.1
│ │ │ ├── semver@5.3.0
│ │ │ └─┬ validate-npm-package-license@3.0.1
│ │ │ ├─┬ spdx-correct@1.0.2
│ │ │ │ └── spdx-license-ids@1.2.2
│ │ │ └── spdx-expression-parse@1.0.4
│ │ └── path-type@1.1.0
│ ├── require-directory@2.1.1
│ ├── require-main-filename@1.0.1
│ ├── set-blocking@2.0.0
│ ├─┬ string-width@1.0.2
│ │ ├── code-point-at@1.1.0
│ │ └─┬ is-fullwidth-code-point@1.0.0
│ │ └── number-is-nan@1.0.1
│ ├── which-module@1.0.0
│ ├── y18n@3.2.1
│ └── yargs-parser@5.0.0
└─┬ node-pre-gyp@0.6.34
├─┬ mkdirp@0.5.1
│ └── minimist@0.0.8
├─┬ nopt@4.0.1
│ ├── abbrev@1.1.0
│ └─┬ osenv@0.1.4
│ ├── os-homedir@1.0.2
│ └── os-tmpdir@1.0.2
├─┬ npmlog@4.0.2
│ ├─┬ are-we-there-yet@1.1.4
│ │ └── delegates@1.0.0
│ ├── console-control-strings@1.1.0
│ ├─┬ gauge@2.7.3
│ │ ├── aproba@1.1.1
│ │ ├── has-unicode@2.0.1
│ │ ├── object-assign@4.1.1
│ │ ├── signal-exit@3.0.2
│ │ ├─┬ string-width@1.0.2
│ │ │ ├── code-point-at@1.1.0
│ │ │ └─┬ is-fullwidth-code-point@1.0.0
│ │ │ └── number-is-nan@1.0.1
│ │ ├─┬ strip-ansi@3.0.1
│ │ │ └── ansi-regex@2.1.1
│ │ └── wide-align@1.1.0
│ └── set-blocking@2.0.0
├─┬ rc@1.2.1
│ ├── deep-extend@0.4.1
│ ├── ini@1.3.4
│ ├── minimist@1.2.0
│ └── strip-json-comments@2.0.1
├─┬ request@2.81.0
│ ├── aws-sign2@0.6.0
│ ├── aws4@1.6.0
│ ├── caseless@0.12.0
│ ├─┬ combined-stream@1.0.5
│ │ └── delayed-stream@1.0.0
│ ├── extend@3.0.0
│ ├── forever-agent@0.6.1
│ ├─┬ form-data@2.1.2
│ │ └── asynckit@0.4.0
│ ├─┬ har-validator@4.2.1
│ │ ├─┬ ajv@4.11.3
│ │ │ ├── co@4.6.0
│ │ │ └─┬ json-stable-stringify@1.0.1
│ │ │ └── jsonify@0.0.0
│ │ └── har-schema@1.0.5
│ ├─┬ hawk@3.1.3
│ │ ├── boom@2.10.1
│ │ ├── cryptiles@2.0.5
│ │ ├── hoek@2.16.3
│ │ └── sntp@1.0.9
│ ├─┬ http-signature@1.1.1
│ │ ├── assert-plus@0.2.0
│ │ ├─┬ jsprim@1.3.1
│ │ │ ├── extsprintf@1.0.2
│ │ │ ├── json-schema@0.2.3
│ │ │ └── verror@1.3.6
│ │ └─┬ sshpk@1.11.0
│ │ ├── asn1@0.2.3
│ │ ├── assert-plus@1.0.0
│ │ ├── bcrypt-pbkdf@1.0.1
│ │ ├─┬ dashdash@1.14.1
│ │ │ └── assert-plus@1.0.0
│ │ ├── ecc-jsbn@0.1.1
│ │ ├─┬ getpass@0.1.6
│ │ │ └── assert-plus@1.0.0
│ │ ├── jodid25519@1.0.2
│ │ ├── jsbn@0.1.1
│ │ └── tweetnacl@0.14.5
│ ├── is-typedarray@1.0.0
│ ├── isstream@0.1.2
│ ├── json-stringify-safe@5.0.1
│ ├─┬ mime-types@2.1.14
│ │ └── mime-db@1.26.0
│ ├── oauth-sign@0.8.2
│ ├── performance-now@0.2.0
│ ├── qs@6.4.0
│ ├── safe-buffer@5.0.1
│ ├── stringstream@0.0.5
│ ├─┬ tough-cookie@2.3.2
│ │ └── punycode@1.4.1
│ ├── tunnel-agent@0.6.0
│ └── uuid@3.0.1
├─┬ rimraf@2.6.1
│ └─┬ glob@7.1.1
│ ├── fs.realpath@1.0.0
│ ├── inflight@1.0.6
│ ├─┬ minimatch@3.0.3
│ │ └─┬ brace-expansion@1.1.6
│ │ ├── balanced-match@0.4.2
│ │ └── concat-map@0.0.1
│ └── path-is-absolute@1.0.1
├── semver@5.3.0
├─┬ tar@2.2.1
│ ├── block-stream@0.0.9
│ ├─┬ fstream@1.0.11
│ │ └── graceful-fs@4.1.11
│ └── inherits@2.0.3
└─┬ tar-pack@3.4.0
├─┬ debug@2.6.1
│ └── ms@0.7.2
├── fstream-ignore@1.0.5
├─┬ once@1.4.0
│ └── wrappy@1.0.2
├─┬ readable-stream@2.2.3
│ ├── buffer-shims@1.0.0
│ ├── core-util-is@1.0.2
│ ├── isarray@1.0.0
│ ├── process-nextick-args@1.0.7
│ ├── string_decoder@0.10.31
│ └── util-deprecate@1.0.2
└── uid-number@0.0.6
npm WARN enoent ENOENT: no such file or directory, open '/home/osm/osrm/osrm-node/package.json'
npm WARN osrm-node No description
npm WARN osrm-node No repository field.
npm WARN osrm-node No README data
npm WARN osrm-node No license field.
I tried to run app.js (which is basically the example.js just fixed the osrm lib dir and .osrm dir) And I think its worked now its returning another error from "node app.js" command:
root@srvopenstreetmap:/home/osm/osrm/osrm-node# node app.js
/home/osm/osrm/osrm-node/app.js:8
var osrm = new OSRM("/home/osm/osm/south-america-latest.osrm");
^
TypeError: Fingerprint mismatch in /home/osm/osm/south-america-latest.osrm.hsgr (at include/storage/io.hpp:61)
at Object.<anonymous> (/home/osm/osrm/osrm-node/app.js:8:12)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.runMain (module.js:605:10)
at run (bootstrap_node.js:423:7)
at startup (bootstrap_node.js:147:9)
at bootstrap_node.js:538:3
Is that a problem with .osrm data? I think the problem is because I exported with the latest osrm version, because I google it and found #2604 Do I have to extract the .pbf again with the pre-built version?
Yes the problem you are seeing is the data files were generated with a different version. The easiest way to keep them in sync is using the binaries we bundle with the Node.js bindings:
./node_modules/osrm/lib/binding/osrm-*
Ok, I'll do that and return
Just a doubt, what is the difference between ./node_modules/osrm/build/osrm- and ./node_modules/osrm/lib/binding/osrm- ?
./node_modules/osrm/lib/binding/osrm-*
is where we put and publish the osrm binaries (generated by Travis). There should be no ./node_modules/osrm/build
directory and if I do npm install osrm
I can't see one.
It is an undefined behavior in the pre-built osrm, but works because it does not hit std::runtime_error::runtime_error(char const*)
that are missing in the library
readelf -Ws /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.20 | c++filt | grep std::runtime_error::runtime_error
1512: 0000000000073770 59 FUNC GLOBAL DEFAULT 12 std::runtime_error::runtime_error(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@@GLIBCXX_3.4
1665: 0000000000073770 59 FUNC GLOBAL DEFAULT 12 std::runtime_error::runtime_error(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@@GLIBCXX_3.4
The problem will be visible when boost or osrm will throw an exception std::runtime_error::runtime_error("error")
.
@daniel-j-h The pre-built version worked like a charm after regenerate osrm files
Thanks for the help and thanks all for this awesome project
@springmeyer this effectively means we can't build osrm and / or the node bindings with Mason on latest Debian. In contrast running pre-build packages (e.g. the node bindings via npm install osrm) in latest Debian seem to work fine, because of compatibility guarantees I guess?
@daniel-j-h @oxidase - thanks for the flag. This feels like more evidence I need to move on https://github.com/mapbox/mason/issues/267.
I've started on boost packages that are built against libstdc++-4.8-dev at https://github.com/mapbox/mason/pull/409. I can ping when these are ready and we could test again against debian jessie. Let me know if you have other ideas.
@springmeyer even if osrm-routed
starts with lazy bindings there is still a hidden undefined behavior because osrm-routed
will fail trying to resolve
589: 0000000000000000 0 FUNC GLOBAL DEFAULT UND std::runtime_error::runtime_error(char const*)
793: 0000000000000000 0 FUNC GLOBAL DEFAULT UND std::runtime_error::runtime_error(char const*)
To switch off lazy bindings and check binary compatibility export LD_BIND_NOW=1
will resolve all required symbols before the main
call and should fail in case of undefined symbols.
@daniel-j-h do you think the issue can be closed?
@oxidase 👋 I think it is worthwhile testing this again to see if it is resolved. Can someone try to replicate again and see if it is fixed? Context: As part of #4567 we upgraded to the boost 1.65.1 package from mason. That package is built against libstdc++4.8. So I think that std::runtime_error::runtime_error(char const*)
will no longer be present in the binary.
@springmeyer just checked with debian:jessie
: no more linker errors
Great, thanks for confirming @oxidase. I wonder if we can remove https://github.com/Project-OSRM/osrm-backend/blob/dc81c7b92656e0e06d797987df535621a397a74b/CMakeLists.txt#L188 now?
Hello, first sorry for my awful English, I'm Brazilian.
Since I read that running osrm-routed on production environment is not recommended, I have been trying to install osrm module for nodejs with the new node-osrm merge into osrm-backend but I'm getting some problems with building this on Debian Jessie
Linux 3.16.0-4-amd64 # 1 SMP Debian 3.16.36-1+deb8u2 (2016-10-19) x86_64 GNU/Linux
g++ (Debian 4.9.2-10) 4.9.2 gcc (Debian 4.9.2-10) 4.9.2
./usr/lib/x86_64-linux-gnu/libstdc++.so.5.0.7 ./usr/lib/x86_64-linux-gnu/libstdc++.so.6 ./usr/lib/x86_64-linux-gnu/libstdc++.so.5 ./usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.20
So, I have to update cmake from default Debian Jessie 3.0.2 to 3.1+ (more specifically 3.7.2) because the building error messages told me to do that.
After update cmake, I tried to build osrm-backend again.
which output the following text:
But when I tried to run "cmake --build ." I got that error:
So, I really don't know whats going on, I'm kinda lost here.