[CMake] fortran end of file error in object files

Kurt R. Sansom kurt.sansom at cfdrc.com
Thu Sep 5 12:36:17 EDT 2019


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



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20190905/f34c3ba4/attachment.html>


More information about the CMake mailing list