New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-requisites to install on Windows? #39

Closed
steveworkman opened this Issue Jul 16, 2012 · 7 comments

Comments

Projects
None yet
5 participants
@steveworkman

steveworkman commented Jul 16, 2012

Posting on behalf of @pavelkucera who posted on my blog here

The error is here: https://gist.github.com/81d62825010a6285e4a8 and appears to be line 37:

LINK : fatal error LNK1181: cannot open input file 'kernel32.lib' [c:\node_modules\contextify\build\contextify.vcxproj]

Pavel's setup is this:

Environment:
*Win 7×64
*Node v0.8.1 x64
*Newest npm – npm install -g npm
*Visual C++ 2010 Free
*Python 2.7

What are the minimum requirements to get this to build? I can make it work with Visual Studio 2010 Pro and the rest of his setup installed, so what is Pavel missing?

@pavelkucera

This comment has been minimized.

Show comment
Hide comment
@pavelkucera

pavelkucera Jul 16, 2012

@steveworkman: thanks, creating an issue here was in my plan if you couldn't help me on your blog :).

More notes on environment:
Python version is 2.7.2 x64
According to https://github.com/TooTallNate/node-gyp/#installation I installed also Windows 7 64-bit SDK

I installed Python, Visual C++ 2010 and Windows 7 64-bit SDK by following installation wizard clicking only on 'next' but I believe everything essential should be in the default configuration.

pavelkucera commented Jul 16, 2012

@steveworkman: thanks, creating an issue here was in my plan if you couldn't help me on your blog :).

More notes on environment:
Python version is 2.7.2 x64
According to https://github.com/TooTallNate/node-gyp/#installation I installed also Windows 7 64-bit SDK

I installed Python, Visual C++ 2010 and Windows 7 64-bit SDK by following installation wizard clicking only on 'next' but I believe everything essential should be in the default configuration.

@pavelkucera

This comment has been minimized.

Show comment
Hide comment
@pavelkucera

pavelkucera Jul 17, 2012

Can't believe it, but I've just sucessfully compiled Contextify! Problem was on my side and I'm sorry I didn't find it earlier. Apparently windows installer of Visual C++ can't install the newest version, after installation you have to install tons of updates via Windows Update and special package of c++ compilers which can be found http://www.microsoft.com/en-us/download/details.aspx?id=4422
Hope this will help somebody, thanks @steveworkman for his initiative here.

pavelkucera commented Jul 17, 2012

Can't believe it, but I've just sucessfully compiled Contextify! Problem was on my side and I'm sorry I didn't find it earlier. Apparently windows installer of Visual C++ can't install the newest version, after installation you have to install tons of updates via Windows Update and special package of c++ compilers which can be found http://www.microsoft.com/en-us/download/details.aspx?id=4422
Hope this will help somebody, thanks @steveworkman for his initiative here.

@steveworkman

This comment has been minimized.

Show comment
Hide comment
@steveworkman

steveworkman Jul 17, 2012

Thanks Pavel, I've updated the blog post.

steveworkman commented Jul 17, 2012

Thanks Pavel, I've updated the blog post.

@vire

This comment has been minimized.

Show comment
Hide comment
@vire

vire Jan 6, 2014

Hi Guys. I've got the same error

LINK : fatal error LNK1181: cannot open input file 'kernel32.lib' [c:\node_modules\contextify\build\contextify.vcxproj]

During installing the contextify library,

I had W7-64, Ptyhon 2.3 32bit (because of some other dependency somewhere - I think some deps for vim ternjs) and the problem was in that, i was using 64bit version of node, and this was not compatible with python, so changing to 32bit node..

Important is to have either 32bit Node+Python, or 64bit...

vire commented Jan 6, 2014

Hi Guys. I've got the same error

LINK : fatal error LNK1181: cannot open input file 'kernel32.lib' [c:\node_modules\contextify\build\contextify.vcxproj]

During installing the contextify library,

I had W7-64, Ptyhon 2.3 32bit (because of some other dependency somewhere - I think some deps for vim ternjs) and the problem was in that, i was using 64bit version of node, and this was not compatible with python, so changing to 32bit node..

Important is to have either 32bit Node+Python, or 64bit...

@bcandullo

This comment has been minimized.

Show comment
Hide comment
@bcandullo

bcandullo Mar 22, 2014

Thanks @vire. If you get this message make sure Node is 32bit.

bcandullo commented Mar 22, 2014

Thanks @vire. If you get this message make sure Node is 32bit.

@kilometers

This comment has been minimized.

Show comment
Hide comment
@kilometers

kilometers Apr 4, 2014

I'm receiving the same error that @vire shared. I've completely wiped and reinstalled my Python installation as well as my array of VS2010 packages (And I followed the instructions @TooTallNate shares here). I've tried Node in both 64 and 32-bit flavors.

I'm not sure if this is of import, but the first sign that something's wrong begins after the line:

Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
  contextify.cc

At which point I receive a stream of yellow warning messages like so:

C:\Users\Drogon\AppData\Roaming\npm\node_modules\contextify\node_modules\nan\na
n.h(1066): warning C4267: 'argument' : conversion from 'size_t' to 'int', possi
ble loss of data [C:\Users\Drogon\AppData\Roaming\npm\node_modules\contextify\b
uild\contextify.vcxproj]
C:\Users\Drogon\AppData\Roaming\npm\node_modules\contextify\node_modules\nan\na
n.h(1083): warning C4267: 'argument' : conversion from 'size_t' to 'int', possi
ble loss of data [C:\Users\Drogon\AppData\Roaming\npm\node_modules\contextify\b
uild\contextify.vcxproj]
C:\Users\Drogon\AppData\Roaming\npm\node_modules\contextify\node_modules\nan\na
n.h(1114): warning C4267: 'argument' : conversion from 'size_t' to 'int', possi
ble loss of data [C:\Users\Drogon\AppData\Roaming\npm\node_modules\contextify\b
uild\contextify.vcxproj]
C:\Users\Drogon\AppData\Roaming\npm\node_modules\contextify\node_modules\nan\na
n.h(1146): warning C4267: 'argument' : conversion from 'size_t' to 'int', possi
ble loss of data [C:\Users\Drogon\AppData\Roaming\npm\node_modules\contextify\b
uild\contextify.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xlocale(323): wa
rning C4530: C++ exception handler used, but unwind semantics are not enabled.
Specify /EHsc [C:\Users\Drogon\AppData\Roaming\npm\node_modules\contextify\buil
d\contextify.vcxproj]
C:\Users\Drogon\AppData\Roaming\npm\node_modules\contextify\node_modules\nan\na
n.h(934): warning C4244: 'initializing' : conversion from '__int64' to 'int', p
ossible loss of data [C:\Users\Drogon\AppData\Roaming\npm\node_modules\contexti
fy\build\contextify.vcxproj]
          C:\Users\Drogon\AppData\Roaming\npm\node_modules\contextify\node_modu
  les\nan\nan.h(1127) : see reference to function template instantiation 'size_
  t _nan_base64_decode<uint16_t>(char *,size_t,const TypeName *,const size_t)'
  being compiled
          with
          [
              TypeName=uint16_t
          ]
C:\Users\Drogon\.node-gyp\0.10.26\deps\v8\include\v8.h(184): warning C4506: no
definition for inline function 'v8::Persistent<T> v8::Persistent<T>::New(v8::Ha
ndle<T>)' [C:\Users\Drogon\AppData\Roaming\npm\node_modules\contextify\build\co
ntextify.vcxproj]
          with
          [
              T=v8::Object
          ]
C:\Users\Drogon\.node-gyp\0.10.26\deps\v8\include\v8.h(184): warning C4506: no
definition for inline function 'v8::Persistent<T> v8::Persistent<T>::New(v8::Ha
ndle<T>)' [C:\Users\Drogon\AppData\Roaming\npm\node_modules\contextify\build\co
ntextify.vcxproj]
          with
          [
              T=v8::FunctionTemplate
          ]

The "possible loss of data" warnings do catch my eye. Perhaps there's a clue there?

Either way, this comes to an abrupt end with @vire's message above:

LINK : fatal error LNK1181: cannot open input file 'kernel32.lib' [C:\Users\Dro
gon\AppData\Roaming\npm\node_modules\contextify\build\contextify.vcxproj]

Followed by a short debris field as npm tries to make a hard landing:

gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe` fail
ed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\
npm\node_modules\node-gyp\lib\build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:797:
12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modu
les\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Drogon\AppData\Roaming\npm\node_modules\contextify
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm ERR! contextify@0.1.7 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the contextify@0.1.7 install script.
npm ERR! This is most likely a problem with the contextify 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 contextify
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "contextify"
npm ERR! cwd C:\Users\Drogon\Documents\Web Projects
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Users\Drogon\Documents\Web Projects\npm-debug.log
npm ERR! not ok code 0

And that's it. I'm way out of my depth when it comes to actually devising a solution to this. Compilers are a fuzzy, hardly visited area for me, not to mention C++ itself. If anyone has ideas though, I look forward to poking around.

kilometers commented Apr 4, 2014

I'm receiving the same error that @vire shared. I've completely wiped and reinstalled my Python installation as well as my array of VS2010 packages (And I followed the instructions @TooTallNate shares here). I've tried Node in both 64 and 32-bit flavors.

I'm not sure if this is of import, but the first sign that something's wrong begins after the line:

Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
  contextify.cc

At which point I receive a stream of yellow warning messages like so:

C:\Users\Drogon\AppData\Roaming\npm\node_modules\contextify\node_modules\nan\na
n.h(1066): warning C4267: 'argument' : conversion from 'size_t' to 'int', possi
ble loss of data [C:\Users\Drogon\AppData\Roaming\npm\node_modules\contextify\b
uild\contextify.vcxproj]
C:\Users\Drogon\AppData\Roaming\npm\node_modules\contextify\node_modules\nan\na
n.h(1083): warning C4267: 'argument' : conversion from 'size_t' to 'int', possi
ble loss of data [C:\Users\Drogon\AppData\Roaming\npm\node_modules\contextify\b
uild\contextify.vcxproj]
C:\Users\Drogon\AppData\Roaming\npm\node_modules\contextify\node_modules\nan\na
n.h(1114): warning C4267: 'argument' : conversion from 'size_t' to 'int', possi
ble loss of data [C:\Users\Drogon\AppData\Roaming\npm\node_modules\contextify\b
uild\contextify.vcxproj]
C:\Users\Drogon\AppData\Roaming\npm\node_modules\contextify\node_modules\nan\na
n.h(1146): warning C4267: 'argument' : conversion from 'size_t' to 'int', possi
ble loss of data [C:\Users\Drogon\AppData\Roaming\npm\node_modules\contextify\b
uild\contextify.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xlocale(323): wa
rning C4530: C++ exception handler used, but unwind semantics are not enabled.
Specify /EHsc [C:\Users\Drogon\AppData\Roaming\npm\node_modules\contextify\buil
d\contextify.vcxproj]
C:\Users\Drogon\AppData\Roaming\npm\node_modules\contextify\node_modules\nan\na
n.h(934): warning C4244: 'initializing' : conversion from '__int64' to 'int', p
ossible loss of data [C:\Users\Drogon\AppData\Roaming\npm\node_modules\contexti
fy\build\contextify.vcxproj]
          C:\Users\Drogon\AppData\Roaming\npm\node_modules\contextify\node_modu
  les\nan\nan.h(1127) : see reference to function template instantiation 'size_
  t _nan_base64_decode<uint16_t>(char *,size_t,const TypeName *,const size_t)'
  being compiled
          with
          [
              TypeName=uint16_t
          ]
C:\Users\Drogon\.node-gyp\0.10.26\deps\v8\include\v8.h(184): warning C4506: no
definition for inline function 'v8::Persistent<T> v8::Persistent<T>::New(v8::Ha
ndle<T>)' [C:\Users\Drogon\AppData\Roaming\npm\node_modules\contextify\build\co
ntextify.vcxproj]
          with
          [
              T=v8::Object
          ]
C:\Users\Drogon\.node-gyp\0.10.26\deps\v8\include\v8.h(184): warning C4506: no
definition for inline function 'v8::Persistent<T> v8::Persistent<T>::New(v8::Ha
ndle<T>)' [C:\Users\Drogon\AppData\Roaming\npm\node_modules\contextify\build\co
ntextify.vcxproj]
          with
          [
              T=v8::FunctionTemplate
          ]

The "possible loss of data" warnings do catch my eye. Perhaps there's a clue there?

Either way, this comes to an abrupt end with @vire's message above:

LINK : fatal error LNK1181: cannot open input file 'kernel32.lib' [C:\Users\Dro
gon\AppData\Roaming\npm\node_modules\contextify\build\contextify.vcxproj]

Followed by a short debris field as npm tries to make a hard landing:

gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe` fail
ed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\
npm\node_modules\node-gyp\lib\build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:797:
12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modu
les\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Drogon\AppData\Roaming\npm\node_modules\contextify
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm ERR! contextify@0.1.7 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the contextify@0.1.7 install script.
npm ERR! This is most likely a problem with the contextify 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 contextify
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "contextify"
npm ERR! cwd C:\Users\Drogon\Documents\Web Projects
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Users\Drogon\Documents\Web Projects\npm-debug.log
npm ERR! not ok code 0

And that's it. I'm way out of my depth when it comes to actually devising a solution to this. Compilers are a fuzzy, hardly visited area for me, not to mention C++ itself. If anyone has ideas though, I look forward to poking around.

@kilometers

This comment has been minimized.

Show comment
Hide comment
@kilometers

kilometers Apr 4, 2014

Okay, the strangest thing just happened. I tried going back to a 32-bit install of Node.js to see if it throws a different error message (the message seemed to have changed when I went from 32 to 64-bit, and frankly the "int64 to int" warnings are damned suspicious). This... magically fixed everything. Contextify just installed without a peep, save for a few warnings. I had switched to a 32-bit version earlier, but that was before re-installing the VS2010 packages. Perhaps that's the difference.

It's amazing what happens when you hit things with a stick and shake them around.

*To clarify, the earlier 32-bit install of Node was still not playing nice even after re-installing the VS2010 packages.

kilometers commented Apr 4, 2014

Okay, the strangest thing just happened. I tried going back to a 32-bit install of Node.js to see if it throws a different error message (the message seemed to have changed when I went from 32 to 64-bit, and frankly the "int64 to int" warnings are damned suspicious). This... magically fixed everything. Contextify just installed without a peep, save for a few warnings. I had switched to a 32-bit version earlier, but that was before re-installing the VS2010 packages. Perhaps that's the difference.

It's amazing what happens when you hit things with a stick and shake them around.

*To clarify, the earlier 32-bit install of Node was still not playing nice even after re-installing the VS2010 packages.

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