Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 271129 - [PATCH] portage should fixup .la files to accomodate removal of same
Summary: [PATCH] portage should fixup .la files to accomodate removal of same
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: High enhancement with 8 votes (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
: 325493 357291 (view as bug list)
Depends on:
Blocks: 287318 314787 335925
  Show dependency tree
 
Reported: 2009-05-24 20:43 UTC by Peter Alfredsen (RETIRED)
Modified: 2011-03-04 15:42 UTC (History)
21 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fixup .la files (misc-functions.patch,5.14 KB, patch)
2009-05-24 20:44 UTC, Peter Alfredsen (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Alfredsen (RETIRED) gentoo-dev 2009-05-24 20:43:31 UTC
We talked about this on IRC some time ago, but it kind of ran into the sand, so here's a bug to help us remember.

See bug 267148 for an example of why it is beneficial to get rid of .la files. Any package transitioning from libtool/autotools to (for instance) CMake will lose .la files.

.la files may needlessly transmit a dependency up the dependency chain even though it is not really DT_NEEDED, but only listed as a library to link against. This assumes that --as-needed is not used.

Also, .la files will list the entire dependency chain in dependency_libs, which may lead to really long rebuilds if a library disappears (such as libxcb in bug 248743) and --as-needed is not used even if lafilefixer is run, since the libraries will still link against the unneeded library.

In short, getting rid of .la files is entirely beneficial on the platforms we support, and in order to do that in a sane way, we need to gradually switch dependency_libs in installed packages to list -llibrary instead of /usr/lib/liblibrary.la. When that is done, packages that need libtool for ltdl will still be able to resolve dependency_libs and removing liblibrary.la will have zero impact.

Patch attached.
Comment 1 Peter Alfredsen (RETIRED) gentoo-dev 2009-05-24 20:44:09 UTC
Created attachment 192332 [details, diff]
Fixup .la files
Comment 2 Oleg Mikheev 2009-11-02 18:53:36 UTC
Do I get it right that a fix to this bug will also resolve the 'fixed' but not fixed bug http://bugs.gentoo.org/show_bug.cgi?id=275597 ?
Comment 3 Alec Warner archtester Gentoo Infrastructure gentoo-dev Security 2009-11-02 20:49:46 UTC
Can't we do this in some kind of hook?  Can we touch livefs in a post_inst_hook?
Comment 4 Alec Warner archtester Gentoo Infrastructure gentoo-dev Security 2009-11-02 21:13:32 UTC
See the main problem here is that the brokenness is in GENTOO stable.  However even if we fix it in portage-shiny-new-version the majority of our users (hi users!) will not be using portage-shiny-new-version and thus will not get the fix.  This is why we need to put more planning into efforts like this.

-A
Comment 5 Zac Medico gentoo-dev 2009-11-02 21:43:45 UTC
Can we just have portage call lafilefixer so that we don't have to maintain this code? If it the code needs to be in portage itself, then I'd prefer python.
Comment 6 Lee Thompson 2009-12-24 03:22:03 UTC
I think deleting LA file should go through a GLEP (Gentoo Linux Enhancement Proposal) process and have a real discussion about it.  Its a big change.  The deletion of the LA file in media-libs/libogg done by the ebuild maintainer broke alot of stuff needlessly.  Don't leave the distribution one foot in and one foot out of autoconf/libtool.
Comment 7 wilhelm hagg 2010-02-06 20:16:21 UTC
(In reply to comment #6)
> I think deleting LA file should go through a GLEP (Gentoo Linux Enhancement
> Proposal) process and have a real discussion about it.  Its a big change.  The
> deletion of the LA file in media-libs/libogg done by the ebuild maintainer
> broke alot of stuff needlessly.  Don't leave the distribution one foot in and
> one foot out of autoconf/libtool.
> 


If fixed liboog by masking it  (>=media-libs/libogg-1.1.4). In the meantime libogg-1.1.3 is no longer in the portage tree and i think it should be there until this problem is fixed. Or did i miss something ?
Comment 8 wilhelm hagg 2010-02-07 00:06:35 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > I think deleting LA file should go through a GLEP (Gentoo Linux Enhancement
> > Proposal) process and have a real discussion about it.  Its a big change.  The
> > deletion of the LA file in media-libs/libogg done by the ebuild maintainer
> > broke alot of stuff needlessly.  Don't leave the distribution one foot in and
> > one foot out of autoconf/libtool.
> > 
> 
> 
> If fixed liboog by masking it  (>=media-libs/libogg-1.1.4). In the meantime
> libogg-1.1.3 is no longer in the portage tree and i think it should be there
> until this problem is fixed. Or did i miss something ?
> 

Yes i missed something, was probably not up to date? Works without *.la files now. Sorry for posting nonsens.
Comment 9 Zac Medico gentoo-dev 2010-05-12 22:04:58 UTC
(In reply to comment #5)
> Can we just have portage call lafilefixer so that we don't have to maintain
> this code? If it the code needs to be in portage itself, then I'd prefer
> python.

On flameeyes' blog he said to use `lafilefixer "${D}"`. Is that equivalent to what the attached patch does? I think something like that is preferable to putting the code in portage.
Comment 10 Samuli Suominen (RETIRED) gentoo-dev 2010-06-25 10:59:49 UTC
*** Bug 325493 has been marked as a duplicate of this bug. ***
Comment 11 Pacho Ramos gentoo-dev 2010-07-02 11:38:14 UTC
Diego posted again that running lafilefixer in this way would be really useful:
http://blog.flameeyes.eu/2010/06/30/let-s-call-a-spade-a-spade

Then, from my point of view, we should go this this approach if nobody disagrees in the next days
Comment 12 Zac Medico gentoo-dev 2010-07-12 09:36:59 UTC
There's a python implementation of this in git now:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=76118ef9b746ca3ba644504b6ddb13906bc2e2f0
Comment 13 Zac Medico gentoo-dev 2010-09-18 04:13:36 UTC
This is fixed in portage-2.1.9.
Comment 14 Jeroen Roovers (RETIRED) gentoo-dev 2011-03-04 15:42:12 UTC
*** Bug 357291 has been marked as a duplicate of this bug. ***