npm install --build-from-source error on Ubuntu
chuong2v opened this issue · 2 comments
osrm@5.3.0 preinstall /home/qup/Documents/Code/node-osrm
npm install node-pre-gyp
node-pre-gyp@0.6.30 node_modules/node-pre-gyp
├── semver@5.3.0
├── nopt@3.0.6 (abbrev@1.0.9)
├── mkdirp@0.5.1 (minimist@0.0.8)
├── rc@1.1.6 (ini@1.3.4, deep-extend@0.4.1, strip-json-comments@1.0.4, minimist@1.2.0)
├── rimraf@2.5.4 (glob@7.1.0)
├── tar@2.2.1 (inherits@2.0.3, block-stream@0.0.9, fstream@1.0.10)
├── npmlog@4.0.0 (set-blocking@2.0.0, console-control-strings@1.1.0, are-we-there-yet@1.1.2, gauge@2.6.0)
├── tar-pack@3.1.4 (uid-number@0.0.6, once@1.3.3, debug@2.2.0, readable-stream@2.1.5, fstream@1.0.10, fstream-ignore@1.0.5)
└── request@2.75.0 (aws-sign2@0.6.0, tunnel-agent@0.4.3, forever-agent@0.6.1, oauth-sign@0.8.2, is-typedarray@1.0.0, caseless@0.11.0, stringstream@0.0.5, aws4@1.4.1, isstream@0.1.2, json-stringify-safe@5.0.1, extend@3.0.0, tough-cookie@2.3.1, qs@6.2.1, node-uuid@1.4.7, combined-stream@1.0.5, mime-types@2.1.12, form-data@2.0.0, bl@1.1.2, hawk@3.1.3, http-signature@1.1.1, har-validator@2.0.6)
npm WARN optional dep failed, continuing fsevents@1.0.14
npm WARN deprecated lodash.assign@4.2.0: This package is deprecated. Use Object.assign.
|
osrm@5.3.0 install /home/qup/Documents/Code/node-osrm
node-pre-gyp install --fallback-to-build
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
make: Entering directory /home/qup/Documents/Code/node-osrm/build' CXX(target) Release/obj.target/osrm/src/node_osrm.o In file included from ../src/node_osrm.cpp:17:0: ../src/node_osrm_support.hpp:21:33: fatal error: boost/make_unique.hpp: No such file or directory #include <boost/make_unique.hpp> ^ compilation terminated. make: *** [Release/obj.target/osrm/src/node_osrm.o] Error 1 make: Leaving directory
/home/qup/Documents/Code/node-osrm/build'
gyp ERR! build error
gyp ERR! stack Error: make
failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/qup/.nvm/versions/node/v4.5.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.4.0-38-generic
gyp ERR! command "/home/qup/.nvm/versions/node/v4.5.0/bin/node" "/home/qup/.nvm/versions/node/v4.5.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/qup/Documents/Code/node-osrm/lib/binding/osrm.node" "--module_name=osrm" "--module_path=/home/qup/Documents/Code/node-osrm/lib/binding"
gyp ERR! cwd /home/qup/Documents/Code/node-osrm
gyp ERR! node -v v4.5.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/home/qup/.nvm/versions/node/v4.5.0/bin/node /home/qup/.nvm/versions/node/v4.5.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/qup/Documents/Code/node-osrm/lib/binding/osrm.node --module_name=osrm --module_path=/home/qup/Documents/Code/node-osrm/lib/binding' (1)
node-pre-gyp ERR! stack at ChildProcess. (/home/qup/Documents/Code/node-osrm/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:87:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:172:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:829:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
node-pre-gyp ERR! System Linux 4.4.0-38-generic
node-pre-gyp ERR! command "/home/qup/.nvm/versions/node/v4.5.0/bin/node" "/home/qup/Documents/Code/node-osrm/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/qup/Documents/Code/node-osrm
node-pre-gyp ERR! node -v v4.5.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.30
node-pre-gyp ERR! not ok
Failed to execute '/home/qup/.nvm/versions/node/v4.5.0/bin/node /home/qup/.nvm/versions/node/v4.5.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/qup/Documents/Code/node-osrm/lib/binding/osrm.node --module_name=osrm --module_path=/home/qup/Documents/Code/node-osrm/lib/binding' (1)
npm ERR! Linux 4.4.0-38-generic
npm ERR! argv "/home/qup/.nvm/versions/node/v4.5.0/bin/node" "/home/qup/.nvm/versions/node/v4.5.0/bin/npm" "install" "--build-from-source"
npm ERR! node v4.5.0
npm ERR! npm v2.15.9
npm ERR! code ELIFECYCLE
npm ERR! osrm@5.3.0 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the osrm@5.3.0 install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! 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
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 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
node_osrm_support.hpp:21:33: fatal error: boost/make_unique.hpp: No such file or directory #include <boost/make_unique.hpp>
Seems like Boost's make_unique
feature is in Boost 1.56+
http://www.boost.org/doc/libs/1_56_0/libs/smart_ptr/make_unique.html
I assume your Boost version is older than that?
As a quick and dirty workaround you could just copy the make_unique.hpp
header from a more recent Boost version to /usr/include/boost
or /usr/local/include/boost
or where ever your local Boost installation resides.
The better solution would be to either upgrade your Boost version, or us shipping such a compatibility header. Or just get the dependencies via mason sourcing . ./bootstrap.sh
. Mason is a package manager and ships a set of working dependencies.
(Btw @springmeyer do you think we need some better documentation for this bootstrap.sh
since I can't find it in the Readme)
Closing here as not actionable for us. See my explanation above.