Project-OSRM / node-osrm

DEPRECATED Part of osrm-backend since 5.7. NodeJS bindings for OSRM
BSD 2-Clause "Simplified" License
141 stars 48 forks source link

Installing via npm fails to build from source #279

Closed jhermsmeier closed 7 years ago

jhermsmeier commented 7 years ago

Hey hey, maybe I'm missing something obvious, but osrm@5.5.2 doesn't want to build when falling back to building from source during an npm install (whereas osrm@5.4.3 installs just fine).

To make sure it's not a general issue with my system, I cloned node-osrm and ran the build there, which succeeded without any warnings or errors. The only thing I found was a warning when running the tests: [warn] .hsgr was prepared with different build. – but I'm thinking that's related to me having a different version of osrm-backend installed already, and pkg-config using that one instead of the local one that was just built (?) – that's a different issue, though.

Environment

$ node --version
v7.3.0

$ npm --version
4.1.1

I have an existing osrm-backend install via Homebrew (which is a different version), in case that's relevant to this particular case.

$ which osrm-extract
/usr/local/bin/osrm-extract

$ which osrm-contract
/usr/local/bin/osrm-contract

$ which osrm-datastore
/usr/local/bin/osrm-datastore

$ pkg-config libosrm --variable=prefix
/usr/local/Cellar/osrm-backend/5.4.3

Expected Behavior

As it can't find pre-built binaries for osrm@5.5.2 against node@7 (as there are only binaries for node@4, according to #238 and #226), it would fall back to building from source (and succeed in doing so).

Actual Behavior

It fails to build from source, with the following error (full output log below):

CMake Error at CMakeLists.txt:95 (find_package):
  By not providing "FindNodeJS.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "NodeJS", but
  CMake did not find one.

  Could not find a package configuration file provided by "NodeJS" with any
  of the following names:

    NodeJSConfig.cmake
    nodejs-config.cmake

  Add the installation prefix of "NodeJS" to CMAKE_PREFIX_PATH or set
  "NodeJS_DIR" to a directory containing one of the above files.  If "NodeJS"
  provides a separate development package or SDK, be sure it has been
  installed.

-- Configuring incomplete, errors occurred!
See also "/Users/Jonas/Work/baikonur/node_modules/osrm/build/CMakeFiles/CMakeOutput.log".
See also "/Users/Jonas/Work/baikonur/node_modules/osrm/build/CMakeFiles/CMakeError.log".
make: *** [Makefile:20: build/Release/node-osrm.node] Error 1
Full Output Log

$ npm i osrm
npm http request GET https://registry.npmjs.org/osrm
npm http 304 https://registry.npmjs.org/osrm
npm http request GET https://registry.npmjs.org/node-cmake
npm http request GET https://registry.npmjs.org/nan
npm http request GET https://registry.npmjs.org/node-pre-gyp
npm http 304 https://registry.npmjs.org/node-cmake
npm http 304 https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/node-pre-gyp
npm http request GET https://registry.npmjs.org/mothership
npm http request GET https://registry.npmjs.org/which
npm http request GET https://registry.npmjs.org/lodash
npm http 304 https://registry.npmjs.org/mothership
npm http 304 https://registry.npmjs.org/which
npm http 200 https://registry.npmjs.org/lodash
npm http request GET https://registry.npmjs.org/find-parent-dir
npm http 304 https://registry.npmjs.org/find-parent-dir
npm http request GET https://registry.npmjs.org/isexe
npm http 304 https://registry.npmjs.org/isexe
npm http request GET https://registry.npmjs.org/nopt
npm http request GET https://registry.npmjs.org/npmlog
npm http request GET https://registry.npmjs.org/rc
npm http request GET https://registry.npmjs.org/request
npm http request GET https://registry.npmjs.org/tar
npm http request GET https://registry.npmjs.org/semver
npm http request GET https://registry.npmjs.org/tar-pack
npm http 304 https://registry.npmjs.org/nopt
npm http 304 https://registry.npmjs.org/npmlog
npm http 304 https://registry.npmjs.org/rc
npm http 304 https://registry.npmjs.org/semver
npm http 304 https://registry.npmjs.org/tar
npm http 304 https://registry.npmjs.org/tar-pack
npm http 304 https://registry.npmjs.org/request
npm http request GET https://registry.npmjs.org/abbrev
npm http 304 https://registry.npmjs.org/abbrev
npm http request GET https://registry.npmjs.org/console-control-strings
npm http request GET https://registry.npmjs.org/gauge
npm http request GET https://registry.npmjs.org/set-blocking
npm http request GET https://registry.npmjs.org/are-we-there-yet
npm http 304 https://registry.npmjs.org/console-control-strings
npm http 304 https://registry.npmjs.org/gauge
npm http 304 https://registry.npmjs.org/are-we-there-yet
npm http 304 https://registry.npmjs.org/set-blocking
npm http request GET https://registry.npmjs.org/delegates
npm http request GET https://registry.npmjs.org/readable-stream
npm http 304 https://registry.npmjs.org/delegates
npm http 304 https://registry.npmjs.org/readable-stream
npm http request GET https://registry.npmjs.org/core-util-is
npm http request GET https://registry.npmjs.org/buffer-shims
npm http request GET https://registry.npmjs.org/isarray
npm http request GET https://registry.npmjs.org/process-nextick-args
npm http request GET https://registry.npmjs.org/util-deprecate
npm http request GET https://registry.npmjs.org/string_decoder
npm http 304 https://registry.npmjs.org/core-util-is
npm http 304 https://registry.npmjs.org/buffer-shims
npm http 304 https://registry.npmjs.org/process-nextick-args
npm http 304 https://registry.npmjs.org/isarray
npm http 304 https://registry.npmjs.org/util-deprecate
npm http 304 https://registry.npmjs.org/string_decoder
npm http request GET https://registry.npmjs.org/has-unicode
npm http request GET https://registry.npmjs.org/object-assign
npm http request GET https://registry.npmjs.org/signal-exit
npm http request GET https://registry.npmjs.org/supports-color
npm http request GET https://registry.npmjs.org/string-width
npm http request GET https://registry.npmjs.org/wide-align
npm http request GET https://registry.npmjs.org/strip-ansi
npm http request GET https://registry.npmjs.org/aproba
npm http 304 https://registry.npmjs.org/has-unicode
npm http 304 https://registry.npmjs.org/object-assign
npm http 304 https://registry.npmjs.org/signal-exit
npm http 304 https://registry.npmjs.org/wide-align
npm http 304 https://registry.npmjs.org/string-width
npm http 304 https://registry.npmjs.org/supports-color
npm http 304 https://registry.npmjs.org/strip-ansi
npm http 304 https://registry.npmjs.org/aproba
npm http request GET https://registry.npmjs.org/code-point-at
npm http request GET https://registry.npmjs.org/is-fullwidth-code-point
npm http 304 https://registry.npmjs.org/code-point-at
npm http 304 https://registry.npmjs.org/is-fullwidth-code-point
npm http request GET https://registry.npmjs.org/number-is-nan
npm http 304 https://registry.npmjs.org/number-is-nan
npm http request GET https://registry.npmjs.org/ansi-regex
npm http 304 https://registry.npmjs.org/ansi-regex
npm http request GET https://registry.npmjs.org/deep-extend
npm http request GET https://registry.npmjs.org/strip-json-comments
npm http request GET https://registry.npmjs.org/ini
npm http request GET https://registry.npmjs.org/minimist
npm http 304 https://registry.npmjs.org/deep-extend
npm http 304 https://registry.npmjs.org/minimist
npm http 304 https://registry.npmjs.org/strip-json-comments
npm http 304 https://registry.npmjs.org/ini
npm http request GET https://registry.npmjs.org/aws-sign2
npm http request GET https://registry.npmjs.org/caseless
npm http request GET https://registry.npmjs.org/extend
npm http request GET https://registry.npmjs.org/combined-stream
npm http request GET https://registry.npmjs.org/aws4
npm http request GET https://registry.npmjs.org/forever-agent
npm http request GET https://registry.npmjs.org/form-data
npm http request GET https://registry.npmjs.org/har-validator
npm http request GET https://registry.npmjs.org/http-signature
npm http request GET https://registry.npmjs.org/isstream
npm http request GET https://registry.npmjs.org/is-typedarray
npm http request GET https://registry.npmjs.org/json-stringify-safe
npm http request GET https://registry.npmjs.org/hawk
npm http request GET https://registry.npmjs.org/qs
npm http request GET https://registry.npmjs.org/stringstream
npm http request GET https://registry.npmjs.org/mime-types
npm http request GET https://registry.npmjs.org/oauth-sign
npm http request GET https://registry.npmjs.org/uuid
npm http request GET https://registry.npmjs.org/tunnel-agent
npm http request GET https://registry.npmjs.org/tough-cookie
npm http 304 https://registry.npmjs.org/caseless
npm http 304 https://registry.npmjs.org/aws-sign2
npm http 304 https://registry.npmjs.org/extend
npm http 304 https://registry.npmjs.org/aws4
npm http 304 https://registry.npmjs.org/forever-agent
npm http 304 https://registry.npmjs.org/har-validator
npm http 304 https://registry.npmjs.org/form-data
npm http 304 https://registry.npmjs.org/combined-stream
npm http 304 https://registry.npmjs.org/uuid
npm http 304 https://registry.npmjs.org/tunnel-agent
npm http 304 https://registry.npmjs.org/tough-cookie
npm http 304 https://registry.npmjs.org/json-stringify-safe
npm http 304 https://registry.npmjs.org/hawk
npm http 304 https://registry.npmjs.org/is-typedarray
npm http 304 https://registry.npmjs.org/http-signature
npm http 304 https://registry.npmjs.org/mime-types
npm http 304 https://registry.npmjs.org/qs
npm http 304 https://registry.npmjs.org/stringstream
npm http 304 https://registry.npmjs.org/isstream
npm http 304 https://registry.npmjs.org/oauth-sign
npm http request GET https://registry.npmjs.org/delayed-stream
npm http 304 https://registry.npmjs.org/delayed-stream
npm http request GET https://registry.npmjs.org/asynckit
npm http 304 https://registry.npmjs.org/asynckit
npm http request GET https://registry.npmjs.org/mime-db
npm http 304 https://registry.npmjs.org/mime-db
npm http request GET https://registry.npmjs.org/pinkie-promise
npm http request GET https://registry.npmjs.org/commander
npm http request GET https://registry.npmjs.org/chalk
npm http request GET https://registry.npmjs.org/is-my-json-valid
npm http 304 https://registry.npmjs.org/commander
npm http 304 https://registry.npmjs.org/pinkie-promise
npm http 304 https://registry.npmjs.org/chalk
npm http 304 https://registry.npmjs.org/is-my-json-valid
npm http request GET https://registry.npmjs.org/ansi-styles
npm http request GET https://registry.npmjs.org/escape-string-regexp
npm http request GET https://registry.npmjs.org/has-ansi
npm http 304 https://registry.npmjs.org/escape-string-regexp
npm http 304 https://registry.npmjs.org/ansi-styles
npm http 304 https://registry.npmjs.org/has-ansi
npm http request GET https://registry.npmjs.org/graceful-readlink
npm http 304 https://registry.npmjs.org/graceful-readlink
npm http request GET https://registry.npmjs.org/generate-object-property
npm http request GET https://registry.npmjs.org/xtend
npm http request GET https://registry.npmjs.org/jsonpointer
npm http request GET https://registry.npmjs.org/generate-function
npm http 304 https://registry.npmjs.org/xtend
npm http 304 https://registry.npmjs.org/generate-object-property
npm http 304 https://registry.npmjs.org/jsonpointer
npm http 304 https://registry.npmjs.org/generate-function
npm http request GET https://registry.npmjs.org/is-property
npm http 304 https://registry.npmjs.org/is-property
npm http request GET https://registry.npmjs.org/pinkie
npm http 304 https://registry.npmjs.org/pinkie
npm http request GET https://registry.npmjs.org/cryptiles
npm http request GET https://registry.npmjs.org/sntp
npm http request GET https://registry.npmjs.org/boom
npm http request GET https://registry.npmjs.org/hoek
npm http 304 https://registry.npmjs.org/cryptiles
npm http 304 https://registry.npmjs.org/sntp
npm http 304 https://registry.npmjs.org/hoek
npm http 304 https://registry.npmjs.org/boom
npm http request GET https://registry.npmjs.org/jsprim
npm http request GET https://registry.npmjs.org/assert-plus
npm http request GET https://registry.npmjs.org/sshpk
npm http 304 https://registry.npmjs.org/assert-plus
npm http 304 https://registry.npmjs.org/jsprim
npm http 304 https://registry.npmjs.org/sshpk
npm http request GET https://registry.npmjs.org/extsprintf
npm http request GET https://registry.npmjs.org/json-schema
npm http request GET https://registry.npmjs.org/verror
npm http 304 https://registry.npmjs.org/extsprintf
npm http 304 https://registry.npmjs.org/verror
npm http 304 https://registry.npmjs.org/json-schema
npm http request GET https://registry.npmjs.org/asn1
npm http request GET https://registry.npmjs.org/dashdash
npm http request GET https://registry.npmjs.org/getpass
npm http request GET https://registry.npmjs.org/ecc-jsbn
npm http request GET https://registry.npmjs.org/jsbn
npm http request GET https://registry.npmjs.org/bcrypt-pbkdf
npm http request GET https://registry.npmjs.org/jodid25519
npm http request GET https://registry.npmjs.org/tweetnacl
npm http 304 https://registry.npmjs.org/asn1
npm http 304 https://registry.npmjs.org/jsbn
npm http 304 https://registry.npmjs.org/ecc-jsbn
npm http 304 https://registry.npmjs.org/dashdash
npm http 304 https://registry.npmjs.org/bcrypt-pbkdf
npm http 304 https://registry.npmjs.org/tweetnacl
npm http 304 https://registry.npmjs.org/jodid25519
npm http 304 https://registry.npmjs.org/getpass
npm http request GET https://registry.npmjs.org/punycode
npm http 304 https://registry.npmjs.org/punycode
npm http request GET https://registry.npmjs.org/block-stream
npm http request GET https://registry.npmjs.org/fstream
npm http 304 https://registry.npmjs.org/block-stream
npm http 304 https://registry.npmjs.org/fstream
npm http request GET https://registry.npmjs.org/graceful-fs
npm http 304 https://registry.npmjs.org/graceful-fs
npm http request GET https://registry.npmjs.org/fstream-ignore
npm http request GET https://registry.npmjs.org/uid-number
npm http request GET https://registry.npmjs.org/once
npm http request GET https://registry.npmjs.org/debug
npm http 304 https://registry.npmjs.org/fstream-ignore
npm http 304 https://registry.npmjs.org/once
npm http 304 https://registry.npmjs.org/uid-number
npm http 304 https://registry.npmjs.org/debug
npm http request GET https://registry.npmjs.org/ms
npm http 304 https://registry.npmjs.org/ms

> osrm@5.5.2 preinstall /Users/Jonas/Work/baikonur/node_modules/.staging/osrm-d9b66aff
> npm install node-pre-gyp

npm http request GET https://registry.npmjs.org/mkdirp
npm http request GET https://registry.npmjs.org/rimraf
npm http 304 https://registry.npmjs.org/rimraf
npm http 304 https://registry.npmjs.org/mkdirp
npm http request GET https://registry.npmjs.org/inherits
npm http 304 https://registry.npmjs.org/inherits
npm http request GET https://registry.npmjs.org/glob
npm http 304 https://registry.npmjs.org/glob
npm http request GET https://registry.npmjs.org/fs.realpath
npm http request GET https://registry.npmjs.org/path-is-absolute
npm http request GET https://registry.npmjs.org/minimatch
npm http request GET https://registry.npmjs.org/inflight
npm http 304 https://registry.npmjs.org/path-is-absolute
npm http 304 https://registry.npmjs.org/fs.realpath
npm http 304 https://registry.npmjs.org/inflight
npm http 304 https://registry.npmjs.org/minimatch
npm http request GET https://registry.npmjs.org/wrappy
npm http 304 https://registry.npmjs.org/wrappy
npm http request GET https://registry.npmjs.org/brace-expansion
npm http 304 https://registry.npmjs.org/brace-expansion
npm http request GET https://registry.npmjs.org/balanced-match
npm http request GET https://registry.npmjs.org/concat-map
npm http 304 https://registry.npmjs.org/balanced-match
npm http 304 https://registry.npmjs.org/concat-map
osrm@5.5.2 /Users/Jonas/Work/baikonur/node_modules/.staging/osrm-d9b66aff
└─┬ node-pre-gyp@0.6.32
  ├─┬ mkdirp@0.5.1
  │ └── minimist@0.0.8
  ├─┬ nopt@3.0.6
  │ └── abbrev@1.0.9
  ├─┬ npmlog@4.0.2
  │ ├─┬ are-we-there-yet@1.1.2
  │ │ ├── delegates@1.0.0
  │ │ └── readable-stream@2.2.2
  │ ├── console-control-strings@1.1.0
  │ ├─┬ gauge@2.7.2
  │ │ ├── aproba@1.0.4
  │ │ ├── has-unicode@2.0.1
  │ │ ├── object-assign@4.1.0
  │ │ ├── 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.0.0
  │ │ ├── supports-color@0.2.0
  │ │ └── wide-align@1.1.0
  │ └── set-blocking@2.0.0
  ├─┬ rc@1.1.6
  │ ├── deep-extend@0.4.1
  │ ├── ini@1.3.4
  │ ├── minimist@1.2.0
  │ └── strip-json-comments@1.0.4
  ├─┬ request@2.79.0
  │ ├── aws-sign2@0.6.0
  │ ├── aws4@1.5.0
  │ ├── caseless@0.11.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@2.0.6
  │ │ ├─┬ chalk@1.1.3
  │ │ │ ├── ansi-styles@2.2.1
  │ │ │ ├── escape-string-regexp@1.0.5
  │ │ │ ├── has-ansi@2.0.0
  │ │ │ └── supports-color@2.0.0
  │ │ ├─┬ commander@2.9.0
  │ │ │ └── graceful-readlink@1.0.1
  │ │ ├─┬ is-my-json-valid@2.15.0
  │ │ │ ├── generate-function@2.0.0
  │ │ │ ├─┬ generate-object-property@1.2.0
  │ │ │ │ └── is-property@1.0.2
  │ │ │ ├── jsonpointer@4.0.1
  │ │ │ └── xtend@4.0.1
  │ │ └─┬ pinkie-promise@2.0.1
  │ │   └── pinkie@2.0.4
  │ ├─┬ 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.10.1
  │ │   ├── asn1@0.2.3
  │ │   ├── assert-plus@1.0.0
  │ │   ├── bcrypt-pbkdf@1.0.0
  │ │   ├─┬ 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.0
  │ │   └── tweetnacl@0.14.5
  │ ├── is-typedarray@1.0.0
  │ ├── isstream@0.1.2
  │ ├── json-stringify-safe@5.0.1
  │ ├─┬ mime-types@2.1.13
  │ │ └── mime-db@1.25.0
  │ ├── oauth-sign@0.8.2
  │ ├── qs@6.3.0
  │ ├── stringstream@0.0.5
  │ ├─┬ tough-cookie@2.3.2
  │ │ └── punycode@1.4.1
  │ ├── tunnel-agent@0.4.3
  │ └── uuid@3.0.1
  ├─┬ rimraf@2.5.4
  │ └─┬ 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
  │   ├── once@1.4.0
  │   └── path-is-absolute@1.0.1
  ├── semver@5.3.0
  ├─┬ tar@2.2.1
  │ ├── block-stream@0.0.9
  │ ├─┬ fstream@1.0.10
  │ │ └── graceful-fs@4.1.11
  │ └── inherits@2.0.3
  └─┬ tar-pack@3.3.0
    ├─┬ debug@2.2.0
    │ └── ms@0.7.1
    ├── fstream-ignore@1.0.5
    ├─┬ once@1.3.3
    │ └── wrappy@1.0.2
    ├─┬ readable-stream@2.1.5
    │ ├── 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

> osrm@5.5.2 install /Users/Jonas/Work/baikonur/node_modules/osrm
> node-pre-gyp install --fallback-to-build=false || make

node-pre-gyp http GET https://mapbox-node-binary.s3.amazonaws.com/osrm/v5.5.2/Release/node-v51-darwin-x64.tar.gz
node-pre-gyp http 403 https://mapbox-node-binary.s3.amazonaws.com/osrm/v5.5.2/Release/node-v51-darwin-x64.tar.gz
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.5.2/Release/node-v51-darwin-x64.tar.gz
node-pre-gyp ERR! stack     at Request. (/Users/Jonas/Work/baikonur/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:188:7)
node-pre-gyp ERR! stack     at Request.onRequestResponse (/Users/Jonas/Work/baikonur/node_modules/osrm/node_modules/request/request.js:986:10)
node-pre-gyp ERR! stack     at emitOne (events.js:96:13)
node-pre-gyp ERR! stack     at ClientRequest.emit (events.js:188:7)
node-pre-gyp ERR! stack     at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:473: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:362:20)
node-pre-gyp ERR! stack     at emitOne (events.js:96:13)
node-pre-gyp ERR! System Darwin 15.6.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/Jonas/Work/baikonur/node_modules/osrm/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build=false"
node-pre-gyp ERR! cwd /Users/Jonas/Work/baikonur/node_modules/osrm
node-pre-gyp ERR! node -v v7.3.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.32
node-pre-gyp ERR! not ok
403 status code downloading tarball https://mapbox-node-binary.s3.amazonaws.com/osrm/v5.5.2/Release/node-v51-darwin-x64.tar.gz
mkdir -p build &&\
 cd build &&\
 cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_LIBOSRM=On &&\
 VERBOSE=1 make -j4 &&\
 cd ..
-- The C compiler identification is AppleClang 8.0.0.8000042
-- The CXX compiler identification is AppleClang 8.0.0.8000042
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/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: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using osrm v5.5.2
-- Downloading to /Users/Jonas/Work/baikonur/node_modules/osrm/deps/osrm-backend-Release
-- Installing to /tmp/osrm-backend
Cloning into '/Users/Jonas/Work/baikonur/node_modules/osrm/deps/osrm-backend-Release'...
Note: checking out 'v5.5.2'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b 

HEAD is now at 434a3a63... Make Travis buildit.
-- Building libosrm as subproject.
-- Enabling mason
-- Building on a 64 bit system
CMake Warning at deps/osrm-backend-Release/CMakeLists.txt:153 (message):
  GNU gold linker isn't available.

-- Configuring OSRM in release mode
-- Configuring release mode optimizations
-- Performing Test LTO_AVAILABLE
-- Performing Test LTO_AVAILABLE - Success
-- Performing Test LTO_WORKS
-- Performing Test LTO_WORKS - Success
-- LTO working
CMake Warning at deps/osrm-backend-Release/CMakeLists.txt:246 (message):
  LLVM specific binutils not found.

-- Using unknown linker, not setting linker optimizations
-- Set Architecture to x64 on OS X
-- linking against libc++
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- Installing dependencies via mason
-- [Mason] Downloading package https://mason-binaries.s3.amazonaws.com/headers/boost/1.61.0.tar.gz...
-- [Mason] Unpacking package to ../../mason_packages/headers/boost/1.61.0...
-- [Mason] Downloading package https://mason-binaries.s3.amazonaws.com/osx-x86_64/boost_libfilesystem/1.61.0.tar.gz...
-- [Mason] Unpacking package to ../../mason_packages/osx-x86_64/boost_libfilesystem/1.61.0...
-- [Mason] Downloading package https://mason-binaries.s3.amazonaws.com/osx-x86_64/boost_libiostreams/1.61.0.tar.gz...
-- [Mason] Unpacking package to ../../mason_packages/osx-x86_64/boost_libiostreams/1.61.0...
-- [Mason] Downloading package https://mason-binaries.s3.amazonaws.com/osx-x86_64/boost_libprogram_options/1.61.0.tar.gz...
-- [Mason] Unpacking package to ../../mason_packages/osx-x86_64/boost_libprogram_options/1.61.0...
-- [Mason] Downloading package https://mason-binaries.s3.amazonaws.com/osx-x86_64/boost_libregex/1.61.0.tar.gz...
-- [Mason] Unpacking package to ../../mason_packages/osx-x86_64/boost_libregex/1.61.0...
-- [Mason] Downloading package https://mason-binaries.s3.amazonaws.com/osx-x86_64/boost_libtest/1.61.0.tar.gz...
-- [Mason] Unpacking package to ../../mason_packages/osx-x86_64/boost_libtest/1.61.0...
-- [Mason] Downloading package https://mason-binaries.s3.amazonaws.com/osx-x86_64/boost_libdate_time/1.61.0.tar.gz...
-- [Mason] Unpacking package to ../../mason_packages/osx-x86_64/boost_libdate_time/1.61.0...
-- [Mason] Downloading package https://mason-binaries.s3.amazonaws.com/osx-x86_64/boost_libthread/1.61.0.tar.gz...
-- [Mason] Unpacking package to ../../mason_packages/osx-x86_64/boost_libthread/1.61.0...
-- [Mason] Downloading package https://mason-binaries.s3.amazonaws.com/osx-x86_64/boost_libsystem/1.61.0.tar.gz...
-- [Mason] Unpacking package to ../../mason_packages/osx-x86_64/boost_libsystem/1.61.0...
-- [Mason] Downloading package https://mason-binaries.s3.amazonaws.com/osx-x86_64/stxxl/1.4.1.tar.gz...
-- [Mason] Unpacking package to ../../mason_packages/osx-x86_64/stxxl/1.4.1...
-- [Mason] Downloading package https://mason-binaries.s3.amazonaws.com/osx-x86_64/expat/2.2.0.tar.gz...
-- [Mason] Unpacking package to ../../mason_packages/osx-x86_64/expat/2.2.0...
-- [Mason] Downloading package https://mason-binaries.s3.amazonaws.com/osx-x86_64/lua/5.2.4.tar.gz...
-- [Mason] Unpacking package to ../../mason_packages/osx-x86_64/lua/5.2.4...
-- [Mason] Downloading package https://mason-binaries.s3.amazonaws.com/osx-x86_64/luabind_lua524/e414c57bcb687bb3091b7c55bbff6947f052e46b.tar.gz...
-- [Mason] Unpacking package to ../../mason_packages/osx-x86_64/luabind_lua524/e414c57bcb687bb3091b7c55bbff6947f052e46b...
-- [Mason] Downloading package https://mason-binaries.s3.amazonaws.com/osx-x86_64/bzip2/1.0.6.tar.gz...
-- [Mason] Unpacking package to ../../mason_packages/osx-x86_64/bzip2/1.0.6...
-- [Mason] Downloading package https://mason-binaries.s3.amazonaws.com/osx-x86_64/tbb/43_20150316.tar.gz...
-- [Mason] Unpacking package to ../../mason_packages/osx-x86_64/tbb/43_20150316...
-- Found ZLIB: /usr/lib/libz.dylib (found version "1.2.5")
CMake Error at CMakeLists.txt:95 (find_package):
  By not providing "FindNodeJS.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "NodeJS", but
  CMake did not find one.

  Could not find a package configuration file provided by "NodeJS" with any
  of the following names:

    NodeJSConfig.cmake
    nodejs-config.cmake

  Add the installation prefix of "NodeJS" to CMAKE_PREFIX_PATH or set
  "NodeJS_DIR" to a directory containing one of the above files.  If "NodeJS"
  provides a separate development package or SDK, be sure it has been
  installed.

-- Configuring incomplete, errors occurred!
See also "/Users/Jonas/Work/baikonur/node_modules/osrm/build/CMakeFiles/CMakeOutput.log".
See also "/Users/Jonas/Work/baikonur/node_modules/osrm/build/CMakeFiles/CMakeError.log".
make: *** [Makefile:20: build/Release/node-osrm.node] Error 1
npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "osrm"
npm ERR! node v7.3.0
npm ERR! npm  v4.1.1
npm ERR! code ELIFECYCLE

npm ERR! osrm@5.5.2 install: 'node-pre-gyp install --fallback-to-build=false || make'
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the osrm@5.5.2 install script 'node-pre-gyp install --fallback-to-build=false || make'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the osrm package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-pre-gyp install --fallback-to-build=false || make
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs osrm
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls osrm
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/Jonas/Work/baikonur/npm-debug.log

TheMarex commented 7 years ago

@jhermsmeier there should also be binaries for node 6 if that works for you.

For building from source I would recommend the following:

  1. Remove the existing osrm-backend install, node-osrm will pull the required dependencies automatically now
  2. Make sure you have xcode installed, on Travis we are using 7.3 but 8 should work as well I think
  3. npm install osrm should do everything automatically

Let me know if there are still problems.

jhermsmeier commented 7 years ago

After removing the existing osrm-backend, the same problem still persists. Xcode CLI tools are installed (compiler identification is AppleClang 8.0.0.8000042), and since building within the cloned node-osrm repo works perfectly fine, I don't think there's an issue there.

find_package(NodeJS REQUIRED) in CMakeLists.txt:95 can't find any node package configs, as shown in the log above – what's up with that? Where would those typically be located / come from?

When building in the node-osrm repository, I see

-- Found ZLIB: /usr/lib/libz.dylib (found version "1.2.5")
-- Downloading: http://nodejs.org/dist/v7.3.0/SHASUMS256.txt
-- Downloading: http://nodejs.org/dist/v7.3.0/node-v7.3.0-headers.tar.gz
-- [download 0% complete]
-- ...
-- [download 100% complete]
-- Validating: /Users/Jonas/Code/node-osrm/build/node-v7.3.0/headers.tar.gz
-- Checksum: c1b344959cf033fd6e3b0bc34ce899caf23a0202e97e19b4aebef9d29e4dc8e2
-- Download: c1b344959cf033fd6e3b0bc34ce899caf23a0202e97e19b4aebef9d29e4dc8e2
-- Found NodeJS: node.js darwin/x64 (found version "7.3.0")

Whereas, when npm installing osrm as a dependency, I see

-- Found ZLIB: /usr/lib/libz.dylib (found version "1.2.5")
CMake Error at CMakeLists.txt:95 (find_package):
  By not providing "FindNodeJS.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "NodeJS", but
  CMake did not find one.

  Could not find a package configuration file provided by "NodeJS" with any
  of the following names:

    NodeJSConfig.cmake
    nodejs-config.cmake

  Add the installation prefix of "NodeJS" to CMAKE_PREFIX_PATH or set
  "NodeJS_DIR" to a directory containing one of the above files.  If "NodeJS"
  provides a separate development package or SDK, be sure it has been
  installed.

-- Configuring incomplete, errors occurred!
TheMarex commented 7 years ago

Hrm NodeJS.cmake should come from the node-cmake package that we install. Are you using a setup where that is not located in node_modules/node-cmake?

Maybe the assumptions in the build file about the node-cmake code location are wrong.

cordovapolymer commented 7 years ago

when building node-osrm master and all versions back to 5.3.3(which builds successfully) from source with sudo -u osrm npm install --build-from-source -g --unsafe-perm build fails with the following error. "ENOENT: no such file or directory, rename" "'/usr/lib/node_modules/.staging/abbrev-xxxxx' -> " My setup is nodejs 7.4.0 on debian jessie, I've tried to do complete node reinstall(including sudo rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/{npm*,node*,man1/node*} and npm -g clean cache) and also tried to rollback to nodejs 6.9.4 LTS, where error is still the same.

As I have mentioned node-osrm 5.3.3 builds successfully on both node 6 and 7 with the following commands:


  sudo -u osrm wget https://downloads.sourceforge.net/project/boost/boost/1.61.0/boost_1_61_0.tar.bz2
  sudo -u osrm tar xjf boost_1_61_0.tar.bz2
  sudo -u osrm git clone https://github.com/Project-OSRM/node-osrm.git
    sudo -u osrm git checkout tags/v5.3.3
  cd node-osrm
  export CXXFLAGS="-I/home/osrm/boost_1_61_0"
  sudo -u osrm npm install --build-from-source -g --unsafe-perm```
cordovapolymer commented 7 years ago

@jhermsmeier , still it wouldn't build with sudo -u osrm npm install --build-from-source -g --unsafe-perm

npm ERR! Linux 3.16.0-4-amd64
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "--build-from-source" "-g"
npm ERR! node v7.4.0
npm ERR! npm  v4.0.5
npm ERR! path /usr/lib/node_modules/.staging/find-parent-dir-7976bd17
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename

npm ERR! enoent ENOENT: no such file or directory, rename '/usr/lib/node_modules/.staging/find-parent-dir-7976bd17' -> '/usr/lib/node_modules/osrm/node_modules/find-parent-dir'
npm ERR! enoent ENOENT: no such file or directory, rename '/usr/lib/node_modules/.staging/find-parent-dir-7976bd17' -> '/usr/lib/node_modules/osrm/node_modules/find-parent-dir'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! Please include the following file with any support request:
npm ERR!     /home/osrm/node-osrm-jhermsmier/npm-debug.log
jhermsmeier commented 7 years ago

@cordovapolymer Hmm. I'm not sure this module is meant to be installed globally – try omitting the -g option. From what that output looks like it's trying to find a directory which is probably one level deeper, in /usr/lib/node_modules/osrm/...

cordovapolymer commented 7 years ago

The paths are OK, when I check it during the build the directories its complaining about are inside. It's possible to build it this way up to v5.3.3 version. without -g it starts building osrm-backend, which fails for my setup due to #232.

jhermsmeier commented 7 years ago

You've still got a -g in that command, though:

npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "--build-from-source" "-g" "--unsafe-perm"

Could you try just running npm install (without any flags, it should build from source anyways under node v7) in the repository root (/home/osrm/node-osrm-jhermsmier/)?

cordovapolymer commented 7 years ago

@jhermsmeier it fails this way because of the #232 , so I'm building osrm-backend separately. (I've updated my previous comment) here's the output of npm install and npm install --build-from-source --unsafe-perm

cd /home/osrm/node-osrm-jhermsmier/build/deps/osrm-backend-Release && /usr/bin/cmake -E cmake_link_script CMakeFiles/osrm-datastore.dir/link.txt --verbose=1
/usr/bin/c++    -flto=2 -Wall -Wextra -pedantic -Wuninitialized -Wunreachable-code -Wstrict-overflow=1 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fdiagnostics-color=auto -fPIC -ftemplate-depth=1024 -std=c++1y -D_GLIBCXX_USE_CXX11_ABI=0 -fopenmp -O3 -DNDEBUG   -fuse-ld=gold -Wl,--disable-new-dtags -flto  -Wl,-O1 -Wl,--hash-style=gnu -Wl,--sort-common  -Wl,-rpath -Wl,/home/osrm/node-osrm-jhermsmier/mason_packages/linux-x86_64/tbb/43_20150316/lib '-Wl,-rpath,$ORIGIN' -Wl,-z,origin CMakeFiles/osrm-datastore.dir/src/tools/store.cpp.o CMakeFiles/UTIL.dir/src/util/assert.cpp.o CMakeFiles/UTIL.dir/src/util/coordinate.cpp.o CMakeFiles/UTIL.dir/src/util/coordinate_calculation.cpp.o CMakeFiles/UTIL.dir/src/util/exception.cpp.o CMakeFiles/UTIL.dir/src/util/fingerprint.cpp.o CMakeFiles/UTIL.dir/src/util/geojson_debug_policies.cpp.o CMakeFiles/UTIL.dir/src/util/log.cpp.o CMakeFiles/UTIL.dir/src/util/name_table.cpp.o CMakeFiles/UTIL.dir/src/util/guidance/bearing_class.cpp.o CMakeFiles/UTIL.dir/src/util/guidance/entry_class.cpp.o CMakeFiles/UTIL.dir/src/util/guidance/turn_bearing.cpp.o CMakeFiles/UTIL.dir/src/util/guidance/turn_lanes.cpp.o  -o osrm-datastore -rdynamic libosrm_store.a ../../../mason_packages/linux-x86_64/boost_libprogram_options/1.61.0/lib/libboost_program_options.a ../../../mason_packages/linux-x86_64/boost_libdate_time/1.61.0/lib/libboost_date_time.a ../../../mason_packages/linux-x86_64/boost_libfilesystem/1.61.0/lib/libboost_filesystem.a ../../../mason_packages/linux-x86_64/boost_libiostreams/1.61.0/lib/libboost_iostreams.a ../../../mason_packages/linux-x86_64/boost_libthread/1.61.0/lib/libboost_thread.a ../../../mason_packages/linux-x86_64/boost_libsystem/1.61.0/lib/libboost_system.a -lpthread -L/home/osrm/node-osrm-jhermsmier/mason_packages/linux-x86_64/tbb/43_20150316/lib -ltbb -lrt 
../../../mason_packages/linux-x86_64/boost_libprogram_options/1.61.0/lib/libboost_program_options.a(cmdline.o):libs/program_options/src/cmdline.cpp:function boost::program_options::detail::cmdline::run(): error: undefined reference to 'boost::program_options::basic_option<char>::~basic_option()'
../../../mason_packages/linux-x86_64/boost_libprogram_options/1.61.0/lib/libboost_program_options.a(cmdline.o):libs/program_options/src/cmdline.cpp:function boost::program_options::detail::cmdline::run(): error: undefined reference to 'boost::program_options::basic_option<char>::basic_option(boost::program_options::basic_option<char> const&)'
../../../mason_packages/linux-x86_64/boost_libprogram_options/1.61.0/lib/libboost_program_options.a(cmdline.o):libs/program_options/src/cmdline.cpp:function boost::program_options::detail::cmdline::run(): error: undefined reference to 'boost::program_options::basic_option<char>::~basic_option()'
../../../mason_packages/linux-x86_64/boost_libprogram_options/1.61.0/lib/libboost_program_options.a(cmdline.o):libs/program_options/src/cmdline.cpp:function boost::program_options::detail::cmdline::run(): error: undefined reference to 'boost::program_options::basic_option<char>::basic_option(boost::program_options::basic_option<char> const&)'
../../../mason_packages/linux-x86_64/boost_libprogram_options/1.61.0/lib/libboost_program_options.a(cmdline.o):libs/program_options/src/cmdline.cpp:function boost::program_options::detail::cmdline::run(): error: undefined reference to 'boost::program_options::basic_option<char>::~basic_option()'
../../../mason_packages/linux-x86_64/boost_libprogram_options/1.61.0/lib/libboost_program_options.a(cmdline.o):libs/program_options/src/cmdline.cpp:function boost::program_options::detail::cmdline::run(): error: undefined reference to 'boost::program_options::basic_option<char>::~basic_option()'
../../../mason_packages/linux-x86_64/boost_libprogram_options/1.61.0/lib/libboost_program_options.a(cmdline.o):libs/program_options/src/cmdline.cpp:function boost::program_options::detail::cmdline::run(): error: undefined reference to 'boost::program_options::basic_option<char>::basic_option(boost::program_options::basic_option<char> const&)'
../../../mason_packages/linux-x86_64/boost_libprogram_options/1.61.0/lib/libboost_program_options.a(cmdline.o):libs/program_options/src/cmdline.cpp:function boost::program_options::detail::cmdline::run(): error: undefined reference to 'std::runtime_error::runtime_error(char const*)'
../../../mason_packages/linux-x86_64/boost_libprogram_options/1.61.0/lib/libboost_program_options.a(cmdline.o):libs/program_options/src/cmdline.cpp:function boost::program_options::detail::cmdline::handle_additional_parser(std::vector<std::string, std::allocator<std::string> >&): error: undefined reference to 'std::runtime_error::runtime_error(char const*)'
../../../mason_packages/linux-x86_64/boost_libprogram_options/1.61.0/lib/libboost_program_options.a(cmdline.o):libs/program_options/src/cmdline.cpp:function boost::program_options::detail::cmdline::parse_long_option(std::vector<std::string, std::allocator<std::string> >&): error: undefined reference to 'boost::program_options::basic_option<char>::basic_option(boost::program_options::basic_option<char> const&)'
../../../mason_packages/linux-x86_64/boost_libprogram_options/1.61.0/lib/libboost_program_options.a(cmdline.o):libs/program_options/src/cmdline.cpp:function boost::program_options::detail::cmdline::finish_option(boost::program_options::basic_option<char>&, std::vector<std::string, std::allocator<std::string> >&, std::vector<boost::function1<std::vector<boost::program_options::basic_option<char>, std::allocator<boost::program_options::basic_option<char> > >, std::vector<std::string, std::allocator<std::string> >&>, std::allocator<boost::function1<std::vector<boost::program_options::basic_option<char>, std::allocator<boost::program_options::basic_option<char> > >, std::vector<std::string, std::allocator<std::string> >&> > > const&): error: undefined reference to 'std::runtime_error::runtime_error(char const*)'
../../../mason_packages/linux-x86_64/boost_libprogram_options/1.61.0/lib/libboost_program_options.a(options_description.o):libs/program_options/src/options_description.cpp:function boost::detail::shared_count::shared_count<boost::program_options::options_description>(boost::program_options::options_description*): error: undefined reference to 'boost::program_options::options_description::~options_description()'
../../../mason_packages/linux-x86_64/boost_libprogram_options/1.61.0/lib/libboost_program_options.a(options_description.o):libs/program_options/src/options_description.cpp:function boost::detail::sp_counted_impl_p<boost::program_options::options_description>::dispose(): error: undefined reference to 'boost::program_options::options_description::~options_description()'
../../../mason_packages/linux-x86_64/boost_libprogram_options/1.61.0/lib/libboost_program_options.a(variables_map.o):libs/program_options/src/variables_map.cpp:function boost::program_options::variables_map::get(std::string const&) const: error: undefined reference to 'boost::program_options::variable_value::~variable_value()'
../../../mason_packages/linux-x86_64/boost_libprogram_options/1.61.0/lib/libboost_program_options.a(variables_map.o):libs/program_options/src/variables_map.cpp:vtable for boost::program_options::variables_map: error: undefined reference to 'boost::program_options::variables_map::~variables_map()'
../../../mason_packages/linux-x86_64/boost_libprogram_options/1.61.0/lib/libboost_program_options.a(variables_map.o):libs/program_options/src/variables_map.cpp:vtable for boost::program_options::variables_map: error: undefined reference to 'boost::program_options::variables_map::~variables_map()'
../../../mason_packages/linux-x86_64/boost_libprogram_options/1.61.0/lib/libboost_program_options.a(value_semantic.o):libs/program_options/src/value_semantic.cpp:function boost::program_options::value_semantic_codecvt_helper<char>::parse(boost::any&, std::vector<std::string, std::allocator<std::string> > const&, bool) const: error: undefined reference to 'void std::vector<std::string, std::allocator<std::string> >::_M_emplace_back_aux<std::string>(std::string&&)'
../../../mason_packages/linux-x86_64/boost_libprogram_options/1.61.0/lib/libboost_program_options.a(value_semantic.o):libs/program_options/src/value_semantic.cpp:function boost::program_options::invalid_option_value::invalid_option_value(std::string const&): error: undefined reference to 'boost::program_options::validation_error::validation_error(boost::program_options::validation_error::kind_t, std::string const&, std::string const&, int)'
../../../mason_packages/linux-x86_64/boost_libprogram_options/1.61.0/lib/libboost_program_options.a(value_semantic.o):libs/program_options/src/value_semantic.cpp:function boost::program_options::invalid_option_value::invalid_option_value(std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&): error: undefined reference to 'boost::program_options::validation_error::validation_error(boost::program_options::validation_error::kind_t, std::string const&, std::string const&, int)'
../../../mason_packages/linux-x86_64/boost_libprogram_options/1.61.0/lib/libboost_program_options.a(value_semantic.o):libs/program_options/src/value_semantic.cpp:function boost::program_options::invalid_bool_value::invalid_bool_value(std::string const&): error: undefined reference to 'boost::program_options::validation_error::validation_error(boost::program_options::validation_error::kind_t, std::string const&, std::string const&, int)'
../../../mason_packages/linux-x86_64/boost_libprogram_options/1.61.0/lib/libboost_program_options.a(value_semantic.o):libs/program_options/src/value_semantic.cpp:function boost::program_options::error_with_option_name::get_canonical_option_prefix() const: error: undefined reference to 'std::logic_error::logic_error(char const*)'
../../../mason_packages/linux-x86_64/boost_libprogram_options/1.61.0/lib/libboost_program_options.a(value_semantic.o):libs/program_options/src/value_semantic.cpp:function std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const& boost::program_options::validators::get_single_string<wchar_t>(std::vector<std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >, std::allocator<std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > > > const&, bool): error: undefined reference to 'boost::program_options::validation_error::validation_error(boost::program_options::validation_error::kind_t, std::string const&, std::string const&, int)'
../../../mason_packages/linux-x86_64/boost_libprogram_options/1.61.0/lib/libboost_program_options.a(value_semantic.o):libs/program_options/src/value_semantic.cpp:function boost::program_options::typed_value<bool, char>::notify(boost::any const&) const: error: undefined reference to 'std::runtime_error::runtime_error(char const*)'
../../../mason_packages/linux-x86_64/boost_libprogram_options/1.61.0/lib/libboost_program_options.a(value_semantic.o):libs/program_options/src/value_semantic.cpp:vtable for boost::program_options::error_with_option_name: error: undefined reference to 'boost::program_options::error_with_option_name::~error_with_option_name()'
../../../mason_packages/linux-x86_64/boost_libprogram_options/1.61.0/lib/libboost_program_options.a(convert.o):libs/program_options/src/convert.cpp:function std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > boost::detail::convert<wchar_t, char, boost::_bi::bind_t<std::codecvt_base::result, boost::_mfi::cmf7<std::codecvt_base::result, std::__codecvt_abstract_base<wchar_t, char, __mbstate_t>, __mbstate_t&, char const*, char const*, char const*&, wchar_t*, wchar_t*, wchar_t*&>, boost::_bi::list8<boost::_bi::value<std::codecvt<wchar_t, char, __mbstate_t> const*>, boost::arg<1>, boost::arg<2>, boost::arg<3>, boost::arg<4>, boost::arg<5>, boost::arg<6>, boost::arg<7> > > >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::_bi::bind_t<std::codecvt_base::result, boost::_mfi::cmf7<std::codecvt_base::result, std::__codecvt_abstract_base<wchar_t, char, __mbstate_t>, __mbstate_t&, char const*, char const*, char const*&, wchar_t*, wchar_t*, wchar_t*&>, boost::_bi::list8<boost::_bi::value<std::codecvt<wchar_t, char, __mbstate_t> const*>, boost::arg<1>, boost::arg<2>, boost::arg<3>, boost::arg<4>, boost::arg<5>, boost::arg<6>, boost::arg<7> > >): error: undefined reference to 'std::logic_error::logic_error(char const*)'
../../../mason_packages/linux-x86_64/boost_libprogram_options/1.61.0/lib/libboost_program_options.a(convert.o):libs/program_options/src/convert.cpp:function std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > boost::detail::convert<wchar_t, char, boost::_bi::bind_t<std::codecvt_base::result, boost::_mfi::cmf7<std::codecvt_base::result, std::__codecvt_abstract_base<wchar_t, char, __mbstate_t>, __mbstate_t&, char const*, char const*, char const*&, wchar_t*, wchar_t*, wchar_t*&>, boost::_bi::list8<boost::_bi::value<std::codecvt<wchar_t, char, __mbstate_t> const*>, boost::arg<1>, boost::arg<2>, boost::arg<3>, boost::arg<4>, boost::arg<5>, boost::arg<6>, boost::arg<7> > > >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::_bi::bind_t<std::codecvt_base::result, boost::_mfi::cmf7<std::codecvt_base::result, std::__codecvt_abstract_base<wchar_t, char, __mbstate_t>, __mbstate_t&, char const*, char const*, char const*&, wchar_t*, wchar_t*, wchar_t*&>, boost::_bi::list8<boost::_bi::value<std::codecvt<wchar_t, char, __mbstate_t> const*>, boost::arg<1>, boost::arg<2>, boost::arg<3>, boost::arg<4>, boost::arg<5>, boost::arg<6>, boost::arg<7> > >): error: undefined reference to 'std::logic_error::logic_error(char const*)'
../../../mason_packages/linux-x86_64/boost_libprogram_options/1.61.0/lib/libboost_program_options.a(convert.o):libs/program_options/src/convert.cpp:function std::basic_string<char, std::char_traits<char>, std::allocator<char> > boost::detail::convert<char, wchar_t, boost::_bi::bind_t<std::codecvt_base::result, boost::_mfi::cmf7<std::codecvt_base::result, std::__codecvt_abstract_base<wchar_t, char, __mbstate_t>, __mbstate_t&, wchar_t const*, wchar_t const*, wchar_t const*&, char*, char*, char*&>, boost::_bi::list8<boost::_bi::value<std::codecvt<wchar_t, char, __mbstate_t> const*>, boost::arg<1>, boost::arg<2>, boost::arg<3>, boost::arg<4>, boost::arg<5>, boost::arg<6>, boost::arg<7> > > >(std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&, boost::_bi::bind_t<std::codecvt_base::result, boost::_mfi::cmf7<std::codecvt_base::result, std::__codecvt_abstract_base<wchar_t, char, __mbstate_t>, __mbstate_t&, wchar_t const*, wchar_t const*, wchar_t const*&, char*, char*, char*&>, boost::_bi::list8<boost::_bi::value<std::codecvt<wchar_t, char, __mbstate_t> const*>, boost::arg<1>, boost::arg<2>, boost::arg<3>, boost::arg<4>, boost::arg<5>, boost::arg<6>, boost::arg<7> > >): error: undefined reference to 'std::logic_error::logic_error(char const*)'
/tmp/cc8Z8tH2.ltrans16.ltrans.o:cc8Z8tH2.ltrans16.o:vtable for boost::detail::sp_counted_impl_p<boost::filesystem::detail::dir_itr_imp>: error: undefined reference to 'boost::detail::sp_counted_impl_p<boost::filesystem::detail::dir_itr_imp>::~sp_counted_impl_p()'
/tmp/cc8Z8tH2.ltrans16.ltrans.o:cc8Z8tH2.ltrans16.o:vtable for boost::detail::sp_counted_impl_p<boost::filesystem::filesystem_error::m_imp>: error: undefined reference to 'boost::detail::sp_counted_impl_p<boost::filesystem::filesystem_error::m_imp>::~sp_counted_impl_p()'
/tmp/cc8Z8tH2.ltrans21.ltrans.o:cc8Z8tH2.ltrans21.o:vtable for boost::bad_function_call: warning: relocation refers to discarded section
/tmp/cc8Z8tH2.ltrans21.ltrans.o:cc8Z8tH2.ltrans21.o:vtable for boost::exception_detail::error_info_injector<boost::program_options::validation_error>: error: undefined reference to 'boost::exception_detail::error_info_injector<boost::program_options::validation_error>::~error_info_injector()'
/tmp/cc8Z8tH2.ltrans21.ltrans.o:cc8Z8tH2.ltrans21.o:vtable for boost::exception_detail::error_info_injector<boost::program_options::validation_error>: error: undefined reference to 'non-virtual thunk to boost::exception_detail::error_info_injector<boost::program_options::validation_error>::~error_info_injector()'
/tmp/cc8Z8tH2.ltrans21.ltrans.o:cc8Z8tH2.ltrans21.o:vtable for boost::exception_detail::error_info_injector<boost::program_options::validation_error>: error: undefined reference to 'non-virtual thunk to boost::exception_detail::error_info_injector<boost::program_options::validation_error>::~error_info_injector()'
/tmp/cc8Z8tH2.ltrans21.ltrans.o:cc8Z8tH2.ltrans21.o:vtable for boost::exception_detail::error_info_injector<boost::bad_function_call>: warning: relocation refers to discarded section
/tmp/cc8Z8tH2.ltrans21.ltrans.o:cc8Z8tH2.ltrans21.o:vtable for boost::exception_detail::error_info_injector<boost::bad_function_call>: warning: relocation refers to discarded section
/tmp/cc8Z8tH2.ltrans21.ltrans.o:cc8Z8tH2.ltrans21.o:vtable for boost::exception_detail::error_info_injector<boost::bad_function_call>: warning: relocation refers to discarded section
/tmp/cc8Z8tH2.ltrans21.ltrans.o:cc8Z8tH2.ltrans21.o:vtable for boost::program_options::validation_error: error: undefined reference to 'boost::program_options::validation_error::~validation_error()'
/tmp/cc8Z8tH2.ltrans21.ltrans.o:cc8Z8tH2.ltrans21.o:vtable for boost::program_options::invalid_option_value: error: undefined reference to 'boost::program_options::invalid_option_value::~invalid_option_value()'
/tmp/cc8Z8tH2.ltrans25.ltrans.o:cc8Z8tH2.ltrans25.o:vtable for boost::program_options::error: warning: relocation refers to discarded section
collect2: error: ld returned 1 exit status
deps/osrm-backend-Release/CMakeFiles/osrm-datastore.dir/build.make:125: recipe for target 'deps/osrm-backend-Release/osrm-datastore' failed
make[3]: *** [deps/osrm-backend-Release/osrm-datastore] Error 1
make[3]: Leaving directory '/home/osrm/node-osrm-jhermsmier/build'
CMakeFiles/Makefile2:749: recipe for target 'deps/osrm-backend-Release/CMakeFiles/osrm-datastore.dir/all' failed
make[2]: *** [deps/osrm-backend-Release/CMakeFiles/osrm-datastore.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....
make[3]: Leaving directory '/home/osrm/node-osrm-jhermsmier/build'
[ 75%] Built target SERVER
make[2]: Leaving directory '/home/osrm/node-osrm-jhermsmier/build'
Makefile:127: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/osrm/node-osrm-jhermsmier/build'
Makefile:20: recipe for target 'build/Release/node-osrm.node' failed
make: *** [build/Release/node-osrm.node] Error 2

npm ERR! Linux 3.16.0-4-amd64
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v7.4.0
npm ERR! npm  v4.0.5
npm ERR! code ELIFECYCLE
npm ERR! osrm@5.6.0-latest install: `node-pre-gyp install --fallback-to-build=false || make`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the osrm@5.6.0-latest install script 'node-pre-gyp install --fallback-to-build=false || make'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the osrm package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-pre-gyp install --fallback-to-build=false || make
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs osrm
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls osrm
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/osrm/node-osrm-jhermsmier/npm-debug.log
o0th commented 7 years ago

I'm having the same issue

$ node --version
v7.7.3
$ npm --version
4.1.2

Installing osrm via npm

$ npm install --save osrm

I've got this npm-debug.txt

Installing via source code the build it's seem to be ok but tests fails

 undefined symbol: _ZNK4osrm4OSRM4TileERKNS_6engine3api14TileParametersERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
stepankuzmin commented 7 years ago

Same here.

$ node -v
v7.7.3
$ npm -v    
4.1.2

npm-debug.log

CMake Error at CMakeLists.txt:98 (find_package):
  By not providing "FindNodeJS.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "NodeJS", but
  CMake did not find one.

  Could not find a package configuration file provided by "NodeJS" with any
  of the following names:

    NodeJSConfig.cmake
    nodejs-config.cmake

  Add the installation prefix of "NodeJS" to CMAKE_PREFIX_PATH or set
  "NodeJS_DIR" to a directory containing one of the above files.  If "NodeJS"
  provides a separate development package or SDK, be sure it has been
  installed.
jhermsmeier commented 7 years ago

I attempted to fix it in https://github.com/Project-OSRM/node-osrm/pull/280, but something on the CI is acting up, and the lack of activity / interest / feedback on that hasn't helped my motivation, so it kind of came to a halt. It does work fine for me with those changes from #280, and I've just been using that for the time being.

daniel-j-h commented 7 years ago

We merged node-osrm into the osrm-backend repo. - I updated node-cmake to v2 in doing so.

Can you check if the node-osrm integration in osrm-backend works for you? It's still in its early staged, here are some prs and issues tagged nodejs:

angelocavallet commented 7 years ago

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

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.

mkdir -p build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_NODE_BINDINGS=On -DENABLE_MASON=On #this is recommended on CHANGELOG to build node-osrm with osrm-backend

But when I tried to run "cmake --build ." I got that error:

root@srvopenstreetmap:/home/osm/osrm/osrm-backend/build# cmake --build .
Scanning dependencies of target UPDATER
[  0%] Building CXX object CMakeFiles/UPDATER.dir/src/updater/csv_source.cpp.o
[  0%] Building CXX object CMakeFiles/UPDATER.dir/src/updater/updater.cpp.o
[  0%] Built target UPDATER
Scanning dependencies of target UTIL
[  0%] 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
[  3%] Building CXX object CMakeFiles/UTIL.dir/src/util/fingerprint.cpp.o
[  3%] 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
[  7%] Building CXX object CMakeFiles/UTIL.dir/src/util/guidance/bearing_class.cpp.o
[  7%] Building CXX object CMakeFiles/UTIL.dir/src/util/guidance/entry_class.cpp.o
[  7%] Building CXX object CMakeFiles/UTIL.dir/src/util/guidance/turn_bearing.cpp.o
[ 10%] Building CXX object CMakeFiles/UTIL.dir/src/util/guidance/turn_lanes.cpp.o
[ 10%] Built target UTIL
Scanning dependencies of target osrm_update
[ 10%] Linking CXX static library libosrm_update.a
[ 10%] Built target osrm_update
Scanning dependencies of target CONTRACTOR
[ 10%] Building CXX object CMakeFiles/CONTRACTOR.dir/src/contractor/contractor.cpp.o
[ 10%] Building CXX object CMakeFiles/CONTRACTOR.dir/src/contractor/contractor_dijkstra.cpp.o
[ 10%] Building CXX object CMakeFiles/CONTRACTOR.dir/src/contractor/graph_contractor.cpp.o
[ 10%] Built target CONTRACTOR
Scanning dependencies of target osrm_contract
[ 10%] Building CXX object CMakeFiles/osrm_contract.dir/src/osrm/contractor.cpp.o
[ 10%] Linking CXX static library libosrm_contract.a
[ 10%] Built target osrm_contract
Scanning dependencies of target SERVER
[ 10%] Building CXX object CMakeFiles/SERVER.dir/src/server/connection.cpp.o
[ 10%] 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
[ 14%] Building CXX object CMakeFiles/SERVER.dir/src/server/http/reply.cpp.o
[ 17%] Building CXX object CMakeFiles/SERVER.dir/src/server/service/match_service.cpp.o
[ 17%] Building CXX object CMakeFiles/SERVER.dir/src/server/service/nearest_service.cpp.o
[ 17%] Building CXX object CMakeFiles/SERVER.dir/src/server/service/route_service.cpp.o
[ 17%] Building CXX object CMakeFiles/SERVER.dir/src/server/service/table_service.cpp.o
[ 17%] Building CXX object CMakeFiles/SERVER.dir/src/server/service/tile_service.cpp.o
[ 17%] Building CXX object CMakeFiles/SERVER.dir/src/server/service/trip_service.cpp.o
[ 17%] Built target SERVER
Scanning dependencies of target PARTITIONER
[ 17%] Building CXX object CMakeFiles/PARTITIONER.dir/src/partition/annotated_partition.cpp.o
[ 21%] Building CXX object CMakeFiles/PARTITIONER.dir/src/partition/bisection_to_partition.cpp.o
[ 21%] Building CXX object CMakeFiles/PARTITIONER.dir/src/partition/dinic_max_flow.cpp.o
[ 21%] Building CXX object CMakeFiles/PARTITIONER.dir/src/partition/graph_view.cpp.o
[ 21%] Building CXX object CMakeFiles/PARTITIONER.dir/src/partition/inertial_flow.cpp.o
[ 21%] Building CXX object CMakeFiles/PARTITIONER.dir/src/partition/partitioner.cpp.o
[ 25%] Building CXX object CMakeFiles/PARTITIONER.dir/src/partition/recursive_bisection.cpp.o
[ 25%] Building CXX object CMakeFiles/PARTITIONER.dir/src/partition/recursive_bisection_state.cpp.o
[ 25%] Building CXX object CMakeFiles/PARTITIONER.dir/src/partition/tarjan_graph_wrapper.cpp.o
[ 25%] Built target PARTITIONER
Scanning dependencies of target STORAGE
[ 28%] Building CXX object CMakeFiles/STORAGE.dir/src/storage/storage.cpp.o
[ 28%] Building CXX object CMakeFiles/STORAGE.dir/src/storage/storage_config.cpp.o
[ 28%] Built target STORAGE
Scanning dependencies of target EXTRACTOR
[ 28%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/compressed_edge_container.cpp.o
[ 32%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/edge_based_graph_factory.cpp.o
[ 32%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/extraction_containers.cpp.o
[ 32%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/extractor.cpp.o
[ 32%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/extractor_callbacks.cpp.o
[ 32%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/graph_compressor.cpp.o
[ 35%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/raster_source.cpp.o
[ 35%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/restriction_map.cpp.o
[ 35%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/restriction_parser.cpp.o
[ 35%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/scripting_environment_lua.cpp.o
[ 35%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/suffix_table.cpp.o
[ 39%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/guidance/coordinate_extractor.cpp.o
[ 39%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/guidance/intersection.cpp.o
[ 39%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/guidance/intersection_generator.cpp.o
[ 39%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/guidance/intersection_handler.cpp.o
[ 39%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/guidance/intersection_normalizer.cpp.o
[ 42%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/guidance/mergable_road_detector.cpp.o
[ 42%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/guidance/motorway_handler.cpp.o
[ 42%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/guidance/node_based_graph_walker.cpp.o
[ 42%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/guidance/roundabout_handler.cpp.o
[ 42%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/guidance/sliproad_handler.cpp.o
[ 46%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/guidance/suppress_mode_handler.cpp.o
[ 46%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/guidance/turn_analysis.cpp.o
[ 46%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/guidance/turn_classification.cpp.o
[ 46%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/guidance/turn_discovery.cpp.o
[ 46%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/guidance/turn_handler.cpp.o
[ 50%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/guidance/turn_lane_augmentation.cpp.o
[ 50%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/guidance/turn_lane_data.cpp.o
[ 50%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/guidance/turn_lane_handler.cpp.o
[ 50%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/guidance/turn_lane_matcher.cpp.o
[ 50%] Built target EXTRACTOR
Scanning dependencies of target osrm_extract
[ 53%] Building CXX object CMakeFiles/osrm_extract.dir/src/osrm/extractor.cpp.o
[ 53%] Linking CXX static library libosrm_extract.a
[ 53%] Built target osrm_extract
Scanning dependencies of target osrm-extract
[ 53%] Building CXX object CMakeFiles/osrm-extract.dir/src/tools/extract.cpp.o
[ 53%] Linking CXX executable osrm-extract
../mason_packages/linux-x86_64/boost_libprogram_options/1.63.0/lib/libboost_program_options.a(cmdline.o):libs/program_options/src/cmdline.cpp:function boost::program_options::detail::cmdline::run(): error: undefined reference to 'std::runtime_error::runtime_error(char const*)'
../mason_packages/linux-x86_64/boost_libprogram_options/1.63.0/lib/libboost_program_options.a(cmdline.o):libs/program_options/src/cmdline.cpp:function boost::program_options::detail::cmdline::handle_additional_parser(std::vector<std::string, std::allocator<std::string> >&): error: undefined reference to 'std::runtime_error::runtime_error(char const*)'
../mason_packages/linux-x86_64/boost_libprogram_options/1.63.0/lib/libboost_program_options.a(cmdline.o):libs/program_options/src/cmdline.cpp:function boost::program_options::detail::cmdline::finish_option(boost::program_options::basic_option<char>&, std::vector<std::string, std::allocator<std::string> >&, std::vector<boost::function1<std::vector<boost::program_options::basic_option<char>, std::allocator<boost::program_options::basic_option<char> > >, std::vector<std::string, std::allocator<std::string> >&>, std::allocator<boost::function1<std::vector<boost::program_options::basic_option<char>, std::allocator<boost::program_options::basic_option<char> > >, std::vector<std::string, std::allocator<std::string> >&> > > const&): error: undefined reference to 'std::runtime_error::runtime_error(char const*)'
../mason_packages/linux-x86_64/boost_libprogram_options/1.63.0/lib/libboost_program_options.a(value_semantic.o):libs/program_options/src/value_semantic.cpp:function boost::program_options::error_with_option_name::get_canonical_option_prefix() const: error: undefined reference to 'std::logic_error::logic_error(char const*)'
../mason_packages/linux-x86_64/boost_libprogram_options/1.63.0/lib/libboost_program_options.a(convert.o):libs/program_options/src/convert.cpp:function std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > boost::detail::convert<wchar_t, char, boost::_bi::bind_t<std::codecvt_base::result, boost::_mfi::cmf7<std::codecvt_base::result, std::__codecvt_abstract_base<wchar_t, char, __mbstate_t>, __mbstate_t&, char const*, char const*, char const*&, wchar_t*, wchar_t*, wchar_t*&>, boost::_bi::list8<boost::_bi::value<std::codecvt<wchar_t, char, __mbstate_t> const*>, boost::arg<1>, boost::arg<2>, boost::arg<3>, boost::arg<4>, boost::arg<5>, boost::arg<6>, boost::arg<7> > > >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::_bi::bind_t<std::codecvt_base::result, boost::_mfi::cmf7<std::codecvt_base::result, std::__codecvt_abstract_base<wchar_t, char, __mbstate_t>, __mbstate_t&, char const*, char const*, char const*&, wchar_t*, wchar_t*, wchar_t*&>, boost::_bi::list8<boost::_bi::value<std::codecvt<wchar_t, char, __mbstate_t> const*>, boost::arg<1>, boost::arg<2>, boost::arg<3>, boost::arg<4>, boost::arg<5>, boost::arg<6>, boost::arg<7> > >): error: undefined reference to 'std::logic_error::logic_error(char const*)'
../mason_packages/linux-x86_64/boost_libprogram_options/1.63.0/lib/libboost_program_options.a(convert.o):libs/program_options/src/convert.cpp:function std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > boost::detail::convert<wchar_t, char, boost::_bi::bind_t<std::codecvt_base::result, boost::_mfi::cmf7<std::codecvt_base::result, std::__codecvt_abstract_base<wchar_t, char, __mbstate_t>, __mbstate_t&, char const*, char const*, char const*&, wchar_t*, wchar_t*, wchar_t*&>, boost::_bi::list8<boost::_bi::value<std::codecvt<wchar_t, char, __mbstate_t> const*>, boost::arg<1>, boost::arg<2>, boost::arg<3>, boost::arg<4>, boost::arg<5>, boost::arg<6>, boost::arg<7> > > >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::_bi::bind_t<std::codecvt_base::result, boost::_mfi::cmf7<std::codecvt_base::result, std::__codecvt_abstract_base<wchar_t, char, __mbstate_t>, __mbstate_t&, char const*, char const*, char const*&, wchar_t*, wchar_t*, wchar_t*&>, boost::_bi::list8<boost::_bi::value<std::codecvt<wchar_t, char, __mbstate_t> const*>, boost::arg<1>, boost::arg<2>, boost::arg<3>, boost::arg<4>, boost::arg<5>, boost::arg<6>, boost::arg<7> > >): error: undefined reference to 'std::logic_error::logic_error(char const*)'
../mason_packages/linux-x86_64/boost_libprogram_options/1.63.0/lib/libboost_program_options.a(convert.o):libs/program_options/src/convert.cpp:function std::basic_string<char, std::char_traits<char>, std::allocator<char> > boost::detail::convert<char, wchar_t, boost::_bi::bind_t<std::codecvt_base::result, boost::_mfi::cmf7<std::codecvt_base::result, std::__codecvt_abstract_base<wchar_t, char, __mbstate_t>, __mbstate_t&, wchar_t const*, wchar_t const*, wchar_t const*&, char*, char*, char*&>, boost::_bi::list8<boost::_bi::value<std::codecvt<wchar_t, char, __mbstate_t> const*>, boost::arg<1>, boost::arg<2>, boost::arg<3>, boost::arg<4>, boost::arg<5>, boost::arg<6>, boost::arg<7> > > >(std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&, boost::_bi::bind_t<std::codecvt_base::result, boost::_mfi::cmf7<std::codecvt_base::result, std::__codecvt_abstract_base<wchar_t, char, __mbstate_t>, __mbstate_t&, wchar_t const*, wchar_t const*, wchar_t const*&, char*, char*, char*&>, boost::_bi::list8<boost::_bi::value<std::codecvt<wchar_t, char, __mbstate_t> const*>, boost::arg<1>, boost::arg<2>, boost::arg<3>, boost::arg<4>, boost::arg<5>, boost::arg<6>, boost::arg<7> > >): error: undefined reference to 'std::logic_error::logic_error(char const*)'
../mason_packages/linux-x86_64/boost_libregex/1.63.0/lib/libboost_regex.a(instances.o):libs/regex/build/../src/instances.cpp:function boost::re_detail_106300::perl_matcher<char const*, std::allocator<boost::sub_match<char const*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::construct_init(boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags): error: undefined reference to 'std::invalid_argument::invalid_argument(char const*)'
../mason_packages/linux-x86_64/boost_libregex/1.63.0/lib/libboost_regex.a(instances.o):libs/regex/build/../src/instances.cpp:function boost::re_detail_106300::perl_matcher<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::construct_init(boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags): error: undefined reference to 'std::invalid_argument::invalid_argument(char const*)'
../mason_packages/linux-x86_64/boost_libregex/1.63.0/lib/libboost_regex.a(instances.o):libs/regex/build/../src/instances.cpp:function boost::object_cache<boost::re_detail_106300::cpp_regex_traits_base<char>, boost::re_detail_106300::cpp_regex_traits_implementation<char> >::get(boost::re_detail_106300::cpp_regex_traits_base<char> const&, unsigned long): error: undefined reference to 'std::runtime_error::runtime_error(char const*)'
../mason_packages/linux-x86_64/boost_libregex/1.63.0/lib/libboost_regex.a(regex.o):libs/regex/build/../src/regex.cpp:function boost::regex_error::regex_error(boost::regex_constants::error_type): error: undefined reference to 'std::runtime_error::runtime_error(char const*)'
../mason_packages/linux-x86_64/lua/5.2.4/lib/liblua.a(loslib.o):loslib.c:function os_tmpname: warning: the use of `tmpnam' is dangerous, better use `mkstemp'
collect2: error: ld returned 1 exit status
CMakeFiles/osrm-extract.dir/build.make:107: recipe for target 'osrm-extract' failed
make[2]: *** [osrm-extract] Error 1
CMakeFiles/Makefile2:281: recipe for target 'CMakeFiles/osrm-extract.dir/all' failed
make[1]: *** [CMakeFiles/osrm-extract.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

So, I really don't know whats going on, I'm kinda lost here.

daniel-j-h commented 7 years ago

@angelocavallet please re-open in osrm-backend. And then please don't forget to add the cmake .. output and give us some details wrt. compiler, stdlib etc.

angelocavallet commented 7 years ago

Oh, sorry. I didn't realize that I'm in node-osrm repo I'm going to do that.