Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Build fails on Windows with Electron >0.37.0 #13

Open
gnail opened this issue Apr 28, 2016 · 2 comments
Open

Build fails on Windows with Electron >0.37.0 #13

gnail opened this issue Apr 28, 2016 · 2 comments
Labels

Comments

@gnail
Copy link

gnail commented Apr 28, 2016

I'm running on Node 5.10.1 (aligned with Electron 0.37), MSVS2013 and it doesn't build when I try to build it with Electron headers:

> node-gyp rebuild --target=0.37.7 -dist-url=https://atom.io/download/atom-shell
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | ia32
gyp info spawn C:\Users\user\Desktop\WinPython-64bit-2.7.9.5\python-2.7.9.amd64\python.EXE
gyp info spawn args [ 'C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'msvs',
gyp info spawn args   '-G',
gyp info spawn args   'msvs_version=auto',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\user\\Desktop\\project\\node_modules\\nslog\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\user\\.node-gyp\\0.37.7\\common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=C:\\Users\\user\\.node-gyp\\0.37.7',
gyp info spawn args   '-Dnode_gyp_dir=C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\node-gyp',
gyp info spawn args   '-Dnode_lib_file=node.lib',
gyp info spawn args   '-Dmodule_root_dir=C:\\Users\\user\\Desktop\\project\\node_modules\\nslog',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'C:\\Users\\user\\Desktop\\project\\node_modules\\nslog\\build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info spawn C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe
gyp info spawn args [ 'build/binding.sln',
gyp info spawn args   '/clp:Verbosity=minimal',
gyp info spawn args   '/nologo',
gyp info spawn args   '/p:Configuration=Release;Platform=Win32' ]
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  main.cc
  nslog_win.cc
C:\Users\user\Desktop\project\node_modules\nan\nan.h(602): error C2039: 'GCEpilogueCallback' : is not a member of 'v8::Isolate' (. .\src\main.cc) [C:\Users\user\Desktop\project\node_modules\nslog\build\nslog.vcxproj]
          C:\Users\user\.node-gyp\0.37.7\deps\v8\include\v8.h(5281) : see declaration of 'v8::Isolate'
C:\Users\user\Desktop\project\node_modules\nan\nan.h(602): error C2065: 'GCEpilogueCallback' : undeclared identifier (..\src\main. cc) [C:\Users\user\Desktop\project\node_modules\nslog\build\nslog.vcxproj]
C:\Users\user\Desktop\project\node_modules\nan\nan.h(603): error C2146: syntax error : missing ')' before identifier 'callback' (. .\src\main.cc) [C:\Users\user\Desktop\project\node_modules\nslog\build\nslog.vcxproj]
C:\Users\user\Desktop\project\node_modules\nan\nan.h(603): error C2182: 'AddGCEpilogueCallback' : illegal use of type 'void' (..\s rc\main.cc) [C:\Users\user\Desktop\project\node_modules\nslog\build\nslog.vcxproj]
C:\Users\user\Desktop\project\node_modules\nan\nan.h(603): error C2433: 'AddGCEpilogueCallback' : '__forceinline' not permitted on  data declarations (..\src\main.cc) [C:\Users\user\Desktop\project\node_modules\nslog\build\nslog.vcxproj]
C:\Users\user\Desktop\project\node_modules\nan\nan.h(603): error C2059: syntax error : ')' (..\src\main.cc) [C:\Users\user\Desk top\project\node_modules\nslog\build\nslog.vcxproj]
C:\Users\user\Desktop\project\node_modules\nan\nan.h(603): error C2143: syntax error : missing ';' before '{' (..\src\main.cc) [C: \Users\user\Desktop\project\node_modules\nslog\build\nslog.vcxproj]
C:\Users\user\Desktop\project\node_modules\nan\nan.h(603): error C2447: '{' : missing function header (old-style formal list?) (.. \src\main.cc) [C:\Users\user\Desktop\project\node_modules\nslog\build\nslog.vcxproj]
C:\Users\user\Desktop\project\node_modules\nan\nan.h(608): error C2039: 'GCEpilogueCallback' : is not a member of 'v8::Isolate' (. .\src\main.cc) [C:\Users\user\Desktop\project\node_modules\nslog\build\nslog.vcxproj]
          C:\Users\user\.node-gyp\0.37.7\deps\v8\include\v8.h(5281) : see declaration of 'v8::Isolate'
C:\Users\user\Desktop\project\node_modules\nan\nan.h(608): error C2065: 'GCEpilogueCallback' : undeclared identifier (..\src\main. cc) [C:\Users\user\Desktop\project\node_modules\nslog\build\nslog.vcxproj]
C:\Users\user\Desktop\project\node_modules\nan\nan.h(608): error C2146: syntax error : missing ')' before identifier 'callback' (. .\src\main.cc) [C:\Users\user\Desktop\project\node_modules\nslog\build\nslog.vcxproj]
C:\Users\user\Desktop\project\node_modules\nan\nan.h(608): error C2182: 'RemoveGCEpilogueCallback' : illegal use of type 'void' (. .\src\main.cc) [C:\Users\user\Desktop\project\node_modules\nslog\build\nslog.vcxproj]
C:\Users\user\Desktop\project\node_modules\nan\nan.h(608): error C2433: 'RemoveGCEpilogueCallback' : '__forceinline' not permitted  on data declarations (..\src\main.cc) [C:\Users\user\Desktop\project\node_modules\nslog\build\nslog.vcxproj]
C:\Users\user\Desktop\project\node_modules\nan\nan.h(608): error C2059: syntax error : ')' (..\src\main.cc) [C:\Users\user\Desk top\project\node_modules\nslog\build\nslog.vcxproj]
C:\Users\user\Desktop\project\node_modules\nan\nan.h(608): error C2143: syntax error : missing ';' before '{' (..\src\main.cc) [C: \Users\user\Desktop\project\node_modules\nslog\build\nslog.vcxproj]
C:\Users\user\Desktop\project\node_modules\nan\nan.h(608): error C2447: '{' : missing function header (old-style formal list?) (.. \src\main.cc) [C:\Users\user\Desktop\project\node_modules\nslog\build\nslog.vcxproj]
C:\Users\user\Desktop\project\node_modules\nan\nan.h(613): error C2039: 'GCPrologueCallback' : is not a member of 'v8::Isolate' (. .\src\main.cc) [C:\Users\user\Desktop\project\node_modules\nslog\build\nslog.vcxproj]
          C:\Users\user\.node-gyp\0.37.7\deps\v8\include\v8.h(5281) : see declaration of 'v8::Isolate'
C:\Users\user\Desktop\project\node_modules\nan\nan.h(613): error C2065: 'GCPrologueCallback' : undeclared identifier (..\src\main. cc) [C:\Users\user\Desktop\project\node_modules\nslog\build\nslog.vcxproj]
C:\Users\user\Desktop\project\node_modules\nan\nan.h(614): error C2146: syntax error : missing ')' before identifier 'callback' (. .\src\main.cc) [C:\Users\user\Desktop\project\node_modules\nslog\build\nslog.vcxproj]
C:\Users\user\Desktop\project\node_modules\nan\nan.h(614): error C2182: 'AddGCPrologueCallback' : illegal use of type 'void' (..\s rc\main.cc) [C:\Users\user\Desktop\project\node_modules\nslog\build\nslog.vcxproj]
C:\Users\user\Desktop\project\node_modules\nan\nan.h(614): error C2433: 'AddGCPrologueCallback' : '__forceinline' not permitted on  data declarations (..\src\main.cc) [C:\Users\user\Desktop\project\node_modules\nslog\build\nslog.vcxproj]
C:\Users\user\Desktop\project\node_modules\nan\nan.h(614): error C2059: syntax error : ')' (..\src\main.cc) [C:\Users\user\Desk top\project\node_modules\nslog\build\nslog.vcxproj]
C:\Users\user\Desktop\project\node_modules\nan\nan.h(614): error C2143: syntax error : missing ';' before '{' (..\src\main.cc) [C: \Users\user\Desktop\project\node_modules\nslog\build\nslog.vcxproj]
C:\Users\user\Desktop\project\node_modules\nan\nan.h(614): error C2447: '{' : missing function header (old-style formal list?) (.. \src\main.cc) [C:\Users\user\Desktop\project\node_modules\nslog\build\nslog.vcxproj]
C:\Users\user\Desktop\project\node_modules\nan\nan.h(619): error C2039: 'GCPrologueCallback' : is not a member of 'v8::Isolate' (. .\src\main.cc) [C:\Users\user\Desktop\project\node_modules\nslog\build\nslog.vcxproj]
          C:\Users\user\.node-gyp\0.37.7\deps\v8\include\v8.h(5281) : see declaration of 'v8::Isolate'
C:\Users\user\Desktop\project\node_modules\nan\nan.h(619): error C2065: 'GCPrologueCallback' : undeclared identifier (..\src\main. cc) [C:\Users\user\Desktop\project\node_modules\nslog\build\nslog.vcxproj]
C:\Users\user\Desktop\project\node_modules\nan\nan.h(619): error C2146: syntax error : missing ')' before identifier 'callback' (. .\src\main.cc) [C:\Users\user\Desktop\project\node_modules\nslog\build\nslog.vcxproj]
C:\Users\user\Desktop\project\node_modules\nan\nan.h(619): error C2182: 'RemoveGCPrologueCallback' : illegal use of type 'void' (. .\src\main.cc) [C:\Users\user\Desktop\project\node_modules\nslog\build\nslog.vcxproj]
C:\Users\user\Desktop\project\node_modules\nan\nan.h(619): error C2433: 'RemoveGCPrologueCallback' : '__forceinline' not permitted  on data declarations (..\src\main.cc) [C:\Users\user\Desktop\project\node_modules\nslog\build\nslog.vcxproj]
C:\Users\user\Desktop\project\node_modules\nan\nan.h(619): error C2059: syntax error : ')' (..\src\main.cc) [C:\Users\user\Desk top\project\node_modules\nslog\build\nslog.vcxproj]
C:\Users\user\Desktop\project\node_modules\nan\nan.h(619): error C2143: syntax error : missing ';' before '{' (..\src\main.cc) [C: \Users\user\Desktop\project\node_modules\nslog\build\nslog.vcxproj]
C:\Users\user\Desktop\project\node_modules\nan\nan.h(619): error C2447: '{' : missing function header (old-style formal list?) (.. \src\main.cc) [C:\Users\user\Desktop\project\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:\Users\user\AppData\Roaming\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:100:13)
gyp ERR! stack     at ChildProcess.emit (events.js:185:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--target=0.37.7" "-dist-url=https://atom.io/download/atom-shell"
gyp ERR! cwd C:\Users\user\Desktop\project\node_modules\nslog
gyp ERR! node -v v5.10.1
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok

Building it under node or with 0.36 headers is fine:

> node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | ia32
gyp info spawn C:\Users\user\Desktop\WinPython-64bit-2.7.9.5\python-2.7.9.amd64\python.EXE
gyp info spawn args [ 'C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'msvs',
gyp info spawn args   '-G',
gyp info spawn args   'msvs_version=auto',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\user\\Desktop\\project\\node_modules\\nslog\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\user\\.node-gyp\\5.10.1\\include\\node\\common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=C:\\Users\\user\\.node-gyp\\5.10.1',
gyp info spawn args   '-Dnode_gyp_dir=C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\node-gyp',
gyp info spawn args   '-Dnode_lib_file=node.lib',
gyp info spawn args   '-Dmodule_root_dir=C:\\Users\\user\\Desktop\\project\\node_modules\\nslog',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'C:\\Users\\user\\Desktop\\project\\node_modules\\nslog\\build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info spawn C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe
gyp info spawn args [ 'build/binding.sln',
gyp info spawn args   '/clp:Verbosity=minimal',
gyp info spawn args   '/nologo',
gyp info spawn args   '/p:Configuration=Release;Platform=Win32' ]
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  main.cc
  nslog_win.cc
  win_delay_load_hook.c
     Creating library C:\Users\user\Desktop\project\node_modules\nslog\build\Release\nslog.lib and object C:\Users\user\Desktop
  \project\node_modules\nslog\build\Release\nslog.exp
  Generating code
  Finished generating code
  nslog.vcxproj -> C:\Users\user\Desktop\project\node_modules\nslog\build\Release\\nslog.node
gyp info ok
> node-gyp rebuild --target=0.36.0 -dist-url=https://atom.io/download/atom-shell
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | ia32
gyp info spawn C:\Users\user\Desktop\WinPython-64bit-2.7.9.5\python-2.7.9.amd64\python.EXE
gyp info spawn args [ 'C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'msvs',
gyp info spawn args   '-G',
gyp info spawn args   'msvs_version=auto',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\user\\Desktop\\project\\node_modules\\nslog\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\user\\.node-gyp\\0.36.0\\common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=C:\\Users\\user\\.node-gyp\\0.36.0',
gyp info spawn args   '-Dnode_gyp_dir=C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\node-gyp',
gyp info spawn args   '-Dnode_lib_file=node.lib',
gyp info spawn args   '-Dmodule_root_dir=C:\\Users\\user\\Desktop\\project\\node_modules\\nslog',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'C:\\Users\\user\\Desktop\\project\\node_modules\\nslog\\build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info spawn C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe
gyp info spawn args [ 'build/binding.sln',
gyp info spawn args   '/clp:Verbosity=minimal',
gyp info spawn args   '/nologo',
gyp info spawn args   '/p:Configuration=Release;Platform=Win32' ]
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  main.cc
  nslog_win.cc
  win_delay_load_hook.c
     Creating library C:\Users\user\Desktop\project\node_modules\nslog\build\Release\nslog.lib and object C:\Users\user\Desktop
  \project\node_modules\nslog\build\Release\nslog.exp
  Generating code
  Finished generating code
  nslog.vcxproj -> C:\Users\user\Desktop\project\node_modules\nslog\build\Release\\nslog.node
gyp info ok

Seems like a nan mismatch issue but I've got the latest nan installed (2.3.2) so I'm at a loss on what's behind this

@winstliu winstliu reopened this Apr 28, 2016
@winstliu
Copy link

edit: thought this was on atom/atom, whoops.

@winstliu winstliu added the bug label Apr 28, 2016
@OwenBrotherwood
Copy link

Instead of starting a new issue, I hope this is relevant for this issue.

For some reason, one has to do a delete of pxt-microbit-electron\node_modules\nslog\build\Release, then rebuild works:
pxt-microbit-electron>node_modules.bin\electron-rebuild.cmd

https://github.com/OwenBrotherwood/pxt-microbit-electron/issues/6#issuecomment-258623868

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants