<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    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?<br>
    <br>
    here are version<br>
    <blockquote><tt>cmake version 3.7.1</tt><br>
      <tt>GNU Fortran (Homebrew GCC 7.1.0) 7.1.0</tt><br>
      <tt>Apple LLVM version 8.1.0 (clang-802.0.42)</tt><br>
    </blockquote>
    and full cmake output<br>
    <blockquote><tt>-- Detecting Fortran/C Interface</tt><br>
      <tt>-- Detecting Fortran/C Interface - Failed to compile</tt><br>
      <tt>-- Verifying Fortran/C Compiler Compatibility</tt><br>
      <tt>CMake Warning (dev) at
/usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/FortranCInterface.cmake:309
        (message):</tt><br>
      <tt>  No FortranCInterface mangling known for VerifyFortran</tt><br>
      <tt>Call Stack (most recent call first):</tt><br>
      <tt> 
/usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/FortranCInterface/Verify/CMakeLists.txt:16
        (FortranCInterface_HEADER)</tt><br>
      <tt>This warning is for project developers.  Use -Wno-dev to
        suppress it.</tt><br>
      <br>
      <tt>-- Verifying Fortran/C Compiler Compatibility - Failed</tt><br>
      <tt>CMake Error at
/usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/FortranCInterface.cmake:382
        (message):</tt><br>
      <tt>  The Fortran compiler:</tt><br>
      <br>
      <tt>    /usr/local/bin/gfortran</tt><br>
      <br>
      <tt>  and the C compiler:</tt><br>
      <br>
      <tt>    /usr/bin/clang</tt><br>
      <br>
      <tt>  failed to compile a simple test project using both
        languages.  The output</tt><br>
      <tt>  was:</tt><br>
      <br>
      <tt>    Change Dir:
        /Users/bloring/TECA/build/CMakeFiles/FortranCInterface/VerifyC</tt><br>
      <tt>    </tt><br>
      <tt>    Run Build Command:"/usr/bin/make"</tt><br>
      <tt>    /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</tt><br>
      <tt>    /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</tt><br>
      <tt>    /Library/Developer/CommandLineTools/usr/bin/make -f
        CMakeFiles/Makefile2 all</tt><br>
      <tt>    /Library/Developer/CommandLineTools/usr/bin/make -f
        CMakeFiles/VerifyFortran.dir/build.make
        CMakeFiles/VerifyFortran.dir/depend</tt><br>
      <tt>    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</tt><br>
      <tt>    Scanning dependencies of target VerifyFortran</tt><br>
      <tt>    /Library/Developer/CommandLineTools/usr/bin/make -f
        CMakeFiles/VerifyFortran.dir/build.make
        CMakeFiles/VerifyFortran.dir/requires</tt><br>
      <tt>    make[2]: Nothing to be done for
        `CMakeFiles/VerifyFortran.dir/requires'.</tt><br>
      <tt>    /Library/Developer/CommandLineTools/usr/bin/make -f
        CMakeFiles/VerifyFortran.dir/build.make
        CMakeFiles/VerifyFortran.dir/build</tt><br>
      <tt>    [ 20%] Building Fortran object
        CMakeFiles/VerifyFortran.dir/VerifyFortran.f.o</tt><br>
      <tt>    /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</tt><br>
      <tt>    [ 40%] Linking Fortran static library libVerifyFortran.a</tt><br>
      <tt>    /usr/local/Cellar/cmake/3.7.1/bin/cmake -P
        CMakeFiles/VerifyFortran.dir/cmake_clean_target.cmake</tt><br>
      <tt>    /usr/local/Cellar/cmake/3.7.1/bin/cmake -E
        cmake_link_script CMakeFiles/VerifyFortran.dir/link.txt
        --verbose=1</tt><br>
      <tt>    /usr/bin/ar qc libVerifyFortran.a 
        CMakeFiles/VerifyFortran.dir/VerifyFortran.f.o</tt><br>
      <tt>    /usr/bin/ranlib libVerifyFortran.a</tt><br>
      <tt>    [ 40%] Built target VerifyFortran</tt><br>
      <tt>    /Library/Developer/CommandLineTools/usr/bin/make -f
        CMakeFiles/VerifyFortranC.dir/build.make
        CMakeFiles/VerifyFortranC.dir/depend</tt><br>
      <tt>    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</tt><br>
      <tt>    Scanning dependencies of target VerifyFortranC</tt><br>
      <tt>    /Library/Developer/CommandLineTools/usr/bin/make -f
        CMakeFiles/VerifyFortranC.dir/build.make
        CMakeFiles/VerifyFortranC.dir/build</tt><br>
      <tt>    [ 60%] Building C object
        CMakeFiles/VerifyFortranC.dir/main.c.o</tt><br>
      <tt>    /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</tt><br>
      <tt>    [ 80%] Building C object
        CMakeFiles/VerifyFortranC.dir/VerifyC.c.o</tt><br>
      <tt>    /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</tt><br>
      <tt>    [100%] Linking C executable VerifyFortranC</tt><br>
      <tt>    /usr/local/Cellar/cmake/3.7.1/bin/cmake -E
        cmake_link_script CMakeFiles/VerifyFortranC.dir/link.txt
        --verbose=1</tt><br>
      <tt>    /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 </tt><br>
      <tt>    Undefined symbols for architecture x86_64:</tt><br>
      <tt>      "_VerifyFortran", referenced from:</tt><br>
      <tt>          _main in main.c.o</tt><br>
      <tt>    ld: symbol(s) not found for architecture x86_64</tt><br>
      <tt>    clang: error: linker command failed with exit code 1 (use
        -v to see invocation)</tt><br>
      <tt>    make[2]: *** [VerifyFortranC] Error 1</tt><br>
      <tt>    make[1]: *** [CMakeFiles/VerifyFortranC.dir/all] Error 2</tt><br>
      <tt>    make: *** [all] Error 2</tt><br>
      <tt>    </tt><br>
      <tt>Call Stack (most recent call first):</tt><br>
      <tt>  alg/CMakeLists.txt:74 (FortranCInterface_VERIFY)</tt><br>
    </blockquote>
  </body>
</html>