Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
194 Views

Using intel Fortran compiler with cmake

I what to compile a software which use cmake as build system. The project is written in c++, but it need a Fortran compiler. I choosed the intel compiler.

While running cmake, it failed. Here is the error message in CMakeError.log:

Compiling the Fortran compiler identification source file "CMakeFortranCompilerId.F" failed.
Compiler: D:/Program Files (x86)/IntelSWTools/compilers_and_libraries/windows/bin/intel64/fortcom.exe
Build flags:
Id flags: -v

 

The output was:
3
Intel(R) Fortran Compiler for applications running on Intel(R) 64, Version 17.0 Build 20160721
Copyright (C) 1985-2016 Intel Corporation.  All rights reserved.
010101_0

Severe: **Internal compiler error: internal abort** Please report this error along with the circumstances in which it occurred in a Software Problem Report.  Note: File and line given may not be explicit cause of this error.

It seems the Intel Fortran Compiler crashed internally without any useful error message. Trying to compile that source file manually with

fortcom.exe -fpp CMakeFortranCompilerId.F

leaves similar result. Do you have any suggestion? Thanks.

Update: I am very sorry. I used "fortcom.exe" directly instead of "ifort.exe". After I change the compiler to "ifort.exe", the problem solved.

My envirnment:

OS: Windows 7

C++ Compiler: Microsoft Visual C++ Compiler 14.0 (amd64)

0 Kudos
5 Replies
Highlighted
Black Belt
194 Views

Please post the source code in the file CMakeFortranCompilerId.F. If it turns out that the ICE does not occur with an version of the Fortran, compiler, you may consider a work-around to use with the 17.0 compiler or see if you need to revert to an earlier version.

0 Kudos
Highlighted
Valued Contributor II
194 Views

This is more a question for the CMake mailing list, but I can assure you that CMake usually works fine with the Intel Fortran compiler. That does not solve your problem of course, merely indicates that there is a solution.

The C compiler you use seems to be a trifle old. Should not be the cause though.

Please follow mecej4's advice - it can be a bit tedious to find the exact source file.

 

0 Kudos
Highlighted
Black Belt
194 Views

It is likely that the source file in question is one that Cmake uses to find the version number of the Fortran compiler. Such utilities often employ tricks that worked with previous versions of the compiler but fail when a new version comes out.

0 Kudos
Highlighted
194 Views

An internal compiler failure is always a compiler bug. Please provide the source file in question (CMakeFortranCompilerId.F) and also tell us what compiler options were used (in particular any preprocessor definitions).

0 Kudos
Highlighted
Beginner
194 Views

This comment has been moved to its own thread
0 Kudos