Closed kurepin closed 11 years ago
Thanks for the report. I recently upgraded the bundled sqlite3 version and it looks like it suffers from a bug. So the solution is likely to patch it or roll back a version. Until I have time to do that you can work around the problem by instead building against an external SQLite. Do this by downloading the package manually, installing node-gyp, and passing --sqlite=/usr like described in the README.
Thank you very much!
Do this by downloading the package manually, installing node-gyp, and passing --sqlite=/usr like described in the README.
It works. ;)
@kurepin - researching this more - it appears the compile error only will impact freebsd. Can you try just doing
export _XOPEN_SOURCE=600
npm install sqlite
Let me know if that works around the problem too?
refs: http://www3.sqlite.org/cgi/src/info/61a1045239 and https://code.google.com/p/go-sqlite/source/browse/go1/sqlite3/sqlite3.patch?spec=svn6753f82ad23bba1f307feeb9ede2eb5126106663&r=6753f82ad23bba1f307feeb9ede2eb5126106663
On the same server:
npm cache clean export _XOPEN_SOURCE=600 npm install sqlite3 npm WARN package.json npm-compat@1.0.1 No repository field. npm http GET https://registry.npmjs.org/sqlite3 npm http 200 https://registry.npmjs.org/sqlite3 npm http GET https://registry.npmjs.org/sqlite3/-/sqlite3-2.1.10.tgz npm http 200 https://registry.npmjs.org/sqlite3/-/sqlite3-2.1.10.tgz npm http GET https://registry.npmjs.org/tar.gz npm http 200 https://registry.npmjs.org/tar.gz npm http GET https://registry.npmjs.org/tar.gz/-/tar.gz-0.1.1.tgz npm http 200 https://registry.npmjs.org/tar.gz/-/tar.gz-0.1.1.tgz npm WARN engine tar.gz@0.1.1: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.8","npm":"1.2.28"}) npm http GET https://registry.npmjs.org/fstream npm http GET https://registry.npmjs.org/tar npm http GET https://registry.npmjs.org/commander npm http 200 https://registry.npmjs.org/fstream npm http GET https://registry.npmjs.org/fstream/-/fstream-0.1.22.tgz npm http 200 https://registry.npmjs.org/tar npm http GET https://registry.npmjs.org/tar/-/tar-0.1.17.tgz npm http 200 https://registry.npmjs.org/commander npm http GET https://registry.npmjs.org/commander/-/commander-1.1.1.tgz npm http 200 https://registry.npmjs.org/fstream/-/fstream-0.1.22.tgz npm http 200 https://registry.npmjs.org/tar/-/tar-0.1.17.tgz npm http 200 https://registry.npmjs.org/commander/-/commander-1.1.1.tgz npm http GET https://registry.npmjs.org/rimraf npm http GET https://registry.npmjs.org/mkdirp npm http GET https://registry.npmjs.org/graceful-fs npm http GET https://registry.npmjs.org/inherits npm http GET https://registry.npmjs.org/inherits npm http GET https://registry.npmjs.org/block-stream npm http 200 https://registry.npmjs.org/inherits npm http GET https://registry.npmjs.org/inherits/-/inherits-1.0.0.tgz npm http 200 https://registry.npmjs.org/mkdirp npm http GET https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz npm http 200 https://registry.npmjs.org/inherits npm http 200 https://registry.npmjs.org/graceful-fs npm http GET https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.2.tgz npm http 200 https://registry.npmjs.org/rimraf npm http GET https://registry.npmjs.org/rimraf/-/rimraf-2.1.4.tgz npm http 200 https://registry.npmjs.org/block-stream npm http GET https://registry.npmjs.org/block-stream/-/block-stream-0.0.6.tgz npm http 200 https://registry.npmjs.org/inherits/-/inherits-1.0.0.tgz npm http 200 https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz npm http 200 https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.2.tgz npm http 200 https://registry.npmjs.org/rimraf/-/rimraf-2.1.4.tgz npm http 200 https://registry.npmjs.org/block-stream/-/block-stream-0.0.6.tgz
sqlite3@2.1.10 install /usr/local/lib/node_modules/sqlite3 node-gyp rebuild
gmake: ???? ? ??????? /usr/local/lib/node_modules/sqlite3/build' ACTION binding_gyp_action_before_build_target_unpack_sqlite_dep deps/sqlite-autoconf-3071700/sqlite3.c Extracting... Done! TOUCH Release/obj.target/action_before_build.stamp CC(target) Release/obj.target/sqlite3/deps/sqlite-autoconf-3071700/sqlite3.o ../deps/sqlite-autoconf-3071700/sqlite3.c:23527: error: 'fchmod' undeclared here (not in a function) ../deps/sqlite-autoconf-3071700/sqlite3.c: In function 'porter_stemmer': ../deps/sqlite-autoconf-3071700/sqlite3.c:127209: warning: value computed is not used ../deps/sqlite-autoconf-3071700/sqlite3.c:127213: warning: value computed is not used ../deps/sqlite-autoconf-3071700/sqlite3.c:127226: warning: value computed is not used ../deps/sqlite-autoconf-3071700/sqlite3.c:127231: warning: value computed is not used ../deps/sqlite-autoconf-3071700/sqlite3.c:127237: warning: value computed is not used ../deps/sqlite-autoconf-3071700/sqlite3.c:127242: warning: value computed is not used ../deps/sqlite-autoconf-3071700/sqlite3.c:127251: warning: value computed is not used ../deps/sqlite-autoconf-3071700/sqlite3.c:127258: warning: value computed is not used ../deps/sqlite-autoconf-3071700/sqlite3.c:127301: warning: value computed is not used ../deps/sqlite-autoconf-3071700/sqlite3.c:127321: warning: value computed is not used gmake: *** [Release/obj.target/sqlite3/deps/sqlite-autoconf-3071700/sqlite3.o] ?????? 1 gmake: ????? ?? ????????
/usr/local/lib/node_modules/sqlite3/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/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System FreeBSD 9.0-RELEASE
gyp ERR! command "node" "/usr/local/bin/node-gyp" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/sqlite3
gyp ERR! node -v v0.10.8
gyp ERR! node-gyp -v v0.10.0
gyp ERR! not ok
npm ERR! weird error 1
npm ERR! not ok code 0
okay, thanks for trying. I think for now stick with the workaround of not using the internal build and rather building against external sqlite. I presume this will be fixed in upcoming sqlite3 versions, so I'd appreciate testing once we upgrade.
Okay. Always ready for testing.
closing, planning to upgrade the internal version soon which will fix this: https://github.com/developmentseed/node-sqlite3/issues/207
Freebsd failed to install with can't download sqlite-autoconf-3080403.tar.gz , any workaround for this ?
@Nevering - please create a new issue rather than commenting on a closed issue. When you create that new issue please provide the sqlite3 version you are installing and the full error message.
Ok On Jul 24, 2014, at 3:10 PM, Dane Springmeyer notifications@github.com wrote:
@Nevering - please create a new issue rather than commenting on a closed issue. When you create that new issue please provide the sqlite3 version you are installing and the full error message.
— Reply to this email directly or view it on GitHub.
Trying to locate where to set ENV variable. Or should I deinstall 2.7 and reinstall. Not sure how 2.7 got installed, by something else that needed it prob.
setimmediate
insteadsqlite3@2.2.4 install /usr/local/include/node_modules/sqlite3 node-pre-gyp install --fallback-to-build
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at failNoPython (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:103:14)
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:42:11
gyp ERR! stack at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:43:25)
gyp ERR! stack at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:46:29)
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/which.js:57:16
gyp ERR! stack at Object.oncomplete (evalmachine.node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sqlite3@2.2.4 install script.
npm ERR! This is most likely a problem with the sqlite3 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 sqlite3
npm ERR! There is likely additional logging output above.
npm ERR! System FreeBSD 10.0-RELEASE npm ERR! command "node" "/usr/local/bin/npm" "install" "sqlite3" npm ERR! cwd /usr/local/include npm ERR! node -v v0.10.28 npm ERR! npm -v 1.4.15 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /usr/local/include/npm-debug.log npm ERR! not ok code 0
Hello,
Today catch the problem to (re)install sqlite3 on FreeBSD 9, after usual update ports (two servers, user root):
npm install -g sqlite3
npm http GET https://registry.npmjs.org/sqlite3 npm http 200 https://registry.npmjs.org/sqlite3 npm http GET https://registry.npmjs.org/sqlite3/-/sqlite3-2.1.9.tgz npm http 200 https://registry.npmjs.org/sqlite3/-/sqlite3-2.1.9.tgz npm http GET https://registry.npmjs.org/tar.gz npm http 200 https://registry.npmjs.org/tar.gz npm http GET https://registry.npmjs.org/tar.gz/-/tar.gz-0.1.1.tgz npm http 200 https://registry.npmjs.org/tar.gz/-/tar.gz-0.1.1.tgz npm WARN engine tar.gz@0.1.1: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.8","npm":"1.2.30"}) npm http GET https://registry.npmjs.org/commander npm http GET https://registry.npmjs.org/fstream npm http GET https://registry.npmjs.org/tar npm http 200 https://registry.npmjs.org/tar npm http GET https://registry.npmjs.org/tar/-/tar-0.1.17.tgz npm http 200 https://registry.npmjs.org/fstream npm http GET https://registry.npmjs.org/fstream/-/fstream-0.1.22.tgz npm http 200 https://registry.npmjs.org/commander npm http GET https://registry.npmjs.org/commander/-/commander-1.1.1.tgz npm http 200 https://registry.npmjs.org/tar/-/tar-0.1.17.tgz npm http 200 https://registry.npmjs.org/fstream/-/fstream-0.1.22.tgz npm http 200 https://registry.npmjs.org/commander/-/commander-1.1.1.tgz npm http GET https://registry.npmjs.org/keypress npm http GET https://registry.npmjs.org/rimraf npm http GET https://registry.npmjs.org/mkdirp npm http GET https://registry.npmjs.org/graceful-fs npm http GET https://registry.npmjs.org/inherits npm http GET https://registry.npmjs.org/inherits npm http GET https://registry.npmjs.org/block-stream npm http 200 https://registry.npmjs.org/keypress npm http 200 https://registry.npmjs.org/mkdirp npm http 200 https://registry.npmjs.org/inherits npm http GET https://registry.npmjs.org/keypress/-/keypress-0.1.0.tgz npm http GET https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz npm http GET https://registry.npmjs.org/inherits/-/inherits-1.0.0.tgz npm http 200 https://registry.npmjs.org/graceful-fs npm http GET https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.2.tgz npm http 200 https://registry.npmjs.org/rimraf npm http GET https://registry.npmjs.org/rimraf/-/rimraf-2.1.4.tgz npm http 200 https://registry.npmjs.org/block-stream npm http GET https://registry.npmjs.org/block-stream/-/block-stream-0.0.6.tgz npm http 200 https://registry.npmjs.org/inherits npm http 200 https://registry.npmjs.org/keypress/-/keypress-0.1.0.tgz npm http 200 https://registry.npmjs.org/inherits/-/inherits-1.0.0.tgz npm http 200 https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz npm http 200 https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.2.tgz npm http 200 https://registry.npmjs.org/block-stream/-/block-stream-0.0.6.tgz npm http 200 https://registry.npmjs.org/rimraf/-/rimraf-2.1.4.tgz
gmake: cwd
/usr/local/lib/node_modules/sqlite3/build' ACTION binding_gyp_action_before_build_target_unpack_sqlite_dep deps/sqlite-autoconf-3071700/sqlite3.c Extracting... Done! TOUCH Release/obj.target/action_before_build.stamp CC(target) Release/obj.target/sqlite3/deps/sqlite-autoconf-3071700/sqlite3.o ../deps/sqlite-autoconf-3071700/sqlite3.c:23527: error: 'fchmod' undeclared here (not in a function) ../deps/sqlite-autoconf-3071700/sqlite3.c: In function 'porter_stemmer': ../deps/sqlite-autoconf-3071700/sqlite3.c:127209: warning: value computed is not used ../deps/sqlite-autoconf-3071700/sqlite3.c:127213: warning: value computed is not used ../deps/sqlite-autoconf-3071700/sqlite3.c:127226: warning: value computed is not used ../deps/sqlite-autoconf-3071700/sqlite3.c:127231: warning: value computed is not used ../deps/sqlite-autoconf-3071700/sqlite3.c:127237: warning: value computed is not used ../deps/sqlite-autoconf-3071700/sqlite3.c:127242: warning: value computed is not used ../deps/sqlite-autoconf-3071700/sqlite3.c:127251: warning: value computed is not used ../deps/sqlite-autoconf-3071700/sqlite3.c:127258: warning: value computed is not used ../deps/sqlite-autoconf-3071700/sqlite3.c:127301: warning: value computed is not used ../deps/sqlite-autoconf-3071700/sqlite3.c:127321: warning: value computed is not used gmake: *** [Release/obj.target/sqlite3/deps/sqlite-autoconf-3071700/sqlite3.o] ?????? 1 gmake: ????? ?? ????????
/usr/local/lib/node_modules/sqlite3/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:267:23) gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12) gyp ERR! System FreeBSD 9.0-RELEASE gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /usr/local/lib/node_modules/sqlite3 gyp ERR! node -v v0.10.8 gyp ERR! node-gyp -v v0.10.0 gyp ERR! not ok npm ERR! weird error 1 npm ERR! not ok code 0Can you help me?
P.S. Previous versions was install && work properly.