Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 46323 - GLIBC is Stripped despite USE="debug" FEATURES+=nostrip DEBUGBUILD=1
Summary: GLIBC is Stripped despite USE="debug" FEATURES+=nostrip DEBUGBUILD=1
Status: RESOLVED DUPLICATE of bug 46186
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Please assign to toolchain
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-30 22:41 UTC by Matt T. Proud
Modified: 2005-07-17 13:06 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt T. Proud 2004-03-30 22:41:49 UTC
With portage (2.0.50-r1), one cannot build glibc (2.3.3_pre20040207) with debugging symbols--let alone without having glibc's libraries stripped.

Select contents from /etc/make.conf
USE=".... debug ..."
FEATURES+=nostrip
DEBUGBUILD=1

nm /lib/libthread_db-1.0.so #part of glibc
/lib/libthread_db-1.0.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), stripped


Reproducible: Always
Steps to Reproduce:
1. Set USE="DEBUG"
2. Set FEATURES+=nostrip
3. Set DEBUGBUILD=1
4. Emerge glibc

Actual Results:  
1. nm /lib/libthread_db-1.0.so #Stripped, when it should not be stripped

Expected Results:  
Unstripped /lib/libthread_db-1.0.so

To compensate for these problems, I had to modify the stripping mechanisms
contained in /usr/lib/portage/bin

gorbachev pkg # emerge info
Portage 2.0.50-r1 (default-x86-2004.0, gcc-3.3.3, glibc-2.3.3_pre20040207-r0,
2.6.4-gentoo-r1)
=================================================================
System uname: 2.6.4-gentoo-r1 i686 Mobile Intel(R) Pentium(R) 4 - M CPU 2.40GHz
Gentoo Base System version 1.4.3.13p1
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref
/usr/share/config /usr/share/texmf/dvipdfm/config/
/usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://128.213.5.34/gentoo/
ftp://vlaai.snt.ipv6.utwente.nl/pub/os/linux/gentoo/
http://open-systems.ufl.edu/mirrors/gentoo http://mirrors.tds.net/gentoo
ftp://ftp.ipv6.uni-muenster.de/pub/linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X Xaw3d aalib acpi aim alsa apm arts avi berkdb bonobo cdr crypt cups debug
dga doc dvd dvdr emacs encode esd ev6 evo fam fbcon flac flash foomaticdb gb
gdbm ggi gif gnome gphoto2 gpm gstreamer gtk gtk2 gtkhtml icq imagemagick imap
imlib ipv6 jabber java jpeg kde lesstif libg++ libwww mad maildir mbox mikmod
mmx motif mozilla mpeg msn nas ncurses nls oggvorbis opengl oscar oss pam pcmcia
pdflib perl png pnp ppds python qt quicktime readline samba scanner sdl slang
spell sse ssl svga tcpd tetex threading threads tiff truetype unicode usb wmf
wxwindows x86 xml2 xmms xv zlib"
 
gorbachev pkg #

gorbachev pkg # emerge info
Portage 2.0.50-r1 (default-x86-2004.0, gcc-3.3.3, glibc-2.3.3_pre20040207-r0,
2.6.4-gentoo-r1)
=================================================================
System uname: 2.6.4-gentoo-r1 i686 Mobile Intel(R) Pentium(R) 4 - M CPU 2.40GHz
Gentoo Base System version 1.4.3.13p1
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref
/usr/share/config /usr/share/texmf/dvipdfm/config/
/usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://128.213.5.34/gentoo/
ftp://vlaai.snt.ipv6.utwente.nl/pub/os/linux/gentoo/
http://open-systems.ufl.edu/mirrors/gentoo http://mirrors.tds.net/gentoo
ftp://ftp.ipv6.uni-muenster.de/pub/linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X Xaw3d aalib acpi aim alsa apm arts avi berkdb bonobo cdr crypt cups debug
dga doc dvd dvdr emacs encode esd ev6 evo fam fbcon flac flash foomaticdb gb
gdbm ggi gif gnome gphoto2 gpm gstreamer gtk gtk2 gtkhtml icq imagemagick imap
imlib ipv6 jabber java jpeg kde lesstif libg++ libwww mad maildir mbox mikmod
mmx motif mozilla mpeg msn nas ncurses nls oggvorbis opengl oscar oss pam pcmcia
pdflib perl png pnp ppds python qt quicktime readline samba scanner sdl slang
spell sse ssl svga tcpd tetex threading threads tiff truetype unicode usb wmf
wxwindows x86 xml2 xmms xv zlib"
 
gorbachev pkg #
Comment 1 Daniel M. Albro 2004-05-19 11:36:32 UTC
I don't see why glibc should *ever* be stripped; stripped glibc makes it impossible to debug any threaded program (that is, if you set a breakpoint
somewhere inside a child thread, gdb will get a SIGTRAP exception and quit
instead of breaking at the breakpoint).  I suggest adding

        RESTRICT="nostrip"

to the ebuild.
Comment 2 Darryl Bleau 2004-05-25 12:17:51 UTC
Adding 'RESTRICT="nostrip"' is what I did to the ebuild to make debugging threaded programs possible. Unless there is a good reason not to, I would recommend adding it to the ebuild as well.
Comment 3 Ali Ijaz Sheikh 2004-06-29 14:33:36 UTC
I personally kept banging my head against the wall for two months trying
to figure out why I was unable to debug threaded programs, eventually to 
discover that a stripped glibc was the cause of the problem.

This problem existed on RedHat in the past and being burnt, they no longer
strip glibc. I would highly recommend adding the RESTRICT='nostrip' option
to the glibc ebuild.
Comment 4 Darryl Bleau 2004-06-29 15:06:06 UTC
Yes, please, I would reiterate that this would be a good idea. I've built glibc a few times again and each time, sometime after, I try to debug a multi-threaded program and curse up a storm after I remember I need to change the ebuild, again.
Comment 5 SpanKY gentoo-dev 2004-07-31 00:16:08 UTC

*** This bug has been marked as a duplicate of 46186 ***