View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014570CMake(No Category)public2013-11-15 03:262013-11-26 10:48
ReporterNils Gladitz 
Assigned ToPeter Kuemmel 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake 3.0 
Target VersionFixed in VersionCMake 3.0 
Summary0014570: Intel + Ninja regression: unable to compile a simple test program
DescriptionI tried the current master (958367e10cee44d2dbce72f9393168746099ebd1) with Ninja and the Intel compiler on Window which results in:

-- The C compiler identification is Intel 12.1.0.20120612
-- The CXX compiler identification is Intel 12.1.0.20120612
-- Check for working C compiler using: Ninja
-- Check for working C compiler using: Ninja -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Ninja
-- Check for working CXX compiler using: Ninja -- broken
CMake Error at C:/opt/cmake-git/share/cmake-2.8.12/Modules/CMakeTestCXXCompiler.cmake:54 (message):
  The C++ compiler "C:/Program Files (x86)/Intel/Composer XE 2011
  SP1/bin/intel64/icl.exe" is not able to compile a simple test program.

  It fails with the following output:

   Change Dir: C:/cdash/086b772-bin/CMakeFiles/CMakeTmp

  

  Run Build Command:c:/Tools/ninja.exe cmTryCompileExec983296435

  [1/2] Building CXX object
  CMakeFiles\cmTryCompileExec983296435.dir\testCXXCompiler.cxx.obj

  FAILED: C:\PROGRA~2\Intel\COMPOS~1\bin\intel64\icl.exe /nologo /TP /DWIN32
  /D_WINDOWS /W3 /GR /EHsc /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 -MMD -MT
  CMakeFiles\cmTryCompileExec983296435.dir\testCXXCompiler.cxx.obj -MF
  CMakeFiles/cmTryCompileExec983296435.dir/testCXXCompiler.cxx.obj.d
  /FoCMakeFiles\cmTryCompileExec983296435.dir\testCXXCompiler.cxx.obj
  /FdCMakeFiles\cmTryCompileExec983296435.dir/ -c testCXXCompiler.cxx

  icl: command line warning #10006: ignoring unknown option '/MMD'

  icl: command line warning #10121: overriding '/MDd' with '/MT'

  icl: command line warning #10006: ignoring unknown option '/MF'

  icl: command line error: multiple sources; obj output option must specify
  dir

  ninja: build stopped: subcommand failed.
[...]

The "NMake Makefiles" generator still works.
TagsNo tags attached.
Attached Filespatch file icon ninja-win-intel-deps.patch [^] (1,131 bytes) 2013-11-23 15:35 [Show Content]
patch file icon ninja-intel-showincludes.patch [^] (799 bytes) 2013-11-24 02:06 [Show Content]

 Relationships
related to 0014411closedPeter Kuemmel Ninja dependencies don't work with Intel and many other GCC-like compilers 

  Notes
(0034522)
Peter Kuemmel (developer)
2013-11-23 02:37

Am I right, that icl behaves like MS's cl.exe on Windows and like GCC on Linux?

If yes, then Intel-C/CXX.cmake should not be included on Windows (there -MMD, -MT, and -MF are defined).
(0034523)
Peter Kuemmel (developer)
2013-11-23 04:01

I don't have a icl installed here, so could you debug CMakeDetermineCompiler.cmake and CMakeDetermineCompilerId.cmake and try to figure out why a GNU/gcc like compiler is detected? (add message(), use --trace, remove all generated files after each cmake run)
(0034526)
Nils Gladitz (developer)
2013-11-23 13:32

Yes I think on windows it tries to support MS cl options and gcc options on linux.
e.g.: http://software.intel.com/sites/products/documentation/doclib/iss/2013/compiler/cpp-lin/GUID-226DE90E-D4C8-420B-B560-0997839D17C4.htm [^]

It includes Intel-CXX.cmake, Windows-Intel-CXX.cmake and Windows-MSVC.cmake.
It does not include GNU.cmake.

The Compiler/Platform ID being detected is "Intel" "Windows".

CMAKE_DEPFILE_FLAGS_CXX is not being set in 2.8.12.1 and seems to only be used by the Ninja generator(?).
(0034527)
Nils Gladitz (developer)
2013-11-23 13:42

Since the variable doesn't seem to get set for MSVC at all I tried unsetting it for icl ...

unset(CMAKE_DEPFILE_FLAGS_${lang}) in Windows-MSVC.cmake in the macro __windows_compiler_msvc seems to fix it.
(0034528)
Peter Kuemmel (developer)
2013-11-23 14:54

Yes, CMAKE_DEPFILE_FLAGS_CXX is now also set for Intel's compiler, but this should only happen on Linux.

On Windows Intel-CXX.cmake must not be included because it defines the GCC-like flags. Where is Intel-CXX.cmake included on Windows? It should be suppressed there.
(0034529)
Nils Gladitz (developer)
2013-11-23 15:04

I think it is correctly including Intel-CXX.cmake based on the compiler ID.

The other (non DEPFILE) flags are probably being overridden by the platform specific variants later on which is why it is OK for them being in there.

The include is in CMakeCXXInformation.cmake:
if(CMAKE_CXX_COMPILER_ID)
  include(Compiler/${CMAKE_CXX_COMPILER_ID}-CXX OPTIONAL)
endif()
(0034530)
Peter Kuemmel (developer)
2013-11-23 15:38

There are gcc like options on Windows:

http://software.intel.com/sites/products/documentation/doclib/iss/2013/compiler/cpp-lin/GUID-3C8AB042-5B7B-46C5-95AE-A30F2B536FE0.htm [^]

Does it work with the patch ninja-win-intel-deps.patch?
(0034531)
Nils Gladitz (developer)
2013-11-23 16:51

It gets me through the initial compiler checks but I think it causes some of the following test failures:
http://open.cdash.org/viewTest.php?onlyfailed&buildid=3112081 [^]
(0034533)
Peter Kuemmel (developer)
2013-11-24 02:05

OK, maybe it works when we don't use these GCC flags but /showIncludes like msvc.
I've uploaded a new patch, ninja-intel-showincludes.patch.
(0034534)
Nils Gladitz (developer)
2013-11-24 04:36

The ninja-intel-showincludes.patch patch seems to work.
I only get two (unrelated) Qt4 test failures.
(0034536)
Peter Kuemmel (developer)
2013-11-25 03:10

Thanks for testing! I merged it to master.
(0034537)
Peter Kuemmel (developer)
2013-11-25 03:12

deptype msvc is used on Windows for Intel's compiler.
(0034571)
Nils Gladitz (developer)
2013-11-26 10:48

Thank you very much :)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=76a88888bc80b05b05fc04a188f277d7671933b4 [^]

Was just merged to master and it works nicely for me.

 Issue History
Date Modified Username Field Change
2013-11-15 03:26 Nils Gladitz New Issue
2013-11-15 08:13 Brad King Assigned To => Peter Kuemmel
2013-11-15 08:13 Brad King Status new => assigned
2013-11-23 02:37 Peter Kuemmel Note Added: 0034522
2013-11-23 04:01 Peter Kuemmel Note Added: 0034523
2013-11-23 13:32 Nils Gladitz Note Added: 0034526
2013-11-23 13:42 Nils Gladitz Note Added: 0034527
2013-11-23 14:54 Peter Kuemmel Note Added: 0034528
2013-11-23 15:04 Nils Gladitz Note Added: 0034529
2013-11-23 15:35 Peter Kuemmel File Added: ninja-win-intel-deps.patch
2013-11-23 15:38 Peter Kuemmel Note Added: 0034530
2013-11-23 16:51 Nils Gladitz Note Added: 0034531
2013-11-24 02:05 Peter Kuemmel Note Added: 0034533
2013-11-24 02:06 Peter Kuemmel File Added: ninja-intel-showincludes.patch
2013-11-24 04:36 Nils Gladitz Note Added: 0034534
2013-11-25 03:10 Peter Kuemmel Note Added: 0034536
2013-11-25 03:12 Peter Kuemmel Note Added: 0034537
2013-11-25 03:12 Peter Kuemmel Status assigned => resolved
2013-11-25 03:12 Peter Kuemmel Fixed in Version => CMake 3.0
2013-11-25 03:12 Peter Kuemmel Resolution open => fixed
2013-11-25 03:53 Peter Kuemmel Relationship added related to 0014411
2013-11-26 10:48 Nils Gladitz Note Added: 0034571
2013-11-26 10:48 Nils Gladitz Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team