Complie error on Freebsd10
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.
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