fortran end of file error in object files

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

fortran end of file error in object files

Kurt R. Sansom

Dear all,

   I am working on some fortran code that links to c++, and have run into an issue where make doesn’t like the generated object file. There is something weird going on either in the preprocessing or something weird with my machine. What is weird is that people with the same OS, compiler etc don’t have this issue and it builds without a problem inside of docker on this machine. I also have compiled some fortran examples that have hardcoded gfortran calls and works fine. I tested this with a different fotran project (json fortran library) and the cmake gave the same error.


I tried with cmake latest release and the same problem occurs. Can someone point me in a better direction here. Compiling on ubuntu 18.04, gcc-7, gfortran.


~Kurt  Sansom



Errors look something like:


f951: Fatal Error: Reading module ‘class_patch’ at line 1368 column 66: Unexpected EOF

compilation terminated.

src/core/CMakeFiles/core.dir/build.make:470: recipe for target 'src/core/CMakeFiles/core.dir/class-vars/class_geom_printer.f90.o' failed

make[2]: *** [src/core/CMakeFiles/core.dir/class-vars/class_geom_printer.f90.o] Error 1

CMakeFiles/Makefile2:296: recipe for target 'src/core/CMakeFiles/core.dir/all' failed

make[1]: *** [src/core/CMakeFiles/core.dir/all] Error 2

Makefile:129: recipe for target 'all' failed

make: *** [all] Error 2





Powered by

Please keep messages on-topic and check the CMake FAQ at:

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support:
CMake Consulting:
CMake Training Courses:

Visit other Kitware open-source projects at

Follow this link to subscribe/unsubscribe: