sidecar icon indicating copy to clipboard operation
sidecar copied to clipboard

Cannot build on Windows

Open blink1073 opened this issue 10 years ago • 12 comments
trafficstars

I can npm install on Windows 7, but rebuilding zmq against the electron headers is a no go. I get a ton of syntax errors from the VS project build, and this debug report. Isn't Windows great?

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'build-zmq' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild-zmq', 'build-zmq', 'postbuild-zmq' ]
5 info prebuild-zmq [email protected]
6 info build-zmq [email protected]
7 verbose unsafe-perm in lifecycle true
8 info [email protected] Failed to exec build-zmq script
9 verbose stack Error: [email protected] build-zmq: `cd node_modules/zmq && node-gyp rebuild --target=0.28.1 --arch=x64 --dist-url=https://atom.io/download/atom-shell`
9 verbose stack Exit status 1
9 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:213:16)
9 verbose stack     at EventEmitter.emit (events.js:110:17)
9 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
9 verbose stack     at ChildProcess.emit (events.js:110:17)
9 verbose stack     at maybeClose (child_process.js:1015:16)
9 verbose stack     at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
10 verbose pkgid [email protected]
11 verbose cwd c:\Users\builder\jupyter-sidecar
12 error Windows_NT 6.1.7601
13 error argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build-zmq"
14 error node v0.12.4
15 error npm  v2.10.1
16 error code ELIFECYCLE
17 error [email protected] build-zmq: `cd node_modules/zmq && node-gyp rebuild --target=0.28.1 --arch=x64 --dist-url=https://atom.io/download/atom-shell`
17 error Exit status 1
18 error Failed at the [email protected] build-zmq script 'cd node_modules/zmq && node-gyp rebuild --target=0.28.1 --arch=x64 --dist-url=https://atom.io/download/atom-shell'.
18 error This is most likely a problem with the jupyter-sidecar package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error     cd node_modules/zmq && node-gyp rebuild --target=0.28.1 --arch=x64 --dist-url=https://atom.io/download/atom-shell
18 error You can get their info via:
18 error     npm owner ls jupyter-sidecar
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]

blink1073 avatar Jun 17 '15 15:06 blink1073

Couple prerequisities to make sure are on Windows:

  • node-gyp needs to have access to Python 2, with a named python executable though there is a way to point node gyp to an alternative Python
  • zeromq headers for Windows

rgbkrk avatar Jun 17 '15 15:06 rgbkrk

Yeah, I can build zmq just fine, just not the second time around.

blink1073 avatar Jun 17 '15 15:06 blink1073

What happens when you cd to the zmq folder and run the electron build step:

HOME=~/.electron-gyp node-gyp rebuild --target=0.25.0 --arch=ia64 --dist-url=https://atom.io/download/atom-shell

Though I guess that HOME var would have to change to be Windowsy?

rgbkrk avatar Jun 17 '15 15:06 rgbkrk

gyp ERR! build error gyp ERR! stack Error: ENOENT, open 'C:\Users\builder.node-gyp\0.25.0\ia64\node. lib' gyp ERR! stack at Error (native) gyp ERR! System Windows_NT 6.1.7601 gyp ERR! command "node" "C:\Users\builder\AppData\Roaming\npm\node_modules \node-gyp\bin\node-gyp.js" "rebuild" "--target=0.25.0" "--arch=ia64" "--dist- url=https://atom.io/download/atom-shell" gyp ERR! cwd c:\Users\builder\jupyter-sidecar\node_modules\zmq gyp ERR! node -v v0.12.4 gyp ERR! node-gyp -v v2.0.1 gyp ERR! not ok

blink1073 avatar Jun 17 '15 17:06 blink1073

crap, just realized that ~ is not a valid path, let me try again

blink1073 avatar Jun 17 '15 17:06 blink1073

If this next try doesn't help, it would be good to try a later version of node (e.g. iojs), though... it should be using Electron's node there...

rgbkrk avatar Jun 17 '15 17:06 rgbkrk

I used v0.12.4

blink1073 avatar Jun 17 '15 17:06 blink1073

I wish we had node-zmq packaged as beautifully as pyzmq.

rgbkrk avatar Jun 17 '15 17:06 rgbkrk

Forever an issue.

rgbkrk avatar Jun 26 '15 20:06 rgbkrk

Can't they just start over from FreeBSD and save us all from misery?

blink1073 avatar Jun 26 '15 20:06 blink1073

Is this still true @rgbkrk, didn't you release your own Windows compatible binary for this?

blink1073 avatar Mar 11 '17 15:03 blink1073

Ha, yes this can be closed so thoroughly once we switch to zeromq. We ship prebuilds for all recent versions of Electron and node across Linux, macOS, and Windows.

rgbkrk avatar Mar 11 '17 16:03 rgbkrk