On 06/15/2015 11:31 AM, Ette, Anthony (CDS) wrote:
> Any ideas?  Our FORTRAN compiler (Concurrent Computer Corporation
> port of f77) is failing to compile simple test program because the
> linker can't find -lrt

>From the log:

>   /usr/ccs/bin/cf77 -c 
> /home/bzpl46/sandbox/AE3007/C2/build/redhawk/CMakeFiles/CMakeTmp/testFortranCompiler.f
>  -o CMakeFiles/cmTryCompileExec3634533531.dir/testFortranCompiler.f.o
>   /usr/ccs/bin/cf77 
> CMakeFiles/cmTryCompileExec3634533531.dir/testFortranCompiler.f.o -o   
> cmTryCompileExec3634533531 -rdynamic
>   /usr/ccs/release/7.3/lib_ia32/ld: cannot find -lrt

This is pretty typical usage of a compiler to compile and link a
program.  Perhaps cf77 is responding to -rdynamic and adding -lrt.

The -rdynamic flag is known to work with GNU compilers on Linux:

 
http://www.cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/Platform/Linux-GNU.cmake;hb=v3.3.0-rc2#l21

That setting may be getting re-used because we don't distinguish
cf77 from GNU f77 currently.  For the Intel Fortran compiler we
turn off use of -rdynamic here:

 
http://www.cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/Platform/Linux-Intel-Fortran.cmake;hb=v3.3.0-rc2#l4

Something similar may be needed for this compiler.  Does it define
a preprocessor macro to identify itself?

Thanks,
-Brad

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to