[vtk-developers] certain libraries included twice

Ken Martin ken.martin at kitware.com
Fri May 24 16:37:00 EDT 2002

Brad and I checked into this recently. The problem is that some versions
of gcc have a wacked out issue with the math library and cannot handle
the math library coming before some internal libraies. So the
linker/compiler actually searches for -lm in your link line and removes
it and then puts it where it wants it (after some of the run time c++
lib stuff). The problem is that it only searches for one copy of -lm and
if there are two only one gets moved. In a nutshell that version of gcc
is broken but ... we have to live with it. So VTK's CMakeLists files
should be modified to deal with the issue. I think once CMake 1.4 is out
we will overhaul the VTK development tree's makefiles and clean up this


At 03:54 PM 5/24/2002 -0400, David Gobbi wrote:
>Thanks Bill, Andy,
>I'll hack my makefiles for now.  Rebuilding my glibc isn't really an
>option (or at least not one I'm willing to consider ;).  If I get any
>additional insights into why the g++ linker is barfing on the double
>I'll report back.
> - David
>On Fri, 24 May 2002, Bill Hoffman wrote:
>> cmake now keeps track of which libraries are used by a library and
adds them to a link line.
>> Since -lm and -lpthreads are done at the top of vtk all libraries
need them.  The get repeated because if a library needs a library it
must come after it on the link line.
>> Anyway, you should be able to repeat -lm without this problem.
>> I did a quick google search, and found this:
>> > Yesterday, I attempted to play with KDE 2.2Beta. During the
compilation of the multimedia package, I get an error sayinhg that the >
linker cannot create application becuase clog@@GLIBC_2.1 cannot be
found... Rebuild your glibc, and this time don't include the
--disable-versioning or --enable-oldest-abi flags.
>> At 03:27 PM 5/24/2002 -0400, David Gobbi wrote:
>> >Hi All,
>> >
>> >I've been having a funny build problem for the past week, I was
>> >that it would vanish on its own but it hasn't.  I'm on linux (redhat
>> >with gcc-2.95.3 rather than the default gcc-2.96-85.
>> >
>> >In every link line I have -lm appear twice, and (for some unknown
>> >this leads to the following link error:
>> >   undefined versioned symbol name clog@@GLIBC_2.1
>> >
>> >So my questions are
>> > 1) Has anyone else seen a similar problem?
>> > 2) Why does cmake list several libraries (-lpthread, -ldl, -lm)
>> >    when it links the shared libraries?
>> >
>> > - David
>> >
>> >_______________________________________________
>> >vtk-developers mailing list
>> >vtk-developers at public.kitware.com
>> >http://public.kitware.com/mailman/listinfo/vtk-developers
>vtk-developers mailing list
>vtk-developers at public.kitware.com

vtk-developers mailing list
vtk-developers at public.kitware.com

More information about the vtk-developers mailing list