Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Call for --as-needed testing
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
skutnar
n00b
n00b


Joined: 13 Jun 2006
Posts: 65

PostPosted: Fri Aug 21, 2009 4:43 am    Post subject: Reply with quote

How many are using the forced --as-needed via GCC spec file? I've been running with that for quite some time now with no ill effects on ~amd64 with KDE.
Back to top
View user's profile Send private message
Bircoph
Apprentice
Apprentice


Joined: 27 Jun 2008
Posts: 220

PostPosted: Thu Oct 01, 2009 8:43 am    Post subject: Reply with quote

Bircoph wrote:

So I changed added "-Wl,--as-needed" to my LDFLAGS. root compiles ok, it starts ok, e.g. no unresolved symbol failures, it works. But(!) on some functions it failed, it silently freezes, no error messages, no logs, it just hangs up. strace reveals a failure point in some futex() lockup after dynamical loading of some libs and object dictionaries, I haven't explored the problem further.

I examined this issue further. I rebuilt my whole tree with LDFLAGS="-Wl,-O1 -Wl,--as-needed". ROOT still have this issue even 5.24.00 with --as-needed patches (see bug 287178). I have no firm idea why this happens, but I'm afraid this is CINT failure and I suspect it is not designed to be used with --as-needed. So be extremly careful with --as-needed, run-time linking and interpreters, especially uncommon interpreters.

Aside from sci-physics/root problems I encountered two other problems triggered by --as-needed while rebuilding the tree.
1) app-forensics/aide. I send a patch to fix it. Despite successful compilation I have not tested work of this package thoroughly.
2) net-libs/libwww can not be fixed due to bad library design, the only way for now is to disable --as-needed.

There are maybe more issues with run-time --as-needed triggered problems, but aside from ROOT I have found none so far.

And a small note to those who wish to rebuild all installed tree. I encountered 10 failures non related to --as-needed, just because packages were build with newer libs or tools. Some of them were already fixed with patches available on bugzilla, but not applied into the portage tree, some of them I fix myself (and patches were send).

But all these action really take a lot of time, so think twice before switching to --as-needed. Despite startup time of some packages improved and link dependency reduced by 5% in average, dangerous nature of this improvement and its high cost make me state that anyone interested in should be aware of awaiting danger.

Of course in future when almost all packages will be fixed and proved to be rather stable at run-time it would be great to have this flag enabled by default.
_________________
Per aspera ad astra!
Back to top
View user's profile Send private message
Bluesquare
n00b
n00b


Joined: 26 Oct 2009
Posts: 24

PostPosted: Mon Nov 30, 2009 7:07 am    Post subject: Reply with quote

Does this mean that the --as-needed flag could be set as a general rule and just be removed while compiling the packages that otherwise fail?
Back to top
View user's profile Send private message
Bircoph
Apprentice
Apprentice


Joined: 27 Jun 2008
Posts: 220

PostPosted: Wed Dec 02, 2009 8:13 pm    Post subject: Reply with quote

Bluesquare wrote:
Does this mean that the --as-needed flag could be set as a general rule and just be removed while compiling the packages that otherwise fail?

Yes. But there is no simple way to found failed packages and you may get unexpected run-time failure, though probability is low.
_________________
Per aspera ad astra!
Back to top
View user's profile Send private message
Bluesquare
n00b
n00b


Joined: 26 Oct 2009
Posts: 24

PostPosted: Thu Dec 10, 2009 9:46 pm    Post subject: Reply with quote

I 'emerge -e world'd with the --as-needed and everything is smooth as ever... Thnx.
Back to top
View user's profile Send private message
dE_logics
Veteran
Veteran


Joined: 02 Jan 2009
Posts: 1848
Location: $TERM

PostPosted: Sat Jan 02, 2010 10:55 am    Post subject: Reply with quote

Absolutely nothing breaks with as needed...it made wine pretty fast.
Back to top
View user's profile Send private message
Letharion
Veteran
Veteran


Joined: 13 Jun 2005
Posts: 1203
Location: Sweden

PostPosted: Sat Aug 14, 2010 10:51 pm    Post subject: Reply with quote

Since --as-needed is default now, I think this thread can be un-stickied. :)
Back to top
View user's profile Send private message
desultory
Administrator
Administrator


Joined: 04 Nov 2005
Posts: 7061

PostPosted: Sun Aug 15, 2010 7:48 am    Post subject: Reply with quote

Letharion wrote:
Since --as-needed is default now, I think this thread can be un-stickied. :)
Agreed, and done. Thanks for the reminder.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum