Author Topic: is vc10 known to work with nightly builds?  (Read 10039 times)

Offline bvanevery

  • Multiple posting newcomer
  • *
  • Posts: 11
is vc10 known to work with nightly builds?
« on: January 09, 2012, 03:37:54 am »
I am using C::B SVN 7550.  I'm trying to get it to work with a Windows SDK 7.1 installation on Vista.  I'm endeavoring to build Ogre with CMake.  I can build it fine using Visual Studio 2010 Express, or from a MSBuild command line.  Now I am trying to do a C::B Nmake build.  I selected a C::B nightly build because 10.05 doesn't have vc10 under Settings... Compiler and Debugger... Selected Compiler.  SVN 7550 does, but no amount of path configuration has yielded any joy.  I believe I've stated plenty of them:

Search Directories:
Compiler:
c:\Program Files\Microsoft Visual Studio 10.0\VC\include
C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE
Linker:
c:\Program Files\Microsoft Visual Studio 10.0\VC\lib
C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib
C:\Windows\Microsoft.NET\Framework\v4.0.30319
C:\Windows\Microsoft.NET\Framework\v3.5
Resource Compiler (decided by C::B, not me)
c:\Program Files\Microsoft Visual Studio 10.0\VC\include

Toolchain Executables:
Compiler's installation directory (auto-detected):
c:\Program Files\Microsoft Visual Studio 10.0\VC
Additional Paths:
C:\Windows\Microsoft.NET\Framework\v4.0.30319
C:\Windows\Microsoft.NET\Framework\v3.5
C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE
C:\Program Files\Microsoft Visual Studio 10.0\Common7\Tools
c:\Program Files\Microsoft Visual Studio 10.0\VC\Bin\VCPackages
C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\NETFX 4.0 Tools
C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin

These I copied at some labor from the environment of my Windows SDK 7.1 command prompt.  Have I missed something, or do C::B nightlies simply not work with vc10?  The error is:
Quote
"OGRE - all": The compiler's setup is invalid so Code::Blocks cannot find/run the compiler. Probably the toolchain path within the compiler options is not setup correctly?! Skipping...
Nothing to be done (all items are up-to-date).


Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: is vc10 known to work with nightly builds?
« Reply #1 on: January 09, 2012, 11:54:32 pm »
First see if removing all of your paths, then clicking Auto-detect, enables it to work correctly.

If not, try the following.

Toolchain executables: Compiler's installation directory:
Code: [Select]
C:\Program Files\Microsoft Visual Studio 10.0\VC

Toolchain executables: Additional Paths:
Code: [Select]
C:\Program Files\Microsoft Visual Studio 10.0\VC\bin
C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE
C:\Program Files\Microsoft SDKs\Windows\v7.1\bin

Search directories: Compiler:
Code: [Select]
C:\Program Files\Microsoft Visual Studio 10.0\VC\include
C:\Program Files\Microsoft SDKs\Windows\v7.1\Include

Search directories: Linker:
Code: [Select]
C:\Program Files\Microsoft Visual Studio 10.0\VC\lib
C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib

Offline bvanevery

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: is vc10 known to work with nightly builds?
« Reply #2 on: January 10, 2012, 02:29:39 am »
First see if removing all of your paths, then clicking Auto-detect, enables it to work correctly.

I started these explorations with no additional paths, just auto-detect, and it didn't work.  That's why I added all those paths in the 1st place, in accord with all the forum searching and finding the Installing A Supported Compiler wiki page.

Quote
If not, try the following.

Amounting to, removing .NET search directories, and adding a (supposed to be unnecessary) \VC\bin directory.

On some previous run I didn't have the .NET directories.  Thus that's not the problem.  Also, they're not supposed to matter as they're .NET things, not C/C++ things.  In any event they're standard Windows SDK paths in a standard order.  I'd be more willing to delete the .NET paths if it didn't require deleting everything to re-add them later.  Some other IDEs have "shift up and down" arrows, or at least will insert a new entry after the highlighted cursor.  I'll make some feature requests about that.

If adding \VC\bin were necessary, that would indeed be quite a bug.  But adding it didn't change anything, so that's not the problem.  (Or else there are multiple problems, rendering this tactic ineffective.)

I've turned on compiler logging.  Oddly, this has no effect on messages at all.  It would seem that "the compiler's setup is invalid" is really to be taken at face value.  Nothing is happening that can be logged.

I will ask again, in case it was missed due to the amount of material I've presented.  Is vc10 known to work with nightly builds?
 Does someone have a known good, proven installation that can happily compile vc10 projects?  If so, then another possibility is a CMake problem, which I haven't explored yet.  CMake MinGW builds work fine; this is a CMake Nmake build.

Alternately, can someone reproduce the error?

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: is vc10 known to work with nightly builds?
« Reply #3 on: January 10, 2012, 06:05:19 am »
Quote
If not, try the following.

Amounting to, removing .NET search directories, and adding a (supposed to be unnecessary) \VC\bin directory.
OK, just double checking something easy had not been missed (I had written from memory as I do not currently have Visual Studio installed).

I've turned on compiler logging.  Oddly, this has no effect on messages at all.  It would seem that "the compiler's setup is invalid" is really to be taken at face value.  Nothing is happening that can be logged.
I assume you have tried scrolling (I cannot find any text in my Code::Blocks logs?).

If so, then another possibility is a CMake problem, which I haven't explored yet.  CMake MinGW builds work fine; this is a CMake Nmake build.
Sorry, I had missed when you mentioned CMake the first time.
Is the CMake executable in your system's/Code::Blocks executable's path?
Does CMake support generating a .cbp that use VC?
Is your project set up to use the Nmake file as a makefile?
If you create a standard console project using Code::Blocks' project wizard, does it compile?
Do all of the programs listed in your toolchain executables correspond to an actual program on your hard drive?
Try launching Code::Blocks with the -v argument (codeblocks.exe -v); some of the additional output may find the root of the problem.

Offline bvanevery

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: is vc10 known to work with nightly builds?
« Reply #4 on: January 10, 2012, 11:58:46 am »
Try launching Code::Blocks with the -v argument

#@!# it's trying to find vc9!  "Execution of command 'C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\cl.exe' failed (the system cannot find the file specified.)"  That directory did exist on my system recently, but I deleted it.  Perhaps it is reading a stale or inappropriate value from the registry.  Perhaps CMake did something goofy.  Perhaps C::B just doesn't do what it's supposed to.  "Compiler and Debugger" says vc10.  It's 6 am and I'm too tired to continue right now, will resume later.

Later came sooner.  I threw out my previous CMake build.  This time instead of accepting the default compiler, I manually specified the C and C++ compilers.  They are set to C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\cl.exe .  I get the same error as before, it's trying to find vc9.  I haven't checked all of CMake's internals but I think it is unlikely to be configured for vc9.  C::B appears to search for vc9 inappropriately.  It may be a general problem, or it may be specific to my system due to a messed up registry.

Can anyone reproduce the problem?
« Last Edit: January 10, 2012, 12:17:44 pm by bvanevery »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: is vc10 known to work with nightly builds?
« Reply #5 on: January 10, 2012, 12:15:39 pm »
Perhaps CMake did something goofy.  Perhaps C::B just doesn't do what it's supposed to.  "Compiler and Debugger" says vc10.
Look: If you are using CMake, then Makefiles are being generated which are only called by Code::Blocks. So the compiler / debugger setup of Code::Blocks is not relevant because in case of Makefiles the compiler is not used! All you need to do is that C::B can find the right make executable (nmake in case of VCV10). So verify that the toolchain path is setup to VC10, and includes the folder where nmake is found and the make executable is setup correctly to nmake.

Check your Cmake setup and configure VC 10 correctly in CMake, then let Cmake produce the correct Makefiles. This is probably not an error of Code::Blocks.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline bvanevery

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: is vc10 known to work with nightly builds?
« Reply #6 on: January 10, 2012, 01:09:43 pm »
This is probably not an error of Code::Blocks.

One way or another, looking for vc9 is definitely an error of Code::Blocks.  I see no reason for that to be happening.  The CMake .txt and .cmake files are configured for c:/Program Files/Microsoft Visual Studio 10.0/VC/bin/cl.exe.  There is no occurrence of the string "9.0" in any CMake .txt or .cmake file, except for 2 instances for Boost configuration, that have nothing to do with Visual Studio.

I did a new build to make it easier to find the word "nmake" in the CMake files.  I am surprised to find out that "nmake" is not given a hardwired path at generation time.  So, it has to be found on a search path somewhere.  Since nmake actually lives in C:\Program Files\Microsoft Visual Studio 10.0\VC\bin, and that path is configured, C::B should be picking it up.  I also tried starting C::B from within a Windows SDK 7.1 Command Prompt environment.  Assuming C::B reads its environment, it should be picking it up.  But is it?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12123
    • Travis build status
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline bvanevery

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: is vc10 known to work with nightly builds?
« Reply #8 on: January 10, 2012, 07:11:46 pm »
Have you read this: http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F ?

Yes, as I said above, I turned on compiler logging and nothing is logged.  The suggestion about scrolling down, didn't turn out to matter.  There is nothing logged at all, it's failing before ever getting to that stage.

Who has a known good vc10 setup?  I've not heard anyone say they have that yet.

Offline seb_seb0

  • Almost regular
  • **
  • Posts: 166
Re: is vc10 known to work with nightly builds?
« Reply #9 on: January 10, 2012, 10:24:28 pm »
It works fine for me.
I am using the last nightly (SVN 7671)
I am on Windows 7 64 bits.

I have installed Visual Studio Express 2010
You can see my settings in screenshots
Additional paths in "Toolchain": "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE"

It works as well a 32 bits XP computer (at work). Same settings (only difference : "Program Files" in place of "Program Files  (x86)")

Quick Checks you can do:
Are you able to compile a Hello World program on the command line ?

Another easy check: do you have the correct Compiler activated in your project / target ? (menu project -> build options, check the value in the combo-box for the main project and all the targets.) If you have not set it manually, and if VC is not your default compiler, then you will have this message.

[attachment deleted by admin]

Offline bvanevery

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: is vc10 known to work with nightly builds?
« Reply #10 on: January 11, 2012, 01:38:42 am »
Quick Checks you can do:
Are you able to compile a Hello World program on the command line ?

Only if I fire up a Windows SDK 7.1 command prompt.  Otherwise, paths to vc10 are (deliberately) not available.  This is a self-defense strategy when working with multiple compilers and builds on Windows.

Quote
Another easy check: do you have the correct Compiler activated in your project / target ? (menu project -> build options, check the value in the combo-box for the main project and all the targets.) If you have not set it manually, and if VC is not your default compiler, then you will have this message.

I'm using SVN 7671 now.  I'll be darned, the default for the option you describe is "Microsoft Visual C++ 2005/2008."  And now that I change it to vc10, the build magically starts to work.  I am wondering if this is a misfeature.  I would have expected the project options to be the same as I configured with CMake.  Pretty rough learning curve if this is expected behavior; thanks for straightening this out.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: is vc10 known to work with nightly builds?
« Reply #11 on: January 11, 2012, 07:48:32 am »
I would have expected the project options to be the same as I configured with CMake.  Pretty rough learning curve if this is expected behavior; thanks for straightening this out.
How should that be? Code::Blocks does know nothing about CMake and actually cannot know anything. It's your duty to setup the project to let C::B know what you've actually configured in CMake.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline bvanevery

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: is vc10 known to work with nightly builds?
« Reply #12 on: January 11, 2012, 09:13:27 am »
I would have expected the project options to be the same as I configured with CMake.  Pretty rough learning curve if this is expected behavior; thanks for straightening this out.
How should that be? Code::Blocks does know nothing about CMake and actually cannot know anything. It's your duty to setup the project to let C::B know what you've actually configured in CMake.

CMake knows the format of the .cbp file and generates such.  I would expect a .cbp file to provide the compiler info to C::B.  It is possible that CMake does not in fact put the compiler info in the .cbp file; I don't know.  But if a .cbp file can't tell C::B which compiler to use even in principle, that's bad design.  As is making this sort of trivia "my responsibility."  But hey, open source is for fixing things, right?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12123
    • Travis build status
Re: is vc10 known to work with nightly builds?
« Reply #13 on: January 11, 2012, 09:26:17 am »
Yes, CMake doesn't know your compiler setup.
Also it is not logical to put the compiler setup in the project,
because the purpose of the project (original one) is to be computer independent,
so you can move the project and it will work on your friends machine,
 if he has the correct compiler and libraries.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: is vc10 known to work with nightly builds?
« Reply #14 on: January 11, 2012, 10:30:24 am »
Also it is not logical to put the compiler setup in the project,
I guess he meant a "pointer" to the compiler to use. This (of course) is in the project file. However, where the compiler is and where it has its resources is (as oBFusCATed stated correctly) user depended. So this is a "user global" configuration you are responsible for inside C::B, not using CMake.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ