Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 100202 - glibc-2.3.5-r1 and xorg-x11-6.8.2-r2, SSP trouble
Summary: glibc-2.3.5-r1 and xorg-x11-6.8.2-r2, SSP trouble
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-25 03:59 UTC by Prakash Punnoor
Modified: 2005-07-31 02:56 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 Prakash Punnoor 2005-07-25 03:59:24 UTC
I built

sys-libs/glibc-2.3.5-r1  -build -erandom -glibc-compat20 +glibc-omitfp -hardened
-linuxthreads-tls (-multilib) +nls +nptl +nptlonly +pic -profile (-selinux)
+userlocales

and

x11-base/xorg-x11-6.8.2-r2  -3dfx +3dnow -bitmap-fonts -cjk -debug -dlloader
-dmx -doc -font-server -insecure-drivers +ipv6 -minimal +mmx -nls -nocxx +opengl
+pam -sdk +sse -static +truetype-fonts -type1-fonts (-uclibc) +xprint +xv

But xorg-x11 wouldn't want to compile, as libloader.a has two unreferenced
symbols to libc6.so. I think that were _guard and something about stack_smashing.

I worked around the problem by editing the apropriate file of libloader by
putting in an #undef __SSP__ just before thos symbols are defined. With this
xorg-x11 compiled through and works. (go into xc/programs/xfree/ whatever,
search for libloader and grep for _guard, I don't have everything memorized...)

So, what goes wrong in xorg-x11 configuration that it enables __SSP__ which
glibc doesn't support?

Reproducible: Always
Steps to Reproduce:
1.
2.
3.




Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r1,
2.6.13-rc3 i686)
=================================================================
System uname: 2.6.13-rc3 i686 AMD Athlon(tm)
Gentoo Base System version 1.6.13
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
dev-lang/python:     2.4.1-r1
sys-apps/sandbox:    1.2.11
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
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer -fweb -g0"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib/fax /usr/share/config /var/qmail/control
/var/spool/fax/etc"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer -fweb -g0
-fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig candy ccache confcache digest distlocks prelink sandbox
sfperms"
GENTOO_MIRRORS=" ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo
ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/
http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="de_DE.utf8"
LC_ALL="de_DE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--enable-new-dtags -Wl,--sort-common -Wl,-z,combreloc
-Wl,--relax"
LINGUAS="de"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/lportage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="x86 3dnow 3dnowext S3TC X a52 aac acpi acpi4linux alsa apm audiofile avi
berkdb bitmap-fonts bzip2 cdda cddb cdparanoia cdr crypt cups curl dga
divx4linux dpms dts dv dvb dvd dvdr dvdread edl emboss encode ext-png ext-zlib
faac faad ffmpeg fftw flac foomaticdb freetype gd gdbm gif gimp gimpprint gpm gs
gtk gtk2 ieee1394 imagemagick imlib ipv6 ithreads java javascript jpeg jpeg2k
kde kdeenablefinal ldap libg++ libwww lm_sensors lzo mad matroska mmx mmxext mng
monkey moznocompose mp3 mpeg mpeg2 mpi musepack ncurses network nls nocd nptl
nvidia ogg oggvorbis openal opengl openssh oss pam pdflib perl pic png povray
ppds python qt qtmt quicktime readline real rtc samba scanner sdl smime speex
spell sqlite sse ssl tcpd tetex theora threads tiff transcode truetype
truetype-fonts type1-fonts unicode usb utf8 vcd videos vorbis win32codecs wmf
wxwindows xfs xine xinerama xinetd xml xml2 xprint xv xvid xvmc yv12 zeroconf
zlib linguas_de userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET
Comment 1 SpanKY gentoo-dev 2005-07-25 15:51:35 UTC
looks like Bug 98600
Comment 2 SpanKY gentoo-dev 2005-07-25 15:52:13 UTC
err, nm

post the actual error message
Comment 3 Prakash Punnoor 2005-07-26 01:06:58 UTC
make[5]: Leaving directory
`/var/tmp/portage/xorg-x11-6.8.2-r2/work/xc/programs/Xserver/hw/vfb'
i686-pc-linux-gnu-gcc -o Xorg -march=athlon-xp -O2 -pipe -fomit-frame-pointer
-g0 -fno-strict-aliasing -ansi -pedantic -Wno-return-type -w    
-L../../exports/lib   xkb/xf86KillSrv.o xkb/xf86VT.o xkb/xf86Private.o        
../../programs/Xserver/hw/xfree86/common/xf86Init.o
../../programs/Xserver/hw/xfree86/common/xf86IniExt.o
../../programs/Xserver/hw/xfree86/common/libxf86.a           
../../programs/Xserver/hw/xfree86/parser/libxf86config.a
../../programs/Xserver/hw/xfree86/os-support/libxf86_os.a
../../programs/Xserver/hw/xfree86/loader/libloader.a                 
../../programs/Xserver/hw/xfree86/common/libxf86.a dix/libdix.a os/libos.a
../../exports/lib/libXau.a               ../../lib/font/fontbase.o             
    ../../lib/font/libfontbase.a Xext/libexts.a xkb/libxkb.a Xi/libxinput.a    
              lbx/liblbx.a                   ../../lib/lbxutil/liblbxutil.a 
../../programs/Xserver/hw/xfree86/common/libxf86.a             
composite/libcomposite.a damageext/libdamage.a miext/damage/libdamage.a
xfixes/libxfixes.a miext/cw/libcw.a              Xext/libexts.a xkb/libxkb.a
Xi/libxinput.a                   lbx/liblbx.a                  
../../lib/lbxutil/liblbxutil.a  randr/librandr.a render/librender.a
dix/libxpstubs.a mi/libmi.a composite/libcomposite.a damageext/libdamage.a
miext/damage/libdamage.a xfixes/libxfixes.a miext/cw/libcw.a                  
Xext/libexts.a xkb/libxkb.a Xi/libxinput.a                   lbx/liblbx.a      
            ../../lib/lbxutil/liblbxutil.a  randr/librandr.a render/librender.a
 ../../programs/Xserver/hw/xfree86/os-support/libxf86_os.a     -lz -lm         
            -lpam -rdynamic -ldl -lpam_misc  -lXau -lXdmcp -lXau -rdynamic -ldl
 -Wl,-rpath-link,../../exports/lib
../../programs/Xserver/hw/xfree86/loader/libloader.a(xf86sym.o):(.data+0x124c):
undefined reference to `__stack_smash_handler'
../../programs/Xserver/hw/xfree86/loader/libloader.a(xf86sym.o):(.data+0x1254):
undefined reference to `__guard'
collect2: ld gab 1 als Ende-Status zur
Comment 4 Prakash Punnoor 2005-07-26 01:06:58 UTC
make[5]: Leaving directory
`/var/tmp/portage/xorg-x11-6.8.2-r2/work/xc/programs/Xserver/hw/vfb'
i686-pc-linux-gnu-gcc -o Xorg -march=athlon-xp -O2 -pipe -fomit-frame-pointer
-g0 -fno-strict-aliasing -ansi -pedantic -Wno-return-type -w    
-L../../exports/lib   xkb/xf86KillSrv.o xkb/xf86VT.o xkb/xf86Private.o        
../../programs/Xserver/hw/xfree86/common/xf86Init.o
../../programs/Xserver/hw/xfree86/common/xf86IniExt.o
../../programs/Xserver/hw/xfree86/common/libxf86.a           
../../programs/Xserver/hw/xfree86/parser/libxf86config.a
../../programs/Xserver/hw/xfree86/os-support/libxf86_os.a
../../programs/Xserver/hw/xfree86/loader/libloader.a                 
../../programs/Xserver/hw/xfree86/common/libxf86.a dix/libdix.a os/libos.a
../../exports/lib/libXau.a               ../../lib/font/fontbase.o             
    ../../lib/font/libfontbase.a Xext/libexts.a xkb/libxkb.a Xi/libxinput.a    
              lbx/liblbx.a                   ../../lib/lbxutil/liblbxutil.a 
../../programs/Xserver/hw/xfree86/common/libxf86.a             
composite/libcomposite.a damageext/libdamage.a miext/damage/libdamage.a
xfixes/libxfixes.a miext/cw/libcw.a              Xext/libexts.a xkb/libxkb.a
Xi/libxinput.a                   lbx/liblbx.a                  
../../lib/lbxutil/liblbxutil.a  randr/librandr.a render/librender.a
dix/libxpstubs.a mi/libmi.a composite/libcomposite.a damageext/libdamage.a
miext/damage/libdamage.a xfixes/libxfixes.a miext/cw/libcw.a                  
Xext/libexts.a xkb/libxkb.a Xi/libxinput.a                   lbx/liblbx.a      
            ../../lib/lbxutil/liblbxutil.a  randr/librandr.a render/librender.a
 ../../programs/Xserver/hw/xfree86/os-support/libxf86_os.a     -lz -lm         
            -lpam -rdynamic -ldl -lpam_misc  -lXau -lXdmcp -lXau -rdynamic -ldl
 -Wl,-rpath-link,../../exports/lib
../../programs/Xserver/hw/xfree86/loader/libloader.a(xf86sym.o):(.data+0x124c):
undefined reference to `__stack_smash_handler'
../../programs/Xserver/hw/xfree86/loader/libloader.a(xf86sym.o):(.data+0x1254):
undefined reference to `__guard'
collect2: ld gab 1 als Ende-Status zurück
make[4]: *** [Xorg] Fehler 1
make[4]: Leaving directory
`/var/tmp/portage/xorg-x11-6.8.2-r2/work/xc/programs/Xserver'
Comment 5 Prakash Punnoor 2005-07-26 01:34:10 UTC
Commenting out

echo "#define ProPoliceSupport YES" >> ${HOSTCONF}

made it compile through. So we need some sort of detection for SSP.
Comment 6 Donnie Berkholz (RETIRED) gentoo-dev 2005-07-26 10:23:39 UTC
Every glibc in the tree should support it, so I'm not really sure what's
happening here.
Comment 7 Prakash Punnoor 2005-07-26 10:48:41 UTC
Well, then this glibc build (installed a few days ago) obviously does something
wrong. The fun began with tar, as this one was complaining about undefined
reference to _guard in libc6.so. So I needed to get a binary (and got a win32
compile), compiled tar by hand, copied to /bin and reemerged tar...
Comment 8 SpanKY gentoo-dev 2005-07-26 15:23:38 UTC
what does this show on your system:
$ readelf -s /lib/libc.so.6 | grep __guard
Comment 9 Prakash Punnoor 2005-07-26 23:51:00 UTC
nothing
Comment 10 SpanKY gentoo-dev 2005-07-30 00:03:32 UTC
your glibc is broken then, re-emerge it
Comment 11 Prakash Punnoor 2005-07-30 03:52:23 UTC
Ok, I now know what went wrong. My fault, but I had reason to do:
I commented out glibc-2.3.5-propolice-guard-functions.patch, because glibs
didn't want to compile using the gcc 3.4.4 as it doesn't know
-fno-stack-protector. I don't know whther gcc has been updated to support it
now? (I used official ebuil when I emerged gcc 3.4.4 when it was ~x86, iirc)

Well, I'll reemerge gcc and try to compile glibc again.


Sorry for the noise. (Nevertheless I still think a bit more auto detection
wouldn't hurt.)
Comment 12 Jeremy Huddleston (RETIRED) gentoo-dev 2005-07-31 02:56:20 UTC
Ok, closing because of the above comment