-
Notifications
You must be signed in to change notification settings - Fork 35
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
Build Error on OS X 10.9.3 #17
Comments
Hi Clément, same here for me. Any idea if we should report it to the owner of pty.js as suggested? |
I have the same problem as well. |
Hey, apparently OSX doesn't ship with the relevant headers, and none of us noticed because we have XCode Commandline Tools installed. Look at the solution below for pty.js |
I have command line tools and still have problems with pty.js npm ERR! [email protected] install: npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] install script. npm ERR! This is most likely a problem with the pty.js package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get their info via: npm ERR! npm owner ls pty.js npm ERR! There is likely additional logging output above. npm ERR! System Darwin 13.2.0 npm ERR! command "node" "/usr/local/bin/npm" "install" npm ERR! cwd /private/tmp/luarocks_gfx.js-scm-0-3979/gfx.js npm ERR! node -v v0.10.29 npm ERR! npm -v 1.4.14 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /private/tmp/luarocks_gfx.js-scm-0-3979/gfx.js/npm-debug.log npm ERR! not ok code 0 Thank you for your help. -Andrew On Sat, Jun 28, 2014 at 1:09 PM, Soumith Chintala [email protected]
Andrew Hartnett |
I finally managed to run it on Mac OS X 10.9.3 (Mavericks), Node v0.10.29, npm 1.4.16, node-gyp 0.13.1. I have XCode installed but nevertheless downloaded and installed the Command Line Developer Tools from apple dev website. The compilation error is due to util.h (which declares openpty and forkpty) not being properly included in required pty.js module. So I cloned https://github.com/chjj/pty.js and edited src/unix/pty.cc at line 39 to replace npm install nan npm install extend make then I copied the entire pty.js directory under gfx.js/mode_modules. Then in gfx.js : sudo luarocks make At this point the compile error should be gone. When launching luajit -lgxf.go I had a few critical lua dependencies missing, I installed them with luarocks : sudo luarocks install dok sudo luarocks install lua-cjson Finally ran luajit -lgfx.go which actually loads the torch repl and launches the server on port 8000. |
@lelayf thanks a lot for the investigation, I am going to make this more permanent by sending in a PR that uses your tricks. |
I think it makes more sense to get the pty.js project to fix itself first, but wrt luarocks dependencies, we can do something immediately about it. |
Thank you Francois! Your fix worked for me as well! Cheers, On Mon, Jun 30, 2014 at 10:25 AM, François Le Lay [email protected]
Andrew Hartnett |
Awesome, thanks for the fix. @soumith , we should patch both our repo and do a pr to them. I'm not tracking their changes actually, it's been a while since I merged from their repo. |
I'm new to Torch. This may help others in my position, I followed your instructions almost exactly but I had to change some things: The |
Thanks, @lelayf. I was having the exact same issue and your fix worked. |
combining responsed from @lelayf and @royalstream :
replace
|
Hi, I've tried all the workarounds in this thread and in atom-archive/terminal#28 (comment) but cannot get this to work. Is there going to be an update to the installation to fix these issues instead of trying to hack it to make it work? Thanks |
@ronanmoynihan what error are you seeing? can you try the solution in #22?
|
Hi @vzhong, Yes I tried that. 2 errors generated. |
When trying to run luajit -lgfx.go module.js:340 |
@vzhong Sorry I got it working now. I went over the steps again from @royalstream and @lelayf Thanks. |
Thank you for this wonderful solution! @lelayf |
@lelayf thanks for the fix again, I made a PR to gfx.js that would not need people to manually hack this patch up. |
I still have the same problem. I tried all the workarounds mentioned above but nothing to do : When trying to run luajit -lgfx.go |
@ronanmoynihan How did you do? I've got your same error. |
Can you just try installing gfx again? I fixed it. Just do luarocks install gfx.js |
Still not working. (on Mac OSX) |
I guess I had some problem with nodejs maybe. |
The issue for me was whether command line tools for Xcode are installed or not. Resolved once I did that. |
Hi, is this still an issue in 2016? I am trying to use the t-SNE visualisation here https://github.com/clementfarabet/manifold, which requires gfx.js luarocks install gfx.js gives me a bunch of errors (& warnings). Will I be better off using qlua instead of gfx? firstly, secondly, define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))
../node_modules/nan/nan.h:343:5: error: no member named 'ThrowException' in namespace 'v8' .... ending with thirdly, and finally, npm ERR! [email protected] install: npm ERR! Please include the following file with any support request: |
I tried to install gfx.js with the command
"
sudo luarocks install https://raw.github.com/clementfarabet/gfx.js/master/gfx.js-scm-0.rockspec
"
but it returns with errors:
==> installing Node.js dependencies
CXX(target) Release/obj.target/pty/src/unix/pty.o
../src/unix/pty.cc:487:10: error: use of undeclared identifier 'openpty'
return openpty(amaster, aslave, name, (termios )termp, (winsize *)winp);
^
../src/unix/pty.cc:533:10: error: use of undeclared identifier 'forkpty'
return forkpty(amaster, name, (termios *)termp, (winsize *)winp);
^
2 errors generated.
make: ** [Release/obj.target/pty/src/unix/pty.o] Error 1
gyp ERR! build error
gyp ERR! stack Error:
make
failed with exit code: 2gyp 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.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:809:12)
gyp ERR! System Darwin 13.2.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /private/tmp/luarocks_gfx.js-scm-0-1414/gfx.js/node_modules/pty.js
gyp ERR! node -v v0.10.29
gyp ERR! node-gyp -v v0.13.1
gyp ERR! not ok
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
SOLINK_MODULE(target) Release/bufferutil.node
SOLINK_MODULE(target) Release/bufferutil.node: Finished
CXX(target) Release/obj.target/validation/src/validation.o
SOLINK_MODULE(target) Release/validation.node
SOLINK_MODULE(target) Release/validation.node: Finished
npm ERR! [email protected] install:
node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the pty.js package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls pty.js
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 13.2.0
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /private/tmp/luarocks_gfx.js-scm-0-1414/gfx.js
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /private/tmp/luarocks_gfx.js-scm-0-1414/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/
It was able to work but today when I tried to reinstalled it, it failed...
Thanks!
The text was updated successfully, but these errors were encountered: