node-gdal icon indicating copy to clipboard operation
node-gdal copied to clipboard

Complie error on Freebsd10

Open dBitech opened this issue 10 years ago • 0 comments

Same issue as found in gdal See https://trac.osgeo.org/gdal/ticket/5452 or background (and possible solution)

/usr/include/iconv.h:56:8: note: candidate function not viable: no known conversion from 'const char *' to 'char *' for 2nd argument size_t iconv(iconv_t, char ** __restrict, ^ 2 errors generated. deps/libgdal/libgdal.target.mk:636: recipe for target 'Release/obj.target/libgdal/deps/libgdal/gdal/port/cpl_recode_iconv.o' failed gmake: *** [Release/obj.target/libgdal/deps/libgdal/gdal/port/cpl_recode_iconv.o] Error 1 gmake: Leaving directory '/usr/local/src/PGRestAPI-master/node_modules/gdal/build' gyp ERR! build error gyp ERR! stack Error: gmake failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270: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 FreeBSD 10.2-RELEASE-p7 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=/usr/local/src/PGRestAPI-master/node_modules/gdal/lib/binding/gdal.node" "--module_name=gdal" "--module_path=/usr/local/src/PGRestAPI-master/node_modules/gdal/lib/binding" gyp ERR! cwd /usr/local/src/PGRestAPI-master/node_modules/gdal gyp ERR! node -v v4.2.1 gyp ERR! node-gyp -v v3.0.3 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=/usr/local/src/PGRestAPI-master/node_modules/gdal/lib/binding/gdal.node --module_name=gdal --module_path=/usr/local/src/PGRestAPI-master/node_modules/gdal/lib/binding' (1) node-pre-gyp ERR! stack at ChildProcess. (/usr/local/src/PGRestAPI-master/node_modules/gdal/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:818:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5) node-pre-gyp ERR! System FreeBSD 10.2-RELEASE-p7 node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/src/PGRestAPI-master/node_modules/gdal/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd /usr/local/src/PGRestAPI-master/node_modules/gdal node-pre-gyp ERR! node -v v4.2.1 node-pre-gyp ERR! node-pre-gyp -v v0.6.15 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=/usr/local/src/PGRestAPI-master/node_modules/gdal/lib/binding/gdal.node --module_name=gdal --module_path=/usr/local/src/PGRestAPI-master/node_modules/gdal/lib/binding' (1) npm ERR! FreeBSD 10.2-RELEASE-p7 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "gdal" npm ERR! node v4.2.1 npm ERR! npm v2.14.7 npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] install script 'node-pre-gyp install --fallback-to-build'. npm ERR! This is most likely a problem with the gdal 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 their info via: npm ERR! npm owner ls gdal npm ERR! There is likely additional logging output above.

Building against a shared gdal (as per the following) works 100% fine npm install gdal --build-from-source --shared_gdal

dBitech avatar Dec 03 '15 12:12 dBitech