tyrasd / osmtogeojson

convert osm to geojson
http://tyrasd.github.io/osmtogeojson/
MIT License
683 stars 112 forks source link

Failed to install: fatal error: 'boost/variant.hpp' file not found #99

Closed stevage closed 6 years ago

stevage commented 6 years ago

Trying to install on OSX Sierra, I get this:

$ npm install osm2geojson

> osmium@0.4.5 install /Users/stevebennett/.../node_modules/osmium
> node-pre-gyp install --fallback-to-build

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

  CXX(target) Release/obj.target/osmium/src/apply.o
../src/apply.cpp:3:10: fatal error: 'boost/variant.hpp' file not found
#include <boost/variant.hpp>
         ^
1 error generated.
make: *** [Release/obj.target/osmium/src/apply.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:225:12)
gyp ERR! System Darwin 16.6.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/stevebennett/.../node_modules/osmium/lib/binding/osmium.node" "--module_name=osmium" "--module_path=/Users/stevebennett/.../node_modules/osmium/lib/binding"
gyp ERR! cwd /Users/stevebennett/.../node_modules/osmium
gyp ERR! node -v v10.0.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/stevebennett/.../node_modules/osmium/lib/binding/osmium.node --module_name=osmium --module_path=/Users/stevebennett/.../node_modules/osmium/lib/binding' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/stevebennett/.../node_modules/osmium/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:947:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:236:5)
node-pre-gyp ERR! System Darwin 16.6.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/stevebennett/.../node_modules/osmium/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/stevebennett/.../node_modules/osmium
node-pre-gyp ERR! node -v v10.0.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.21
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/stevebennett/.../node_modules/osmium/lib/binding/osmium.node --module_name=osmium --module_path=/Users/stevebennett/.../node_modules/osmium/lib/binding' (1)
npm WARN cycletour-content@1.0.0 No description
npm WARN cycletour-content@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! osmium@0.4.5 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the osmium@0.4.5 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/stevebennett/.npm/_logs/2018-08-23T22_55_09_270Z-debug.log

I gather that the warning about command-line tools for Xcode can be ignored. But I don't know how to solve the issue with the missing C++ header file?

stevage commented 6 years ago

Whoops, I see I was installing osm2geojson not osmtogeojson. heh.