Pre-built fibers for node 0.10.21 doesn't run on WinXP #147

Closed
sdarnell opened this Issue Nov 10, 2013 · 1 comment

Comments

Projects
None yet
2 participants
Contributor

sdarnell commented Nov 10, 2013

The pre-build binaries that come with the npm install of fibers@1.0.1 doesn't load on a Windows XP system. (win32-ia32-v8-3.14)

Just start up node.exe and require('fibers') and you get the following error:

module.js:356
  Module._extensions[extension](this, filename);
                               ^
Error: no errorD:\Dokumente und Einstellungen\USERNAME\Anwendungsdaten\.meteor\tools\e42f0b78d3\lib\node_modules\fibers\bin\win32-ia32-v8-3.14\fibers.node
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (D:\Dokumente und Einstellungen\USERNAME\Anwendungsdaten\.meteor\tools\e42f0b78d3\lib\node_modules\fibers\fibers.js:17:18)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)

Looking with dependency walker it looks like it is statically linked with a new runtime library that has some extra dependencies on kernel32 that XP doesn't have. Unfortunately I haven't figured out exactly which is the issue.

The missing entry points are:
EnumSystemLocalesEx, GetLocaleInfoEx, GetTickCount64, GetUserDefaultLocaleName, InitOnceExecuteOnce, InitializeCriticalSectionEx, IsValidLocaleName, LCMapStringEx

There are ...A or ...W variants of some of these on XP, but there are some that are missing (GetTickCount64, InitOnceExecuteOnce...)

I rebuilt it on a Win7 machine with Visual Studio 2010 and 2012 installed, and the resulting binary is noticeably smaller, but critically works on Windows XP.

For reference, here is the build output:

gyp info it worked if it ends with ok
gyp info using node-gyp@0.10.10
gyp info using node@0.10.21 | win32 | ia32
gyp info spawn python
gyp info spawn args [ 'c:\\node0.10.21\\node_modules\\npm\\node_modules\\node-gyp\\gyp\\gyp',
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:\\node0.10.21\\node_modules\\fibers\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'c:\\node0.10.21\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\stephendar\\.node-gyp\\0.10.21\\common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=C:\\Users\\stephendar\\.node-gyp\\0.10.21',
gyp info spawn args   '-Dmodule_root_dir=c:\\node0.10.21\\node_modules\\fibers',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--generator-output',
gyp info spawn args   'c:\\node0.10.21\\node_modules\\fibers\\build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info spawn c:\Windows\Microsoft.NET\Framework\v4.0.30319\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.
  coroutine.cc
  fibers.cc
..\src\coroutine.cc(62): warning C4552: '!' : operator has no effect; expected operator with side-effect [c:\node0.10.2
1\node_modules\fibers\build\fibers.vcxproj]
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\vector(753): warning C4530: C++ exception handler used,
but unwind semantics are not enabled. Specify /EHsc [c:\node0.10.21\node_modules\fibers\build\fibers.vcxproj]
          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\vector(746) : while compiling class template member function 'void std::vector<_Ty>::reserve(unsigned int)'
          with
          [
              _Ty=Coroutine *
          ]
          ..\src\coroutine.cc(29) : see reference to class template instantiation 'std::vector<_Ty>' being compiled
          with
          [
              _Ty=Coroutine *
          ]
etc.

FWIW The pre-built binary is 179712 bytes, whereas my rebuilt version is 137216.

I'm not sure how or whether you can specify the runtime to use with node-gyp.

Owner

laverdet commented Dec 17, 2014

It should rebuild automatically on your Windows XP machine if you have Visual Studio installed on it. Anyway, I'm not super interested in bothering with XP because it's 13 years old at this point :)

laverdet closed this Dec 17, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment