FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 06-28-2010, 01:09 AM
Nirbheek Chauhan
 
Default Adding --as-needed to LDFLAGS in profiles/default/linux/make.defaults

Hello everyone,

I'm sure at least half of you are thinking "Oh no, not this again...",
and I agree. However, I'm /also/ thinking "Why the heck haven't we
done this yet?"

We've been discussing this since 2008, and probably waaay before that
too. The entire discussion about whether we should do this or not has
already passed, there is NO NEED to have that again. This email is
about discussion on what all is *left* before we can do $SUBJECT.

What prompted this email? libpng-1.4 and many other upgrades that have
left gentoo systems very very broken. We have to resort to random
scripts to fix breakage, which reflects very badly on us. Even worse,
a lot of users just give up and reinstall their system, or don't
upgrade, or just move away from Gentoo.

I understand that these kind of breakages are inevitable, but with
as-needed, we can reduce their effect *drastically*. Instead of having
to rebuild almost their entire system, the user would only need to
rebuild packages that directly link(ed) to libpng. I honestly think
that we cannot afford to expose our users to any more such upgrades
without as-needed in the default linux profile.

There's a tracker bug for this, and the problems still remaining are:
http://bugs.gentoo.org/showdependencytree.cgi?id=129413&hide_resolved=1

*Most* of the problems listed there are forced-as-needed problems,
which need to be fixed no doubt, but should NOT block addition of
--as-needed to LDFLAGS in make.defaults which will not trigger those
build failures.

What needs to be done now is for someone with lots of CPU power to
grab the list of packages[1], and build them one-by-one (all
versions), adding to a new list all the ebuilds that fail. How to
test:

LDFLAGS="-Wl,--as-needed" emerge -v1 $atom

Once we have the list that fails with normal as-needed, we can fix
them, get the fix upstreamed (if possible), and switch the flag on.
This action should probably be accompanied by a news item informing
users about the change, and encouraging them to report the (rare) bug
which might hit them.

Let's try to make Gentoo less frustrating for our users.

1. http://dev.gentoo.org/~nirbheek/files/as-needed-failures.list
--
~Nirbheek Chauhan

Gentoo GNOME+Mozilla Team
 
Old 06-28-2010, 07:23 AM
Christian Faulhammer
 
Default Adding --as-needed to LDFLAGS in profiles/default/linux/make.defaults

Hi,

Nirbheek Chauhan <nirbheek@gentoo.org>:
> What needs to be done now is for someone with lots of CPU power to
> grab the list of packages[1], and build them one-by-one (all
> versions), adding to a new list all the ebuilds that fail. How to
> test:
>
> LDFLAGS="-Wl,--as-needed" emerge -v1 $atom
>
> Once we have the list that fails with normal as-needed, we can fix
> them, get the fix upstreamed (if possible), and switch the flag on.
> This action should probably be accompanied by a news item informing
> users about the change, and encouraging them to report the (rare) bug
> which might hit them.

And the stable tree should be safe, too. In general I like the idea.

V-Li

--
Christian Faulhammer, Gentoo Lisp project
<URL:http://www.gentoo.org/proj/en/lisp/>, #gentoo-lisp on FreeNode

<URL:http://www.faulhammer.org/>
 
Old 06-28-2010, 07:35 AM
Ciaran McCreesh
 
Default Adding --as-needed to LDFLAGS in profiles/default/linux/make.defaults

On Mon, 28 Jun 2010 06:39:44 +0530
Nirbheek Chauhan <nirbheek@gentoo.org> wrote:
> There's a tracker bug for this, and the problems still remaining are:
> http://bugs.gentoo.org/showdependencytree.cgi?id=129413&hide_resolved=1

You've forgotten "make --as-needed not break correct code by making the
linker ignore explicit instructions from a program author to link two
things together". Until you do that, --as-needed is in the same
category as -ffast-math.

--
Ciaran McCreesh
 
Old 06-28-2010, 07:44 AM
Samuli Suominen
 
Default Adding --as-needed to LDFLAGS in profiles/default/linux/make.defaults

On 06/28/2010 10:35 AM, Ciaran McCreesh wrote:
> On Mon, 28 Jun 2010 06:39:44 +0530
> Nirbheek Chauhan <nirbheek@gentoo.org> wrote:
>> There's a tracker bug for this, and the problems still remaining are:
>> http://bugs.gentoo.org/showdependencytree.cgi?id=129413&hide_resolved=1
>
> You've forgotten "make --as-needed not break correct code by making the
> linker ignore explicit instructions from a program author to link two
> things together". Until you do that, --as-needed is in the same
> category as -ffast-math.
>

And we can't be held hostage by few packages (marginal cases), that's
why we have function called $(no-as-needed) in flag-o-matic.eclass to
disable the behavior for these packages.

I.e. your point is moot.

- Samuli
 
Old 06-28-2010, 07:51 AM
Ciaran McCreesh
 
Default Adding --as-needed to LDFLAGS in profiles/default/linux/make.defaults

On Mon, 28 Jun 2010 10:44:54 +0300
Samuli Suominen <ssuominen@gentoo.org> wrote:
> > You've forgotten "make --as-needed not break correct code by making
> > the linker ignore explicit instructions from a program author to
> > link two things together". Until you do that, --as-needed is in the
> > same category as -ffast-math.
>
> And we can't be held hostage by few packages (marginal cases), that's
> why we have function called $(no-as-needed) in flag-o-matic.eclass to
> disable the behavior for these packages.

Will Gentoo be doing the same for -Ofast and its flags then? After all,
most packages work with them, and you can't let the few packages that
require standard-compliant behaviour from a compiler hold Gentoo
hostage.

--
Ciaran McCreesh
 
Old 06-28-2010, 08:04 AM
Nikos Chantziaras
 
Default Adding --as-needed to LDFLAGS in profiles/default/linux/make.defaults

On 06/28/2010 10:51 AM, Ciaran McCreesh wrote:

On Mon, 28 Jun 2010 10:44:54 +0300
Samuli Suominen<ssuominen@gentoo.org> wrote:

You've forgotten "make --as-needed not break correct code by making
the linker ignore explicit instructions from a program author to
link two things together". Until you do that, --as-needed is in the
same category as -ffast-math.


And we can't be held hostage by few packages (marginal cases), that's
why we have function called $(no-as-needed) in flag-o-matic.eclass to
disable the behavior for these packages.


Will Gentoo be doing the same for -Ofast and its flags then? After all,
most packages work with them, and you can't let the few packages that
require standard-compliant behaviour from a compiler hold Gentoo
hostage.


--as-needed is a flag that tries to solve a specific (and very annoying)
problem. It deserves a bit of special treatment. It's not a ricer flag :-)
 
Old 06-28-2010, 08:08 AM
Samuli Suominen
 
Default Adding --as-needed to LDFLAGS in profiles/default/linux/make.defaults

On 06/28/2010 10:51 AM, Ciaran McCreesh wrote:
> On Mon, 28 Jun 2010 10:44:54 +0300
> Samuli Suominen <ssuominen@gentoo.org> wrote:
>>> You've forgotten "make --as-needed not break correct code by making
>>> the linker ignore explicit instructions from a program author to
>>> link two things together". Until you do that, --as-needed is in the
>>> same category as -ffast-math.
>>
>> And we can't be held hostage by few packages (marginal cases), that's
>> why we have function called $(no-as-needed) in flag-o-matic.eclass to
>> disable the behavior for these packages.
>
> Will Gentoo be doing the same for -Ofast and its flags then? After all,
> most packages work with them, and you can't let the few packages that
> require standard-compliant behaviour from a compiler hold Gentoo
> hostage.
>

This is not about optimizing but preventing clear breakage, the benefits
of asneeded are not under debate here (like already stated in the
original message this thread started from)

So please stop trying to derail the thread

- Samuli
 
Old 06-28-2010, 08:16 AM
Ciaran McCreesh
 
Default Adding --as-needed to LDFLAGS in profiles/default/linux/make.defaults

On Mon, 28 Jun 2010 11:08:22 +0300
Samuli Suominen <ssuominen@gentoo.org> wrote:
> This is not about optimizing but preventing clear breakage, the
> benefits of asneeded are not under debate here (like already stated
> in the original message this thread started from)

--as-needed does not prevent breakage. It shoves some breakages under
the carpet so they're sometimes less visible, and sometimes easier to
fix when they happen. However, it does absolutely nothing to address
any of the root causes of the breakage, and it does introduce new
breakages itself.

Had one tenth of the effort that had been put into running around and
adding in hacks to work around a deliberately broken toolchain instead
been put into fixing libtool and delivering better slotting mechanisms,
none of this would be an issue.

Or is the policy "we've started running towards the cliff and we've
already debated the merits of jumping off it, so all you're allowed to
discuss now is how we remove the fence"?

--
Ciaran McCreesh
 
Old 06-28-2010, 08:17 AM
Markos Chandras
 
Default Adding --as-needed to LDFLAGS in profiles/default/linux/make.defaults

On Mon, Jun 28, 2010 at 06:39:44AM +0530, Nirbheek Chauhan wrote:
>
> What needs to be done now is for someone with lots of CPU power to
> grab the list of packages[1], and build them one-by-one (all
> versions), adding to a new list all the ebuilds that fail. How to
> test:
>
> LDFLAGS="-Wl,--as-needed" emerge -v1 $atom
>
> Let's try to make Gentoo less frustrating for our users.
>
> 1. http://dev.gentoo.org/~nirbheek/files/as-needed-failures.list
> --
> ~Nirbheek Chauhan
>
> Gentoo GNOME+Mozilla Team
>
I have the CPU power so I will start building those packages and report
back here
--
Markos Chandras (hwoarang)
Gentoo Linux Developer
Web: http://hwoarang.silverarrow.org
 
Old 06-28-2010, 08:42 AM
Pacho Ramos
 
Default Adding --as-needed to LDFLAGS in profiles/default/linux/make.defaults

El lun, 28-06-2010 a las 06:39 +0530, Nirbheek Chauhan escribió:
> Hello everyone,
>
> I'm sure at least half of you are thinking "Oh no, not this again...",
> and I agree. However, I'm /also/ thinking "Why the heck haven't we
> done this yet?"
>
> We've been discussing this since 2008, and probably waaay before that
> too. The entire discussion about whether we should do this or not has
> already passed, there is NO NEED to have that again. This email is
> about discussion on what all is *left* before we can do $SUBJECT.
>
> What prompted this email? libpng-1.4 and many other upgrades that have
> left gentoo systems very very broken. We have to resort to random
> scripts to fix breakage, which reflects very badly on us. Even worse,
> a lot of users just give up and reinstall their system, or don't
> upgrade, or just move away from Gentoo.
>
> I understand that these kind of breakages are inevitable, but with
> as-needed, we can reduce their effect *drastically*. Instead of having
> to rebuild almost their entire system, the user would only need to
> rebuild packages that directly link(ed) to libpng. I honestly think
> that we cannot afford to expose our users to any more such upgrades
> without as-needed in the default linux profile.
>
> There's a tracker bug for this, and the problems still remaining are:
> http://bugs.gentoo.org/showdependencytree.cgi?id=129413&hide_resolved=1
>
> *Most* of the problems listed there are forced-as-needed problems,
> which need to be fixed no doubt, but should NOT block addition of
> --as-needed to LDFLAGS in make.defaults which will not trigger those
> build failures.
>
> What needs to be done now is for someone with lots of CPU power to
> grab the list of packages[1], and build them one-by-one (all
> versions), adding to a new list all the ebuilds that fail. How to
> test:
>
> LDFLAGS="-Wl,--as-needed" emerge -v1 $atom
>
> Once we have the list that fails with normal as-needed, we can fix
> them, get the fix upstreamed (if possible), and switch the flag on.
> This action should probably be accompanied by a news item informing
> users about the change, and encouraging them to report the (rare) bug
> which might hit them.
>
> Let's try to make Gentoo less frustrating for our users.
>
> 1. http://dev.gentoo.org/~nirbheek/files/as-needed-failures.list

Thanks for taking care
 

Thread Tools




All times are GMT. The time now is 02:11 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org