View previous topic :: View next topic |
Author |
Message |
octapus n00b
Joined: 10 Mar 2003 Posts: 35
|
Posted: Sat Jun 10, 2006 9:28 pm Post subject: Prelink - KDE - GCC |
|
|
I recently updated basic packages in my gentoo system such as (order given)
gcc-4.1.1
binutils-2.16.93
libstdc++-v3-3.3.6
glibc-2.4-r3
kdelibs-3.5.3
kdebase-3.5.3
Before the update I had the system prelinked. When I tried to prelink it after the updates I get errors from every program I try to execute (including emerge). i.e :
# su:
9319: out of bounds madness ... 0x3ee34
bash: symbol lookup error: /lib/libncurses.so.5: undefined symbol: _nc_tparm_err
My prelink command was: prelink -amvR
Literally I couldn't start any new program at all (either command line or X) but the running programs were fine. Most programs displayed symbol lookup errors on
/usr/lib/libXdmcp.so.6
/usr/lib/libxml2.so.2
/lib/libncurses.so.5
I had to undo prelinking in order to have my system usable again (prelink -auv)
I tried compiling the corresponding packages ( libXdmcp, libxml2, ncurses) with gcc-4.1.1 and but I had the same problems.
Other than that my system is stable but I would appreciate the faster program execution startup that prelink gives.
Does anybody know what could be wrong? |
|
Back to top |
|
|
kfiaciarka Veteran
Joined: 20 May 2005 Posts: 1498 Location: Dobre Miasto, Poland
|
Posted: Sat Jun 10, 2006 9:43 pm Post subject: |
|
|
a first post your emerge --info or make.conf. |
|
Back to top |
|
|
octapus n00b
Joined: 10 Mar 2003 Posts: 35
|
Posted: Sat Jun 10, 2006 10:18 pm Post subject: |
|
|
Yes, I have my CFLAGS & LDFLAGS overloaded but there must be a more specific reason for what I observerd.
I tried searching for similar cases but nothing relevant.
Here it is:
Code: |
Portage 2.1_rc4-r5 (default-linux/amd64/2005.1, gcc-4.1.1/amd64-vanilla, glibc-2.4-r3, 2.6.17-rc3-no2 x86_64)
=================================================================
System uname: 2.6.17-rc3-no2 x86_64 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.12.1
dev-lang/python: 2.3.5, 2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache: [Not Present]
dev-util/confcache: [Not Present]
sys-apps/sandbox: 1.2.18.1
sys-devel/autoconf: 2.13, 2.59-r7
sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils: 2.16.93
sys-devel/gcc-config: 2.0.0_rc1
sys-devel/libtool: 1.5.22
virtual/os-headers: 2.6.16
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -Os -pipe -fno-ident -fomit-frame-pointer -frename-registers -fweb -funit-at-a-time -freorder-blocks-and-partition -fmerge-all-constants -ftree-vectorize"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib/fax /usr/share/X11/xkb /usr/share/config /var/spool/fax/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-march=athlon64 -Os -pipe -fno-ident -fomit-frame-pointer -frename-registers -fweb -funit-at-a-time -freorder-blocks-and-partition -fmerge-all-constants -ftree-vectorize -fno-enforce-eh-specs -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://mirror.espri.arizona.edu/gentoo/ http://mirrors.acm.cs.rpi.edu/gentoo/"
LDFLAGS="-Wl,-O1 -Wl,--enable-new-dtags -Wl,--sort-common -Wl,--as-needed -Wl,-Bdirect -Wl,-hashvals -Wl,-zdynsort -s"
LINGUAS="en el"
MAKEOPTS="-j2"
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="/usr/local/portage /usr/local/gentopia /usr/local/sci /usr/local/xgl-coffee /usr/local/flameeyes"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X a52 aac acpi alsa apache2 apm avi bash-completion bitmap-fonts cairo cdda cddb cdparanoia cgi cli crypt css cups dri dts dvd dvdr dvdread emul-linux-x86 encode ffmpeg flac foomaticdb gif glibc-omitfp glitz gmail gnome gpm gstreamer gtk gtk2 hal ieee1394 imap imlib ithreads jpeg kde kdehiddenvisibility lame lapack live lzw lzw-tiff matroska mp3 mpeg mplayer msn mssql musicbrainz ncurses network nls nomalloccheck nptl nptlonly nsplugin ntlm oggvorbis opengl pam pcmcia pcre pdf perl png pop pppd python qt quicktime readline sasl screen sdl server session spell spl sqlite3 ssl stream svg tcltk tcpd theora threads tiff truetype-fonts type1-fonts usb userlocales vcd video_cards_ati visualization wifi wma wxwindows xorg xpm xscreensaver xv xvid zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_synaptics kernel_linux linguas_en linguas_el userland_GNU video_cards_fglrx video_cards_vesa video_cards_fbdev"
Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_RSYNC_EXTRA_OPTS
|
|
|
Back to top |
|
|
kfiaciarka Veteran
Joined: 20 May 2005 Posts: 1498 Location: Dobre Miasto, Poland
|
Posted: Mon Jun 12, 2006 9:25 am Post subject: |
|
|
IMHO it may be because of hardcored ldflags (-hashvals, -zdynsort and cflags -Os (your amd64 has at least 512 kb cache, so you use -Os?), -fweb -funit-at-a-time -freorder-blocks-and-partition -fmerge-all-constants -ftree-vectorize. I don't use such flags:) exept -funit-at-a-time which is a part od -O2. If you have hardcored system, don't be supprised with such behavior of prelink:) |
|
Back to top |
|
|
octapus n00b
Joined: 10 Mar 2003 Posts: 35
|
Posted: Mon Jun 12, 2006 9:38 am Post subject: |
|
|
Most of the not-so-common CFLAGS are new for me too (2 weeks). Some of them are supported only for GCC 4.1.1.
But for LDFLAGS, I have been using those for a long time (3-6 months, I'm not quite sure) and I have prelinked many times without problems (but with GCC 3.4.5 compiled binaries).
The strangest thing is that I can't find any other cases for which display similar messages. And I can't imagine why CFLAGS would affect linking (as long as the programs run perfectly well before prelinking). Let me say again that even though you may consider these settings hardcore they cause no instability whatsoever. |
|
Back to top |
|
|
Flameeyes Retired Dev
Joined: 30 Mar 2005 Posts: 189 Location: London, Europe
|
Posted: Mon Jun 12, 2006 9:54 am Post subject: |
|
|
A part reiterating that --enable-new-dtags is pointless on Gentoo (it's forced in binutils already, and anyway it just makes the ELF files use a different internal structure, no change on performances), prelink has known problems with -hashvals. So if you use one, you shouldn't use the other, quite simple _________________ You want to know what I'm working on right now? Just follow my blog. |
|
Back to top |
|
|
vipernicus Veteran
Joined: 17 Jan 2005 Posts: 1462 Location: Your College IT Dept.
|
Posted: Mon Jun 12, 2006 1:31 pm Post subject: |
|
|
Michael Meek's patches (-Bdirect, -hashvals,-zdynsort) were meant to be an alternative to prelinking. I no longer use them, because of how they have been thrown out by the binutils devs.
Now, I use:
Code: | LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--sort-common" |
_________________ Viper-Sources Maintainer || nesl247 Projects || vipernicus.org blog |
|
Back to top |
|
|
octapus n00b
Joined: 10 Mar 2003 Posts: 35
|
Posted: Mon Jun 12, 2006 9:15 pm Post subject: |
|
|
Thank you for your answers.
If LDFALGS option -hashvals and prelink are meant to do the same thing what would you recommend in terms of performance (or how good each of them is at achieving the goal)?
On other aspects (other than peformance) we have the following:
hashvals needs to be done once during compilation for each program while prelink needs a lot of time for the whole system after each library upgrade.
hashvals is more of a hack compared to the way prelink works (?) and needs patched binutils.
One more thing: I'm not using prelink at all right now and things seem to be pretty fast. Do the below values have any meaning without prelink? I mean can I interpret them somehow to measure how well hashvals work (other than human perceived interactiveness)? :
LD_DEBUG=statistics kedit
22930:
22930: runtime linker statistics:
22930: total startup time in dynamic loader: 115512154 clock cycles
22930: time needed for relocation: 108494928 clock cycles (93.9%)
22930: number of relocations: 20010
22930: number of relocations from cache: 60914
22930: number of relative relocations: 40896
22930: time needed to load objects: 6560602 clock cycles (5.6%)
22930:
22930: runtime linker statistics:
22930: final number of relocations: 24654
22930: final number of relocations from cache: 60948 |
|
Back to top |
|
|
|
|
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
|
|