clementfarabet / gfx.js

A graphics backend for the browser (with a Torch7 client).
MIT License
125 stars 35 forks source link

Installation error in Arch linux #25

Open JimBee opened 10 years ago

JimBee commented 10 years ago

I'm getting an error when trying to install gfx.js on Arch linux. The trace it looks like the install doesn't like Arch:

Using https://raw.github.com/clementfarabet/gfx.js/master/gfx.js-scm-0.rockspec... switching to 'build' mode Cloning into 'gfx.js'... remote: Counting objects: 249, done. remote: Compressing objects: 100% (177/177), done. remote: Total 249 (delta 72), reused 175 (delta 61) Receiving objects: 100% (249/249), 5.41 MiB | 857.00 KiB/s, done. Resolving deltas: 100% (72/72), done. Checking connectivity... done. ls LICENSE bin gfx.js-scm-0.rockspec index.js install.sh package.json static README.md clients img install-python.sh lib server.js templates bash install.sh ==> installing Node.js dependencies npm ERR! notsup Unsupported npm ERR! notsup Not compatible with your operating system or architecture: fsevents@0.2.0 npm ERR! notsup Valid OS: darwin npm ERR! notsup Valid Arch: any npm ERR! notsup Actual OS: linux npm ERR! notsup Actual Arch: x64

npm ERR! System Linux 3.16.1-1-ARCH npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" npm ERR! cwd /tmp/luarocks_gfx.js-scm-0-1351/gfx.js npm ERR! node -v v0.10.31 npm ERR! npm -v 1.4.27 npm ERR! code EBADPLATFORM

pty.js@0.2.4 install /tmp/luarocks_gfx.js-scm-0-1351/gfx.js/node_modules/pty.js node-gyp rebuild

make: Entering directory '/tmp/luarocks_gfx.js-scm-0-1351/gfx.js/node_modules/pty.js/build' CXX(target) Release/obj.target/pty/src/unix/pty.o SOLINK_MODULE(target) Release/obj.target/pty.node SOLINK_MODULE(target) Release/obj.target/pty.node: Finished COPY Release/pty.node make: Leaving directory '/tmp/luarocks_gfx.js-scm-0-1351/gfx.js/node_modules/pty.js/build'

ws@0.4.31 install /tmp/luarocks_gfx.js-scm-0-1351/gfx.js/node_modules/socket.io/node_modules/engine.io/node_modules/ws (node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory '/tmp/luarocks_gfx.js-scm-0-1351/gfx.js/node_modules/socket.io/node_modules/engine.io/node_modules/ws/build' CXX(target) Release/obj.target/bufferutil/src/bufferutil.o SOLINK_MODULE(target) Release/obj.target/bufferutil.node SOLINK_MODULE(target) Release/obj.target/bufferutil.node: Finished COPY Release/bufferutil.node CXX(target) Release/obj.target/validation/src/validation.o SOLINK_MODULE(target) Release/obj.target/validation.node SOLINK_MODULE(target) Release/obj.target/validation.node: Finished COPY Release/validation.node make: Leaving directory '/tmp/luarocks_gfx.js-scm-0-1351/gfx.js/node_modules/socket.io/node_modules/engine.io/node_modules/ws/build'

ws@0.4.31 install /tmp/luarocks_gfx.js-scm-0-1351/gfx.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws (node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory '/tmp/luarocks_gfx.js-scm-0-1351/gfx.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/build' CXX(target) Release/obj.target/bufferutil/src/bufferutil.o SOLINK_MODULE(target) Release/obj.target/bufferutil.node SOLINK_MODULE(target) Release/obj.target/bufferutil.node: Finished COPY Release/bufferutil.node CXX(target) Release/obj.target/validation/src/validation.o SOLINK_MODULE(target) Release/obj.target/validation.node SOLINK_MODULE(target) Release/obj.target/validation.node: Finished COPY Release/validation.node make: Leaving directory '/tmp/luarocks_gfx.js-scm-0-1351/gfx.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/build' npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /tmp/luarocks_gfx.js-scm-0-1351/gfx.js/npm-debug.log npm ERR! not ok code 0 ==> installing static resources into ~/.gfx.js/ ==> installing torch client into /usr/local/bin/../share/lua/5.1/gfx/ ==> Torch client installed globally, run me like this: $ luajit -lgfx.start or $ luajit -lgfx.go (this will start the gfx server automatically) gfx command-line binary installed. Use it to display images quickly $ gfx test.jpg Warning: Directory 'doc' not found Updating manifest for /usr/local/lib/luarocks/rocks

gfx.js scm-0 is now built and installed in /usr/local/ (license: MIT)

lendle commented 10 years ago

I'm also on Arch. I'm getting a different error, but I'll report it here instead of opening a new issue.

==> installing Node.js dependencies

> pty.js@0.2.4 install /tmp/luarocks_gfx.js-scm-0-1584/gfx.js/node_modules/pty.js
> node-gyp rebuild

gyp ERR! configure error 
gyp ERR! stack Error: Python executable "python" is v3.4.1, which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
gyp ERR! stack     at failPythonVersion (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:108:14)
gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:97:9
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:646:7)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at maybeClose (child_process.js:756:16)
gyp ERR! stack     at Socket.<anonymous> (child_process.js:969:11)
gyp ERR! stack     at Socket.emit (events.js:95:17)
gyp ERR! stack     at Pipe.close (net.js:465:12)
gyp ERR! System Linux 3.15.3-1-ARCH
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /tmp/luarocks_gfx.js-scm-0-1584/gfx.js/node_modules/pty.js
gyp ERR! node -v v0.10.32
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok 

> ws@0.4.31 install /tmp/luarocks_gfx.js-scm-0-1584/gfx.js/node_modules/socket.io/node_modules/engine.io/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

> ws@0.4.31 install /tmp/luarocks_gfx.js-scm-0-1584/gfx.js/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

npm ERR! Linux 3.15.3-1-ARCH
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v0.10.32
npm ERR! npm  v2.1.0
npm ERR! code EBADPLATFORM

npm ERR! notsup Unsupported
npm ERR! notsup Not compatible with your operating system or architecture: fsevents@0.2.0
npm ERR! notsup Valid OS:    darwin
npm ERR! notsup Valid Arch:  any
npm ERR! notsup Actual OS:   linux
npm ERR! notsup Actual Arch: x64

npm ERR! Please include the following file with any support request:
npm ERR!     /tmp/luarocks_gfx.js-scm-0-1584/gfx.js/npm-debug.log
==> installing static resources into ~/.gfx.js/
==> installing torch client into /home/sam/local/bin/../share/lua/5.1/gfx/
==> Torch client installed globally, run me like this:
$ luajit -lgfx.start
or
$ luajit -lgfx.go
(this will start the gfx server automatically)
gfx command-line binary installed. Use it to display images quickly
$ gfx test.jpg
Warning: Directory 'doc' not found
Updating manifest for /home/sam/local/lib/luarocks/rocks

The file /tmp/luarocks_gfx.js-scm-0-1584/gfx.js/npm-debug.log is empty.

$ python --version reports 3.4.1.

szym commented 10 years ago

@lendle My workaround for most things that can only work with python2 on Arch is to put this simple script early in my PATH:

#!/bin/bash
# Default to /usr/bin/python unless PYTHON is defined
${PYTHON:-/usr/bin/python} "$@"

Then PYTHON=python2 luarocks install gfx.js.