[CMake] Unable to create project files with Visual Studio 2010 on Windows 7

David Cole DLRdave at aol.com
Wed Jan 7 10:58:09 EST 2015


The "The requested operation requires elevation." message indicates
some sort of permissions problem (admin privileges...)

Did you run VS and/or CMake as an admin one time, and then not as an
admin a second time...?

It should work with either all-non-admin runs or all-admin runs, but
you probably can't mix-n-match from run to run.

Can you start with a very simple hello world app, in a brand new
"empty to start with" directory, and run CMake and VS without admin
privileges?

Or do you get exactly the same thing if you do that?


D



On Tue, Jan 6, 2015 at 7:10 PM,  <David.Karr at engilitycorp.com> wrote:
> I have just started using a new Windows 7 host with Visual Studio 2010
> Professional. When I call CMake to generate my project files, I get the
> following output in CMakeError.log:
>
> ==========================
> Determining if the C compiler works failed with the following output:
> Change Dir: C:/________________________/__________/CMakeFiles/CMakeTmp
>
> Run Build Command:C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
> cmTryCompileExec.vcxproj /p:Configuration=Debug
> Microsoft (R) Build Engine version 4.0.30319.17929
> [Microsoft .NET Framework, version 4.0.30319.18034]
> Copyright (C) Microsoft Corporation. All rights reserved.
>
> Build started 1/6/2015 6:15:19 PM.
> Project
> "C:\________________________\__________\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj"
> on node 1 (default targets).
> InitializeBuildStatus:
>   Creating "cmTryCompileExec.dir\Debug\cmTryCompileExec.unsuccessfulbuild"
> because "AlwaysCreate" was specified.
> ClCompile:
>   C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\CL.exe /c /Zi
> /nologo /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D
> "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise
> /Zc:wchar_t /Zc:forScope /Fo"cmTryCompileExec.dir\Debug\\"
> /Fd"C:/________________________/__________/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec.pdb"
> /Gd /TC /analyze- /errorReport:queue testCCompiler.c  /Zm1000
> TRACKER : error TRK0002: Failed to execute command: ""C:\Program Files
> (x86)\Microsoft Visual Studio 10.0\VC\bin\CL.exe"
> @C:\Users\nnnnnnnnnnnn\AppData\Local\Temp\tmp9db9bf329c554cb8be447cdb72535c4e.rsp".
> The requested operation requires elevation.
> [C:\________________________\__________\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj]
>
>
> Done Building Project
> "C:\________________________\__________\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj"
> (default targets) -- FAILED.
>
> Build FAILED.
>
> "C:\________________________\__________\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj"
> (default target) (1) ->
> (ClCompile target) ->
>   TRACKER : error TRK0002: Failed to execute command: ""C:\Program Files
> (x86)\Microsoft Visual Studio 10.0\VC\bin\CL.exe"
> @C:\Users\nnnnnnnnnnnn\AppData\Local\Temp\tmp9db9bf329c554cb8be447cdb72535c4e.rsp".
> The requested operation requires elevation.
> [C:\________________________\__________\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj]
>
>     0 Warning(s)
>     1 Error(s)
>
> Time Elapsed 00:00:00.10
> ==========================
>
> The only thing I've changed in the output text is I replaced some
> user-specific directory names with underscores or "nnnnnnnnnnnn".
>
> This project previously built just fine on Windows XP. Moreover, my
> coworker, who as far as we can tell set up his Windows 7 host the same way I
> did (modulo some things that shouldn't matter, such as I have a copy of
> Emacs and he doesn't), is able to build the same project files without
> error.
>
> It may be noteworthy that after this failure, the file
> CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj does not exist, and there are
> no files whatsoever in CMakeFiles\CMakeTmp\cmTryCompileExec.dir\Debug.
>
> I have been trying all kinds of suggestions I have found by looking up the
> message "The requested operation requires elevation." I have tried setting
> ownership of the directories (it turns out I owned them all along), I have
> tried setting access rights (already set to full access), I tried turning
> off UAC, and I even tried repairing the installation of Visual Studio 2010.
> None of it made any difference.
>
> I've found some Web sites where some people have complained of problems when
> they had installed Visual Studio 2012 and tried to use Visual Studio 2010.
> But Visual Studio 2010 is the only version that has been installed on this
> host.
>
> This has had me dead in the water for at least a day, unable to make any
> progress on my actual project. Does anyone have any ideas about where to
> even begin to look for solutions I haven't already tried?
>
> David
>
>
>
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake


More information about the CMake mailing list