[vtk-developers] certain libraries included twice

Bill Hoffman bill.hoffman at kitware.com
Fri May 24 16:01:06 EDT 2002


It would seem that KDE is having a similar problem.
I guess one fix would be to move the -lm and -lpthread lines to 
TARGET_LINK_LIBRARIES in Common/CMakeLists.txt, then they would only
show up once and get pulled in by anything linking vtkCommon.
Can you try that?  If it works, we can put a cmake version if in the vtk
cmake list files so vtk can still be built with older cmakes.

-Bill


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 -lm
>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 hoping
>> >that it would vanish on its own but it hasn't.  I'm on linux (redhat 7.1)
>> >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 reason)
>> >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) twice
>> >    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
>http://public.kitware.com/mailman/listinfo/vtk-developers 




More information about the vtk-developers mailing list