[Trilinos-Users] [12.6.3] VerifyFortranC does not respect Trilinos_EXTRA_LINK_FLAGS nor CMAKE_EXE_LINKER_FLAGS:STRING

Denis Davydov davydden at gmail.com
Wed Mar 23 07:55:43 EDT 2016


Dear all,

The CMake test VerifyFortranC does not seem to use any flags provided in Trilinos_EXTRA_LINK_FLAGS / CMAKE_EXE_LINKER_FLAGS:STRING, where I provide “-lgfortran” / “-L/path/to -lgfortran” respectively.
Consequently, I have config errors:

/path/to/cxx -O3 -DNDEBUG -Wl,-search_paths_first -Wl,-headerpad_max_install_names  CMakeFiles/VerifyFortranC.dir/main.c.o CMakeFiles/VerifyFortranC.dir/VerifyC.c.o CMakeFiles/VerifyFortranC.dir/VerifyCXX.cxx.o  -o VerifyFortranC libVerifyFortran.a
Undefined symbols for architecture x86_64:
      "__gfortran_st_write", referenced from:
          _verifyfortran_ in libVerifyFortran.a(VerifyFortran.f.o)
      "__gfortran_st_write_done", referenced from:
          _verifyfortran_ in libVerifyFortran.a(VerifyFortran.f.o)
      "__gfortran_transfer_character_write", referenced from:
          _verifyfortran_ in libVerifyFortran.a(VerifyFortran.f.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

Looks like a config bug, is it?

Kind regards,
Denis 



More information about the Trilinos-Users mailing list