[CMake] ifort,icc,icpc: ld: cannot find -lcilkrts
Michael Hertling
mhertling at online.de
Sun Nov 13 02:24:51 EST 2011
On 11/12/2011 08:48 AM, Ilias Miroslav wrote:
> Dear experts,
>
> our problem is that cmake sets automatically linking libraries for C,C++ and with Intel compilers (Fortran,C,C++) we are getting these problems
> ( first observed here https://repo.ctcc.no/CDash/viewBuildError.php?buildid=5283 ) :
> .
> .
> .
> Linking Fortran executable dirac.x
> /people/disk2/ilias/bin/cmake_install/bin/cmake -E cmake_link_script CMakeFiles/dirac.x.dir/link.txt --verbose=1
> /people/disk2/magnus/intel/composerxe-2011.2.137/bin/intel64/ifort -static -Wl,-E -w -assume byterecl -DVAR_IFORT -g -traceback -static-libgcc -static-intel -i8 -O0 CMakeFiles/dirac.x.dir/main/main.F90.o -o dirac.x -i_dynamic lib/libdirac.a lib/libxcfun.a -ldecimal -lcilkrts -lstdc++ -lirc
> ld: cannot find -lcilkrts
> make[3]: *** [dirac.x] Error 1
> .
>
> Manual linking without the "-lcilkrts" flag works:
>
> ilias at fe6.dcsc.sdu.dk:~/QCH_Work/qch_progs/dirac_git/trunk/build_ompi_ifort_icc_ilp64_static/./people/disk2/magnus/intel/composerxe-2011.2.137/bin/intel64/ifort -static -Wl,-E -w -assume byterecl -DVAR_IFORT -g -traceback -static-libgcc -static-intel -i8 -O0 CMakeFiles/dirac.x.dir/main/main.F90.o -o dirac.x -i_dynamic lib/libdirac.a lib/libxcfun.a -ldecimal -lstdc++ -lirc
> ilias at fe6.dcsc.sdu.dk:~/QCH_Work/qch_progs/dirac_git/trunk/build_ompi_ifort_icc_ilp64_static/.
>
> The problematic "cilkrts" library is set automatically within CMAKE_C_IMPLICIT_LINK_LIBRARIES & CMAKE_CXX_IMPLICIT_LINK_LIBRARIES variables, as found:
>
> ilias at fe6.dcsc.sdu.dk:~/QCH_Work/qch_progs/dirac_git/trunk/build_ompi_ifort_icc_ilp64_static/.grep cilkrts * */*
> .
> CMakeFiles/CMakeCCompiler.cmake:SET(CMAKE_C_IMPLICIT_LINK_LIBRARIES "imf;svml;m;ipgo;decimal;cilkrts;stdc++;irc;c;irc_s;dl;c")
> CMakeFiles/CMakeCXXCompiler.cmake:SET(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "imf;svml;m;ipgo;decimal;cilkrts;stdc++;irc;c;irc_s;dl;c")
> .
> .
>
> Please how to remove "cilkrts" or any other parameter from CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES,
> http://www.cmake.org/cmake/help/cmake-2-8-docs.html#variable:CMAKE_LANG_IMPLICIT_LINK_LIBRARIES ?
>
> We have cmake version 2.8.4 and Intel is Intel(R) 64, Version 12.0.2.137 Build 20110112.
>
> Yours, M.Ilias
Perhaps, you might check how the offending library makes it into the
CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES variables. IIRC, these libraries
are determined by building a small test program and analyzing the link
command line, so linking against the cilkrts library should basically
work if it appears among the implicit link libraries. The results of
the analysis are reported in CMakeFiles/CMakeOutput.log; could you
post it, or the relevant part thereof, for further investigation?
Regards,
Michael
More information about the CMake
mailing list