Description of problem: The Fortran/C{,++} interface detection is broken in Fedora 23 and 24. Version-Release number of selected component (if applicable): cmake-3.3.1-3 How reproducible: Try to build package that mixes C and Fortran. Steps to Reproduce: Try to build psi4-0.3-1.188450git Actual results: -- Detecting Fortran/C Interface -- Detecting Fortran/C Interface - Found GLOBAL and MODULE mangling -- Verifying Fortran/CXX Compiler Compatibility -- Verifying Fortran/CXX Compiler Compatibility - Failed CMake Error at /usr/share/cmake/Modules/FortranCInterface.cmake:331 (message): The Fortran compiler: /usr/bin/gfortran and the CXX compiler: /usr/bin/g++ failed to compile a simple test project using both languages. The output was: (clip) /usr/bin/g++ -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -std=c++11 -Wno-narrowing -DNDEBUG -fopenmp -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld CMakeFiles/VerifyFortranC.dir/main.c.o CMakeFiles/VerifyFortranC.dir/VerifyC.c.o CMakeFiles/VerifyFortranC.dir/VerifyCXX.cxx.o -o VerifyFortranC -rdynamic libVerifyFortran.a libVerifyFortran.a(VerifyFortran.f.o): In function `verifyfortran_': /usr/share/cmake/Modules/FortranCInterface/Verify/VerifyFortran.f:2: undefined reference to `_gfortran_st_write' /usr/share/cmake/Modules/FortranCInterface/Verify/VerifyFortran.f:2: undefined reference to `_gfortran_transfer_character_write' /usr/share/cmake/Modules/FortranCInterface/Verify/VerifyFortran.f:2: undefined reference to `_gfortran_st_write_done' collect2: error: ld returned 1 exit status CMakeFiles/VerifyFortranC.dir/build.make:150: recipe for target 'VerifyFortranC' failed gmake[2]: Leaving directory '/builddir/build/BUILD/psi4public-1881450f30d3bd2ac91dbc4fc6a4eaa5c9f03ae5/objdir-i686-redhat-linux-gnu/CMakeFiles/FortranCInterface/VerifyCXX' gmake[2]: *** [VerifyFortranC] Error 1 Expected results: -- Detecting Fortran/C Interface -- Detecting Fortran/C Interface - Found GLOBAL and MODULE mangling -- Verifying Fortran/CXX Compiler Compatibility -- Verifying Fortran/CXX Compiler Compatibility - Success Additional info: Looks like the problem is that libgfortran isn't specified in the link command.
The same spec builds in Fedora 21 and 22.
Please give cmake-3.3.1-4.fc24 a try when that finishes building.
Maybe build it first? :P
Well, built it for you. And it still fails. The problem isn't that it fails to parse the compiler output, but rather that it's not linking the gfortran runtime libraries in.
It seemed a long shot - but there was a very similar issue on the cmake list that it appeared to fix. I'll try to take a closer look.
Use of redhat-hardened-ld is confusing cmake. Filed http://www.cmake.org/Bug/view.php?id=15737 upstream.
cmake-3.3.1-5.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-15668
cmake-3.3.1-5.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update cmake'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-15668
cmake-3.3.1-5.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.