Skip to content
This repository has been archived by the owner on Sep 5, 2022. It is now read-only.

No CMAKE_Fortran_COMPILER could be found #85

Open
arnav257 opened this issue May 17, 2020 · 4 comments
Open

No CMAKE_Fortran_COMPILER could be found #85

arnav257 opened this issue May 17, 2020 · 4 comments
Labels

Comments

@arnav257
Copy link

Upon entering 'cmake ..', I get the following error message:

-- The Fortran compiler identification is unknown
CMake Error at CMakeLists.txt:2 (project):
No CMAKE_Fortran_COMPILER could be found.

-- Configuring incomplete, errors occurred!
See also "C:/Users/anous/MultiNest/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/anous/MultiNest/build/CMakeFiles/CMakeError.log"

When I open the CMakeError.log file, here's what I find:
Compiling the Fortran compiler identification source file "CMakeFortranCompilerId.F" failed.
Compiler:
Build flags:
Id flags:

How do I resolve this? I was trying to use cmake to install MultiNest using these instructions.

Can't seem to get it to work. I'm not sure what other information I can give but please do ask whatever you need to help me resolve this issue.

@Ghostkeeper
Copy link
Contributor

One of Cura's dependencies needs a Fortran 95 compiler to be built (Scipy).

So the way to solve this would be to install a Fortran compiler, like GNU Fortran. There are binary distributions here. Some operating systems also have this in their package distributions (it's apt install gfortran for me), but for you the easiest way would probably be to install it via the MinGW installer, which you're going to need anyway.

@arnav257
Copy link
Author

So the way to solve this would be to install a Fortran compiler, like GNU Fortran.

I'm using Windows and I tried installing the Intel Fortran Compiler, but I still can't seem to make make treat that as a Fortran compiler. I tried the set() function in the CMakeLists.txt file, not sure what else I can do.

@Ghostkeeper
Copy link
Contributor

Rather than modifying the CMakeLists.txt file, use CMake-GUI to modify those variables. The CMake interface has this little "advanced" toggle. If you click that you'll be able to see a whole lot more variables you can change, among which the Fortran compiler.

@Ghostkeeper
Copy link
Contributor

Perhaps it's also better to delete your cache and generate the cache anew. It should automatically find your Fortran compiler.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants