Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
LDFLAG --as-needed / Speeding up of GNOME or KDE
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3 ... , 9, 10, 11  Next  
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
Gabrys
Veteran
Veteran


Joined: 05 Dec 2005
Posts: 1096
Location: Toruń [PL]

PostPosted: Wed Jan 25, 2006 11:17 am    Post subject: Reply with quote

And has anyone tried to compile firefox with some LDFLAGS? I am really happy having my Gentoo, but Firefox starts in 10 seconds. Firefox-bin in 6 seconds. I want Firefox to start in 5 seconds. Will LDFLAGS do a trick?
_________________
Sabayon Professional 1.1 (czyli zdradziłem oryginalne Gentoo)
@ Dell Inspiron 8600 (nVidia, Realtek, Pentium M)
Back to top
View user's profile Send private message
Belandrew
n00b
n00b


Joined: 15 Mar 2004
Posts: 18

PostPosted: Sat Jan 28, 2006 8:46 am    Post subject: Reply with quote

These are packages I've had trouble emerging with --as-needed. They compile fine without it.

  • app-text/tetex-2.0.x though version 3.0.x compiles fine
  • dev-lisp/sbcl-0.9.4
  • media-libs/netpbm-10.30-r1
  • media-sound/hydrogen-0.9.0
  • media-sound/swami-0.9.2
  • x11-libs/fltk-1.1.6


On the other hand, here's some in the list that are fixed in these later versions.

  • dev-util/kdevelop-3.3.0
  • net-p2p/amule-2.1.0-r1
  • x11-libs/wxGTK-2.6.1-r1


Gabrys wrote:
And has anyone tried to compile firefox with some LDFLAGS? I am really happy having my Gentoo, but Firefox starts in 10 seconds. Firefox-bin in 6 seconds. I want Firefox to start in 5 seconds. Will LDFLAGS do a trick?


I've compiled Firefox with "-Wl,-O1 -Wl,--sort-common -Wl,--as-needed" (whole system is that way, except the few remaining packages that break) and haven't had any problems. I can't tell you if it loads any faster than without, since I use Konqueror as my main browser, so never got a feel for Firefox's previous loading time on here.
Back to top
View user's profile Send private message
Gabrys
Veteran
Veteran


Joined: 05 Dec 2005
Posts: 1096
Location: Toruń [PL]

PostPosted: Sat Jan 28, 2006 12:04 pm    Post subject: Reply with quote

I have already compiled Fx with LDFLAGS mentioned above. I didn't noticed any speedup. In contrast there was a nice speedup of the system (not only Fx) when migrating my filesystem to reiserfs. It seems to me, that playing with LDFLAGS is not worth all the trouble they make. At least for me ;).
_________________
Sabayon Professional 1.1 (czyli zdradziłem oryginalne Gentoo)
@ Dell Inspiron 8600 (nVidia, Realtek, Pentium M)
Back to top
View user's profile Send private message
FireBurn
Apprentice
Apprentice


Joined: 19 Sep 2004
Posts: 165
Location: Edinburgh, UK

PostPosted: Sat Feb 11, 2006 11:14 am    Post subject: Reply with quote

Has anyone noticed problems with compiling using --as-needed with the experimental glibc 2.4 and gcc 4.1?

I've been having issues with anything that tries to link against libcairo.so with the error:

i686-pc-linux-gnu-gcc -pedantic -Wall -Wstrict-prototypes -Wnested-externs -std=c89 -U__STRICT_ANSI__ -Wl,-O1 -Wl,--sort-common -Wl,--enable-new-dtags -Wl,-Bdirect -Wl,-hashvals -Wl,-zdynsort -Wl,--as-needed -L/usr/lib -o xscreensaver-demo-Gtk prefs.o dpms.o remote.o exec.o ../utils/resources.o ../utils/usleep.o ../utils/visual.o demo-Gtk.o demo-Gtk-conf.o -L/usr/lib \
-Wl,--export-dynamic -lglade-2.0 -lgtk-x11-2.0 -lxml2 -lz -lgdk-x11-2.0 -latk-1.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgdk_pixbuf_xlib-2.0 -lgdk_pixbuf-2.0 -lm -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -lXmu -lXpm -lgdk_pixbuf_xlib-2.0 -lgdk_pixbuf-2.0 -lm -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -lSM -lICE \
-lXt -lX11 -lXext
/usr/lib/libcairo.so.2: undefined reference to `__popcountsi2@GCC_3.4'
collect2: ld returned 1 exit status
make[1]: *** [xscreensaver-demo-Gtk] Error 1
make[1]: Leaving directory `/var/tmp/portage/xscreensaver-4.23-r1/work/xscreensaver-4.23/driver'
make: *** [default] Error 5

I used to use this flag with gcc-4.1 before moving to the new glibc and if the flag is removed it works just fine

Any one have any ideas or even better patches?
Back to top
View user's profile Send private message
pussi
l33t
l33t


Joined: 08 May 2004
Posts: 727
Location: Finland

PostPosted: Sat Feb 11, 2006 11:58 am    Post subject: Reply with quote

Gabrys wrote:
I have already compiled Fx with LDFLAGS mentioned above. I didn't noticed any speedup. In contrast there was a nice speedup of the system (not only Fx) when migrating my filesystem to reiserfs. It seems to me, that playing with LDFLAGS is not worth all the trouble they make. At least for me ;).
I think firefox ebuild strips all LDFLAGS by default so you should use custom ebuild if you want to see any speedup with it.
Back to top
View user's profile Send private message
Gabrys
Veteran
Veteran


Joined: 05 Dec 2005
Posts: 1096
Location: Toruń [PL]

PostPosted: Sat Feb 11, 2006 12:54 pm    Post subject: Reply with quote

So can you tell me why it starts so slowly?
_________________
Sabayon Professional 1.1 (czyli zdradziłem oryginalne Gentoo)
@ Dell Inspiron 8600 (nVidia, Realtek, Pentium M)
Back to top
View user's profile Send private message
Gergan Penkov
Veteran
Veteran


Joined: 17 Jul 2004
Posts: 1464
Location: das kleinste Kuhdorf Deutschlands :)

PostPosted: Sat Feb 11, 2006 2:40 pm    Post subject: Reply with quote

This is not correct it uses the flags:
Code:
readelf -d firefox-bin

Dynamic section at offset 0x10bd4 contains 31 entries:
  Tag        Type                         Name/Value
 0x00000001 (NEEDED)                     Shared library: [libmozjs.so]
 0x00000001 (NEEDED)                     Shared library: [libxpcom_core.so]
 0x00000001 (NEEDED)                     Shared library: [libplc4.so.6]
 0x00000001 (NEEDED)                     Shared library: [libnspr4.so.6]
 0x00000001 (NEEDED)                     Shared library: [libpthread.so.0]
 0x00000001 (NEEDED)                     Shared library: [libgtk-x11-2.0.so.0]
 0x00000001 (NEEDED)                     Shared library: [libgdk-x11-2.0.so.0]
 0x00000001 (NEEDED)                     Shared library: [libX11.so.6]
 0x00000001 (NEEDED)                     Shared library: [libstdc++.so.6]
 0x00000001 (NEEDED)                     Shared library: [libc.so.6]
 0x0000000f (RPATH)                      Library rpath: [$ORIGIN:/usr/lib/nspr]
 0x0000001d (RUNPATH)                    Library runpath: [$ORIGIN:/usr/lib/nspr]

As you see it links to only 10 libs :)
_________________
"I knew when an angel whispered into my ear,
You gotta get him away, yeah
Hey little bitch!
Be glad you finally walked away or you may have not lived another day."
Godsmack
Back to top
View user's profile Send private message
Enverex
Guru
Guru


Joined: 02 Jul 2003
Posts: 501
Location: Worcester, UK

PostPosted: Sun Feb 26, 2006 1:44 pm    Post subject: Reply with quote

Just did an emerge -e world and these were the programs that failed to compile:

media-gfx/pornview-0.2.0_pre1
media-plugins/xmms-alsa-1.2.10-r3
media-plugins/xmms-mikmod-1.2.10
media-plugins/xmms-vorbis-1.2.10-r1
media-plugins/xmms-sndfile-1.2
media-plugins/xmms-jack-0.16
media-plugins/xmms-mpg123-1.2.10-r1
media-plugins/xmms-btexmms-0.5
media-plugins/xmms-cdaudio-1.2.10-r1
media-sound/xmms-1.2.10-r15
dev-libs/expat-1.95.8
mail-client/evolution-2.4.2.1
net-wireless/gnome-bluetooth-0.7.0
media-sound/alsa-tools-1.0.11_rc3
net-misc/openssh-4.2_p1-r1
media-sound/ardour-0.99.2
dev-util/anjuta-1.2.4-r1
media-gfx/gimp-print-4.2.7
media-video/transcode-1.0.2-r2
xfce-base/xffm-4.2.3
media-libs/gle-3.0.1-r2
app-misc/mc-4.6.0-r14

Not bad out of 750+ programs installed :)
Updated: 27/02/2006
Back to top
View user's profile Send private message
Enverex
Guru
Guru


Joined: 02 Jul 2003
Posts: 501
Location: Worcester, UK

PostPosted: Tue Feb 28, 2006 11:28 am    Post subject: Reply with quote

Ok, another annoying issue. Even if I parse LDFLAGS="" emerge boinc it still seems to be compiling with my LDFLAGS, so I went into make.conf and commented them out and it STILL does it >.< Any ideas? The actual error is...

Quote:
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.5/../../../../x86_64-pc-linux-gnu/bin/ld: BFD 2.16.1 assertion fail /var/tmp/portage/binutils-2.16.1-r1/work/binutils-2.16.1/bfd/elflink.c:2334
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.5/../../../../x86_64-pc-linux-gnu/bin/ld: BFD 2.16.1 assertion fail /var/tmp/portage/binutils-2.16.1-r1/work/binutils-2.16.1/bfd/elflink.c:2335
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.5/../../../../x86_64-pc-linux-gnu/bin/ld: BFD 2.16.1 assertion fail /var/tmp/portage/binutils-2.16.1-r1/work/binutils-2.16.1/bfd/elflink.c:2334
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.5/../../../../x86_64-pc-linux-gnu/bin/ld: BFD 2.16.1 internal error, aborting at /var/tmp/portage/binutils-2.16.1-r1/work/binutils-2.16.1/bfd/elflink.c line 6518 in elf_link_output_extsym

/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.5/../../../../x86_64-pc-linux-gnu/bin/ld: Please report this bug.


As it is still parsing....

Quote:
boinc_gui-hyperlink.o -Wl,-O1 -Wl,--sort-common -Wl,--enable-new-dtags -Wl,-Bdirect -Wl,-O1 -Wl,--sort-common -Wl,--enable-new-dtags -Wl,-Bdirect -Wl,--as-needed -L/var/tmp/portage/boinc-5.2.14/work/boinc-5.2.14/lib -L/usr/lib64 -L/usr/lib
Back to top
View user's profile Send private message
Gergan Penkov
Veteran
Veteran


Joined: 17 Jul 2004
Posts: 1464
Location: das kleinste Kuhdorf Deutschlands :)

PostPosted: Sat Mar 04, 2006 12:11 am    Post subject: Reply with quote

It is coming from some la or pkg-config files, you should find, in which package and eradicate it or somehow filter the boinc make files after ./configure :(
_________________
"I knew when an angel whispered into my ear,
You gotta get him away, yeah
Hey little bitch!
Be glad you finally walked away or you may have not lived another day."
Godsmack
Back to top
View user's profile Send private message
Enverex
Guru
Guru


Joined: 02 Jul 2003
Posts: 501
Location: Worcester, UK

PostPosted: Sun Mar 05, 2006 1:01 pm    Post subject: Reply with quote

Well Boinc doesn't work after an emerge -e world without those LDFLAGS so we can assume it's Boincs fault.
Back to top
View user's profile Send private message
lnxz
Guru
Guru


Joined: 03 Jul 2005
Posts: 472
Location: Earth

PostPosted: Sun Mar 26, 2006 8:51 am    Post subject: Reply with quote

x11-misc/fbpanel-4.3 fails for no apparent reason, works without.
Back to top
View user's profile Send private message
lnxz
Guru
Guru


Joined: 03 Jul 2005
Posts: 472
Location: Earth

PostPosted: Sun Apr 02, 2006 4:28 am    Post subject: Reply with quote

app-admin/xstow-0.5.1 fails too.
Back to top
View user's profile Send private message
Enverex
Guru
Guru


Joined: 02 Jul 2003
Posts: 501
Location: Worcester, UK

PostPosted: Sun Apr 02, 2006 11:48 am    Post subject: Reply with quote

Ok, I can't be the only one here, to be honest, despite commands telling me less libraries are being linked, I've noticed no speedup whatsoever...
Back to top
View user's profile Send private message
Kragen
Tux's lil' helper
Tux's lil' helper


Joined: 28 Mar 2006
Posts: 77

PostPosted: Sat Apr 08, 2006 9:07 am    Post subject: Reply with quote

Gabrys wrote:
So can you tell me why it starts so slowly?


My firefox starts in about 4-5 seconds. The only thing I can think of that I've done is prelinking:
http://forums.gentoo.org/viewtopic-t-231170-highlight-speed.html
http://www.gentoo.org/doc/en/prelink-howto.xml
Back to top
View user's profile Send private message
Kragen
Tux's lil' helper
Tux's lil' helper


Joined: 28 Mar 2006
Posts: 77

PostPosted: Sat Apr 08, 2006 9:23 am    Post subject: Reply with quote

sys-fs/captive fails as well.
Back to top
View user's profile Send private message
Gergan Penkov
Veteran
Veteran


Joined: 17 Jul 2004
Posts: 1464
Location: das kleinste Kuhdorf Deutschlands :)

PostPosted: Sat Apr 08, 2006 9:43 am    Post subject: Reply with quote

There is a general misunderstanding on this, probably the thread must be renamed to sth like "--as-needed LDFLAG helping us maintain our systems", there could be speed-up but this will be mostly unnoticable, and it is not the main gain of using it.
Look for example what is happening in the libexpat-2.0.0 ABI_breakage thread, this ldflag could prevent such disasters and that is what it is really good at.
_________________
"I knew when an angel whispered into my ear,
You gotta get him away, yeah
Hey little bitch!
Be glad you finally walked away or you may have not lived another day."
Godsmack
Back to top
View user's profile Send private message
infirit
l33t
l33t


Joined: 11 Jan 2003
Posts: 774
Location: Hoofddorp / The Netherlands

PostPosted: Sat Apr 08, 2006 1:58 pm    Post subject: Reply with quote

Gergan Penkov wrote:
Look for example what is happening in the libexpat-2.0.0 ABI_breakage thread, this ldflag could prevent such disasters and that is what it is really good at.

flameeyes has a nice blog post about this, the case of the missing --as-needed.

And the fixing guide is here.
_________________
EASY TO INSTALL = Difficult to install, but instruction manual has pictures.
Join the adopt an unanswered post initiative today
Back to top
View user's profile Send private message
Gergan Penkov
Veteran
Veteran


Joined: 17 Jul 2004
Posts: 1464
Location: das kleinste Kuhdorf Deutschlands :)

PostPosted: Sat Apr 08, 2006 2:34 pm    Post subject: Reply with quote

Well after such postings, one could really feel a little better or at least not as the last dumb ricer :)
I knew that flameeyes is vocal supporter of --as-needed, as I have read some of his earlier blogs, but I haven't expected that this leads to contention with some of the other devs.
Pity as this one is really usefull - I hope that the wisest will prevail :)
_________________
"I knew when an angel whispered into my ear,
You gotta get him away, yeah
Hey little bitch!
Be glad you finally walked away or you may have not lived another day."
Godsmack
Back to top
View user's profile Send private message
vipernicus
Veteran
Veteran


Joined: 17 Jan 2005
Posts: 1462
Location: Your College IT Dept.

PostPosted: Sat Apr 08, 2006 9:10 pm    Post subject: Reply with quote

Quick question:

Presently my LDFLAGS are:
Code:
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,-Bdirect -Wl,-hashvals -Wl,-zdynsort"


Does --sort-common cause any performance issues?
Code:
--sort-common
    This option tells ld to sort the common symbols by size when it places them in the appropriate output sections. First come all the one byte symbols, then all the two byte, then all the four byte, and then everything else. This is to prevent gaps between symbols due to alignment constraints.


And how would I add --as-needed to my LDFLAGS?
_________________
Viper-Sources Maintainer || nesl247 Projects || vipernicus.org blog


Last edited by vipernicus on Sat Apr 08, 2006 9:14 pm; edited 2 times in total
Back to top
View user's profile Send private message
predatorfreak
l33t
l33t


Joined: 13 Jan 2005
Posts: 708
Location: USA, Michigan.

PostPosted: Sat Apr 08, 2006 9:13 pm    Post subject: Reply with quote

vipernicus wrote:
Quick question:

Presently my LDFLAGS are:
Code:
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,-Bdirect -Wl,-hashvals -Wl,-zdynsort"


What does --sort-common do for me? And how would I add --as-needed to my LDFLAGS?


--sort-common lays the resulting binary out better (it organizes it in a better way). -Wl,--as-needed.
_________________
System: predatorbox
Distro: Arch Linux x86_64
Current projects: blackhole, convmedia and anything else I cook up.
Back to top
View user's profile Send private message
lnxz
Guru
Guru


Joined: 03 Jul 2005
Posts: 472
Location: Earth

PostPosted: Mon Apr 10, 2006 12:31 am    Post subject: Reply with quote

media-sound/id3v2-0.1.11 fails with alot of undefined references.
Back to top
View user's profile Send private message
Gergan Penkov
Veteran
Veteran


Joined: 17 Jul 2004
Posts: 1464
Location: das kleinste Kuhdorf Deutschlands :)

PostPosted: Mon Apr 10, 2006 5:09 pm    Post subject: Reply with quote

Gergan Penkov wrote:
Well after such postings, one could really feel a little better or at least not as the last dumb ricer :)
...
Pity as this one is really usefull - I hope that the wisest will prevail :)

Well it seems that the wiser ones have prevailed - there is an official bug-tracker about --as-needed bugs - http://bugs.gentoo.org/show_bug.cgi?id=129413
I don't know what is the policy, but bugs with patches should be ok.
_________________
"I knew when an angel whispered into my ear,
You gotta get him away, yeah
Hey little bitch!
Be glad you finally walked away or you may have not lived another day."
Godsmack
Back to top
View user's profile Send private message
infirit
l33t
l33t


Joined: 11 Jan 2003
Posts: 774
Location: Hoofddorp / The Netherlands

PostPosted: Mon Apr 10, 2006 6:04 pm    Post subject: Reply with quote

Gergan Penkov wrote:
Well it seems that the wiser ones have prevailed - there is an official bug-tracker about --as-needed bugs - http://bugs.gentoo.org/show_bug.cgi?id=129413
I don't know what is the policy, but bugs with patches should be ok.

Hurray, i can finally get rid of my package.ldflags (well at least try) :wink:
_________________
EASY TO INSTALL = Difficult to install, but instruction manual has pictures.
Join the adopt an unanswered post initiative today
Back to top
View user's profile Send private message
KD-120RD
Tux's lil' helper
Tux's lil' helper


Joined: 07 Mar 2004
Posts: 149
Location: Hamburg

PostPosted: Fri Apr 28, 2006 11:00 am    Post subject: Reply with quote

Gergan Penkov wrote:

Well it seems that the wiser ones have prevailed - there is an official bug-tracker about --as-needed bugs - http://bugs.gentoo.org/show_bug.cgi?id=129413
I don't know what is the policy, but bugs with patches should be ok.


This is good news. Quite a few packages have gotten fixed now!
I whish I could provide patches myself, but am not much a coder.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Goto page Previous  1, 2, 3 ... , 9, 10, 11  Next
Page 10 of 11

 
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