Re: [CMake] Check for working C compiler using: Visual Studio 10 -- broken

2013-03-07 Thread Mateusz Loskot
On 6 March 2013 11:52, Mateusz Loskot mate...@loskot.net wrote:
 On 5 March 2013 17:09, Bill Hoffman bill.hoff...@kitware.com wrote:

 Taking off incremental seemed to fix the problem for them as well.   If you 
 read that
 thread close, there seems to be ways to fix the problem...

 Installing VS2010 SP1 as the only sensible option.

I've found quicker and less intrusive solution [1] that works for those
who can't/don't want to upgrade to VS2010 SP1

Simply, take cvtres.exe from VS2010 SP1
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cvtres.exe
 or from VS2012
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\cvtres.exe
and copy it over the cvtres.exe in VS2010 RTM installation (the one without SP1)
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cvtres.exe

[1] 
http://social.msdn.microsoft.com/Forums/da-DK/vssetup/thread/d10adba0-e082-494a-bb16-2bfc039faa80

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Check for working C compiler using: Visual Studio 10 -- broken

2013-03-06 Thread Mateusz Loskot
On 5 March 2013 17:09, Bill Hoffman bill.hoff...@kitware.com wrote:
 On 3/5/2013 11:40 AM, Mateusz Loskot wrote:

 Nice tip with the solution in the CMakeTmp, I had no idea about it.

 I figured out that the VS2010 project there,
 cmTryCompileExec3417082516.vcxproj,
 specifies for linker  /INCREMENTAL:YES
 If I change to /INCREMENTAL:NO, then it builds.

 Still not sure how the VS2010/VS2012 toolsets interfere here,
 but it looks like this mess is not related to any problems with CMake.

 Seems to match what is in that stackoverflow article.

Yes, I have made a circle and came back to that solution.

 Taking off incremental seemed to fix the problem for them as well.   If you 
 read that
 thread close, there seems to be ways to fix the problem...

Installing VS2010 SP1 as the only sensible option.

Thanks!

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Check for working C compiler using: Visual Studio 10 -- broken

2013-03-05 Thread Mateusz Loskot
Hi,

Here is my environment:
- Windows 7 (64-bit).
- CMake 2.8.10.2
- Visual Studio 2010 Professional
- Visual Studio 2012 Professional (Update 1)

All VS installations work well with hand-crafted projects,
no problems building from IDE, no problems building from
corresponding command line prompts.

I launch Visual Studio Command Prompt (2010) and try to configure
CMake-based project, and I'm getting the status from the subject line.

Here is detailed CMake output:


d:\dev\soci\_git\build-sqlite3cmake -G Visual Studio 10 ..\soci\src
-- The C compiler identification is MSVC 16.0.30319.1
-- The CXX compiler identification is MSVC 16.0.30319.1
-- Check for working C compiler using: Visual Studio 10
-- Check for working C compiler using: Visual Studio 10 -- broken
CMake Error at C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message):
  The C compiler C:/Program Files (x86)/Microsoft Visual Studio
  10.0/VC/bin/cl.exe is not able to compile a simple test program.

  It fails with the following output:

   Change Dir: D:/dev/soci/_git/build-sqlite3/CMakeFiles/CMakeTmp

  Run Build Command:C:\PROGRA~2\MICROS~2.0\Common7\IDE\devenv.com
  CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec2214779388

  Microsoft (R) Visual Studio Version 10.0.30319.1.
  Copyright (C) Microsoft Corp.  All rights reserved.

  1-- Build started: Project: cmTryCompileExec2214779388, Configuration:
  Debug Win32 --

  1Build started 05/03/2013 15:34:40.
  1PrepareForBuild:
  1 Creating directory
  D:\dev\soci\_git\build-sqlite3\CMakeFiles\CMakeTmp\Debug\.
  1InitializeBuildStatus:
  1 Creating
  
cmTryCompileExec2214779388.dir\Debug\cmTryCompileExec2214779388.unsuccessfulbuild
  because AlwaysCreate was specified.
  1ClCompile:
  1 Microsoft (R) 32-bit C/C++ Optimizing Compiler Version
16.00.30319.01 for 80x86
  1 Copyright (C) Microsoft Corporation.  All rights reserved.
  1
  1 cl /c /Zi /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 /FocmTryCompileExec2214779388.dir\Debug\\
  
/FdD:/dev/soci/_git/build-sqlite3/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec2214779388.pdb
  /Gd /TC /analyze- /errorReport:prompt testCCompiler.c /Zm1000
  1
  1 testCCompiler.c
  1LINK : fatal error LNK1123: failure during conversion to COFF:
file invalid or corrupt
  1
  1Build FAILED.
  1
  1Time Elapsed 00:00:00.44
  == Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==

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

-- Configuring incomplete, errors occurred!

d:\dev\soci\_git\build-sqlite3



I have searched Web and this kind of error seems to be recurring,
some users even suggest to uninstall/reinstall Visual Studio...
Note, both VS versions work well with projects I already have.

I'm confused, what is the correct solution?

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Check for working C compiler using: Visual Studio 10 -- broken

2013-03-05 Thread Bill Hoffman

On 3/5/2013 10:45 AM, Mateusz Loskot wrote:

Hi,

Here is my environment:
- Windows 7 (64-bit).
- CMake 2.8.10.2
- Visual Studio 2010 Professional
- Visual Studio 2012 Professional (Update 1)

All VS installations work well with hand-crafted projects,
no problems building from IDE, no problems building from
corresponding command line prompts.

I launch Visual Studio Command Prompt (2010) and try to configure
CMake-based project, and I'm getting the status from the subject line.

Here is detailed CMake output:


d:\dev\soci\_git\build-sqlite3cmake -G Visual Studio 10 ..\soci\src
-- The C compiler identification is MSVC 16.0.30319.1
-- The CXX compiler identification is MSVC 16.0.30319.1
-- Check for working C compiler using: Visual Studio 10
-- Check for working C compiler using: Visual Studio 10 -- broken
CMake Error at C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message):
   The C compiler C:/Program Files (x86)/Microsoft Visual Studio
   10.0/VC/bin/cl.exe is not able to compile a simple test program.

   It fails with the following output:

Change Dir: D:/dev/soci/_git/build-sqlite3/CMakeFiles/CMakeTmp

   Run Build Command:C:\PROGRA~2\MICROS~2.0\Common7\IDE\devenv.com
   CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec2214779388

   Microsoft (R) Visual Studio Version 10.0.30319.1.
   Copyright (C) Microsoft Corp.  All rights reserved.

   1-- Build started: Project: cmTryCompileExec2214779388, Configuration:
   Debug Win32 --

   1Build started 05/03/2013 15:34:40.
   1PrepareForBuild:
   1 Creating directory
   D:\dev\soci\_git\build-sqlite3\CMakeFiles\CMakeTmp\Debug\.
   1InitializeBuildStatus:
   1 Creating
   
cmTryCompileExec2214779388.dir\Debug\cmTryCompileExec2214779388.unsuccessfulbuild
   because AlwaysCreate was specified.
   1ClCompile:
   1 Microsoft (R) 32-bit C/C++ Optimizing Compiler Version
16.00.30319.01 for 80x86
   1 Copyright (C) Microsoft Corporation.  All rights reserved.
   1
   1 cl /c /Zi /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 /FocmTryCompileExec2214779388.dir\Debug\\
   
/FdD:/dev/soci/_git/build-sqlite3/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec2214779388.pdb
   /Gd /TC /analyze- /errorReport:prompt testCCompiler.c /Zm1000
   1
   1 testCCompiler.c
   1LINK : fatal error LNK1123: failure during conversion to COFF:
file invalid or corrupt
   1
   1Build FAILED.
   1
   1Time Elapsed 00:00:00.44
   == Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==

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

-- Configuring incomplete, errors occurred!

d:\dev\soci\_git\build-sqlite3



I have searched Web and this kind of error seems to be recurring,
some users even suggest to uninstall/reinstall Visual Studio...
Note, both VS versions work well with projects I already have.

I'm confused, what is the correct solution?


I found this:

http://stackoverflow.com/questions/10888391/link-fatal-error-lnk1123-failure-during-conversion-to-coff-file-invalid-or-c

You could run cmake --debug-trycompile, then load the .sln file in the 
CMakeTmp directory with the IDE and see why it does not work.  Sounds 
like a .NET version issue.  I would try some of the stuff in that 
stackoverflow link.




Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake




--
Bill Hoffman
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065
bill.hoff...@kitware.com
http://www.kitware.com
518 881-4905 (Direct)
518 371-3971 x105
Fax (518) 371-4573
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Check for working C compiler using: Visual Studio 10 -- broken

2013-03-05 Thread John Drescher
On Tue, Mar 5, 2013 at 10:58 AM, David Cole dlrd...@aol.com wrote:
 Is your VS 2010 up to date with respect to available service packs?


I was going to ask that because Visual Studio 2010 RTM has a nasty
optimizer bug that caused me some pain in the past. SP1 fixed that
issue.


John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Check for working C compiler using: Visual Studio 10 -- broken

2013-03-05 Thread Mateusz Loskot
On 5 March 2013 15:58, David Cole dlrd...@aol.com wrote:
 Is your VS 2010 up to date with respect to available service packs?

Nope, I don't use SP1.
But, before VS2012 installation yesterday, everything worked perfectly well
(with regard to CMake).

 Does this same exact thing happen every time when you are starting from a
 clean build tree?

Yes, it does.

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Check for working C compiler using: Visual Studio 10 -- broken

2013-03-05 Thread Mateusz Loskot
On 5 March 2013 15:58, Bill Hoffman bill.hoff...@kitware.com wrote:
 On 3/5/2013 10:45 AM, Mateusz Loskot wrote:

 Here is my environment:
 - Windows 7 (64-bit).
 - CMake 2.8.10.2
 - Visual Studio 2010 Professional
 - Visual Studio 2012 Professional (Update 1)

 All VS installations work well with hand-crafted projects,
 no problems building from IDE, no problems building from
 corresponding command line prompts.

 I launch Visual Studio Command Prompt (2010) and try to configure
 CMake-based project, and I'm getting the status from the subject line.

 Here is detailed CMake output:


 
 d:\dev\soci\_git\build-sqlite3cmake -G Visual Studio 10 ..\soci\src
 -- The C compiler identification is MSVC 16.0.30319.1
 -- The CXX compiler identification is MSVC 16.0.30319.1
 -- Check for working C compiler using: Visual Studio 10
 -- Check for working C compiler using: Visual Studio 10 -- broken
 CMake Error at C:/Program Files (x86)/CMake
 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message):
The C compiler C:/Program Files (x86)/Microsoft Visual Studio
10.0/VC/bin/cl.exe is not able to compile a simple test program.

It fails with the following output:

 Change Dir: D:/dev/soci/_git/build-sqlite3/CMakeFiles/CMakeTmp

Run Build Command:C:\PROGRA~2\MICROS~2.0\Common7\IDE\devenv.com
CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec2214779388

Microsoft (R) Visual Studio Version 10.0.30319.1.
Copyright (C) Microsoft Corp.  All rights reserved.

1-- Build started: Project: cmTryCompileExec2214779388,
 Configuration:
Debug Win32 --

1Build started 05/03/2013 15:34:40.
1PrepareForBuild:
1 Creating directory
D:\dev\soci\_git\build-sqlite3\CMakeFiles\CMakeTmp\Debug\.
1InitializeBuildStatus:
1 Creating

 cmTryCompileExec2214779388.dir\Debug\cmTryCompileExec2214779388.unsuccessfulbuild
because AlwaysCreate was specified.
1ClCompile:
1 Microsoft (R) 32-bit C/C++ Optimizing Compiler Version
 16.00.30319.01 for 80x86
1 Copyright (C) Microsoft Corporation.  All rights reserved.
1
1 cl /c /Zi /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 /FocmTryCompileExec2214779388.dir\Debug\\

 /FdD:/dev/soci/_git/build-sqlite3/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec2214779388.pdb
/Gd /TC /analyze- /errorReport:prompt testCCompiler.c /Zm1000
1
1 testCCompiler.c
1LINK : fatal error LNK1123: failure during conversion to COFF:
 file invalid or corrupt
1
1Build FAILED.
1
1Time Elapsed 00:00:00.44
== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
 ==

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

 -- Configuring incomplete, errors occurred!

 d:\dev\soci\_git\build-sqlite3

 


 I have searched Web and this kind of error seems to be recurring,
 some users even suggest to uninstall/reinstall Visual Studio...
 Note, both VS versions work well with projects I already have.

 I'm confused, what is the correct solution?


 I found this:

 http://stackoverflow.com/questions/10888391/link-fatal-error-lnk1123-failure-during-conversion-to-coff-file-invalid-or-c

Bill,

I think I know this error well, but I experienced that at different occasion
not related to CMake. AFAIK, it simply means object files or binaries
being linked are
incompatible (i.e. one .obj built with VC++ from VS2010, the other
.obj by VS2012)

 You could run cmake --debug-trycompile, then load the .sln file in the
 CMakeTmp directory with the IDE and see why it does not work.  Sounds like a
 .NET version issue.  I would try some of the stuff in that stackoverflow link.

Nice tip with the solution in the CMakeTmp, I had no idea about it.

I figured out that the VS2010 project there, cmTryCompileExec3417082516.vcxproj,
specifies for linker  /INCREMENTAL:YES
If I change to /INCREMENTAL:NO, then it builds.

Still not sure how the VS2010/VS2012 toolsets interfere here,
but it looks like this mess is not related to any problems with CMake.

Thanks!

Best regards.
--
Mateusz Loskot, http://mateusz.loskot.net
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Check for working C compiler using: Visual Studio 10 -- broken

2013-03-05 Thread Bill Hoffman

On 3/5/2013 11:40 AM, Mateusz Loskot wrote:

Nice tip with the solution in the CMakeTmp, I had no idea about it.

I figured out that the VS2010 project there, cmTryCompileExec3417082516.vcxproj,
specifies for linker  /INCREMENTAL:YES
If I change to /INCREMENTAL:NO, then it builds.

Still not sure how the VS2010/VS2012 toolsets interfere here,
but it looks like this mess is not related to any problems with CMake.
Seems to match what is in that stackoverflow article.  Taking off 
incremental seemed to fix the problem for them as well.   If you read 
that thread close, there seems to be ways to fix the problem...


-Bill

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake