Build fail with iojs 3.1.0
Opened this issue · 6 comments
dustinblackman commented
Currently getting an error with iojs 3.1.0 (on Windows 8.1) when trying to install electron-rebuild, and fails at installing nslog.
PS Y:\Git\myapp> npm install electron-rebuild
npm WARN package.json myapp@3.1.0 No license field.
\
> nslog@2.0.0 install Y:\Git\myapp\node_modules\electron-rebuild\node_modules\nslog
> node-gyp rebuild
Y:\Git\myapp\node_modules\electron-rebuild\node_modules\nslog>if not defined npm_config_node_gyp (node "C:\Program Files (x86)\iojs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
main.cc
nslog_win.cc
Y:\Git\myapp\node_modules\electron-rebuild\node_modules\nslog\node_modules\nan\nan.h(262): error C2995: 'v8::Local<T> _NanEnsureLocal(v8::Local<T>)' : function template has a lready been defined (..\src\main.cc) [Y:\Git\myapp\node_modules\electron-rebuild\node_modules\nslog\build\nslog.vcxproj]
Y:\Git\myapp\node_modules\electron-rebuild\node_modules\nslog\node_modules\nan\nan.h(255) : see declaration of '_NanEnsureLocal'
Y:\Git\myapp\node_modules\electron-rebuild\node_modules\nslog\node_modules\nan\nan.h(660): error C3083: 'smalloc': the symbol to the left of a '::' must be a type (..\src\mai n.cc) [Y:\Git\myapp\node_modules\electron-rebuild\node_modules\nslog\build\nslog.vcxproj]
Y:\Git\myapp\node_modules\electron-rebuild\node_modules\nslog\node_modules\nan\nan.h(660): error C2039: 'FreeCallback' : is not a member of 'node' (..\src\main.cc) [Y:\Git\no de-runas\node_modules\electron-rebuild\node_modules\nslog\build\nslog.vcxproj]
Y:\Git\myapp\node_modules\electron-rebuild\node_modules\nslog\node_modules\nan\nan.h(660): error C2061: syntax error : identifier 'FreeCallback' (..\src\main.cc) [Y:\Git\node -runas\node_modules\electron-rebuild\node_modules\nslog\build\nslog.vcxproj]
Y:\Git\myapp\node_modules\electron-rebuild\node_modules\nslog\node_modules\nan\nan.h(664): error C2065: 'callback' : undeclared identifier (..\src\main.cc) [Y:\Git\myapp \node_modules\electron-rebuild\node_modules\nslog\build\nslog.vcxproj]
Y:\Git\myapp\node_modules\electron-rebuild\node_modules\nslog\node_modules\nan\nan.h(664): error C2065: 'hint' : undeclared identifier (..\src\main.cc) [Y:\Git\myapp\nod e_modules\electron-rebuild\node_modules\nslog\build\nslog.vcxproj]
Y:\Git\myapp\node_modules\electron-rebuild\node_modules\nslog\node_modules\nan\nan.h(671): error C2665: 'node::Buffer::New' : none of the 4 overloads could convert all the ar gument types (..\src\main.cc) [Y:\Git\myapp\node_modules\electron-rebuild\node_modules\nslog\build\nslog.vcxproj]
C:\Users\TestMe\.node-gyp\3.1.0\include\node\node_buffer.h(43): could be 'v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate *,char *,size_t)'
C:\Users\TestMe\.node-gyp\3.1.0\include\node\node_buffer.h(31): or 'v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate *,v8::Local<v8::String>,node::encoding
)'
while trying to match the argument list '(v8::Isolate *, const char *, uint32_t)'
Y:\Git\myapp\node_modules\electron-rebuild\node_modules\nslog\node_modules\nan\nan.h(675): error C2664: 'v8::Local<v8::Object>::Local(const v8::Local<v8::Object> &)' : cannot convert argument 1 from 'v8::MaybeLocal<v8::Object>' to 'const v8::Local<v8::Object> &' (..\src\main.cc) [Y:\Git\myapp\node_modules\electron-rebuild\node_modules\nslog\build \nslog.vcxproj]
Reason: cannot convert from 'v8::MaybeLocal<v8::Object>' to 'const v8::Local<v8::Object>'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
Y:\Git\myapp\node_modules\electron-rebuild\node_modules\nslog\node_modules\nan\nan.h(682): error C2039: 'Use' : is not a member of 'node::Buffer' (..\src\main.cc) [Y:\Git\nod e-runas\node_modules\electron-rebuild\node_modules\nslog\build\nslog.vcxproj]
Y:\Git\myapp\node_modules\electron-rebuild\node_modules\nslog\node_modules\nan\nan.h(682): error C3861: 'Use': identifier not found (..\src\main.cc) [Y:\Git\myapp\node_m odules\electron-rebuild\node_modules\nslog\build\nslog.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files (x86)\iojs\node_modules\npm\node_modules\node-gyp\lib\build.js:269:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\\Program Files (x86)\\iojs\\node.exe" "C:\\Program Files (x86)\\iojs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd Y:\Git\myapp\node_modules\electron-rebuild\node_modules\nslog
gyp ERR! node -v v3.1.0
gyp ERR! node-gyp -v v2.0.2
gyp ERR! not ok
kpko commented
Hi,
I get a similar error trying to get nslog running with electron. I can reproduce this by building a new project with electron-prebuilt, electron-rebuild, nslog and then try to run electron-rebuild.
C:\Projects\snom-client>node_modules\.bin\electron-rebuild
> nslog@2.0.0 install C:\Projects\snom-client\node_modules\nslog
> node-gyp rebuild
C:\Projects\snom-client\node_modules\nslog>if not defined npm_config_node_gyp (node "C:\Projects\snom-client\node_modules\electron-rebuild\node_modules\npm
\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild )
main.cc
nslog_win.cc
C:\Projects\snom-client\node_modules\nslog\node_modules\nan\nan.h(262): error C2995: 'v8::Local<T> _NanEnsureLocal(v8::Local<T>)' : function template has a
lready been defined (..\src\main.cc) [C:\Projects\snom-client\node_modules\nslog\build\nslog.vcxproj]
C:\Projects\snom-client\node_modules\nslog\node_modules\nan\nan.h(255) : see declaration of '_NanEnsureLocal'
C:\Projects\snom-client\node_modules\nslog\node_modules\nan\nan.h(660): error C3083: 'smalloc': the symbol to the left of a '::' must be a type (..\src\mai
n.cc) [C:\Projects\snom-client\node_modules\nslog\build\nslog.vcxproj]
C:\Projects\snom-client\node_modules\nslog\node_modules\nan\nan.h(660): error C2039: 'FreeCallback' : is not a member of 'node' (..\src\main.cc) [C:\Projec
ts\snom-client\node_modules\nslog\build\nslog.vcxproj]
C:\Projects\snom-client\node_modules\nslog\node_modules\nan\nan.h(660): error C2061: syntax error : identifier 'FreeCallback' (..\src\main.cc) [C:\Projects
\snom-client\node_modules\nslog\build\nslog.vcxproj]
C:\Projects\snom-client\node_modules\nslog\node_modules\nan\nan.h(664): error C2065: 'callback' : undeclared identifier (..\src\main.cc) [C:\Projects\snom-
client\node_modules\nslog\build\nslog.vcxproj]
C:\Projects\snom-client\node_modules\nslog\node_modules\nan\nan.h(664): error C2065: 'hint' : undeclared identifier (..\src\main.cc) [C:\Projects\snom-clie
nt\node_modules\nslog\build\nslog.vcxproj]
C:\Projects\snom-client\node_modules\nslog\node_modules\nan\nan.h(671): error C2665: 'node::Buffer::New' : none of the 4 overloads could convert all the ar
gument types (..\src\main.cc) [C:\Projects\snom-client\node_modules\nslog\build\nslog.vcxproj]
C:\Projects\snom-client\node_modules\electron-rebuild\lib\headers\.node-gyp\0.31.0\src\node_buffer.h(50): could be 'v8::MaybeLocal<v8::Object> no
de::Buffer::New(v8::Isolate *,char *,size_t)'
C:\Projects\snom-client\node_modules\electron-rebuild\lib\headers\.node-gyp\0.31.0\src\node_buffer.h(38): or 'v8::MaybeLocal<v8::Object> no
de::Buffer::New(v8::Isolate *,v8::Local<v8::String>,node::encoding)'
while trying to match the argument list '(v8::Isolate *, const char *, uint32_t)'
C:\Projects\snom-client\node_modules\nslog\node_modules\nan\nan.h(675): error C2664: 'v8::Local<v8::Object>::Local(const v8::Local<v8::Object> &)' : cannot
convert argument 1 from 'v8::MaybeLocal<v8::Object>' to 'const v8::Local<v8::Object> &' (..\src\main.cc) [C:\Projects\snom-client\node_modules\nslog\build
\nslog.vcxproj]
Reason: cannot convert from 'v8::MaybeLocal<v8::Object>' to 'const v8::Local<v8::Object>'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
C:\Projects\snom-client\node_modules\nslog\node_modules\nan\nan.h(682): error C2039: 'Use' : is not a member of 'node::Buffer' (..\src\main.cc) [C:\Project
s\snom-client\node_modules\nslog\build\nslog.vcxproj]
C:\Projects\snom-client\node_modules\nslog\node_modules\nan\nan.h(682): error C3861: 'Use': identifier not found (..\src\main.cc) [C:\Projects\snom-client\
node_modules\nslog\build\nslog.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Projects\snom-client\node_modules\electron-rebuild\node_modules\npm\node_modules\node-gyp\lib\build.js:269:23
)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "C:\\Projects\\snom-client\\node_modules\\electron-rebuild\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Projects\snom-client\node_modules\nslog
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.2
gyp ERR! not ok
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "node" "C:\\Projects\\snom-client\\node_modules\\electron-rebuild\\node_modules\\npm\\bin\\npm-cli.js" "rebuild" "--target=0.31.0" "--arch=x64"
npm ERR! node v0.12.7
npm ERR! npm v2.14.0
npm ERR! code ELIFECYCLE
npm ERR! nslog@2.0.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nslog@2.0.0 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the nslog 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 nslog
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Projects\snom-client\node_modules\npm-debug.log
Process exited with code: 1
Error: Process exited with code: 1
at ChildProcess.<anonymous> (C:\Projects\snom-client\node_modules\electron-rebuild\lib\spawn.js:53:26)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
ssreekanth commented
@zcbenz nslog is not compatible with 0.31.x either. electron-rebuild is failing..
anaisbetts commented
See the release notes for 0.31.0, all native node modules need to be rewritten for Nan 2.0 - this is on my list.
buddingmonkey commented
+1
ssreekanth commented
@paulcbetts I see that your pull request has been merged. Could you please update dependencies in electron-rebuild's package.json too? I had created an issue for the same.