[Trilinos-Users] trilinos build fails: undefined reference to _gfortran...
Slaven Peles
peles at cox.net
Sat Nov 21 08:10:56 MST 2009
I'm using 2.8.0 pre-compiled linux binary of cmake. I fixed the linking
problem by replacing lapack library path in cmake gui
/usr/lib/liblapack.so
with
/usr/lib/liblapack.so;/usr/lib/libgfortran.so.1
This way cmake linked to gfortran every time it needed to link to lapack, so
it solved my problem. It was kind of a quick and dirty solution.
I guess better way to do it would b to add
-D Trilinos_EXTRA_LINK_FLAGS:STRING="-lgfortran"
line to cmake script.
Thanks for the help!
Slaven
On Friday 20 November 2009 08:24:55 am Brad King wrote:
> Slaven wrote:
> > My Trilinos build on a linux box failed with the error message as
> > shown below. It seems as if -lgfortran flag is missing somewhere in
> > linking options. I am new to cmake so I would appreciate any advice
> > how to troubleshoot this problem. Please let me know if you need me
> > to provide more information.
>
> What version of CMake are you running?
>
> cmake --version
>
> > [ 76%] Building CXX object packages/rythmos/test/UnitTest/CMakeFiles/
> > Rythmos_AdjointModelEvaluator_UnitTest.dir/Rythmos_UnitTest.cpp.o
> > Linking CXX executable Rythmos_AdjointModelEvaluator_UnitTest.exe
> > /usr/lib/gcc/i586-suse-linux/4.1.2/../../../liblapack.so: undefined
> > reference to `_gfortran_concat_string'
>
> Please run
>
> make VERBOSE=1
>
> to see the full link line used, and post it. Also, what do the commands
>
> ldd /usr/lib/liblapack.so
> readelf -d /usr/lib/liblapack.so
>
> say?
>
> Thanks,
> -Brad
More information about the Trilinos-Users
mailing list