node-kexec
node-kexec copied to clipboard
Fail to compile on TravisCI
Tests of nodeos-reverse-proxy on TravisCI fails due to some problem when installing node-kexec
itself:
> [email protected] install /home/travis/build/piranna/nodeos-reverse-proxy/node_modules/kexec
> node-gyp rebuild
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
make: Entering directory `/home/travis/build/piranna/nodeos-reverse-proxy/node_modules/kexec/build'
CXX(target) Release/obj.target/kexec/src/kexec.o
In file included from ../src/kexec.cc:2:0:
/home/travis/.node-gyp/6.1.0/include/node/v8.h:341:1: error: expected unqualified-id before ‘using’
/home/travis/.node-gyp/6.1.0/include/node/v8.h:477:1: error: expected unqualified-id before ‘using’
/home/travis/.node-gyp/6.1.0/include/node/v8.h:871:1: error: expected unqualified-id before ‘using’
../src/kexec.cc:133:23: error: variable or field ‘init’ declared void
../src/kexec.cc:133:23: error: ‘Handle’ was not declared in this scope
../src/kexec.cc:133:36: error: expected primary-expression before ‘>’ token
../src/kexec.cc:133:38: error: ‘target’ was not declared in this scope
../src/kexec.cc:137:5: error: ‘init’ was not declared in this scope
../src/kexec.cc:42:13: warning: ‘void kexec(const v8::FunctionCallbackInfo<v8::Value>&)’ defined but not used [-Wunused-function]
make: *** [Release/obj.target/kexec/src/kexec.o] Error 1
make: Leaving directory `/home/travis/build/piranna/nodeos-reverse-proxy/node_modules/kexec/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/travis/.nvm/versions/node/v6.1.0/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 3.13.0-40-generic
gyp ERR! command "/home/travis/.nvm/versions/node/v6.1.0/bin/node" "/home/travis/.nvm/versions/node/v6.1.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/travis/build/piranna/nodeos-reverse-proxy/node_modules/kexec
gyp ERR! node -v v6.1.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
Maybe should we add some tests to be sure node-kexec
works with latests versions of Node.js?
I have just seen that node-kexec
in fact has some TravisCI based tests... It requires to update the version of gcc, maybe we should update node-kexec
to allow to work with older versions? It's not so complicated to require to have CXX11 features... On the other hand, don't know why TravisCI support Node.js >= 4.x.x and is still using an old version of gcc... :-/
Reviewing the code (and the error output) it has direct references to v8, maybe is it time to update it and use nan
macros?
Reviewing the code (and the error output) it has direct references to v8, maybe is it time to update it and use nan macros?
Sure, sounds good. Any thoughts on how difficult this would be @foysavas?
I don't have almost experience with nan so I can't be able to do it, but definitely I would be a good beta-tester since I use it in several NodeOS projects. El 10/7/2016 17:08, "JP Richardson" [email protected] escribió:
Reviewing the code (and the error output) it has direct references to v8, maybe is it time to update it and use nan macros?
Sure, sounds good. Any thoughts on how difficult this would be @foysavas https://github.com/foysavas?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jprichardson/node-kexec/issues/30#issuecomment-231593769, or mute the thread https://github.com/notifications/unsubscribe/AAgfvv6joctxl6iqf1PvGAtjIDOGxRVoks5qUQr-gaJpZM4JI2R- .
I believe that because of a v8 dependency on modern C++ features, all native add-ons for node >= v4 require gcc >= 4.8.
Switching to nan won't ease this dependency issue during compilation, so for TravisCI, we'll still need to specify that in .travis.yml
files.
It would be a great idea to migrate to nan, however, even if just around where the macros are now, as it would nicely clean up code. I recommend a major version bump and deprecation of support below the current node LTS.
Unfortunately, I don't have any projects currently dependent on node-kexec
, so I'm not the best to work on it at the moment.
I believe that because of a v8 dependency on modern C++ features, all native add-ons for node >= v4 require gcc >= 4.8.
Switching to nan won't ease this dependency issue during compilation, so for TravisCI, we'll still need to specify that in .travis.yml files.
Makes sense, but since there's a lot of other modules working on TravisCI, maybe it's a combination of gcc version and v8 headers that by using nan would get fixed.
It would be a great idea to migrate to nan, however, even if just around where the macros are now, as it would nicely clean up code. I recommend a major version bump and deprecation of support below the current node LTS.
+1 to the major.
Unfortunately, I don't have any projects currently dependent on node-kexec, so I'm not the best to work on it at the moment.
Maybe for the shake of it...? :-D I would do it myself, but I'm a nan noob, specially with the changes they've done with nan2... :-/
"Si quieres viajar alrededor del mundo y ser invitado a hablar en un monton de sitios diferentes, simplemente escribe un sistema operativo Unix." – Linus Tordvals, creador del sistema operativo Linux
@foysavas thanks for taking the time to respond with your thoughts. Very helpful. Totally understand your position as well.
Now on SemaphoreCI I'm getting the next error:
Error: { [Error: spawn /home/runner/.nvm/versions/node/v5.0.0/lib/node_modules/npm/bin/node-gyp-bin/node-gyp EAGAIN]
code: 'EAGAIN',
errno: 'EAGAIN',
syscall: 'spawn /home/runner/.nvm/versions/node/v5.0.0/lib/node_modules/npm/bin/node-gyp-bin/node-gyp',
path: '/home/runner/.nvm/versions/node/v5.0.0/lib/node_modules/npm/bin/node-gyp-bin/node-gyp',
spawnargs: [] }
g++-4.8
is installed and enabled by default :-/
I've managed to migrate node-kexec
to nan
at #31 :-) I hope this can help to fix the build errors. Could you be able to review it? Also I think that if we release a major, maybe we could remove the usage alternative using a shell, what do you think?
It could be good if you config TravisCI to check the pull-requests, since the project already has the config files...