View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0010539CMakeCMakepublic2010-04-12 16:032011-06-14 09:58
ReporterTorsten Rohlfing 
Assigned ToBill Hoffman 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake-2-8 
Target VersionFixed in Version 
Summary0010539: CMake fails with VS10 Express
DescriptionConfiguration of my CMake project fails using Visual Studio 10 Express (final) and CMake 2.8.1.

On the same machine, configuration for/using VS9 Express works fine. CMake output of first two errors is attached. I'll be happy to attach more information if someone tells me what would be helpful.

Thanks.
Additional InformationCheck for working C compiler using: Visual Studio 10
Check for working C compiler using: Visual Studio 10 -- works
Detecting C compiler ABI info
CMake Error: Could not COPY_FILE.
  OutputFile: ''
    copyFile: 'C:/cygwin/home/torsten/testing/studio10/CMakeFiles/CMakeDetermineCompilerABI_C.bin'

Unable to find executable for try_compile: tried "C:/cygwin/home/torsten/testing/studio10/CMakeFiles/CMakeTmp/cmTryCompileExec.exe" and "C:/cygwin/home/torsten/testing/studio10/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec.exe" and "C:/cygwin/home/torsten/testing/studio10/CMakeFiles/CMakeTmp/Development/cmTryCompileExec.exe".

Detecting C compiler ABI info - done
CMake Error at C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/CMakeDetermineCompilerABI.cmake:40 (FILE):
  file STRINGS file
  "C:/cygwin/home/torsten/testing/studio10/CMakeFiles/CMakeDetermineCompilerABI_C.bin"
  cannot be read.
Call Stack (most recent call first):
  C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:71 (CMAKE_DETERMINE_COMPILER_ABI)
  CMakeLists.txt:38 (PROJECT)


TagsNo tags attached.
Attached Fileszip file icon buildtree.zip [^] (14,504 bytes) 2010-04-12 16:17

 Relationships

  Notes
(0020141)
Bill Hoffman (manager)
2010-04-12 16:09

Can you attach a zipped up build tree to this bug?
(0020142)
Torsten Rohlfing (reporter)
2010-04-12 16:18

Here you go - build tree ZIP.
(0020144)
Bill Hoffman (manager)
2010-04-12 16:52

This seems to be the problem: (From CMakeOutput.log:)

Change Dir: C:/cygwin/home/torsten/testing/studio10/CMakeFiles/CMakeTmp

Run Build Command:C:\PROGRA~1\MICROS~2.0\Common7\IDE\VCExpress.exe cmTryCompileE
xec.vcxproj /p:Configuration=Debug
^M
Microsoft (R) Visual C++ 2010 Express Version 10.0.30319.1.^M
Copyright (C) Microsoft Corp. All rights reserved.^M
^M
Invalid Command Line. Unknown Switch : p:Configuration=Debug.^M
^M
Use:^M
vcexpress [solutionfile | projectfile | anyfile.ext] [switches]^M
^M
The first argument for vcexpress is usually a solution file or project file.^M
You can also use any other file as the first argument if you want to have the^M
file open automatically in an editor. When you enter a project file, the IDE^M
looks for an .sln file with the same base name as the project file in the^M
parent directory for the project file. If no such .sln file exists, then the^M
IDE looks for a single .sln file that references the project. If no such single

.sln file exists, then the IDE creates an unsaved solution with a default .sln^M
file name that has the same base name as the project file.^M
^M
Command line builds:^M
vcexpress solutionfile.sln /build [ solutionconfig ] [ /project projectnameorfil
e [ /projectconfig name ] ]^M
Available command line switches:^M
^M
/Log Logs IDE activity to the specified file for troubleshooting.^M
/ResetSettings Restores the IDE's default settings, optionally resets to^M
                the specified VSSettings file.^M
/SafeMode Launches the IDE in safe mode loading minimal windows.^M
^M
Product-specific switches:^M
^M
/debugexe Open the specified executable to be debugged. The^M
        remainder of the command line is passed to this^M
                executable as its arguments.^M
/useenv Use PATH, INCLUDE, LIBPATH, and LIB environment variables^M
                instead of IDE paths for VC++ builds.^M
^M
To attach the debugger from the command line, use:^M
        VsJITDebugger.exe -p <pid>^M


Detecting C compiler ABI info compiled with the following output:
Change Dir: C:/cygwin/home/torsten/testing/studio10/CMakeFiles/CMakeTmp

Run Build Command:C:\PROGRA~1\MICROS~2.0\Common7\IDE\VCExpress.exe cmTryCompileE
xec.vcxproj /p:Configuration=Debug


Does VS express include MSBuild.exe? On the pro version I have this in my cache:

I have this:
CMAKE_MAKE_PROGRAM:FILEPATH=C:/WINDOWS/Microsoft.NET/Framework/v4.0.30128/MSBuil
d.exe

You have this:
CMAKE_MAKE_PROGRAM:FILEPATH=C:/PROGRA~1/MICROS~2.0/Common7/IDE/VCExpress.exe
(0020145)
Torsten Rohlfing (reporter)
2010-04-12 17:01

The MSBuild.exe seems to come from Net4, not VS Express, so I have it too:

$ ls -l /cygdrive/c/WINDOWS/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe
-rwxrwx---+ 1 Administrators SYSTEM 132944 2010-03-18 16:47 /cygdrive/c/WINDOWS/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe

(Excuse the use of Cygwin/bash for ls'ing, but cmd.exe is such a pain in the behind ;))

Given that I have the MSBuild binary, does that open up the possibility for an easy fix?
(0020146)
Bill Hoffman (manager)
2010-04-12 17:09

OK, can you see Modules/CMakeVS10FindMake.cmake, this part:

FIND_PROGRAM(CMAKE_MAKE_PROGRAM
  NAMES MSBuild
  HINTS
  "$ENV{SYSTEMROOT}/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0;CLR Version]/"
  "c:/WINDOWS/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0;CLR Version]/"
  )

It must be that you have different reg entries. Can you try to fix that? I also should remove the other stuff, since only MSBuild is going to work for VS 10. If you set CMAKE_MAKE_PROGRAM in your cache, does it work?
(0020147)
Torsten Rohlfing (reporter)
2010-04-12 17:19

Fixing it in the cache doesn't help. But editing the Modules/CMakeVS10FindMake.cmake to:

FIND_PROGRAM(CMAKE_MAKE_PROGRAM
  NAMES MSBuild
  HINTS
  "c:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/"
  "$ENV{SYSTEMROOT}/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0;CLR Version]/"
  "c:/WINDOWS/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0;CLR Version]/"
  )

gets everything working. Obviously, this is not portable and will probably break sometime in the future ;)
(0020148)
Bill Hoffman (manager)
2010-04-12 17:26

Can you check your registry with regedit cand see if there is a way to find it? Did VS express install anything that would have the version of MSBuild in it?
(0020149)
Torsten Rohlfing (reporter)
2010-04-12 17:34

The closest I can find is key

"WinFX1"

in

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\MSBuild\SafeImports

which on my machine has the value

C:\WINDOWS\microsoft.net\framework\v4.0.30319\Microsoft.WinFX.targets

That's the only place where I can find the NET.4 path under VisualStudio/10.0/, but then again, it's not like I am a Windows expert.
(0020214)
Nils Gladitz (developer)
2010-04-16 06:39

What seems to be working for me is:

"$ENV{SYSTEMROOT}/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\10.0;CLR Version]/"
(0020224)
Bill Hoffman (manager)
2010-04-16 12:49

Thanks!

I have pushed the change to master.

To git@cmake.org:cmake.git
   bbd9392..6202d96 master -> master

 Issue History
Date Modified Username Field Change
2010-04-12 16:03 Torsten Rohlfing New Issue
2010-04-12 16:09 Bill Hoffman Note Added: 0020141
2010-04-12 16:09 Bill Hoffman Status new => assigned
2010-04-12 16:09 Bill Hoffman Assigned To => Bill Hoffman
2010-04-12 16:17 Torsten Rohlfing File Added: buildtree.zip
2010-04-12 16:18 Torsten Rohlfing Note Added: 0020142
2010-04-12 16:52 Bill Hoffman Note Added: 0020144
2010-04-12 17:01 Torsten Rohlfing Note Added: 0020145
2010-04-12 17:09 Bill Hoffman Note Added: 0020146
2010-04-12 17:19 Torsten Rohlfing Note Added: 0020147
2010-04-12 17:26 Bill Hoffman Note Added: 0020148
2010-04-12 17:34 Torsten Rohlfing Note Added: 0020149
2010-04-16 06:39 Nils Gladitz Note Added: 0020214
2010-04-16 12:49 Bill Hoffman Note Added: 0020224
2011-06-14 09:58 Bill Hoffman Status assigned => closed
2011-06-14 09:58 Bill Hoffman Resolution open => fixed


Copyright © 2000 - 2018 MantisBT Team