[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
Fri Mar 25 13:45:50 EDT 2016


Never mind this issue. 
That was related to compiler wrappers used in the build system,
which confused CMake in checking C/Fortran compatibility.

Regards,
Denis.

> On 23 Mar 2016, at 12:55, Denis Davydov <davydden at gmail.com> wrote:
> 
> 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