View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007088CMakeCMakepublic2008-05-23 17:252008-09-11 12:11
ReporterGary Yang 
Assigned ToBill Hoffman 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake-2-6 
Target VersionFixed in Version 
Summary0007088: CMake cannot use VC2007 compiler when using a build account (not real-user account) on Windows Vista
DescriptionAfter I upgraded the CMake from 2.4 to the current release 2.6.0, the automatic build on my machine no longer function properly.

I have a dedicated user account for the automatic build for an internal project. In order to figure out what is going wrong, I use the same source code, some command, but different user account (mine vs. build account) and different directories.

--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
The CMake script used to produce the output looks like:
# set Root
#SET (TOP "c:/Gehua/VXL")
SET(CTEST_DASHBOARD_ROOT "c:/Gehua/VXL")

# this is the cvs module name that should be checked out
SET (CTEST_MODULE_NAME DA)
# these are the the name of the source and binary directory on disk.
# They will be appended to DASHBOARD_ROOT
SET(CTEST_SOURCE_NAME dalsrc)
SET(CTEST_BINARY_NAME bin-tmp)
SET(CTEST_SOURCE_DIRECTORY ${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME})
SET(CTEST_BINARY_DIRECTORY ${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME})

# what cmake command to use for configuring this dashboard
# Use this CTEST command
SET(CTEST_CMAKE_COMMAND "${CMAKE_INSTALL_PATH}/cmake.exe")
SET(CTEST_CVS_COMMAND "C:/tools/cygwin/bin/cvs.exe")
SET(CTEST_SVN_COMMAND "C:/tools/cygwin/bin/svn.exe")
SET(CTEST_CTEST_NAME "${CMAKE_INSTALL_PATH}/ctest.exe")
SET(CTEST_BUILD_CONFIGURATION "Debug")
SET(CTEST_CMAKE_GENERATOR "Visual Studio 8 2005")

# should ctest wipe the binary tree before running
SET (CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE)

# which ctest command to use for running the dashboard
# "${CTEST_CMAKE_COMMAND} -E copy ${MYINFO} ${CTEST_BINARY_DIRECTORY}/Testing/Notes/ctest_info.txt"
# "${CTEST_CMAKE_COMMAND} -E copy ${MYSCRIPT} ${CTEST_BINARY_DIRECTORY}/Testing/Notes/ctest_script.cmake"

SET (CTEST_COMMAND
  "${CTEST_CTEST_NAME} -C Debug -D NightlyStart"
  "${CTEST_CTEST_NAME} -C Debug -D NightlyUpdate"
  "${CTEST_CTEST_NAME} -C Debug -D NightlyConfigure"
  "${CTEST_CTEST_NAME} -C Debug -D NightlyBuild"
  "${CTEST_CTEST_NAME} -C Debug -D NightlyTest"
  "${CTEST_CTEST_NAME} -C Debug -D NightlySubmit"
)
# this is the initial cache
SET (CTEST_INITIAL_CACHE "
BUILDNAME:STRING=WinVista-VS8-dbg
VXL_DIR:PATH=c:/Gehua/VXL/vxlbin-vc8
")

--------------------------------------------------------------------------------
--------------------------------------------------------------------------------

I used command "c:/tools/CMake-2.6/bin/ctest.exe -VV -S ..\nightly-debug_vc8.cmake" to trigger the build.

The build used the dedicated build account failed to compile anything. The output is:
C:\builds\bin-nightly-debug>c:/tools/CMake-2.6/bin/ctest.exe -VV -S ..\nightly-debug_vc8.cmake
* Extra verbosity turned on
Reading Script: C:/builds/nightly-debug_vc8.cmake
Problem removing the binary directory
Run cmake command: C:/Tools/CMake-2.6/bin/cmake.exe "c:/builds/src-nightly-debug"
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio 8/VC/bin/cl.exe
CMake Error: GetObject failed HRESULT, hr = 0x80070005
C:\Hoffman\CMakeReleaseDirectory\CMake-2-6\Source\cmCallVisualStudioMacro.cxx(311)
CMake Error: GetObject failed HRESULT, hr = 0x80070005
C:\Hoffman\CMakeReleaseDirectory\CMake-2-6\Source\cmCallVisualStudioMacro.cxx(311)
CMake Error: GetRunningInstances failed HRESULT, hr = 0x80070005
C:\Hoffman\CMakeReleaseDirectory\CMake-2-6\Source\cmCallVisualStudioMacro.cxx(361)
CMake Error: FindVisualStudioInstances failed HRESULT, hr = 0x80070005
C:\Hoffman\CMakeReleaseDirectory\CMake-2-6\Source\cmCallVisualStudioMacro.cxx(455)
CMake Error: cmCallVisualStudioMacro::CallMacro failed, err = 2
CMake Error: Internal CMake error, TryCompile generation of cmake failed
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio 8/VC/bin/cl.exe -- broken
-- Configuring done
CMake Error at C:/tools/CMake-2.6/share/cmake-2.6/Modules/CMakeTestCCompiler.cmake:32 (MESSAGE):
  The C compiler "C:/Program Files/Microsoft Visual Studio 8/VC/bin/cl.exe"
  is not able to compile a simple test program.

  It fails with the following output:





  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:1 (PROJECT)


Run ctest command: C:/Tools/CMake-2.6/bin/ctest.exe -C Debug -D NightlyStart
Cannot find file: C:/builds/bin-nightly-debug/DartConfiguration.tcl
   Site:
   Build name:
WARNING: No nightly start time found please set in CTestConfig.cmake or DartConfig.cmake
Problem initializing the dashboard.
Unable to run cmake:
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio 8/VC/bin/cl.exe
CMake Error: GetObject failed HRESULT, hr = 0x80070005
C:\Hoffman\CMakeReleaseDirectory\CMake-2-6\Source\cmCallVisualStudioMacro.cxx(311)
CMake Error: GetObject failed HRESULT, hr = 0x80070005
C:\Hoffman\CMakeReleaseDirectory\CMake-2-6\Source\cmCallVisualStudioMacro.cxx(311)
CMake Error: GetRunningInstances failed HRESULT, hr = 0x80070005
C:\Hoffman\CMakeReleaseDirectory\CMake-2-6\Source\cmCallVisualStudioMacro.cxx(361)
CMake Error: FindVisualStudioInstances failed HRESULT, hr = 0x80070005
C:\Hoffman\CMakeReleaseDirectory\CMake-2-6\Source\cmCallVisualStudioMacro.cxx(455)
CMake Error: cmCallVisualStudioMacro::CallMacro failed, err = 2
CMake Error: Internal CMake error, TryCompile generation of cmake failed
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio 8/VC/b
in/cl.exe -- broken
-- Configuring done
CMake Error at C:/tools/CMake-2.6/share/cmake-2.6/Modules/CMakeTestCCompiler.cma
ke:32 (MESSAGE):
  The C compiler "C:/Program Files/Microsoft Visual Studio 8/VC/bin/cl.exe"
  is not able to compile a simple test program.

  It fails with the following output:





  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:1 (PROJECT)

C:\builds\bin-nightly-debug>

The build using my account progresses normally. The output is:
C:\Gehua\VXL\bin-tmp>c:/tools/CMake-2.6/bin/ctest.exe -VV -S ..\nightly-debug_vc8.cmake
* Extra verbosity turned on
Reading Script: C:/Gehua/VXL/nightly-debug_vc8.cmake
Run cmake command: C:/Tools/CMake-2.6/bin/cmake.exe "c:/Gehua/VXL/dalsrc"
-- Check for working C compiler: cl
-- Check for working C compiler: cl -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: cl
-- Check for working CXX compiler: cl -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
CMake Warning (dev) at dax/CMakeLists.txt:40 (ADD_EXECUTABLE):
  Policy CMP0003 should be set before this line. Add code such as

    if(COMMAND cmake_policy)
      cmake_policy(SET CMP0003 NEW)
    endif(COMMAND cmake_policy)

  as early as possible but after the most recent call to
  cmake_minimum_required or cmake_policy(VERSION). This warning appears
  because target "batch_test_pairwise" links to some libraries for which the
  linker must search:

    vil_algo, vil3d, vil, vul, rrel, rsdl, vnl_algo, netlib, v3p_netlib, vnl
    vbl, jpeg, tiff, png, vgl, vsl, vcl, ws2_32, z, vil, vul, vnl

  and other libraries with known full path:

    C:/Gehua/VXL/bin-tmp/lib/Debug/ddl.lib

  CMake is adding directories in the second list to the linker search path in
  case they are needed to find libraries from the first list (for backwards
  compatibility with CMake 2.4). Set policy CMP0003 to OLD or NEW to enable
  or disable this behavior explicitly. Run "cmake --help-policy CMP0003" for
  more information.
This warning is for project developers. Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: C:/Gehua/VXL/bin-tmp
Run ctest command: C:/Tools/CMake-2.6/bin/ctest.exe -C Debug -D NightlyStart
   Site: hd.dualalign
   Build name: WinVista-VS8-dbg
Determine Nightly Start Time
   Specified time: 23:00:00 EDT
Create new tag: 20080523-0300 - Nightly
Start processing tests
Run ctest command: C:/Tools/CMake-2.6/bin/ctest.exe -C Debug -D NightlyUpdate
   Site: hd.dualalign
   Build name: WinVista-VS8-dbg
Start processing tests
Updating the repository
   Updating the repository: C:/Gehua/VXL/dalsrc
   Use SVN repository type
Determine Nightly Start Time
   Specified time: 23:00:00 EDT
The system cannot find the file specified
The system cannot find the file specified
The system cannot find the file specified
   Gathering version information (each . represents one updated file):
The system cannot find the file specified
Problem determining the current revision of the repository from output:

   Update with command: "SVNCOMMAND-NOTFOUND" status failed
Error(s) when updating the project
Output:
Errors while running CTest
   Project is up-to-date
Run ctest command: C:/Tools/CMake-2.6/bin/ctest.exe -C Debug -D NightlyConfigure

   Site: hd.dualalign
   Build name: WinVista-VS8-dbg
Start processing tests
Configure project
   Each . represents 1024 bytes of output
    .. Size of output: 1K
Run ctest command: C:/Tools/CMake-2.6/bin/ctest.exe -C Debug -D NightlyBuild
   Site: hd.dualalign
   Build name: WinVista-VS8-dbg
Start processing tests
Build project
   Each symbol represents 1024 bytes of output.
   '!' represents an error and '*' a warning.
    .******..
[the further output is ignored]
TagsNo tags attached.
Attached Filestxt file icon output-my-account.txt [^] (3,389 bytes) 2008-05-23 17:28 [Show Content]
txt file icon output-auto-build-account.txt [^] (3,350 bytes) 2008-05-23 17:28 [Show Content]

 Relationships

  Notes
(0012100)
Bill Hoffman (manager)
2008-05-23 22:46

Dave this looks like trouble with the the macro stuff.
(0012128)
Gary Yang (reporter)
2008-05-27 15:14

It turned out that, FOR THE FIRST RUN OF CMake, it requires admin privilege in order to get passed the problem reported before.
(0012884)
David Cole (manager)
2008-07-30 15:32

I fixed this by changing the "error" output to "message" output, and only doing any output at all if you pass in a flag saying you want the output. For gui based cmakes the message output should not be there any more when an error occurs calling a Visual Studio macro. For command line cmakes, you have to pass --debug-output to see the error messages about calling VS macros.

Bill, please merge this bug fix to the CMake-2-6 branch after a night on the dashboards:

/cvsroot/CMake/CMake/Source/cmCallVisualStudioMacro.cxx,v <-- cmCallVisualStudioMacro.cxx
new revision: 1.4; previous revision: 1.3
/cvsroot/CMake/CMake/Source/cmCallVisualStudioMacro.h,v <-- cmCallVisualStudioMacro.h
new revision: 1.2; previous revision: 1.1
/cvsroot/CMake/CMake/Source/cmGlobalVisualStudioGenerator.cxx,v <-- cmGlobalVisualStudioGenerator.cxx
new revision: 1.14; previous revision: 1.13
/cvsroot/CMake/CMake/Source/cmake.cxx,v <-- cmake.cxx
new revision: 1.390; previous revision: 1.389

 Issue History
Date Modified Username Field Change
2008-05-23 17:25 Gary Yang New Issue
2008-05-23 17:28 Gary Yang File Added: output-my-account.txt
2008-05-23 17:28 Gary Yang File Added: output-auto-build-account.txt
2008-05-23 22:45 Bill Hoffman Status new => assigned
2008-05-23 22:45 Bill Hoffman Assigned To => David Cole
2008-05-23 22:46 Bill Hoffman Note Added: 0012100
2008-05-27 15:14 Gary Yang Note Added: 0012128
2008-07-30 15:32 David Cole Note Added: 0012884
2008-07-30 15:32 David Cole Assigned To David Cole => Bill Hoffman
2008-09-11 12:11 Bill Hoffman Status assigned => closed
2008-09-11 12:11 Bill Hoffman Resolution open => fixed


Copyright © 2000 - 2018 MantisBT Team