[CMake] No FortranCInterface mangling known for VerifyFortran -- OSX Sierra

Burlen Loring burlen.loring at gmail.com
Fri Jun 2 17:20:21 EDT 2017


upgrading from cmake 3.7.1 to cmake version 3.8.2 resolved the issue.

On 06/02/2017 11:53 AM, Burlen Loring wrote:
> After upgrading to latest XCode and command line tools on OSX Sierra 
> our project that uses CMake to mix C++ and Fortran fails to configure. 
> Full output below. Any ideas?
>
> here are version
>
>     cmake version 3.7.1
>     GNU Fortran (Homebrew GCC 7.1.0) 7.1.0
>     Apple LLVM version 8.1.0 (clang-802.0.42)
>
> and full cmake output
>
>     -- Detecting Fortran/C Interface
>     -- Detecting Fortran/C Interface - Failed to compile
>     -- Verifying Fortran/C Compiler Compatibility
>     CMake Warning (dev) at
>     /usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/FortranCInterface.cmake:309
>     (message):
>       No FortranCInterface mangling known for VerifyFortran
>     Call Stack (most recent call first):
>     /usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/FortranCInterface/Verify/CMakeLists.txt:16
>     (FortranCInterface_HEADER)
>     This warning is for project developers.  Use -Wno-dev to suppress it.
>
>     -- Verifying Fortran/C Compiler Compatibility - Failed
>     CMake Error at
>     /usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/FortranCInterface.cmake:382
>     (message):
>       The Fortran compiler:
>
>         /usr/local/bin/gfortran
>
>       and the C compiler:
>
>         /usr/bin/clang
>
>       failed to compile a simple test project using both languages. 
>     The output
>       was:
>
>         Change Dir:
>     /Users/bloring/TECA/build/CMakeFiles/FortranCInterface/VerifyC
>
>         Run Build Command:"/usr/bin/make"
>         /usr/local/Cellar/cmake/3.7.1/bin/cmake
>     -H/usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/FortranCInterface/Verify
>     -B/Users/bloring/TECA/build/CMakeFiles/FortranCInterface/VerifyC
>     --check-build-system CMakeFiles/Makefile.cmake 0
>         /usr/local/Cellar/cmake/3.7.1/bin/cmake -E
>     cmake_progress_start
>     /Users/bloring/TECA/build/CMakeFiles/FortranCInterface/VerifyC/CMakeFiles
>     /Users/bloring/TECA/build/CMakeFiles/FortranCInterface/VerifyC/CMakeFiles/progress.marks
>         /Library/Developer/CommandLineTools/usr/bin/make -f
>     CMakeFiles/Makefile2 all
>         /Library/Developer/CommandLineTools/usr/bin/make -f
>     CMakeFiles/VerifyFortran.dir/build.make
>     CMakeFiles/VerifyFortran.dir/depend
>         cd
>     /Users/bloring/TECA/build/CMakeFiles/FortranCInterface/VerifyC &&
>     /usr/local/Cellar/cmake/3.7.1/bin/cmake -E cmake_depends "Unix
>     Makefiles"
>     /usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/FortranCInterface/Verify
>     /usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/FortranCInterface/Verify
>     /Users/bloring/TECA/build/CMakeFiles/FortranCInterface/VerifyC
>     /Users/bloring/TECA/build/CMakeFiles/FortranCInterface/VerifyC
>     /Users/bloring/TECA/build/CMakeFiles/FortranCInterface/VerifyC/CMakeFiles/VerifyFortran.dir/DependInfo.cmake
>         Scanning dependencies of target VerifyFortran
>         /Library/Developer/CommandLineTools/usr/bin/make -f
>     CMakeFiles/VerifyFortran.dir/build.make
>     CMakeFiles/VerifyFortran.dir/requires
>         make[2]: Nothing to be done for
>     `CMakeFiles/VerifyFortran.dir/requires'.
>         /Library/Developer/CommandLineTools/usr/bin/make -f
>     CMakeFiles/VerifyFortran.dir/build.make
>     CMakeFiles/VerifyFortran.dir/build
>         [ 20%] Building Fortran object
>     CMakeFiles/VerifyFortran.dir/VerifyFortran.f.o
>         /usr/local/bin/gfortran
>     -I/Users/bloring/TECA/build/CMakeFiles/FortranCInterface/VerifyC
>     -Wall -Wextra -Wno-conversion -O3 -DNDEBUG -O3   -c
>     /usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/FortranCInterface/Verify/VerifyFortran.f
>     -o CMakeFiles/VerifyFortran.dir/VerifyFortran.f.o
>         [ 40%] Linking Fortran static library libVerifyFortran.a
>         /usr/local/Cellar/cmake/3.7.1/bin/cmake -P
>     CMakeFiles/VerifyFortran.dir/cmake_clean_target.cmake
>         /usr/local/Cellar/cmake/3.7.1/bin/cmake -E cmake_link_script
>     CMakeFiles/VerifyFortran.dir/link.txt --verbose=1
>         /usr/bin/ar qc libVerifyFortran.a
>     CMakeFiles/VerifyFortran.dir/VerifyFortran.f.o
>         /usr/bin/ranlib libVerifyFortran.a
>         [ 40%] Built target VerifyFortran
>         /Library/Developer/CommandLineTools/usr/bin/make -f
>     CMakeFiles/VerifyFortranC.dir/build.make
>     CMakeFiles/VerifyFortranC.dir/depend
>         cd
>     /Users/bloring/TECA/build/CMakeFiles/FortranCInterface/VerifyC &&
>     /usr/local/Cellar/cmake/3.7.1/bin/cmake -E cmake_depends "Unix
>     Makefiles"
>     /usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/FortranCInterface/Verify
>     /usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/FortranCInterface/Verify
>     /Users/bloring/TECA/build/CMakeFiles/FortranCInterface/VerifyC
>     /Users/bloring/TECA/build/CMakeFiles/FortranCInterface/VerifyC
>     /Users/bloring/TECA/build/CMakeFiles/FortranCInterface/VerifyC/CMakeFiles/VerifyFortranC.dir/DependInfo.cmake
>         Scanning dependencies of target VerifyFortranC
>         /Library/Developer/CommandLineTools/usr/bin/make -f
>     CMakeFiles/VerifyFortranC.dir/build.make
>     CMakeFiles/VerifyFortranC.dir/build
>         [ 60%] Building C object CMakeFiles/VerifyFortranC.dir/main.c.o
>         /usr/bin/clang
>     -I/Users/bloring/TECA/build/CMakeFiles/FortranCInterface/VerifyC
>     -O3 -DNDEBUG   -o CMakeFiles/VerifyFortranC.dir/main.c.o   -c
>     /usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/FortranCInterface/Verify/main.c
>         [ 80%] Building C object CMakeFiles/VerifyFortranC.dir/VerifyC.c.o
>         /usr/bin/clang
>     -I/Users/bloring/TECA/build/CMakeFiles/FortranCInterface/VerifyC
>     -O3 -DNDEBUG   -o CMakeFiles/VerifyFortranC.dir/VerifyC.c.o -c
>     /usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/FortranCInterface/Verify/VerifyC.c
>         [100%] Linking C executable VerifyFortranC
>         /usr/local/Cellar/cmake/3.7.1/bin/cmake -E cmake_link_script
>     CMakeFiles/VerifyFortranC.dir/link.txt --verbose=1
>         /usr/bin/clang  -O3 -DNDEBUG -Wl,-search_paths_first
>     -Wl,-headerpad_max_install_names
>     CMakeFiles/VerifyFortranC.dir/main.c.o
>     CMakeFiles/VerifyFortranC.dir/VerifyC.c.o  -o VerifyFortranC
>     -L/usr/local/Cellar/gcc/7.1.0/lib/gcc/7/gcc/x86_64-apple-darwin16.5.0/7.1.0
>     -L/usr/local/Cellar/gcc/7.1.0/lib/gcc/7 libVerifyFortran.a
>     -lgfortran -lquadmath -lm
>         Undefined symbols for architecture x86_64:
>           "_VerifyFortran", referenced from:
>               _main in main.c.o
>         ld: symbol(s) not found for architecture x86_64
>         clang: error: linker command failed with exit code 1 (use -v
>     to see invocation)
>         make[2]: *** [VerifyFortranC] Error 1
>         make[1]: *** [CMakeFiles/VerifyFortranC.dir/all] Error 2
>         make: *** [all] Error 2
>
>     Call Stack (most recent call first):
>       alg/CMakeLists.txt:74 (FortranCInterface_VERIFY)
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170602/890ff6f1/attachment-0001.html>


More information about the CMake mailing list