romgrk / termrk

Terminal for atom, using pty.js & term.js
MIT License
33 stars 7 forks source link

Rebuild failed! #84

Closed sbrl closed 8 years ago

sbrl commented 8 years ago

I just got this error the other day. It first said

Some installed packages could not be loaded because they contain native modules that were compiled for an earlier version of Atom.

...but if I hit Rebuild Packages, it fails with this error:

In file included from ../src/unix/pty.cc:20:0:
../node_modules/nan/nan.h:592:20: error: variable or field ‘AddGCEpilogueCallback’ declared void
       v8::Isolate::GCEpilogueCallback callback
                    ^
../node_modules/nan/nan.h:592:7: error: ‘GCEpilogueCallback’ is not a member of ‘v8::Isolate’
       v8::Isolate::GCEpilogueCallback callback
       ^
../node_modules/nan/nan.h:593:18: error: expected primary-expression before ‘gc_type_filter’
     , v8::GCType gc_type_filter = v8::kGCTypeAll) {
                  ^
../node_modules/nan/nan.h:598:20: error: variable or field ‘RemoveGCEpilogueCallback’ declared void
       v8::Isolate::GCEpilogueCallback callback) {
                    ^
../node_modules/nan/nan.h:598:7: error: ‘GCEpilogueCallback’ is not a member of ‘v8::Isolate’
       v8::Isolate::GCEpilogueCallback callback) {
       ^
../node_modules/nan/nan.h:603:20: error: variable or field ‘AddGCPrologueCallback’ declared void
       v8::Isolate::GCPrologueCallback callback
                    ^
../node_modules/nan/nan.h:603:7: error: ‘GCPrologueCallback’ is not a member of ‘v8::Isolate’
       v8::Isolate::GCPrologueCallback callback
       ^
../node_modules/nan/nan.h:604:18: error: expected primary-expression before ‘gc_type_filter’
     , v8::GCType gc_type_filter = v8::kGCTypeAll) {
                  ^
../node_modules/nan/nan.h:609:20: error: variable or field ‘RemoveGCPrologueCallback’ declared void
       v8::Isolate::GCPrologueCallback callback) {
                    ^
../node_modules/nan/nan.h:609:7: error: ‘GCPrologueCallback’ is not a member of ‘v8::Isolate’
       v8::Isolate::GCPrologueCallback callback) {
       ^
../src/unix/pty.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE PtyFork(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/unix/pty.cc:222:34: warning: ignoring return value of ‘int chdir(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
       if (strlen(cwd)) chdir(cwd);
                                  ^
make: *** [Release/obj.target/pty/src/unix/pty.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/opt/atom/resources/app/apm/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System Linux 4.2.0-16-generic
gyp ERR! command "node" "/opt/atom/resources/app/apm/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/sbrl/.atom/packages/termrk/node_modules/pty.js
gyp ERR! node -v v0.10.40
gyp ERR! node-gyp -v v2.0.2
gyp ERR! not ok 

npm ERR! Linux 4.2.0-16-generic
npm ERR! argv "/opt/atom/resources/app/apm/bin/node" "/opt/atom/resources/app/apm/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/home/sbrl/.atom/.apm/.apmrc" "--userconfig" "/home/sbrl/.atom/.apmrc" "rebuild" "--target=0.37.8" "--arch=x64"
npm ERR! node v0.10.40
npm ERR! npm  v2.13.3
npm ERR! code ELIFECYCLE
npm ERR! pty.js@0.3.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the pty.js@0.3.0 install script 'node-gyp rebuild'.
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! Please include the following file with any support request:
npm ERR!     /home/sbrl/.atom/packages/termrk/npm-debug.log
romgrk commented 8 years ago

As mentionned in the log, this is an issue with the pty.js module. I'd recommend opening an issue there. Though before make sure you have everything installed properly (Frameworks, compiler, etc)

(Sorry for the brevity of this answer, I get many of this type of issues these days)

romgrk commented 8 years ago

Note: I see in the logs that the pty.js version is 0.3.0. If you are willing to solve it by yourself you could try with pty.js@0.2.x. Basically the apm command-line tool works exactly like npm does. See apm dev -h. Run apm dev Termrk. Modify package.json to use pty.js (maybe the 0.2.7-1 version).

sbrl commented 8 years ago

Frameworks? Compilers? Ummm.....

I think I'll try and find an alternative extension.

ghost commented 8 years ago

Hi @romgrk I've just encountered the same issue and it seems to have been solved in pty.js version 0.3.1 [1]. I got this package to rebuild by simply bumping the version in the package.json and running apm install. As there is now an official release that includes it, it might be beneficial to update the dependency here as well.

[1] https://github.com/chjj/pty.js/issues/164

romgrk commented 8 years ago

Thanks @Gert-dev for the useful feedback :) I have never been able to reproduce this issue, but as it pops up frequently these days, I've updated pty.js@0.3.1 aa6c9c0c845adec5dc9db73e8293b9c09f96bc54, and deployed a patch as version 0.2.6.