View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0010179CMakeCMakepublic2010-01-22 14:202016-06-10 14:31
ReporterLuis Ibanez 
Assigned ToKitware Robot 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0010179: Duplicate libraries appearances in link command line
DescriptionWhen composing the link line, CMake sometimes end up placing multiple copies of a given library. This results in link-time warnings of the sort:

"ld: warning: duplicate dylib"

(e.g. in Darwin).

Additional Informationld: warning: duplicate dylib
/.../Slicer3/../Slicer3-lib/VTK-build/bin/libvtkzlib.dylib

This illustrates the problem in a build of Slicer3:
http://www.cdash.org/CDash/viewBuildError.php?type=1&buildid=520807 [^]
TagsNo tags attached.
Attached Files

 Relationships
related to 0004810closedBrad King OSX linker fails with too many duplicate -lfoo arguments 

  Notes
(0019275)
Luis Ibanez (reporter)
2010-01-22 14:22

From Brad:

"CMake does a lot of work to follow library dependencies to make sure
everything links. Often this involves duplicating library appearance
on command lines. Generally it is needed for static libraries but
we do it for all libraries because sometimes we do not know whether
a library is static or shared.

This can be addressed, but is non-trivial."
(0027611)
Craig Scott (reporter)
2011-10-22 01:18

Would it not work if, when duplicate libraries are listed on the link command line, just keep the last one and remove all earlier ones? The link dependency order would then still be preserved and the duplicate dylib warnings should be eliminated.
(0033484)
Lachlan Hetherton (reporter)
2013-07-04 23:49

Has there been any progress on this? Or are there any obvious work-arounds?
(0041643)
Kitware Robot (administrator)
2016-06-10 14:27

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2010-01-22 14:21 Luis Ibanez New Issue
2010-01-22 14:22 Luis Ibanez Note Added: 0019275
2010-12-14 17:45 David Cole Assigned To => David Cole
2010-12-14 17:45 David Cole Status new => assigned
2011-02-09 14:26 David Cole Status assigned => backlog
2011-02-09 15:09 David Cole Assigned To David Cole =>
2011-10-22 01:18 Craig Scott Note Added: 0027611
2012-02-09 10:03 Brad King Relationship added related to 0004810
2013-07-04 23:49 Lachlan Hetherton Note Added: 0033484
2016-06-10 14:27 Kitware Robot Note Added: 0041643
2016-06-10 14:27 Kitware Robot Status backlog => resolved
2016-06-10 14:27 Kitware Robot Resolution open => moved
2016-06-10 14:27 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team