pty.js icon indicating copy to clipboard operation
pty.js copied to clipboard

npm install pty.js` failed on FreeBSD, missing GCEpilogueCallback in V8::Isolate #160

Open olevole opened this issue 9 years ago • 6 comments

Same issue https://github.com/chjj/pty.js/issues/160

But no luck with solution from #160

root@gizmo:/tmp/a # git clone https://github.com/chjj/pty.js.git
Cloning into 'pty.js'...
remote: Counting objects: 1321, done.
remote: Total 1321 (delta 0), reused 0 (delta 0), pack-reused 1321
Receiving objects: 100% (1321/1321), 318.87 KiB | 252.00 KiB/s, done.
Resolving deltas: 100% (559/559), done.
Checking connectivity... done.
root@gizmo:/tmp/a # cd pty.js/
root@gizmo:/tmp/a/pty.js # npm install nan
[email protected] /tmp/a/pty.js
└── [email protected] 
root@gizmo:/tmp/a/pty.js # gmake gyp
node-gyp configure
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | freebsd | x64
gyp info spawn /usr/local/bin/python2
gyp info spawn args [ '/usr/local/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/tmp/a/pty.js/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/root/.node-gyp/6.2.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/root/.node-gyp/6.2.0',
gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=node.lib',
gyp info spawn args   '-Dmodule_root_dir=/tmp/a/pty.js',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info ok 
node-gyp build
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | freebsd | x64
gyp info spawn gmake
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
gmake[1]: Entering directory '/tmp/a/pty.js/build'
  CXX(target) Release/obj.target/pty/src/unix/pty.o
In file included from ../src/unix/pty.cc:20:
../node_modules/nan/nan.h:592:20: error: no type named 'GCEpilogueCallback' in 'v8::Isolate'
      v8::Isolate::GCEpilogueCallback callback
      ~~~~~~~~~~~~~^
../node_modules/nan/nan.h:598:20: error: no type named 'GCEpilogueCallback' in 'v8::Isolate'
      v8::Isolate::GCEpilogueCallback callback) {
      ~~~~~~~~~~~~~^
../node_modules/nan/nan.h:603:20: error: no type named 'GCPrologueCallback' in 'v8::Isolate'
      v8::Isolate::GCPrologueCallback callback
      ~~~~~~~~~~~~~^
../node_modules/nan/nan.h:609:20: error: no type named 'GCPrologueCallback' in 'v8::Isolate'
      v8::Isolate::GCPrologueCallback callback) {
      ~~~~~~~~~~~~~^
4 errors generated.
pty.target.mk:88: recipe for target 'Release/obj.target/pty/src/unix/pty.o' failed
gmake[1]: *** [Release/obj.target/pty/src/unix/pty.o] Error 1
gmake[1]: Leaving directory '/tmp/a/pty.js/build'
gyp ERR! build error 
gyp ERR! stack Error: `gmake` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System FreeBSD 11.0-CURRENT
gyp ERR! command "/usr/local/bin/node" "/usr/local/bin/node-gyp" "build"
gyp ERR! cwd /tmp/a/pty.js
gyp ERR! node -v v6.2.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok 
Makefile:8: recipe for target 'gyp' failed
gmake: *** [gyp] Error 1

olevole avatar May 25 '16 23:05 olevole

~same on fedora

 npm install
npm WARN deprecated [email protected]: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.

> [email protected] install /home/x/pty.js
> node-gyp rebuild

make: Entering directory '/home/x/pty.js/build'
  CXX(target) Release/obj.target/pty/src/unix/pty.o
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) {
       ^
pty.target.mk:88: recipe for target 'Release/obj.target/pty/src/unix/pty.o' failed
make: *** [Release/obj.target/pty/src/unix/pty.o] Error 1
make: Leaving directory '/home/x/pty.js/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Linux 4.4.9-300.fc23.x86_64+debug
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/x/pty.js
gyp ERR! node -v v6.2.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok 

npm ERR! Linux 4.4.9-300.fc23.x86_64+debug
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v6.2.0
npm ERR! npm  v3.8.9
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, 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 information on how to open an issue for this project with:
npm ERR!     npm bugs pty.js
npm ERR! Or if that isn't available, 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/x/pty.js/npm-debug.log

LaKing avatar May 29 '16 14:05 LaKing

So it relates to these:

/* forkpty */
/* http://www.gnu.org/software/gnulib/manual/html_node/forkpty.html */
#if defined(__GLIBC__) || defined(__CYGWIN__)
#include <pty.h>
#elif defined(__APPLE__) || defined(__OpenBSD__) || defined(__NetBSD__)
/**
 * From node v0.10.28 (at least?) there is also a "util.h" in node/src, which would confuse
 * the compiler when looking for "util.h".
 */
#if NODE_VERSION_AT_LEAST(0, 10, 28)
#include </usr/include/util.h>
#else
#include <util.h>
#endif
#elif defined(__FreeBSD__)
#include <libutil.h>
#elif defined(__sun)
#include <stropts.h> /* for I_PUSH */
#else
#include <pty.h>
#endif

LaKing avatar May 29 '16 15:05 LaKing

Seems we need nan 2.3.3.

LaKing avatar May 30 '16 12:05 LaKing

Indeed, nan 2.3.3 fix issue on FreeBSD platform

olevole avatar Jun 01 '16 21:06 olevole

I get the same error message on Arch- seems to be fixed by adding nan 2.3.3. Creating pull request.

npm install
> [email protected] install /home/dbrown/projects/xterm.js/node_modules/pty.js
> node-gyp rebuild

make: Entering directory '/home/dbrown/projects/xterm.js/node_modules/pty.js/build'
  CXX(target) Release/obj.target/pty/src/unix/pty.o
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) {
       ^~
pty.target.mk:88: recipe for target 'Release/obj.target/pty/src/unix/pty.o' failed
make: *** [Release/obj.target/pty/src/unix/pty.o] Error 1
make: Leaving directory '/home/dbrown/projects/xterm.js/node_modules/pty.js/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Linux 4.5.4-1-ARCH
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/dbrown/projects/xterm.js/node_modules/pty.js
gyp ERR! node -v v6.1.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok 
[email protected] /home/dbrown/projects/xterm.js
`-- [email protected]  extraneous

npm ERR! Linux 4.5.4-1-ARCH
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v6.1.0
npm ERR! npm  v3.9.5
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, 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 information on how to open an issue for this project with:
npm ERR!     npm bugs pty.js
npm ERR! Or if that isn't available, 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/dbrown/projects/xterm.js/npm-debug.log

DerekTBrown avatar Jun 08 '16 06:06 DerekTBrown

same here@Arch

npm-debug.txt

keevitaja avatar Jun 24 '16 21:06 keevitaja