[CMake] Compiler Test Failing on Windows 7

Gregory Peele ARA/CFD gpeele at ara.com
Tue Jan 5 11:27:08 EST 2010


I wrote the batch script that Joe is using - the AMD64 in the build directory path is just a consequence of using %PROCESSOR_ARCHITECTURE% to create the build directory from the batch script and is purely a cosmetic issue.

The CMake generator is what selects whether the build is 32-bit or 64-bit, and we definitely use the 32-bit Visual Studio 2005 generator.  Since CMake is a 32-bit process, it sees the system as being 32-bit when processing CMakelists.txt, and is definitely using our configuration settings for 32-bit Windows.  I'm especially puzzled by this behavior because the same project builds successfully in 64-bit Vista.

Gregory Peele, Jr.
Applied Research Associates, Inc.

From: cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] On Behalf Of Smith Jack (Ext. - UGIS - UniCredit Group)
Sent: Tuesday, January 05, 2010 8:51 AM
To: cmake at cmake.org
Subject: Re: [CMake] Compiler Test Failing on Windows 7

"The path is made from a batch script, and cmake is hardcoded to use 32bit on windows in the build scripts."

I'm no expert, but it seems like you must have something wrong in the 'batch script' (or your environment).  It looks like cmake thinks it's running on a AMD64 based system.  I think the OS architecture is *normally* auto-detected, and to mistake a 32 bit OS for a 64 bit one seems like a pretty big error.

Have you examined the script to be sure it's not misbehaving under Windows 7 - perhaps a list of known OSes doesn't include Win7 ?


________________________________
From: Joe L [mailto:superist_joe at yahoo.com]
Sent: Tuesday, January 05, 2010 2:44 PM
To: Smith Jack (Ext. - UGIS - UniCredit Group); cmake at cmake.org
Subject: Re: [CMake] Compiler Test Failing on Windows 7
I deleted the whole build directory before running the build.  There isn't any modifying of the CMakeCache.txt as far as i know.

Joe
________________________________
From: Smith Jack (Ext. - UGIS - UniCredit Group) <jack.smith.extern at unicreditgroup.de>
To: "cmake at cmake.org" <cmake at cmake.org>
Sent: Tue, January 5, 2010 8:24:51 AM
Subject: Re: [CMake] Compiler Test Failing on Windows 7
Do you have a stale CMakeCache.txt file somewhere ?

It's *usually* perfectly safe to delete all occurrences of CMakeCache.txt within a project and have CMake regenerate them.  I say usually, because I have no idea if you are modifying that file for some reason, although the practice is not recommended.

________________________________
From: cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] On Behalf Of Joe L
Sent: Tuesday, January 05, 2010 2:09 PM
To: cmake at cmake.org
Subject: [CMake] Compiler Test Failing on Windows 7
After upgrading to windows 7, I'm getting errors when trying to run the cmake project generation step.  It seems as though I'm unable to copy a file.  I have the directory as a subdirectory of my users folder, so I didn't think it would be a permissions issue.

Here is the error:
CMake Error: Could not COPY_FILE.
  OutputFile: ''
    copyFile: 'C:/Users/joe/devel/RUGUD-devel/com.ara.engen.plugins.cpp/build/windows.AMD64.vc.8.release/CMakeFiles/CMakeDetermineCompilerABI_C.bin'

Unable to find executable for try_compile: tried "C:/Users/joe/devel/RUGUD-devel/com.ara.engen.plugins.cpp/build/windows.AMD64.vc.8.release/CMakeFiles/CMakeTmp/cmTryCompileExec.exe" and "C:/Users/joe/devel/RUGUD-devel/com.ara.engen.plugins.cpp/build/windows.AMD64.vc.8.release/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec.exe" and "C:/Users/joe/devel/RUGUD-devel/com.ara.engen.plugins.cpp/build/windows.AMD64.vc.8.release/CMakeFiles/CMakeTmp/Development/cmTryCompileExec.exe".

CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeDetermineCompilerABI.cmake:40 (FILE):
  file STRINGS file
  "C:/Users/joe/devel/RUGUD-devel/com.ara.engen.plugins.cpp/build/windows.AMD64.vc.8.release/CMakeFiles/CMakeDetermineCompilerABI_C.bin"
  cannot be read.
Call Stack (most recent call first):
  C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:69 (CMAKE_DETERMINE_COMPILER_ABI)
  CMakeLists.txt:3 (PROJECT)


CMake Error: Could not COPY_FILE.
  OutputFile: ''
    copyFile: 'C:/Users/joe/devel/RUGUD-devel/com.ara.engen.plugins.cpp/build/windows.AMD64.vc.8.release/CMakeFiles/CMakeDetermineCompilerABI_CXX.bin'

Unable to find executable for try_compile: tried "C:/Users/joe/devel/RUGUD-devel/com.ara.engen.plugins.cpp/build/windows.AMD64.vc.8.release/CMakeFiles/CMakeTmp/cmTryCompileExec.exe" and "C:/Users/joe/devel/RUGUD-devel/com.ara.engen.plugins.cpp/build/windows.AMD64.vc.8.release/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec.exe" and "C:/Users/joe/devel/RUGUD-devel/com.ara.engen.plugins.cpp/build/windows.AMD64.vc.8.release/CMakeFiles/CMakeTmp/Development/cmTryCompileExec.exe".

CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeDetermineCompilerABI.cmake:40 (FILE):
  file STRINGS file
  "C:/Users/joe/devel/RUGUD-devel/com.ara.engen.plugins.cpp/build/windows.AMD64.vc.8.release/CMakeFiles/CMakeDetermineCompilerABI_CXX.bin"
  cannot be read.
Call Stack (most recent call first):
  C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCXXCompiler.cmake:62 (CMAKE_DETERMINE_COMPILER_ABI)
  CMakeLists.txt:3 (PROJECT)

Even though the path says AMD64, it's doing a 32-bit build.  The path is made from a batch script, and cmake is hardcoded to use 32bit on windows in the build scripts.

Any ideas on what the problem might be?

Thanks,
Joe


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100105/70a49868/attachment-0001.htm>


More information about the CMake mailing list