CMake and Fortran compiler

Mojca Miklavec mojca.miklavec.lists at
Fri Dec 9 15:33:27 PST 2011


I'm trying to compile Root with CMake (the Root package is MacPorts is
broken, but even if it wasn't, there might be reasons why I would want
to use a standalone version).

When running ccmake <path-to-root-sources> I get the following error:

CMake Error at /opt/local/share/cmake-2.8/Modules/CMakeDetermineFortranCompiler.cmake:31
  Could not find compiler set in environment variable FC:

Call Stack (most recent call first):
  cmake/modules/CheckCompiler.cmake:11 (enable_language)
  CMakeLists.txt:24 (include)

CMake Error: Error required internal CMake variable not set, cmake may
be not be built correctly.
Missing variable is:

CMake Error: Could not find cmake module

I strongly suspect that this error has nothing to do with Root itself,
but rather with some "misconfiguration" in cmake package in MacPorts
which is not aware of Fortran being present. But I might just as well
be wrong.  (I'm neither a Fortran programmer not somebody familiar
with CMake.)

After setting
    export FC=/opt/local/bin/gfortran-mp-4.4
(almost) all goes fine again.

What do you suggest?

Thank you,

More information about the macports-users mailing list