| View previous topic :: View next topic |
| Author |
Message |
skutnar n00b

Joined: 13 Jun 2006 Posts: 65
|
Posted: Fri Aug 21, 2009 4:43 am Post subject: |
|
|
| 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 |
|
 |
Bircoph Apprentice


Joined: 27 Jun 2008 Posts: 209
|
Posted: Thu Oct 01, 2009 8:43 am Post subject: |
|
|
| 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 |
|
 |
Bluesquare n00b


Joined: 26 Oct 2009 Posts: 24
|
Posted: Mon Nov 30, 2009 7:07 am Post subject: |
|
|
| 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 |
|
 |
Bircoph Apprentice


Joined: 27 Jun 2008 Posts: 209
|
Posted: Wed Dec 02, 2009 8:13 pm Post subject: |
|
|
| 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 |
|
 |
Bluesquare n00b


Joined: 26 Oct 2009 Posts: 24
|
Posted: Thu Dec 10, 2009 9:46 pm Post subject: |
|
|
| I 'emerge -e world'd with the --as-needed and everything is smooth as ever... Thnx. |
|
| Back to top |
|
 |
dE_logics Veteran


Joined: 02 Jan 2009 Posts: 1774 Location: $TERM
|
Posted: Sat Jan 02, 2010 10:55 am Post subject: |
|
|
| Absolutely nothing breaks with as needed...it made wine pretty fast. |
|
| Back to top |
|
 |
Letharion Veteran

Joined: 13 Jun 2005 Posts: 1195 Location: Sweden
|
Posted: Sat Aug 14, 2010 10:51 pm Post subject: |
|
|
Since --as-needed is default now, I think this thread can be un-stickied.  |
|
| Back to top |
|
 |
desultory Administrator


Joined: 04 Nov 2005 Posts: 6906
|
Posted: Sun Aug 15, 2010 7:48 am Post subject: |
|
|
| 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 |
|
 |
|