Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 82117 - prelink inactive
Summary: prelink inactive
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Stefan Jones (RETIRED)
URL:
Whiteboard:
Keywords:
: 107714 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-02-15 07:38 UTC by Richard Benjamin Voigt
Modified: 2007-02-13 11:06 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
The output of prelik -amR (prelink_amR.out,11.89 KB, text/plain)
2007-01-20 11:05 UTC, Tobias Bender
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Benjamin Voigt 2005-02-15 07:38:52 UTC
Prelink stopped working on my system.  Originally it complained about a couple libraries, then stopped complaining.  I don't know if it ever actually did change anything.

Now I did prelink -u -a and then prelink -a -v -m -R and nothing happens.  prelink -y works, but prelink -u /bin/bash tells me that there is no prelink section (.gnu.prelinkundo or some such).

I haven't intentionally disabled prelink anywhere, and /etc/prelink.conf looks ok.  prelink -v /bin/bash also produces no output, so I don't think prelink.conf is the problem.

I deleted prelink.cache hoping that would solve the problem, but it didn't help at all.

Reproducible: Always
Steps to Reproduce:
prelink -n -v -a
Actual Results:  
No output

Expected Results:  
the list of files that would be prelinked

root@colinux-penn ~ # uname -a
Linux colinux-penn 2.6.10-co-0.7.1 #1 Sun Feb 13 05:32:09 UTC 2005 i686 AMD
Athlon(tm) MP 1800+ AuthenticAMD GNU/Linux


root@colinux-penn ~ # equery list prelink
[ Searching for package 'prelink' in all categories among: ]
 * installed packages
[I--] [  ] sys-devel/prelink-20041123 (0)
root@colinux-penn ~ # equery list prelink elfutils
[ Searching for package 'elfutils' in all categories among: ]
 * installed packages
[I--] [  ] dev-libs/elfutils-0.97 (0)



root@colinux-penn ~ # cat /proc/config.gz | gunzip | grep SEC
# CONFIG_EXT3_FS_SECURITY is not set
# CONFIG_XFS_SECURITY is not set
# CONFIG_RPCSEC_GSS_KRB5 is not set
# CONFIG_RPCSEC_GSS_SPKM3 is not set
# CONFIG_SECURITY is not set


Portage 2.0.51-r15 (default-linux/x86/2004.3, gcc-3.4.3,
glibc-2.3.4.20041102-r0, 2.6.10-co-0.7.1 i686)
=================================================================
System uname: 2.6.10-co-0.7.1 i686 AMD Athlon(tm) MP 1800+
Gentoo Base System version 1.6.9
Python:              dev-lang/python-2.2.3-r1,dev-lang/python-2.3.4-r1 [2.3.4
(#1, Feb  9 2005, 00:21:53)]
dev-lang/python:     2.2.3-r1, 2.3.4-r1
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r2
sys-devel/libtool:   1.5.10-r4
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-mp -Os -pipe -fomit-frame-pointer -mfpmath=sse -fPIC -w"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env
/usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-mp -Os -pipe -fomit-frame-pointer -mfpmath=sse -fPIC -w"

DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks prelink sandbox sfperms
userpriv usersandbox"
GENTOO_MIRRORS="http://128.213.5.34/gentoo/
ftp://ftp.ussg.iu.edu/pub/linux/gentoo
http://open-systems.ufl.edu/mirrors/gentoo http://gentoo.mirrors.pair.com/
http://mirrors.tds.net/gentoo"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnow X acl acpi acpi4linux apm arts atlas avi berkdb bitmap-fonts
bzip2 crypt cups curl dga dnd dvd emacs encode esd ethereal f77 fam fbcon flash
font-server foomaticdb fortran gd gdbm gif gpm gtk gtk2 hardened imlib ithreads
java joystick jpeg kde kdeenablefinal libg++ libwww ltsp mikmod mmx motif
moznocompose moznoirc mpeg mysql ncurses nptl nptlonly opengl pam pdflib perl
png pnp python qt quicktime radeon readline slang snmp spell sse ssl svga tcltk
tcpd tetex tiff truetype truetype-fonts type1-fonts usb userlocales vim-with-x
xml2 xv zlib video_cards_radeon"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS
Comment 1 César Fernández 2005-02-15 14:11:50 UTC
Same problem here:

Portage 2.0.51-r15 (default-linux/x86/2004.0, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.6.10-nitro4 i686)
=================================================================
System uname: 2.6.10-nitro4 i686 AMD Athlon(TM) XP 1800+
Gentoo Base System version 1.6.9
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb  7 2005, 14:06:56)]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.4-r1
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.7.9-r1, 1.8.5-r3, 1.6.3, 1.9.4, 1.5
sys-devel/binutils:  2.15.92.0.2-r2
sys-devel/libtool:   1.5.10-r4
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -mmmx -m3dnow -msse -mfpmath=sse,387 -ffast-math -O2 -fomit-frame-pointer -frename-registers -funroll-loops -fPIC -fstack-protector -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -mmmx -m3dnow -msse -mfpmath=sse,387 -ffast-math -O2 -fomit-frame-pointer -frename-registers -funroll-loops -fPIC -fstack-protector -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="es_ES@euro"
LC_ALL="es_ES@euro"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 16bit 3dnow 3dnowex S3TC X aac aalib acpi alsa avi berkdb bidi bzip2 cdparanoia cdr chroot cjk crypt cups curl dvd dvdr dvdread edl f77 faac faad fam fbcon flac font-server foomaticdb foreign-sysvinit gd gdbm gif gimpprint glitz gphoto2 gpm graphviz gstreamer gtk gtk2 hardened imagemagick imap imlib imlib2 ipv6 ithreads jabber java javascript jbig jce jikes jpeg jpeg2k justify kde kdeenablefinal kdexdeltas lcms libcaca libg++ libwww live lzo lzw-tiff matroska md5sum mikmod mmap mmx mmx2 mng monkey mozilla moznoirc mozsvg mpeg mpeg4 mpi mplayer msn mysql ncurses network nls no-old-linux no_wxgtk1 nomac nomalloccheck nomotif nptl nptlonly nvidia oggvorbis openexr opengl pam pdflib perl pic pngppds python qt readline real rtc ruby sasl snmp speex spell sse ssl stencil-buffer svg symlink tcltk tcpd tga theora threads tiff truetype truetype-fonts unicode usb userlocales vim-with-x wmf xml xml2 xmms xprint xrandr xscreensaver xv xvid xvmc zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LDFLAGS
Comment 2 Richard Benjamin Voigt 2005-02-15 20:34:33 UTC
I should mention that before I reported this bug, I tried the previous versions of both elfutils and prelink (since I saw a recent update of elfutils).  All combinations exhibited the same symptoms.

The first time I run prelink it takes awhile to return, thereafter it quits immediately with no output even with -v.  I assume this is just disk caching in effect.
Comment 3 Stefan Jones (RETIRED) gentoo-dev 2005-02-16 07:26:11 UTC
Ok, I have reproduced the problem here, looking into it. Thanks
Comment 4 C. Dominik Bodi 2005-02-16 07:34:38 UTC
This problem has been mentioned in the forums before. In my case the cause was symlink loop: /usr/lib/lib -> /usr/lib/lib

Deleting that symlink with rm /usr/lib/lib should make prelink work again.
Alternatively, this bug report should be reported upstream or prelink should be changed to print out some useful error message.

Also, it should be investigated what created the symlink loop in the first place.

If you don't have that problem, running prelink with strace and piping stdout and stderr into a file should help you in further analysis.

Cheers,
Dominik
Comment 5 Stefan Jones (RETIRED) gentoo-dev 2005-02-16 08:54:57 UTC
I had the /usr/lib/lib -> lib symlink. Prelink was not working there. (same problem as this bug)

Removing the symlink fixed it. No package owned the symlink either ...

I guess I will have to patch prelink to print an error. Many thanks Dominick
Comment 6 Richard Benjamin Voigt 2005-02-16 10:01:37 UTC
I don't seem to have /usr/lib/lib.  Of course, there could be any number of symlinks loops in other places.  Any easy way to find them?  I guess now I get to read the man pages for strace.

I think there should maybe be an increased verbosity that makes prelink show each directory it visits....
Comment 7 Stefan Jones (RETIRED) gentoo-dev 2005-02-16 10:10:12 UTC
Well I think prelink just errors out, being a bug in it's filesystem traversal code.

I will just attempt to fix that, make it just ignore symlink loops.
Comment 8 C. Dominik Bodi 2005-02-18 03:29:57 UTC
To find out if other link loops are stopping prelink from working, you could do an strace, that's what I used to confirm the bug on my machine.
Comment 9 Richard Benjamin Voigt 2005-02-18 20:08:05 UTC
Found two symbolic loops,

/lib/modules/2.6.0/build/linux-2.6.4
/lib/modules/2.6.0/build/linux-2.6.4-rc2
Comment 10 Richard Benjamin Voigt 2005-02-18 20:19:27 UTC
And some more,

/lib/modules/2.6.4/build/linux-2.6.9-rc2
/lib/modules/2.6.9-rc2/build/linux-2.6.10-rc1

(something is creating these systematically I think)
Comment 11 Richard Benjamin Voigt 2005-02-18 21:10:41 UTC
Thanks, cleaning up all symlink loops fixed it.

There were a few more, but they all had the form /lib/modules/2.6.?/build/linux-*
Comment 12 Stefan Jones (RETIRED) gentoo-dev 2005-07-30 19:39:53 UTC
Research this a while back,

Problem is that if the system function nftw64 quits with an error if it
encounters a looping symlink.

Prelink then quits due to the error, but given the nftw64 API there is not way
to tell what file caused the error.

I could add a warning if prelink quits due to an error ( prelink || echo Error ).
Suppose that will have to do!
Comment 13 Stefan Jones (RETIRED) gentoo-dev 2005-11-13 21:27:22 UTC
*** Bug 107714 has been marked as a duplicate of this bug. ***
Comment 14 Stefan Jones (RETIRED) gentoo-dev 2006-04-11 14:37:14 UTC
I have added a patch to prelink so that it prints a nice error message like:

prelink: Can't walk directory tree /usr/lib/: Too many levels of symbolic links

I guess that will have to do unless anyone want to write alot of code :-)
Comment 15 Tobias Bender 2007-01-20 11:05:48 UTC
Created attachment 107518 [details]
The output of prelik -amR
Comment 16 Tobias Bender 2007-01-20 11:10:02 UTC
When I try to prelink kde I get a lot of non_fpic_errors prelinking kde (see attachment). 
I've already posted to the forum, where I was told I've done everything correct (note sure about this...)

emerge --info
Portage 2.1.1-r2 (default-linux/x86/2006.0, gcc-4.1.1, glibc-2.4-r4, 2.6.18-gentoo-r2 i686)
=================================================================
System uname: 2.6.18-gentoo-r2 i686 AMD Duron(tm) Processor
Gentoo Base System version 1.12.6
Last Sync: Thu, 18 Jan 2007 08:30:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.4 [enabled]
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: 1.3.7, 2.0.31
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r6
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-Os -march=athlon-xp -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /usr/lib/x11/xkb/"
CXXFLAGS="-O2 -mcpu=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distcc distlocks metadata-transfer prelink sandbox sfperms strict"
GENTOO_MIRRORS="http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://pandemonium.tiscali.de/pub/gentoo/"
LANG="de_DE@euro"
LC_ALL="de_DE@euro"
LINGUAS="de en"
MAKEOPTS="-j13"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/home/tbender/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnow X aac acpi alsa alsa_cards_ali5451 alsa_cards_als4000 alsa_cards_atiixp alsa_cards_atiixp-modem alsa_cards_bt87x alsa_cards_ca0106 alsa_cards_cmipci alsa_cards_emu10k1x alsa_cards_ens1370 alsa_cards_ens1371 alsa_cards_es1938 alsa_cards_es1968 alsa_cards_fm801 alsa_cards_hda-intel alsa_cards_intel8x0 alsa_cards_intel8x0m alsa_cards_maestro3 alsa_cards_trident alsa_cards_usb-audio alsa_cards_via82xx alsa_cards_via82xx-modem alsa_cards_ymfpci alsa_pcm_plugins_adpcm alsa_pcm_plugins_alaw alsa_pcm_plugins_asym alsa_pcm_plugins_copy alsa_pcm_plugins_dmix alsa_pcm_plugins_dshare alsa_pcm_plugins_dsnoop alsa_pcm_plugins_empty alsa_pcm_plugins_extplug alsa_pcm_plugins_file alsa_pcm_plugins_hooks alsa_pcm_plugins_iec958 alsa_pcm_plugins_ioplug alsa_pcm_plugins_ladspa alsa_pcm_plugins_lfloat alsa_pcm_plugins_linear alsa_pcm_plugins_meter alsa_pcm_plugins_mulaw alsa_pcm_plugins_multi alsa_pcm_plugins_null alsa_pcm_plugins_plug alsa_pcm_plugins_rate alsa_pcm_plugins_route alsa_pcm_plugins_share alsa_pcm_plugins_shm alsa_pcm_plugins_softvol apm arts asf avi bash-completion bitmap-fonts bootsplash cdr cli cracklib crypt css cups curl dbus divx dlloader dri dvd dvdr dvdread eds elibc_glibc emboss encode esd firefox foomaticdb fortran gif gpm gstreamer gtk gtk2 hal iconv imlib input_devices_evdev input_devices_keyboard input_devices_mouse isdnlog java jpeg kde kernel_linux lcd_devices_bayrad lcd_devices_cfontz lcd_devices_cfontz633 lcd_devices_glk lcd_devices_hd44780 lcd_devices_lb216 lcd_devices_lcdm001 lcd_devices_mtxorb lcd_devices_ncurses lcd_devices_text libg++ libwww linguas_de linguas_en lirc_devices_atiusb mad maildir mikmod mmx motif mp3 mpeg musepack musicbrainz ncurses nls nptl nptlonly nsplugin nvidia ogg opengl oss pam pcre pdf perl png ppds pppd python qt3 qt4 quicktime readline reflection samba sdl session slp spell spl sse ssl symllink tcpd threads truetype truetype-fonts type1-fonts udev unicode usb userland_GNU vcd video_cards_nv video_cards_nvidia vidix vorbis win32codecs wxwindows x264 xml xorg xv xvid zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 17 Richard Benjamin Voigt 2007-01-20 19:00:49 UTC
This is a different issue and you probably should have created a new bug.  You don't have CFLAGS=-fPIC in your make.conf, I think this is needed for prelink to work on x86.
Comment 18 Tobias Bender 2007-01-21 21:14:05 UTC
Sorry for this chaos. I just follewed the link from the prelink howto to this place. I have filed a new bug http://bugs.gentoo.org/show_bug.cgi?id=163130

By the way: even when adding -fPIC to the Cflags the result is the same. Refering to the prelink howto there is no need to -FPIC to the CFLAGS. I have just added prelink the the FEATURES. 
Comment 19 Jakub Moc (RETIRED) gentoo-dev 2007-02-01 16:46:12 UTC
(In reply to comment #16)
> When I try to prelink kde I get a lot of non_fpic_errors prelinking kde (see
> attachment). 
> I've already posted to the forum, where I was told I've done everything correct

Completely unrelated.

Closing this bug wrt Comment #14.