Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 227241

Summary: dev-build/libtool-2*: When creating shared libraries libtool adds dependencies of specified libraries which causes needless linking against additional libraries
Product: Gentoo Linux Reporter: Arfrever Frehtes Taifersar Arahesis (RETIRED) <arfrever>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: CONFIRMED ---    
Severity: major CC: axiator, fiona.klute, flameeyes, galtgendo, loki_val, nicolasbock, pacho, remi
Priority: High    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 212763    
Attachments: libtool-1.log
libtool-2.log
libtool_test.c

Description Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2008-06-15 16:01:12 UTC
sys-devel/libtool-2.2.4: When creating shared libraries libtool adds dependencies of specified libraries which causes needless linking against additional libraries.

sys-devel/libtool-1.5.26 works correctly.
Comment 1 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2008-06-15 16:02:06 UTC
Created attachment 156935 [details]
libtool-1.log
Comment 2 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2008-06-15 16:02:58 UTC
Created attachment 156937 [details]
libtool-2.log
Comment 3 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2008-06-15 16:04:21 UTC
Created attachment 156939 [details]
libtool_test.c
Comment 4 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2008-06-15 16:07:22 UTC
(In reply to comment #1 and comment #2)

There should be:
$ scanelf -qF "%F: %n" .libs/libtool_test.so.0.0.0

Instead of:
$ scanelf -qF %F: %n .libs/libtool_test.so.0.0.0
Comment 5 Pacho Ramos gentoo-dev 2008-11-14 20:18:40 UTC
Maybe this is related to the following patch applied in debian:
http://patch-tracking.debian.net/patch/series/view/libtool/2.2.2-1/link_all_deplibs.patch
Comment 6 Yaroslav Isakov 2009-04-20 13:41:32 UTC
Any progress in this bug?
Comment 7 SpanKY gentoo-dev 2009-05-29 23:41:59 UTC
any work to be done is going to be on the upstream mailing lists
Comment 8 Opportunist 2009-06-28 09:02:52 UTC
any news?
Comment 9 Yaroslav Isakov 2016-02-14 20:25:54 UTC
I'm here from 2016 :) It seems that it is fixed for sys-devel/libtool-2.4.6, sys-devel/gcc-4.9.3 and x86_64 arch. Please confirm on other platforms.

$ scanelf -qF "%F: %n" .libs/libtool_test.so.0.0.0
.libs/libtool_test.so.0.0.0: libapr-1.so.0,libaprutil-1.so.0,libc.so.6
Comment 10 SpanKY gentoo-dev 2016-02-14 20:51:54 UTC
make sure you aren't using the gold linker or --as-needed.  both of those will fix up the excess linkage.
Comment 11 Yaroslav Isakov 2016-02-14 20:56:38 UTC
Yeah, you're right, I'm using LDFLAGS="-Wl,-O1 -Wl,--as-needed"

But it's in default profile, so probably it's fixed on every installation (besides of custom LDFLAGS users)