Here's the output of our build machine. Had to wing some of the commands.
-Tony
-----Original Message-----
From: Saether Jan-Arve
Sent: 10. huhtikuuta 2013 16:01
To: Stephen Kelly; [email protected]
Cc: Sarajärvi Tony; Andreas Holzammer; Patrick Spendrin
Subject: RE: [Development] CMake tests with 64 bit windows
Attached is the essential output, Stephen.
Interestingly, the tool chain I had in this shell was msvc2010 (x64).
(As you can see from the call to 'cl')
However, cmake doesn't seem to pick that up and instead picks up my older 2008
compiler.
Inspecting the qtcmaketest.vcproj file also shows the issue (line 67):
AdditionalOptions=" /STACK:10000000 /machine:X86 /debug"
It seems that the reason is that cmake does not recognize/utilize the msvc2010
x64 toolchain for some reason.
Jan Arve
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]
> On Behalf Of Stephen Kelly
> Sent: 10. april 2013 13:09
> To: [email protected]
> Cc: Sarajärvi Tony; Andreas Holzammer; Patrick Spendrin
> Subject: Re: [Development] CMake tests with 64 bit windows On
> Wednesday, April 10, 2013 07:30:34 you wrote:
>> Hello,
>>
>> we encountered some trouble when setting up a new CI machine where we
>> would run Windows 7 64 bit and compile in 64 bit mode. The CMake
>> tests fail there.
>
> Andy/Patrick, have you ever seen something like this before?
>
> ClCompile:
> two.cpp
> two_automoc.cpp
> Qt5Core.lib(Qt5Core.dll) : fatal error LNK1112: module machine type
> 'x64'
> conflicts with target machine type 'X86'
>
> More logging:
>
> http://thread.gmane.org/gmane.comp.lib.qt.devel/10746
>
> Tony, please download the attached files and execute the build with
> qmake and cmake (both with nmake and visual studio generators) and
> post all of the terminal output. Something like this:
>
> cd qtcmaketest mkdir qmaketest cd qmaketest
> C:\path\to\Qt5\bin\qmake.exe .. nmake cd .. mkdir cmake_nmake cd
> cmake_nmake cmake .. -G "NMake Makefiles" -DCMAKE_VERBOSE_MAKEFILE=1 -
> DCMAKE_PREFIX_PATH=C:\path\to\Qt5\lib\cmake cmake --build . cd .. cd
> cmake_vs cmake .. -DCMAKE_VERBOSE_MAKEFILE=1 -DCMAKE_PREFIX_PATH=C:
> \path\to\Qt5\lib\cmake cmake --build . cd ..
> Thanks,
>
C:\>cd work
C:\work>cd cmaketest
C:\work\cmaketest>dir
Volume in drive C has no label.
Volume Serial Number is 1420-CEB1
Directory of C:\work\cmaketest
04/10/2013 02:14 PM <DIR> .
04/10/2013 02:14 PM <DIR> ..
04/10/2013 02:13 PM 248 CMakeLists.txt
04/10/2013 02:13 PM 135 main.cpp
04/10/2013 02:13 PM 263 qtcmaketest.pro
04/10/2013 02:13 PM 205 signature.asc
4 File(s) 851 bytes
2 Dir(s) 48,550,916,096 bytes free
C:\work\cmaketest>dir ..\build\qmake.exe /s /b
C:\work\build\qt\qtbase\bin\qmake.exe
C:\work\build\qt\qtbase\qmake\qmake.exe
C:\work\cmaketest>c:\work\build\qt\qtbase\bin\qmake.exe
C:\work\cmaketest>c:\work\build\qt\qtbase\qmake\qmake.exe
C:\work\cmaketest>"c:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\vcvarsall.bat" x64
Setting environment for using Microsoft Visual Studio 2010 x64 tools.
C:\work\cmaketest>nmake
Microsoft (R) Program Maintenance Utility Version 10.00.40219.01
Copyright (C) Microsoft Corporation. All rights reserved.
"c:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\BIN\amd64\nmake.exe" -f Makefile.Release
Microsoft (R) Program Maintenance Utility Version 10.00.40219.01
Copyright (C) Microsoft Corporation. All rights reserved.
NMAKE : fatal error U1073: don't know how to make
'..\build\qt\qtbase\include\QtCore\QCoreApplication'
Stop.
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\BIN\amd64\nmake.exe"' : return code
'0x2'
Stop.
C:\work\cmaketest>cd ..
C:\work>mkdir cmake_nmake
C:\work>cd cmake_nmake
C:\work\cmake_nmake>set path=c:\CMake\bin\;%PATH%
C:\work\cmake_nmake>cmake ..\cmaketest -G "NMake Makefiles"
-DCMAKE_VERBOSE_MAKEFILE=1 -DCMAKE_PREFIX_PATH=c:\work\build
\qtbase\lib\cmake
-- The C compiler identification is MSVC 16.0.40219.1
-- The CXX compiler identification is MSVC 16.0.40219.1
-- Check for CL compiler version
-- Check for CL compiler version - 1600
-- Check if this is a free VC compiler
-- Check if this is a free VC compiler - no
-- Check for working C compiler: c:/Program Files (x86)/Microsoft Visual Studio
10.0/VC/bin/amd64/cl.exe
-- Check for working C compiler: c:/Program Files (x86)/Microsoft Visual Studio
10.0/VC/bin/amd64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: c:/Program Files (x86)/Microsoft Visual
Studio 10.0/VC/bin/amd64/cl.exe
-- Check for working CXX compiler: c:/Program Files (x86)/Microsoft Visual
Studio 10.0/VC/bin/amd64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: C:/work/cmake_nmake
C:\work\cmake_nmake>cmake --build .
c:\CMake\bin\cmake.exe -HC:\work\cmaketest -BC:\work\cmake_nmake
--check-build-system CMakeFiles\Makefile.cmake
0
c:\CMake\bin\cmake.exe -E cmake_progress_start
C:\work\cmake_nmake\CMakeFiles C:\work\cmake_nmake\CMakeFiles\pro
gress.marks
"c:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\BIN\amd64\nmake.exe" -f CMakeFiles\Makefile2 /nologo -L
all
"c:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\BIN\amd64\nmake.exe" -f CMakeFiles\qtcmaketest.dir\build
.make /nologo -L CMakeFiles\qtcmaketest.dir\depend
c:\CMake\bin\cmake.exe -E cmake_depends "NMake Makefiles"
C:\work\cmaketest C:\work\cmaketest C:\work\cmake_nmak
e C:\work\cmake_nmake
C:\work\cmake_nmake\CMakeFiles\qtcmaketest.dir\DependInfo.cmake --color=
Scanning dependencies of target qtcmaketest
"c:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\BIN\amd64\nmake.exe" -f CMakeFiles\qtcmaketest.dir\build
.make /nologo -L CMakeFiles\qtcmaketest.dir\build
Microsoft (R) C/C++ Optimizing Compiler Version 16.00.40219.01 for x64
c:\CMake\bin\cmake.exe -E cmake_progress_report
C:\work\cmake_nmake\CMakeFiles 1
[100%] Building CXX object CMakeFiles/qtcmaketest.dir/main.cpp.obj
c:\PROGRA~2\MICROS~2.0\VC\bin\amd64\cl.exe
@C:\Users\qt\AppData\Local\Temp\nm8EF9.tmp
Copyright (C) Microsoft Corporation. All rights reserved.
cl /DWIN32 /D_WINDOWS /W3 /Zm1000 /EHsc /GR /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1
-Ic:\work\build\qtbase\include\QtCore -Ic
:\work\build\qtbase\include -Ic:\work\build\qtbase\mkspecs\win32-msvc2010
-DQT_CORE_LIB -DQT_NAMESPACE=TestNamespace /TP
/FoCMakeFiles\qtcmaketest.dir\main.cpp.obj
/FdC:\work\cmake_nmake\qtcmaketest.pdb -c C:\work\cmaketest\main.cpp
main.cpp
Linking CXX executable qtcmaketest.exe
c:\CMake\bin\cmake.exe -E vs_link_exe
c:\PROGRA~2\MICROS~2.0\VC\bin\amd64\cl.exe @CMakeFiles\qtcmaketest.dir\o
bjects1.rsp @C:\Users\qt\AppData\Local\Temp\nm92B2.tmp
Microsoft (R) C/C++ Optimizing Compiler Version 16.00.40219.01 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
cl CMakeFiles/qtcmaketest.dir/main.cpp.obj
Microsoft (R) Incremental Linker Version 10.00.40219.01
Copyright (C) Microsoft Corporation. All rights reserved.
/debug
/out:qtcmaketest.exe
/implib:qtcmaketest.lib
/version:0.0
/STACK:10000000
/machine:x64
/debug
/INCREMENTAL
/subsystem:console
c:\work\build\qtbase\lib\Qt5Core.lib
kernel32.lib
user32.lib
gdi32.lib
winspool.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
comdlg32.lib
advapi32.lib
/MANIFEST
/MANIFESTFILE:qtcmaketest.exe.intermediate.manifest
qtcmaketest.exe.embed.manifest.res
CMakeFiles/qtcmaketest.dir/main.cpp.obj
Microsoft (R) C/C++ Optimizing Compiler Version 16.00.40219.01 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
cl CMakeFiles/qtcmaketest.dir/main.cpp.obj
Microsoft (R) Incremental Linker Version 10.00.40219.01
Copyright (C) Microsoft Corporation. All rights reserved.
/debug
/out:qtcmaketest.exe
/implib:qtcmaketest.lib
/version:0.0
/STACK:10000000
/machine:x64
/debug
/INCREMENTAL
/subsystem:console
c:\work\build\qtbase\lib\Qt5Core.lib
kernel32.lib
user32.lib
gdi32.lib
winspool.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
comdlg32.lib
advapi32.lib
/MANIFEST
/MANIFESTFILE:qtcmaketest.exe.intermediate.manifest
qtcmaketest.exe.embed.manifest.res
CMakeFiles/qtcmaketest.dir/main.cpp.obj
c:\CMake\bin\cmake.exe -E cmake_progress_report
C:\work\cmake_nmake\CMakeFiles 1
[100%] Built target qtcmaketest
c:\CMake\bin\cmake.exe -E cmake_progress_start
C:\work\cmake_nmake\CMakeFiles 0
C:\work\cmake_nmake>cd ..
C:\work>md cmake_vs
C:\work>cd cmake_vs
C:\work\cmake_vs>cmake ..\cmaketest -DCMAKE_VERBOSE_MAKEFILE=1
-DCMAKE_PREFIX_PATH=c:\work\build\qtbase\lib\cmake
-- Building for: Visual Studio 10
-- Check for working C compiler using: Visual Studio 10
-- Check for working C compiler using: Visual Studio 10 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Visual Studio 10
-- Check for working CXX compiler using: Visual Studio 10 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: C:/work/cmake_vs
C:\work\cmake_vs>cmake --build .
Microsoft (R) Visual Studio Version 10.0.40219.1.
Copyright (C) Microsoft Corp. All rights reserved.
1>------ Build started: Project: ZERO_CHECK, Configuration: Debug Win32 ------
1>Build started 4/10/2013 4:08:15 PM.
1>PrepareForBuild:
1> Creating directory "C:\work\cmake_vs\Debug\".
1>InitializeBuildStatus:
1> Creating "Win32\Debug\ZERO_CHECK\ZERO_CHECK.unsuccessfulbuild" because
"AlwaysCreate" was specified.
1>CustomBuild:
1> Checking Build System
1> CMake does not need to re-run because
C:/work/cmake_vs/CMakeFiles/generate.stamp is up-to-date.
1>FinalizeBuildStatus:
1> Deleting file "Win32\Debug\ZERO_CHECK\ZERO_CHECK.unsuccessfulbuild".
1> Touching "Win32\Debug\ZERO_CHECK\ZERO_CHECK.lastbuildstate".
1>
1>Build succeeded.
1>
1>Time Elapsed 00:00:00.07
2>------ Build started: Project: qtcmaketest, Configuration: Debug Win32 ------
2>Build started 4/10/2013 4:08:15 PM.
2>InitializeBuildStatus:
2> Creating "qtcmaketest.dir\Debug\qtcmaketest.unsuccessfulbuild" because
"AlwaysCreate" was specified.
2>CustomBuild:
2> Building Custom Rule C:/work/cmaketest/CMakeLists.txt
2> CMake does not need to re-run because
C:\work\cmake_vs\CMakeFiles\generate.stamp is up-to-date.
2>ClCompile:
2> Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for
80x86
2> Copyright (C) Microsoft Corporation. All rights reserved.
2>
2> cl /c /Ic:/work/build/qtbase/include/QtCore /Ic:/work/build/qtbase/include
/I"c:/work/build/qtbase/mkspecs/win32-msv
c2010" /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D QT_CORE_LIB
/D QT_NAMESPACE=TestNamespace /D "CMAKE_
INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t
/Zc:forScope /GR /Fo"qtcmaketest.dir\Debug\
\" /Fd"C:/work/cmake_vs/Debug/qtcmaketest.pdb" /Gd /TP /analyze-
/errorReport:prompt ..\cmaketest\main.cpp /Zm1000
2>
2> main.cpp
2>Qt5Core.lib(Qt5Core.dll) : fatal error LNK1112: module machine type 'x64'
conflicts with target machine type 'X86'
2>
2>Build FAILED.
2>
2>Time Elapsed 00:00:01.30
3>------ Build started: Project: ALL_BUILD, Configuration: Debug Win32 ------
3>Build started 4/10/2013 4:08:16 PM.
3>InitializeBuildStatus:
3> Creating "Win32\Debug\ALL_BUILD\ALL_BUILD.unsuccessfulbuild" because
"AlwaysCreate" was specified.
3>CustomBuild:
3> Building Custom Rule C:/work/cmaketest/CMakeLists.txt
3> CMake does not need to re-run because
C:\work\cmake_vs\CMakeFiles\generate.stamp is up-to-date.
3> Build all projects
3>FinalizeBuildStatus:
3> Deleting file "Win32\Debug\ALL_BUILD\ALL_BUILD.unsuccessfulbuild".
3> Touching "Win32\Debug\ALL_BUILD\ALL_BUILD.lastbuildstate".
3>
3>Build succeeded.
3>
3>Time Elapsed 00:00:00.11
========== Build: 2 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
C:\work\cmake_vs>_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development