Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build sqlite for building for node-webkit #329

Closed
kiranps opened this issue Aug 13, 2014 · 8 comments
Closed

Unable to build sqlite for building for node-webkit #329

kiranps opened this issue Aug 13, 2014 · 8 comments

Comments

@kiranps
Copy link

kiranps commented Aug 13, 2014

I'm using
ubuntu 14.04
node-webkit v0.9.2
node.js v0.11.9
Chromium 32.0.1700.107

sudo npm install sqlite3 --build-from-source --runtime=node-webkit --target_arch=x64 --target=$NODE_WEBKIT_VERSION6
npm WARN deprecated set-immediate@0.1.1: Use setimmediate instead

sqlite3@2.2.7 install /tmp/sqlite/node_modules/sqlite3
node-pre-gyp install --fallback-to-build

gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: 407 status code downloading tarball
gyp ERR! stack at Request. (/usr/lib/node_modules/nw-gyp/lib/install.js:234:14)
gyp ERR! stack at Request.EventEmitter.emit (events.js:117:20)
gyp ERR! stack at Request.onResponse (/usr/lib/node_modules/nw-gyp/node_modules/request/request.js:986:10)
gyp ERR! stack at ClientRequest.g (events.js:180:16)
gyp ERR! stack at ClientRequest.EventEmitter.emit (events.js:95:17)
gyp ERR! stack at HTTPParser.parserOnIncomingClient (http.js:1688:21)
gyp ERR! stack at HTTPParser.parserOnHeadersComplete as onHeadersComplete
gyp ERR! stack at Socket.socketOnData (http.js:1583:20)
gyp ERR! stack at TCP.onread (net.js:525:27)
gyp ERR! System Linux 3.13.0-32-generic
gyp ERR! command "node" "/usr/bin/nw-gyp" "rebuild" "--name=sqlite3" "--configuration=Release" "--module_name=node_sqlite3" "--version=2.2.7" "--major=2" "--minor=2" "--patch=7" "--runtime=node-webkit" "--node_abi=node-webkit-v11" "--platform=linux" "--target_platform=linux" "--arch=x64" "--target_arch=x64" "--module_main=./lib/sqlite3" "--host=https://mapbox-node-binary.s3.amazonaws.com/" "--module_path=/tmp/sqlite/node_modules/sqlite3/lib/binding/node-webkit-v11-linux-x64" "--remote_path=./sqlite3/v2.2.7/" "--package_name=node-webkit-v11-linux-x64.tar.gz" "--staged_tarball=build/stage/sqlite3/v2.2.7/node-webkit-v11-linux-x64.tar.gz" "--hosted_path=https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v2.2.7/" "--hosted_tarball=https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v2.2.7/node-webkit-v11-linux-x64.tar.gz"
gyp ERR! cwd /tmp/sqlite/node_modules/sqlite3
gyp ERR! node -v v0.10.25
gyp ERR! nw-gyp -v v0.12.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'nw-gyp rebuild --name=sqlite3 --configuration=Release --module_name=node_sqlite3 --version=2.2.7 --major=2 --minor=2 --patch=7 --runtime=node-webkit --node_abi=node-webkit-v11 --platform=linux --target_platform=linux --arch=x64 --target_arch=x64 --module_main=./lib/sqlite3 --host=https://mapbox-node-binary.s3.amazonaws.com/ --module_path=/tmp/sqlite/node_modules/sqlite3/lib/binding/node-webkit-v11-linux-x64 --remote_path=./sqlite3/v2.2.7/ --package_name=node-webkit-v11-linux-x64.tar.gz --staged_tarball=build/stage/sqlite3/v2.2.7/node-webkit-v11-linux-x64.tar.gz --hosted_path=https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v2.2.7/ --hosted_tarball=https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v2.2.7/node-webkit-v11-linux-x64.tar.gz' (1)
node-pre-gyp ERR! stack at ChildProcess. (/tmp/sqlite/node_modules/sqlite3/node_modules/node-pre-gyp/lib/util/compile.js:76:29)
node-pre-gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
node-pre-gyp ERR! stack at maybeClose (child_process.js:743:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:5)
node-pre-gyp ERR! System Linux 3.13.0-32-generic
node-pre-gyp ERR! command "node" "/tmp/sqlite/node_modules/sqlite3/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /tmp/sqlite/node_modules/sqlite3
node-pre-gyp ERR! node -v v0.10.25
node-pre-gyp ERR! node-pre-gyp -v v0.5.22
node-pre-gyp ERR! not ok
Failed to execute 'nw-gyp rebuild --name=sqlite3 --configuration=Release --module_name=node_sqlite3 --version=2.2.7 --major=2 --minor=2 --patch=7 --runtime=node-webkit --node_abi=node-webkit-v11 --platform=linux --target_platform=linux --arch=x64 --target_arch=x64 --module_main=./lib/sqlite3 --host=https://mapbox-node-binary.s3.amazonaws.com/ --module_path=/tmp/sqlite/node_modules/sqlite3/lib/binding/node-webkit-v11-linux-x64 --remote_path=./sqlite3/v2.2.7/ --package_name=node-webkit-v11-linux-x64.tar.gz --staged_tarball=build/stage/sqlite3/v2.2.7/node-webkit-v11-linux-x64.tar.gz --hosted_path=https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v2.2.7/ --hosted_tarball=https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v2.2.7/node-webkit-v11-linux-x64.tar.gz' (1)
npm ERR! sqlite3@2.2.7 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sqlite3@2.2.7 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 Linux 3.13.0-32-generic
npm ERR! command "node" "/usr/local/bin/npm" "install" "sqlite3" "--build-from-source" "--runtime=node-webkit" "--target_arch=x64" "--target="
npm ERR! cwd /tmp/sqlite
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.23
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /tmp/sqlite/npm-debug.log
npm ERR! not ok code 0

@Mithgol
Copy link
Contributor

Mithgol commented Sep 15, 2014

It was decided that sqlite3 module won't support Node.js v0.11.x branch below v0.11.13.

If you need sqlite3 module in Node.js v0.11.x, upgrade your Node v0.11.9 to the version v0.11.13 or newer. (For node-webkit it means that you should use node-webkit v0.10.x instead of node-webkit v0.9.x.)

It has the following reason: the nan module (used by sqlite3 as a dependency) does not support Node.js v0.11.x branch below v0.11.13 since May 2014.

@Mithgol Mithgol closed this as completed Sep 15, 2014
@Mithgol
Copy link
Contributor

Mithgol commented Sep 15, 2014

P. S.   Sorry for the late reply.

@arunkabraham
Copy link

Can someone build sqlite3 module for nodewebkit 0.8.6 and share me. I am totally stuck at this position. Tried to build from source but getting error on top of error. Please build it and share to arunk2005@gmail.com

Node version : 0.10.29
Nodewebkit version : 0.8.6

@Mithgol
Copy link
Contributor

Mithgol commented Oct 13, 2014

Replied at #328 (comment)

@Karlheinzniebuhr
Copy link

same issue here..


[1786:0831/210744:ERROR:nw_shell.cc(336)] Error: Cannot find module '/Users/Karl/Documents/Dev/javascript/internetPatrol/node_modules/sqlite3/lib/binding/node-webkit-v0.12.3-darwin-x64/node_sqlite3.node'
    at Function.Module._resolveFilename (module.js:327:15)
    at Function.Module._load (module.js:264:25)
    at Module.require (module.js:356:17)
    at require (module.js:375:17)
    at Object. (/Users/Karl/Documents/Dev/javascript/internetPatrol/node_modules/sqlite3/lib/sqlite3.js:4:15)
    at Module._compile (module.js:451:26)
    at Object.Module._extensions..js (module.js:469:10)
    at Module.load (module.js:346:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:356:17)
[1786:0831/210744:INFO:CONSOLE(329)] "Uncaught Error: Cannot find module '/Users/Karl/Documents/Dev/javascript/internetPatrol/node_modules/sqlite3/lib/binding/node-webkit-v0.12.3-darwin-x64/node_sqlite3.node'", source: module.js (329)

@Mithgol
Copy link
Contributor

Mithgol commented Sep 1, 2015

@Karlheinzniebuhr Have there been any errors while running npm install sqlite3 --runtime=node-webkit --target_arch=x64 --target=0.12.3?

@Karlheinzniebuhr
Copy link

this is the output I got


Karlheinzs-MacBook-Pro:internetPatrol Karl$ npm install sqlite3 --runtime=node-webkit --target_arch=x64 --target=0.12.3
npm WARN package.json Internet-Patrol@1.0.0 No repository field.
npm WARN package.json Internet-Patrol@1.0.0 No README data
\
> sqlite3@3.0.10 install /Users/Documents/Dev/javascript/internetPatrol/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build
child_process: customFds option is deprecated, use stdio instead.
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
child_process: customFds option is deprecated, use stdio instead.
  ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3081101/sqlite3.c
  TOUCH Release/obj.target/deps/action_before_build.stamp
  CC(target) Release/obj.target/sqlite3/gen/sqlite-autoconf-3081101/sqlite3.o
Release/obj/gen/sqlite-autoconf-3081101/sqlite3.c:9117:26: warning: unused variable 'sqlite3one' [-Wunused-const-variable]
SQLITE_PRIVATE const int sqlite3one = 1;
                         ^
1 warning generated.
  LIBTOOL-STATIC Release/sqlite3.a
  CXX(target) Release/obj.target/node_sqlite3/src/database.o
../src/database.cc:145:9: warning: unused variable 'status' [-Wunused-variable]
    int status = uv_queue_work(uv_default_loop(),
        ^
../src/database.cc:230:9: warning: unused variable 'status' [-Wunused-variable]
    int status = uv_queue_work(uv_default_loop(),
        ^
../src/database.cc:509:9: warning: unused variable 'status' [-Wunused-variable]
    int status = uv_queue_work(uv_default_loop(),
        ^
../src/database.cc:610:9: warning: unused variable 'status' [-Wunused-variable]
    int status = uv_queue_work(uv_default_loop(),
        ^
4 warnings generated.
  CXX(target) Release/obj.target/node_sqlite3/src/node_sqlite3.o
  CXX(target) Release/obj.target/node_sqlite3/src/statement.o
../src/statement.cc:120:9: warning: unused variable 'status' [-Wunused-variable]
    int status = uv_queue_work(uv_default_loop(),
        ^
../src/statement.cc:324:5: warning: unused variable 'status' [-Wunused-variable]
    STATEMENT_BEGIN(Bind);
    ^
../src/macros.h:122:9: note: expanded from macro 'STATEMENT_BEGIN'
    int status = uv_queue_work(uv_default_loop(),                              \
        ^
../src/statement.cc:372:5: warning: unused variable 'status' [-Wunused-variable]
    STATEMENT_BEGIN(Get);
    ^
../src/macros.h:122:9: note: expanded from macro 'STATEMENT_BEGIN'
    int status = uv_queue_work(uv_default_loop(),                              \
        ^
../src/statement.cc:440:5: warning: unused variable 'status' [-Wunused-variable]
    STATEMENT_BEGIN(Run);
    ^
../src/macros.h:122:9: note: expanded from macro 'STATEMENT_BEGIN'
    int status = uv_queue_work(uv_default_loop(),                              \
        ^
../src/statement.cc:506:5: warning: unused variable 'status' [-Wunused-variable]
    STATEMENT_BEGIN(All);
    ^
../src/macros.h:122:9: note: expanded from macro 'STATEMENT_BEGIN'
    int status = uv_queue_work(uv_default_loop(),                              \
        ^
../src/statement.cc:603:5: warning: unused variable 'status' [-Wunused-variable]
    STATEMENT_BEGIN(Each);
    ^
../src/macros.h:122:9: note: expanded from macro 'STATEMENT_BEGIN'
    int status = uv_queue_work(uv_default_loop(),                              \
        ^
../src/statement.cc:725:5: warning: unused variable 'status' [-Wunused-variable]
    STATEMENT_BEGIN(Reset);
    ^
../src/macros.h:122:9: note: expanded from macro 'STATEMENT_BEGIN'
    int status = uv_queue_work(uv_default_loop(),                              \
        ^
7 warnings generated.
  SOLINK_MODULE(target) Release/node_sqlite3.node
  SOLINK_MODULE(target) Release/node_sqlite3.node: Finished
  COPY /Users/Documents/Dev/javascript/internetPatrol/node_modules/sqlite3/lib/binding/node-webkit-v0.12.3-darwin-x64/node_sqlite3.node
  TOUCH Release/obj.target/action_after_build.stamp
sqlite3@3.0.10 node_modules/sqlite3
└── nan@1.8.4

@Karlheinzniebuhr
Copy link

Now it seems to work, many thanks @Mithgol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants