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

Bug 421197

Summary: eutils.eclass: prune_libtool_files() failed to remove unnecessary libtool archive from /usr/lib64/python2.7/site-packages
Product: Gentoo Linux Reporter: Samuli Suominen (RETIRED) <ssuominen>
Component: EclassesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED INVALID    
Severity: normal CC: mgorny, pacho, pinkbyte
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: app-pda/synce/synce-core-0.16.ebuild
pyrapi2.la

Description Samuli Suominen (RETIRED) gentoo-dev 2012-06-15 06:46:24 UTC
Created attachment 315381 [details]
app-pda/synce/synce-core-0.16.ebuild

* Removing unnecessary /usr/lib64/python2.7/site-packages/pyrapi2.a
 * Removing unnecessary /usr/lib64/libsynce.la (no static archive)

[ ... ]

--- /usr/lib64/
--- /usr/lib64/pkgconfig/
>>> /usr/lib64/pkgconfig/libsynce.pc
--- /usr/lib64/python2.7/
--- /usr/lib64/python2.7/site-packages/
>>> /usr/lib64/python2.7/site-packages/pyrapi2.la <- here
>>> /usr/lib64/python2.7/site-packages/pyrapi2.so
>>> /usr/lib64/libsynce.so.0.0.0

Attaching the ebuild I'm writing where this occured with USE="python"
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2012-06-15 06:47:37 UTC
Created attachment 315383 [details]
pyrapi2.la

This is the actual libtool archive that should get removed, but was installed.
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2012-06-15 06:51:30 UTC
(In reply to comment #0)
> * Removing unnecessary /usr/lib64/python2.7/site-packages/pyrapi2.a

Wait a moment. prune_libtool_files is supposed to remove static archives too??
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-06-15 06:53:57 UTC
(In reply to comment #2)
> (In reply to comment #0)
> > * Removing unnecessary /usr/lib64/python2.7/site-packages/pyrapi2.a
> 
> Wait a moment. prune_libtool_files is supposed to remove static archives
> too??

Those with 'shouldnotlink=yes', yes. In other words, static plugins. And '.la' files with shouldnotlink require '--all' because some plugin loaders rely on them.
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2012-06-15 06:57:48 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > (In reply to comment #0)
> > > * Removing unnecessary /usr/lib64/python2.7/site-packages/pyrapi2.a
> > 
> > Wait a moment. prune_libtool_files is supposed to remove static archives
> > too??
> 
> Those with 'shouldnotlink=yes', yes. In other words, static plugins. And
> '.la' files with shouldnotlink require '--all' because some plugin loaders
> rely on them.

Yeah, sorry for not reading @DESCRIPTION. That sounds sane. 

How about adding an exception for *.la installed in */site-packages/* and always remove them?
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2012-06-15 07:00:04 UTC
Except in this case, there was no .a in the first place... As in,
If I replace `prune_libtool_files` with simple `find "${D}" -name '*.la' -delete` then only .so gets installed.
Comment 6 Pacho Ramos gentoo-dev 2012-06-16 12:23:39 UTC
*** Bug 421279 has been marked as a duplicate of this bug. ***
Comment 7 Martin Kletzander 2014-09-23 07:58:24 UTC
Also sys-cluster/ceph-0.80.5 (and all other current versions as well) use "prune_libtool_files --all" in src_install() after "default" and even with USE=-static-libs there are many .la files installed in the system anyway.
The ones causing problems for me are:

/usr/lib64/libcephfs.la
/usr/lib64/librbd.la
/usr/lib64/librados.la

When merging, I get these messages:

 * Removing unnecessary /usr/lib64/librados.la (requested)
 * Removing unnecessary /usr/lib64/librbd.la (requested)
 * Removing unnecessary /usr/lib64/libcephfs.la (requested)

But they are still installed.  Should I wait for prune_libtool_files to be fixed or is this completely unrelated to this bug and I should file a new one?  Anything I could do to make this move a bit?

P.S.:  At the end of install, there are executable bits removed, but that doesn't help:

removing executable bit: usr/lib64/libcephfs.la
removing executable bit: usr/lib64/librados.la
removing executable bit: usr/lib64/librbd.la
Comment 8 Martin Kletzander 2014-09-23 11:49:03 UTC
Disregard my previous post around about sys-cluster/ceph, the problem is in the ebuild itself, I'll create new bug for that.  Sorry for the noise.
Comment 9 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-12-10 09:03:15 UTC
I think we don't have any more issues to explain here.