Skip to content
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

MSVS 2011 beta doesn't work? #44

Closed
ghost opened this issue Mar 24, 2012 · 27 comments
Closed

MSVS 2011 beta doesn't work? #44

ghost opened this issue Mar 24, 2012 · 27 comments
Labels

Comments

@ghost
Copy link

ghost commented Mar 24, 2012

Just to let you know it fails when using visual studio 11 beta.

ERR! Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed w
ith exit code: 1

trying to work out why.

spider uses contextify.

Contextify is supposed to use the new build systems. as per here.
brianmcd/contextify#17

I looked into the path where it is looking for the cdproj, but its not there.

Mhhh ?

Gerard

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\_data\_SvnRepo\Prod\ITProject_UbuntuDesignWebSite\tools\nodejs>node install s
pider

node.js:201
        throw e; // process.nextTick error, or 'error' event on first tick
              ^
Error: Cannot find module 'C:\_data\_SvnRepo\Prod\ITProject_UbuntuDesignWebSite\
tools\nodejs\install'
    at Function._resolveFilename (module.js:332:11)
    at Function._load (module.js:279:25)
    at Array.0 (module.js:479:10)
    at EventEmitter._tickCallback (node.js:192:40)

C:\_data\_SvnRepo\Prod\ITProject_UbuntuDesignWebSite\tools\nodejs>npm install sp
ider
npm http GET https://registry.npmjs.org/spider
npm http 304 https://registry.npmjs.org/spider
npm http GET https://registry.npmjs.org/routes
npm http GET https://registry.npmjs.org/cookiejar
npm http GET https://registry.npmjs.org/jsdom
npm http GET https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/jsdom
npm http 304 https://registry.npmjs.org/cookiejar
npm http 304 https://registry.npmjs.org/routes
npm http 304 https://registry.npmjs.org/request
npm http GET https://registry.npmjs.org/cssom
npm http GET https://registry.npmjs.org/contextify
npm http GET https://registry.npmjs.org/htmlparser
npm http 304 https://registry.npmjs.org/htmlparser
npm http 304 https://registry.npmjs.org/cssom
npm http 304 https://registry.npmjs.org/contextify
npm http GET https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/bindings

> contextify@0.1.2 install C:\_data\_SvnRepo\Prod\ITProject_UbuntuDesignWebSite\
tools\nodejs\node_modules\spider\node_modules\jsdom\node_modules\contextify
> node-gyp rebuild


C:\_data\_SvnRepo\Prod\ITProject_UbuntuDesignWebSite\tools\nodejs\node_modules\s
pider\node_modules\jsdom\node_modules\contextify>node "C:\Program Files (x86)\no
dejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp
.js" rebuild
info it worked if it ends with ok
spawn C:\Python27\python.exe [ 'C:\\Users\\gerard\\.node-gyp\\0.6.14\\tools\\gyp
_addon',
  'binding.gyp',
  '-IC:\\_data\\_SvnRepo\\Prod\\ITProject_UbuntuDesignWebSite\\tools\\nodejs\\no
de_modules\\spider\\node_modules\\jsdom\\node_modules\\contextify\\build\\config
.gypi',
  '-f',
  'msvs',
  '-G',
  'msvs_version=2010' ]
spawn C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe [ 'build/binding
.sln',
  '/clp:Verbosity=minimal',
  '/nologo',
  '/p:Configuration=Release;Platform=Win32' ]
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.t
argets(34,5): error MSB8020: The builds tools for Visual Studio 2010 (Platform
Toolset = 'v100') cannot be found. To build using the v100 build tools, either
click the Project menu or right-click the solution, and then select "Update VC+
+ Projects...". Install Visual Studio 2010 to build using the Visual Studio 201
0 build tools. [C:\_data\_SvnRepo\Prod\ITProject_UbuntuDesignWebSite\tools\node
js\node_modules\spider\node_modules\jsdom\node_modules\contextify\build\context
ify.vcxproj]
ERR! Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed w
ith exit code: 1
    at Array.0 (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node
-gyp\lib\build.js:176:25)
    at EventEmitter._tickCallback (node.js:192:40)
ERR! not ok
npm WARN optional dependency failed, continuing contextify@0.1.2
spider@0.1.0 ./node_modules/spider
├── cookiejar@1.3.0
├── routes@0.1.0
├── request@2.9.153
└── jsdom@0.2.13

C:\_data\_SvnRepo\Prod\ITProject_UbuntuDesignWebSite\tools\nodejs>
@TooTallNate
Copy link
Contributor

@gedw99 Is there somewhere to download a free version of the 2011 beta so I can test this out? gyp itself may or may not support version 2011 yet, but if I could get my hands on it I could try test it.

@ghost
Copy link
Author

ghost commented Mar 25, 2012

http://www.microsoft.com/visualstudio/11/en-us/downloads

is here

:)

gerard

On 25 March 2012 21:32, Nathan Rajlich <
reply@reply.github.com

wrote:

@gedw99 Is there somewhere to download a free version of the 2011 beta so
I can test this out? gyp itself may or may not support version 2011 yet,
but if I could get my hands on it I could try test it.


Reply to this email directly or view it on GitHub:
#44 (comment)

@TooTallNate
Copy link
Contributor

Ok so it looks like gyp doesn't yet support version 2011. This is what I get:

spawn python [ 'C:\\Documents and Settings\\Administrator\\.node-gyp\\0.6.12\\tools\\gyp_addon',
  'binding.gyp',
  '-IC:\\Documents and Settings\\Administrator\\My Documents\\node-weak\\build\\config.gypi',
  '-f',
  'msvs',
  '-G',
  'msvs_version=2011' ]
Traceback (most recent call last):
  File "C:\Documents and Settings\Administrator\.node-gyp\0.6.12\tools\gyp_addon", line 38, in <module>
    rc = gyp.main(gyp_args)
  File "C:\Documents and Settings\Administrator\.node-gyp\0.6.12\tools\gyp\pylib\gyp\__init__.py", line 471, in main
    options.circular_check)
  File "C:\Documents and Settings\Administrator\.node-gyp\0.6.12\tools\gyp\pylib\gyp\__init__.py", line 79, in Load
    generator.CalculateVariables(default_variables, params)
  File "C:\Documents and Settings\Administrator\.node-gyp\0.6.12\tools\gyp\pylib\gyp\generator\msvs.py", line 1657, in C
alculateVariables
    generator_flags.get('msvs_version', 'auto'))
  File "C:\Documents and Settings\Administrator\.node-gyp\0.6.12\tools\gyp\pylib\gyp\MSVSVersion.py", line 264, in Selec
tVisualStudioVersion
    return _CreateVersion(version)
  File "C:\Documents and Settings\Administrator\.node-gyp\0.6.12\tools\gyp\pylib\gyp\MSVSVersion.py", line 188, in _Crea
teVersion
    return versions[str(name)]
KeyError: '2011'

So for now you have to install 2010, and/or wait for the gyp devs to add 2011 support.

@ghost
Copy link
Author

ghost commented Mar 25, 2012

ok so its pass the buck time to the gyp people ?

G

On 25 March 2012 22:42, Nathan Rajlich <
reply@reply.github.com

wrote:

Ok so it looks like gyp doesn't yet support version 2011. This is what I
get:

spawn python [ 'C:\\Documents and
Settings\\Administrator\\.node-gyp\\0.6.12\\tools\\gyp_addon',
 'binding.gyp',
 '-IC:\\Documents and Settings\\Administrator\\My
Documents\\node-weak\\build\\config.gypi',
 '-f',
 'msvs',
 '-G',
 'msvs_version=2011' ]
Traceback (most recent call last):
 File "C:\Documents and
Settings\Administrator\.node-gyp\0.6.12\tools\gyp_addon", line 38, in
<module>
   rc = gyp.main(gyp_args)
 File "C:\Documents and
Settings\Administrator\.node-gyp\0.6.12\tools\gyp\pylib\gyp\__init__.py",
line 471, in main
   options.circular_check)
 File "C:\Documents and
Settings\Administrator\.node-gyp\0.6.12\tools\gyp\pylib\gyp\__init__.py",
line 79, in Load
   generator.CalculateVariables(default_variables, params)
 File "C:\Documents and
Settings\Administrator\.node-gyp\0.6.12\tools\gyp\pylib\gyp\generator\msvs.py",
line 1657, in C
alculateVariables
   generator_flags.get('msvs_version', 'auto'))
 File "C:\Documents and
Settings\Administrator\.node-gyp\0.6.12\tools\gyp\pylib\gyp\MSVSVersion.py",
line 264, in Selec
tVisualStudioVersion
   return _CreateVersion(version)
 File "C:\Documents and
Settings\Administrator\.node-gyp\0.6.12\tools\gyp\pylib\gyp\MSVSVersion.py",
line 188, in _Crea
teVersion
   return versions[str(name)]
KeyError: '2011'

Reply to this email directly or view it on GitHub:
#44 (comment)

@TooTallNate
Copy link
Contributor

Yup

@ghost
Copy link
Author

ghost commented Mar 25, 2012

i went back to VS 10, but good to know if does not work so the gyp people
can fix it before vs11 become too mainstream

g

On 25 March 2012 22:43, Nathan Rajlich <
reply@reply.github.com

wrote:

Yup


Reply to this email directly or view it on GitHub:
#44 (comment)

@domenic
Copy link

domenic commented May 16, 2012

Is there a gyp issue we could subscribe to/vote on?

@ghost
Copy link
Author

ghost commented Jul 5, 2012

I think this may fix it: http://social.msdn.microsoft.com/Forums/en-US/msbuild/thread/0f6aef3d-9778-47fe-a70d-4c9c6bd106e3/

process.env.VisualStudioVersion = "11.0"

@ghost
Copy link
Author

ghost commented Jul 5, 2012

Ahah I got it. Quick hack that does it. Line 2398 of gyp/pylib/generator/msvs.py

_AddConditionalProperty(properties, condition, 'PlatformToolset', 'v110')

@domenic
Copy link

domenic commented Aug 15, 2012

@Benvie, @TooTallNate What's the status these days?

Looking near the line you cited above, the closest I could find was http://code.google.com/p/gyp/source/browse/trunk/pylib/gyp/generator/msvs.py#2459 which seems to support configuring the value of 'PlatformToolset' in some way. Could node-gyp use this to become VS2012 compatible?

@ghost
Copy link
Author

ghost commented Aug 15, 2012

Almost, looks like it should go on line 2450 in the global props. The way I determined it was by looking at what was near where <PlatformToolset>v100</PlatformToolset> is inserted by the default MS generator, and it lives right next to 'ConfigurationType' and 'CharacterSet'.

@ghost
Copy link
Author

ghost commented Aug 15, 2012

Oh and yeah I have sucesssfully compiled both Node itself and modules using node-gyp with VS2012 with only this change being required to make it work.

@domenic
Copy link

domenic commented Aug 15, 2012

Hmm, I think I am too much of a gyp noob to know what line 2450 in the global props means. Basically, how can I get this working? And what patches would one of us have to submit to get it working out of the box, for everyone? :)

@ghost
Copy link
Author

ghost commented Aug 15, 2012

Also MozillaBuild has a launcher for the newer platform now as well. I think it's included in the latest release: http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-Latest.exe. If not, it's just the two .bat files which are somewhere on there or I can post them if anyone needs them.

@ghost
Copy link
Author

ghost commented Aug 15, 2012

You can paste the line in entirety. Should work if you stick it on its own line before the 'ConfigurationType' line on 2450. It's verbose but once its in there you'll see it's almost the same as code as the other two lines, so that helps confirm you're doing it right.

@TooTallNate
Copy link
Contributor

Is there an upstream gyp issue that's tracking this?

@ghost
Copy link
Author

ghost commented Aug 15, 2012

waiting for https://github.com/svn2github to make http://github.com/svn2github/gyp so I can do the change.

@ghost
Copy link
Author

ghost commented Aug 15, 2012

@domenic
Copy link

domenic commented Aug 21, 2012

I just looked at it again. Isn't the point of the line

_AddConditionalProperty(properties, condition, 'PlatformToolset', msbuild_attributes['PlatformToolset'])

to allow us, the gyp users, to set the correct toolset version, by setting msbuild_attributes? Couldn't node-gyp to detection on installation of which compilers are available, and set the correct msbuild_attributes? (Somehow?)

We unfortunately can't make VS11 the default yet, because there's no Express (free) edition for non-Metro development yet

@TooTallNate
Copy link
Contributor

nodejs/node-v0.x-archive@f90c9ce looks like it might help.

@JayBeavers
Copy link
Contributor

I have validated that I am unable to install nodejs from git clone with just Visual Studio 2012 Express for Windows Desktop installed. It complains that the vcxproj files are generated for tooling v100 (e.g. VC++ 2010). The first failure I see is that deps\cares.vcxproj.

@TooTallNate
Copy link
Contributor

Guys, Windows 8 and MSVC 2012 support just landed in 63a3426 (v0.7.2 release). If somebody could try it out and verify that it works, that would rock!

@staxmanade
Copy link

I just tried to npm install tobi and received an error probably related to this thread. Is there a way you can instruct a node noob to configure tobi (or one of it's depencencies) to use the latest/greatest node-gyp? (including your most recent change-set)...

@staxmanade
Copy link

Ah, so it's the 'contextify' project that's raising the error...

> contextify@0.1.3 install C:\Code\temp\3\node_modules\contextify
> node-gyp rebuild


C:\Code\temp\3\node_modules\contextify>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild 
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.targets(34,5): error MSB8020: The builds tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found. To build using the v100 build tools, either click the Project menu or right-click the solution, and then select "Update VC++ Projects...". Install Visual Studio 2010 to build using the Visual Studio 2010 build tools. [C:\Code\temp\3\node_modules\contextify\build\contextify.vcxproj]

@dch
Copy link

dch commented Jan 11, 2013

Is there a reason you are not targeting SDK 7.1 as a baseline and avoiding the VS20* licencing and complexity entirely? Apologies if this has been discussed ad nauseam elsewhere.

I still need to test on a clean box but checks on my dev machine suggest at least for some modules I quickly tested, the compilation is fine (e.g. serialport, bcrypt, time) time, of course won't work on windows but it does compile at least!

@ianscrivener
Copy link

500Mb of prerequisites just to run node-gyp on Windows 7 x64.... WTF!

@sminodonte
Copy link

node-gyp build didn't find this library "atlstr.h",..... I'm using MVS 11

targos added a commit to targos/node-gyp that referenced this issue Aug 22, 2021
* gyp: fix XCode CLT version detection on Catalina

Copies @szekelyisz nodejs#2141 to this repo.

* Regex loves raw strings

* Update pylib/gyp/xcode_emulation.py

Co-authored-by: Michaël Zasso <targos@protonmail.com>

Co-authored-by: Michaël Zasso <targos@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants