Ultimaker / cura-build-environment

CMake project to build dependencies for Cura
GNU Affero General Public License v3.0
24 stars 55 forks source link

No CMAKE_Fortran_COMPILER could be found #85

Open arnav257 opened 4 years ago

arnav257 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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