Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[HOWTO] how I use to prelink (nvidia included) [x86] [~x86]
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5, 6  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
radfoj
Guru
Guru


Joined: 31 Dec 2004
Posts: 490
Location: Tísek, Czech Republic

PostPosted: Wed Feb 23, 2005 7:53 pm    Post subject: Reply with quote

tortue.net wrote:
I understand that with this method we have improvements in KDE. GREAT !
But do we have the same improvement using Gnome?
I am using Gnome on my Gentoo box, I measured real improvement in opening Firefox for instance after using your howto.
But is there a method to best accelerate Gnome or is this only good for KDE desktop ?


Read this - https://forums.gentoo.org/viewtopic.php?t=226909 It sounds interesting.
I as a KDE user cannot say you, wheather it really "speedup" GNOME and GTK apps.
But I also added LDFLAGS="-Wl,-O1" to my make.conf some days ago, reemerged system (not world), without any problems yet, but still for me prelink rocks. :lol:
Back to top
View user's profile Send private message
tortue.net
n00b
n00b


Joined: 08 Jul 2004
Posts: 62
Location: France

PostPosted: Wed Feb 23, 2005 9:20 pm    Post subject: Reply with quote

Thanks for your help. I had this options LDFLAGS="-Wl,-O1" in my make.conf since stage1.
I guess I cannot do more (that's great already....but who knows ?)
Back to top
View user's profile Send private message
Pubare
Tux's lil' helper
Tux's lil' helper


Joined: 24 Nov 2003
Posts: 81
Location: Lafayette, LA

PostPosted: Thu Feb 24, 2005 10:25 am    Post subject: prelink and libgcc_s.so.1 errors Reply with quote

Ok, folks posting this type of error:

prelink: Could not prelink /usr/kde/3.4/lib/libDCOP.so.4 because it doesn't use /lib/libgcc_s.so.1, but one of its dependencies has been prelinked against it

I ran into the same issue with a few software packages recently. It seems to be because the package was build using GCC-3.4.3 and some of the deps were build using GCC-3.3.4. Most notable on my system were Kmail (build alone using "DO_NOT_COMPILE" - can't wait for the splits to go stable), Kuickshow (again, built alone), Kaffeine, Kuroo, and Sim. After prelinking, Kuroo and Kmail would sig11 all the time - very annoying, had to unlink everything. Rebuilding all the dependencies (of those packages) with GCC-3.4.3 allowed prelink to do it's thing and those progs quit crashing. I ended up almost completely recompiling my system over a few days period. However, using the script posted by thebigslide at https://forums.gentoo.org/viewtopic-t-299382.html should make this much easier . Use his script against the binary with the problem in prelink and recompile the packages that own the libs listed. If you are not sure which package the libs belong to, just do an "equery belongs /path/to/filename" (assuming you have gentoolkit installed, if not, emerge it). Then just re-emerge those packages.

Hope that made sense... Anyway, it worked for me.

edit: Oh, and prelinking works for any progs that can be linked, regardless of DE / WM. GTK-based apps may not benefit from it as much as QT ones, but it should be the same (or nearly) for both.
Back to top
View user's profile Send private message
bludger
Guru
Guru


Joined: 09 Apr 2003
Posts: 389

PostPosted: Thu Feb 24, 2005 5:57 pm    Post subject: Reply with quote

I just got a lot of the following messages:
prelink: /usr/bin/ffmpeg: Cannot prelink against non-PIC shared library /usr/lib/libavformat.so

The use flag "pic" is set in /etc/make.conf

"emerge -pv ffmpeg" shows the following:
[ebuild R ] media-video/ffmpeg-0.4.9_pre1 -aac (-altivec) -debug -doc +dvd +encode +imlib +mmx +oggvorbis +sdl -static+truetype 0 kB

It looks as if the ffmpeg ebuild is no longer using the pic flag. Is this correct?
Back to top
View user's profile Send private message
hds
Advocate
Advocate


Joined: 21 Aug 2004
Posts: 2629
Location: Sprockhoevel [GER]

PostPosted: Fri Feb 25, 2005 7:13 am    Post subject: Reply with quote

@bludger:
https://forums.gentoo.org/viewtopic-p-2077060.html#2077060
Back to top
View user's profile Send private message
Ox-
Guru
Guru


Joined: 19 Jun 2003
Posts: 305

PostPosted: Fri Feb 25, 2005 11:12 am    Post subject: Reply with quote

The reason many library packages don't have a use "pic" is because they use libtool to build the library. Libtool will automatically add -fPIC during compilation of shared libraries on platforms that support it (e.g. Gentoo Linux).

As for gnome, I'm not sure how much it would be helped by prelinking. My understanding is that prelinking provides the most benefit to applications written in C++ such as KDE and Mozilla.
Back to top
View user's profile Send private message
bludger
Guru
Guru


Joined: 09 Apr 2003
Posts: 389

PostPosted: Sat Feb 26, 2005 7:07 am    Post subject: Reply with quote

Ox- wrote:
The reason many library packages don't have a use "pic" is because they use libtool to build the library. Libtool will automatically add -fPIC during compilation of shared libraries on platforms that support it (e.g. Gentoo Linux).


Well then why can't I prelink ffmpeg? I managed to prelink everything a few weeks ago, but now gives the error above.
Back to top
View user's profile Send private message
hds
Advocate
Advocate


Joined: 21 Aug 2004
Posts: 2629
Location: Sprockhoevel [GER]

PostPosted: Sat Feb 26, 2005 8:29 am    Post subject: Reply with quote

bludger wrote:

Well then why can't I prelink ffmpeg? I managed to prelink everything a few weeks ago, but now gives the error above.

i very much doubt you managed to prelink ffmpeg a few weeks ago. i guess you havent watched the process all the time, so you didnt notice? or maybe ffmpeg wasnt installed?
Back to top
View user's profile Send private message
bens
n00b
n00b


Joined: 03 Mar 2004
Posts: 37
Location: MIT

PostPosted: Sat Feb 26, 2005 10:31 am    Post subject: Prelink Errors Reply with quote

When I run prelink -avmR I get screenfulls of
Code:
prelink: /usr/bin/ntp-keygen: Dependency tracing failed
prelink: /usr/bin/tifficc: Dependency tracing failed
prelink: /usr/bin/which: Dependency tracing failed
prelink: /usr/bin/y4mshift: Dependency tracing failed

Absolutely nothing is prelinked; I just get that failure error for every executable and library on the system.
Anyone know what "Dependency tracing failed" means?

More details at
https://forums.gentoo.org/viewtopic-t-300604-highlight-.html
Back to top
View user's profile Send private message
Cyrack
n00b
n00b


Joined: 15 Jun 2003
Posts: 39
Location: Denmark (Herning)

PostPosted: Sat Feb 26, 2005 4:12 pm    Post subject: Reply with quote

simondo42 wrote:
Cyrack: This thread might be of use:

https://forums.gentoo.org/viewtopic-t-292379-highlight-prelink+gccconfig.html

simon


Well, everybody should check first if this problem exist in their install, since prelinking did something bad to my binaries. Almost every single program I tried to start seg.faulted shortly after, leaving the kernel in a unstable state, then causing the kernel to crash (even as normal user). I tried to unlink the apps again (singleuser mode and a load of time spent with knoppix and chroot), but eventhough prelink reported that the bins were unlinked the seg.faults didn't stop, so now I have reinstalled the entire system.
Just a little warning/info....
Back to top
View user's profile Send private message
hds
Advocate
Advocate


Joined: 21 Aug 2004
Posts: 2629
Location: Sprockhoevel [GER]

PostPosted: Sat Feb 26, 2005 8:36 pm    Post subject: Reply with quote

<lol>, this didnt happen here. x86 stable and also full ~x86 on a different machine.
is this 64 architecture, or something apart from x86? just wondering..
if it is on x86 machines, you would happen to be the 1st one to tell.

//edit: updated the topic to show x86 only
Back to top
View user's profile Send private message
Cyrack
n00b
n00b


Joined: 15 Jun 2003
Posts: 39
Location: Denmark (Herning)

PostPosted: Sun Feb 27, 2005 9:22 am    Post subject: Reply with quote

hds wrote:
<lol>, this didnt happen here. x86 stable and also full ~x86 on a different machine.
is this 64 architecture, or something apart from x86? just wondering..
if it is on x86 machines, you would happen to be the 1st one to tell.

//edit: updated the topic to show x86 only


Yes, it is an amd64, but it should work.
Back to top
View user's profile Send private message
Pubare
Tux's lil' helper
Tux's lil' helper


Joined: 24 Nov 2003
Posts: 81
Location: Lafayette, LA

PostPosted: Sun Feb 27, 2005 11:39 pm    Post subject: Reply with quote

Cyrack: did you read my post above - https://forums.gentoo.org/posting.php?mode=quote&p=2125440 ? This should fix the "can not link against libgcc" issue. If you are running an A64 on an x86 install, everything should work. If you are running an x86_64 build with multilib support, results may be unpredictable...

Oh, and I think Ox- is correct about it mostly helping C++ apps, so not as noticeable on gnome...
Back to top
View user's profile Send private message
bens
n00b
n00b


Joined: 03 Mar 2004
Posts: 37
Location: MIT

PostPosted: Mon Feb 28, 2005 8:37 am    Post subject: Fixed Reply with quote

I believe I now have prelink running on hardened-dev-sources. My Glibc was corrupt, or something. Anyone know a good way to prove that a program has actually been prelinked?
Back to top
View user's profile Send private message
runlevel0
n00b
n00b


Joined: 09 Sep 2004
Posts: 67
Location: Mountains of Noord-Holland

PostPosted: Tue Mar 01, 2005 1:23 am    Post subject: Reply with quote

radfoj wrote:
Hi,
about month ago, I tried to prelink my new gentoo box. I followed the prelink guide, with USE-flag "pic" in my make.conf. No benchmark were done, but I wasnt feeling any speedups. I decided to try once more after some time. Today I found this howto, so I tried again, also with your trick "opengl-update".


IMHO you forgot running 'emerge -newuse world', the 'newuse' flag tells portage to honour the newly changed USE settings.
_________________
--
]:O <-[Mooooooooooo!]
Back to top
View user's profile Send private message
bludger
Guru
Guru


Joined: 09 Apr 2003
Posts: 389

PostPosted: Tue Mar 01, 2005 8:19 pm    Post subject: Reply with quote

hds wrote:
bludger wrote:

Well then why can't I prelink ffmpeg? I managed to prelink everything a few weeks ago, but now gives the error above.

i very much doubt you managed to prelink ffmpeg a few weeks ago. i guess you havent watched the process all the time, so you didnt notice? or maybe ffmpeg wasnt installed?

I have had ffmpeg installed for quite some time:
genlop -l|grep ffmpeg
Tue Jun 3 10:37:14 2003 >>> media-video/ffmpeg-0.4.6-r1
Mon Apr 19 08:51:33 2004 >>> media-video/ffmpeg-0.4.7
Mon Jan 17 02:12:56 2005 >>> media-video/ffmpeg-0.4.9_pre1
Tue Mar 1 14:00:01 2005 >>> media-video/ffmpeg-0.4.9_p20050226

I have also been emerging with "--newuse" for quite some time now.

I recently followed your instructions and managed to prelink everything with no errors. Ie. I got to the "init U" command. Now I get this error with ffmpeg. I know it doesn't seem to make sense, but I definitely remember getting the "init U".
Back to top
View user's profile Send private message
hds
Advocate
Advocate


Joined: 21 Aug 2004
Posts: 2629
Location: Sprockhoevel [GER]

PostPosted: Tue Mar 01, 2005 8:24 pm    Post subject: Reply with quote

err? you get this "init U" regardless if ffmpeg is prelinked or not. i fear you misunderstood?
this "init u" output simply tells, that the prelink process got finished. it does not! tell everything has been prelinked!
Back to top
View user's profile Send private message
ShakyJake
n00b
n00b


Joined: 20 Sep 2004
Posts: 46

PostPosted: Fri Mar 04, 2005 3:56 pm    Post subject: Reply with quote

After reading (most) of this topic, I decided to go ahead and format and reload Gentoo from scratch. This time I made sure the "pic" USE flag was in MAKE.CONF from the beginning.

After compiling all the stuff I use (KDE, Firefox, MPlayer), I ran prelink. I got the "Init U" thingy at the end of the output. But I am not noticing any tangible increase in loading times. It seems exactly the same as before.

I used a Stage3 tarball. Should i have done the "emerge -uDv --newuse world" even though I built the entire system from the get go with the USE flag? Only thing I can think of is that the stage3 binaries could be the source of it's non-working-ness. :(
Back to top
View user's profile Send private message
hds
Advocate
Advocate


Joined: 21 Aug 2004
Posts: 2629
Location: Sprockhoevel [GER]

PostPosted: Fri Mar 04, 2005 5:12 pm    Post subject: Reply with quote

ShakyJake wrote:
Only thing I can think of is that the stage3 binaries could be the source of it's non-working-ness. :(

probably. run: "emerge -upDv --newuse world" (-p for pretend) and see if something likes to be updated.
and dont forget /etc/env.d/99kde-env, edit "KDE_IS_PRELINKED=1"! and run env-update, source etc/profile

i never did a stage3, but if you didnt compile glibc yourself, and glibc was already a binary (i dont know that) it does probably not have pic support.
Back to top
View user's profile Send private message
_mikec_
Guru
Guru


Joined: 22 May 2004
Posts: 386

PostPosted: Sun Mar 20, 2005 12:12 am    Post subject: Reply with quote

i had an aumix make failed error, emerge -uDv --newuse world couldn't finish.

I opened a new thread here,
https://forums.gentoo.org/viewtopic-t-311178-highlight-.html
_________________
(8 Mars 2005 - 07:52:46)
(18 September 2017 - 11:25:35)
Back to top
View user's profile Send private message
gmichels
Guru
Guru


Joined: 20 Jun 2003
Posts: 480
Location: Brazil

PostPosted: Wed Mar 23, 2005 7:31 pm    Post subject: Reply with quote

Ok, I have just finished updating my system. Just upgraded glibc (pic enabled) and a bunch of other packages. Then I upgraded my 3.3.2 kde to the new 3.4 using the split ebuilds.

Now it's time to prelink to get a little speed boost. So I did the usual prelink -amR and got several lines like these ones:
Code:
prelink: /usr/kde/3.4/bin/kwin_killer_helper: Cannot prelink against non-PIC shared library /usr/kde/3.4/lib/libkdeui.so.4
prelink: /usr/kde/3.4/bin/kio_media_mounthelper: Cannot prelink against non-PIC shared library /usr/kde/3.4/lib/libkio.so.4
prelink: /usr/kde/3.4/bin/khotnewstuff: Cannot prelink against non-PIC shared library /usr/kde/3.4/lib/libknewstuff.so.1
prelink: /usr/kde/3.4/bin/kcminit: Cannot prelink against non-PIC shared library /usr/kde/3.4/lib/libkutils.so.1
prelink: /usr/kde/3.4/bin/mcopidl: Cannot prelink against non-PIC shared library /usr/kde/3.4/lib/libmcop.so.1
prelink: /usr/kde/3.4/bin/kcontrol: Cannot prelink against non-PIC shared library /usr/kde/3.4/lib/libkhtml.so.4
prelink: /usr/kde/3.4/bin/dcopquit: Cannot prelink against non-PIC shared library /usr/kde/3.4/lib/libDCOP.so.4
prelink: /usr/kde/3.4/bin/keditbookmarks: Cannot prelink against non-PIC shared library /usr/kde/3.4/lib/libkonq.so.4


There are plenty lines of this, almost all of them kde related. If anyone would like the see the entire prelink output, it's available here.

Any ideas?
Thanks
Back to top
View user's profile Send private message
_mikec_
Guru
Guru


Joined: 22 May 2004
Posts: 386

PostPosted: Wed Mar 23, 2005 11:11 pm    Post subject: Reply with quote

the pic flag should be in your make.conf file i guess then emerging any new package or updating existent ones will be aware of the --newuse flag (pic) i had the same problem before everything is working right now. speed aint that noticeable for me though.
_________________
(8 Mars 2005 - 07:52:46)
(18 September 2017 - 11:25:35)
Back to top
View user's profile Send private message
alinv
Guru
Guru


Joined: 19 Nov 2002
Posts: 395
Location: Bucharest

PostPosted: Thu Mar 24, 2005 12:11 pm    Post subject: Reply with quote

If you want to have a measurement of speed improvement, try running
Code:
time DISPLAY="" LD_DEBUG=statistics konqueror (or whatever you want to test)

before and after prelinking. (Look for the final number o relocations)

This way you can tell if prelinking really worked.
_________________
Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better.
S.B.
Back to top
View user's profile Send private message
gmichels
Guru
Guru


Joined: 20 Jun 2003
Posts: 480
Location: Brazil

PostPosted: Thu Mar 24, 2005 12:35 pm    Post subject: Reply with quote

The pic USE flag is set and --newuse only report a few unrelated packages:
Code:
$ emerge info |grep pic
USE="x86 #cpu #glibc #gnome #graphics #hardware #kde #kdeenablefinal #other #perl #print #sound #video 3dnow 3dnowex X aalib acpi alsa apm avi bash-completion berkdb cdr crypt cups curl directfb dvd emboss encode fam flac foomaticdb fortran gdbm gif gphoto2 gpm hal imagemagick imlib ithreads java jpeg kde libg++ libwww mad matroska mikmod mmx mmxext motif mp3 mpeg ncurses nls nptl nptlonly oggvorbis opengl pam pdflib perl pic png ppds python qt quicktime readline rtc samba sdl slang specific spell sse ssl svga tcltk tcpd tiff truetype truetype-fonts type1-fonts unicode usb userlocales wifi xine xml2 xv xvid zlib video_cards_radeon"
$ emerge -uDp --newuse world

These are the packages that I would merge, in order:

Calculating world dependencies ...done!
[ebuild   R   ] dev-lang/tcl-8.4.6
[ebuild   R   ] dev-lang/tk-8.4.6-r1
[ebuild   R   ] net-misc/tightvnc-1.3_alpha5
[ebuild   R   ] media-libs/libkipi-0.1.1
[ebuild   R   ] media-libs/libao-0.8.5
[ebuild   R   ] media-video/mplayer-1.0_pre5-r5
[ebuild   R   ] media-plugins/kipi-plugins-0.1.0_beta2


So, yes, this is really weird.
Back to top
View user's profile Send private message
Master One
l33t
l33t


Joined: 25 Aug 2003
Posts: 754
Location: Austria

PostPosted: Sat Apr 09, 2005 10:20 am    Post subject: Reply with quote

It it correct, that the "Executing /sbin/init U" does not show up after
Code:
prelink -qavmR
also everthing worked out fine?

I just checked, when running "prelink -avmfR" it's showing up at the end, but not on updates using "-qavmR".
_________________
Las torturas mentales de la CIA
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6  Next
Page 4 of 6

 
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