* [patch] autotools: Remove .la files by default
@ 2011-03-29 14:43 Colin Walters
2011-03-29 16:03 ` Richard Purdie
0 siblings, 1 reply; 7+ messages in thread
From: Colin Walters @ 2011-03-29 14:43 UTC (permalink / raw)
To: poky
[-- Attachment #1: Type: text/plain, Size: 21 bytes --]
See attached patch.
[-- Attachment #2: 0001-autotools-Remove-.la-files-by-default.patch --]
[-- Type: text/x-patch, Size: 1346 bytes --]
From 487753f1bbef085c558befba7f03b6b4f01f392d Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@verbum.org>
Date: Tue, 29 Mar 2011 10:41:34 -0400
Subject: [PATCH] autotools: Remove .la files by default
They are installed by libtool only to make automake's "make uninstall"
work; but we don't care about that, since no one sane bases an
operating system upgrade/uninstall procedure on automake. Saner
people use higher level abstractions like "packages" or pure image
based synchronization.
They are otherwise unnecessary and actually can break things; see:
https://live.gnome.org/GnomeShell/RemovingLaFiles
http://wiki.debian.org/ReleaseGoals/LAFileRemoval
---
meta/classes/autotools.bbclass | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index 7ebf833..1f77212 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -163,6 +163,11 @@ autotools_do_install() {
if [ -e "${D}${infodir}/dir" ]; then
rm -f ${D}${infodir}/dir
fi
+ # Also kill off .la files; they are wholly unnecessary and actually can
+ # break things; see:
+ # https://live.gnome.org/GnomeShell/RemovingLaFiles
+ # http://wiki.debian.org/ReleaseGoals/LAFileRemoval
+ find ${D}${libdir} -name '*.la' -delete
}
inherit siteconfig
--
1.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [patch] autotools: Remove .la files by default
2011-03-29 14:43 [patch] autotools: Remove .la files by default Colin Walters
@ 2011-03-29 16:03 ` Richard Purdie
2011-03-29 16:15 ` Colin Walters
0 siblings, 1 reply; 7+ messages in thread
From: Richard Purdie @ 2011-03-29 16:03 UTC (permalink / raw)
To: Colin Walters; +Cc: poky
On Tue, 2011-03-29 at 10:43 -0400, Colin Walters wrote:
> From 487753f1bbef085c558befba7f03b6b4f01f392d Mon Sep 17 00:00:00 2001
> From: Colin Walters <walters@verbum.org>
> Date: Tue, 29 Mar 2011 10:41:34 -0400
> Subject: [PATCH] autotools: Remove .la files by default
>
> They are installed by libtool only to make automake's "make uninstall"
> work; but we don't care about that, since no one sane bases an
> operating system upgrade/uninstall procedure on automake. Saner
> people use higher level abstractions like "packages" or pure image
> based synchronization.
>
> They are otherwise unnecessary and actually can break things; see:
> https://live.gnome.org/GnomeShell/RemovingLaFiles
> http://wiki.debian.org/ReleaseGoals/LAFileRemoval
Much as I dislike libtool, I've not seen these files do us much harm and
they do sometimes give warning of linkage against things we shouldn't be
linking against. I want to try and stay close to standard libtool in the
hope we can get some of the more major problems we have like working
sysroot support sorted out.
So no, I'm not going to merge this patch at this time. If we were going
to do something like this I'd rather thrown out libtool entirely and
switch to something like dolt.
Also note in your gnome shell link above that its listed as required
because of "the dirty hacks that jhbuild plays to get it to sandbox your
system" which is hardly a glowing recommendation. We don't have this
problem.
Cheers,
Richard
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [patch] autotools: Remove .la files by default
2011-03-29 16:03 ` Richard Purdie
@ 2011-03-29 16:15 ` Colin Walters
2011-03-29 16:29 ` Richard Purdie
2011-03-29 16:35 ` Koen Kooi
0 siblings, 2 replies; 7+ messages in thread
From: Colin Walters @ 2011-03-29 16:15 UTC (permalink / raw)
To: Richard Purdie; +Cc: poky
On Tue, Mar 29, 2011 at 12:03 PM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> So no, I'm not going to merge this patch at this time. If we were going
> to do something like this I'd rather thrown out libtool entirely and
> switch to something like dolt.
Would you take an option, off by default then? I definitely do not
want these files in my OS; I could remove them in a
ROOTFS_POSTPROCESS_COMMAND, but it'd be even better to do in after
each build.
> Also note in your gnome shell link above that its listed as required
> because of "the dirty hacks that jhbuild plays to get it to sandbox your
> system" which is hardly a glowing recommendation. We don't have this
> problem.
The core problem arises in that often for developers it's convenient
to do partial builds; say only rebuild glib and gtk+, but not rebuild
pango (which lies between them). What the libtool pango.la file does
is add -L/usr/lib which is 1) unnecessary and 2) forces the linker
search first in /usr/lib instead of /opt/gnome like we want.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [patch] autotools: Remove .la files by default
2011-03-29 16:15 ` Colin Walters
@ 2011-03-29 16:29 ` Richard Purdie
2011-03-29 17:04 ` Colin Walters
2011-03-29 16:35 ` Koen Kooi
1 sibling, 1 reply; 7+ messages in thread
From: Richard Purdie @ 2011-03-29 16:29 UTC (permalink / raw)
To: Colin Walters; +Cc: poky
On Tue, 2011-03-29 at 12:15 -0400, Colin Walters wrote:
> On Tue, Mar 29, 2011 at 12:03 PM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
>
> > So no, I'm not going to merge this patch at this time. If we were going
> > to do something like this I'd rather thrown out libtool entirely and
> > switch to something like dolt.
>
> Would you take an option, off by default then? I definitely do not
> want these files in my OS; I could remove them in a
> ROOTFS_POSTPROCESS_COMMAND, but it'd be even better to do in after
> each build.
I can do better than that, we have some limitations in the way .conf
files are parsed compared to .bbclass files. If you create a
"localchanges.bbclass" containing:
autotools_do_install_append () {
# Also kill off .la files; they are wholly unnecessary and actually can
# break things; see:
# https://live.gnome.org/GnomeShell/RemovingLaFiles
# http://wiki.debian.org/ReleaseGoals/LAFileRemoval
find ${D}${libdir} -name '*.la' -delete
}
and then do INHERIT += "localchanges" you should have this doing what
you want though. You can create a classes/ directory for the .bbclass
along side you conf files (or add a layer for your customisations).
> > Also note in your gnome shell link above that its listed as required
> > because of "the dirty hacks that jhbuild plays to get it to sandbox your
> > system" which is hardly a glowing recommendation. We don't have this
> > problem.
>
> The core problem arises in that often for developers it's convenient
> to do partial builds; say only rebuild glib and gtk+, but not rebuild
> pango (which lies between them). What the libtool pango.la file does
> is add -L/usr/lib which is 1) unnecessary and 2) forces the linker
> search first in /usr/lib instead of /opt/gnome like we want.
Right, but with our build environment, this really becomes a non-issue
(and I've been trying to get patches upstream which stop -L/usr/lib
being injected anyway as that is a libtool bug).
Cheers,
Richard
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [patch] autotools: Remove .la files by default
2011-03-29 16:15 ` Colin Walters
2011-03-29 16:29 ` Richard Purdie
@ 2011-03-29 16:35 ` Koen Kooi
1 sibling, 0 replies; 7+ messages in thread
From: Koen Kooi @ 2011-03-29 16:35 UTC (permalink / raw)
To: Colin Walters; +Cc: poky
Op 29 mrt 2011, om 18:15 heeft Colin Walters het volgende geschreven:
> On Tue, Mar 29, 2011 at 12:03 PM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
>
>> So no, I'm not going to merge this patch at this time. If we were going
>> to do something like this I'd rather thrown out libtool entirely and
>> switch to something like dolt.
>
> Would you take an option, off by default then? I definitely do not
> want these files in my OS; I could remove them in a
> ROOTFS_POSTPROCESS_COMMAND, but it'd be even better to do in after
> each build.
>
>> Also note in your gnome shell link above that its listed as required
>> because of "the dirty hacks that jhbuild plays to get it to sandbox your
>> system" which is hardly a glowing recommendation. We don't have this
>> problem.
>
> The core problem arises in that often for developers it's convenient
> to do partial builds; say only rebuild glib and gtk+, but not rebuild
> pango (which lies between them). What the libtool pango.la file does
> is add -L/usr/lib which is 1) unnecessary and 2) forces the linker
> search first in /usr/lib instead of /opt/gnome like we want.
Isn't that why we have libtool sysroot support? Or does that break with the split you describe above?
regards,
Koen
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [patch] autotools: Remove .la files by default
2011-03-29 16:29 ` Richard Purdie
@ 2011-03-29 17:04 ` Colin Walters
2011-03-29 22:18 ` Richard Purdie
0 siblings, 1 reply; 7+ messages in thread
From: Colin Walters @ 2011-03-29 17:04 UTC (permalink / raw)
To: Richard Purdie; +Cc: poky
On Tue, Mar 29, 2011 at 12:29 PM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>
> I can do better than that, we have some limitations in the way .conf
> files are parsed compared to .bbclass files. If you create a
> "localchanges.bbclass" containing:
Of course I can code it locally, but I think this mechanism would be
of value to other people creating systems, and hence my proposal to do
it upstream.
> and then do INHERIT += "localchanges"
This appears to work, thanks.
> Right, but with our build environment, this really becomes a non-issue
I agree it's a non-issue for building the OS. But it will be an issue
for people who *after* having the OS installed, want to temporarily
override system libraries with other versions. And there's just no
sane way to fix it without just nuking the files from the OS.
> (and I've been trying to get patches upstream which stop -L/usr/lib
> being injected anyway as that is a libtool bug).
I think a better fix would actually be an automake option to stop it
from even installing them, and I looked into this (it's not trivial,
and effectively requires disabling "make uninstall"), and even if the
fix landed every project would have to be updated for it.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [patch] autotools: Remove .la files by default
2011-03-29 17:04 ` Colin Walters
@ 2011-03-29 22:18 ` Richard Purdie
0 siblings, 0 replies; 7+ messages in thread
From: Richard Purdie @ 2011-03-29 22:18 UTC (permalink / raw)
To: Colin Walters; +Cc: poky
On Tue, 2011-03-29 at 13:04 -0400, Colin Walters wrote:
> On Tue, Mar 29, 2011 at 12:29 PM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> >
> > I can do better than that, we have some limitations in the way .conf
> > files are parsed compared to .bbclass files. If you create a
> > "localchanges.bbclass" containing:
>
> Of course I can code it locally, but I think this mechanism would be
> of value to other people creating systems, and hence my proposal to do
> it upstream.
For the reasons I've outlined I really don't want to encourage people to
be doing this so I'm reluctant to accept such a patch. Note that
removing them from the install directory removes them from the sysroots
too and may have undesired side effects on dlopened libraries for
example.
> > Right, but with our build environment, this really becomes a non-issue
>
> I agree it's a non-issue for building the OS. But it will be an issue
> for people who *after* having the OS installed, want to temporarily
> override system libraries with other versions. And there's just no
> sane way to fix it without just nuking the files from the OS.
My questions are: How many people actually use the system that way
rather than generating a new image? Is deleting the .la files really
that hard if you're doing development on the system?
I appreciate for you it is an issue but I'm not yet convinced this is a
widespread problem.
> > (and I've been trying to get patches upstream which stop -L/usr/lib
> > being injected anyway as that is a libtool bug).
>
> I think a better fix would actually be an automake option to stop it
> from even installing them, and I looked into this (it's not trivial,
> and effectively requires disabling "make uninstall"), and even if the
> fix landed every project would have to be updated for it.
The nice thing about OE is that it reautoconf's the sources so if you do
change libtool, we can cascade it to pretty much every package bar some
of the toolchain pieces automagically!
Cheers,
Richard
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-03-29 22:19 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-29 14:43 [patch] autotools: Remove .la files by default Colin Walters
2011-03-29 16:03 ` Richard Purdie
2011-03-29 16:15 ` Colin Walters
2011-03-29 16:29 ` Richard Purdie
2011-03-29 17:04 ` Colin Walters
2011-03-29 22:18 ` Richard Purdie
2011-03-29 16:35 ` Koen Kooi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.