Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 73282

Summary: xorg-x11 doesn't start when compiled with hardened gcc-3.4.3 on amd64
Product: Gentoo Linux Reporter: David Norris <danorris>
Component: New packagesAssignee: The Gentoo Linux Hardened Team <hardened>
Status: RESOLVED INVALID    
Severity: normal CC: amd64, unit3
Priority: High    
Version: 2004.3   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description David Norris 2004-12-03 17:25:32 UTC
xorg 6.8.0-r3, when compiled with gcc-3.4.3 on amd64, won't start:

   Elf_RelocateEntry() Unsupported relocation type 4

I'm no gcc wizard but it seems from reading forums & Google that gcc 3.4.3 uses some 'new' relocation types which aren't supported by xorg's module loader. There seems to have been a patch for this in xfree (see forum link below) but it might not have made it into xorg?

Forums: <http://forums.gentoo.org/viewtopic.php?t=24969> (see wwoods' post)

FWIW here's emerge info:

Portage 2.0.51-r3 (default-linux/amd64/2004.3, gcc-3.4.3, glibc-2.3.4.20040808-r1, 2.6.9-gentoo-r6 x86_64)
=================================================================
System uname: 2.6.9-gentoo-r6 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.15.90.0.1.1-r3,sys-devel/binutils-2.15.92.0.2-r1
Headers:  sys-kernel/linux26-headers-2.6.8.1-r1
Libtools: sys-devel/libtool-1.5.2-r7
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CFLAGS="-march=athlon64 -O3 -pipe -funroll-loops -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon64 -O3 -pipe -funroll-loops -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox"
GENTOO_MIRRORS="http://mirrors.tds.net/gentoo ftp://ftp6.uni-erlangen.de/pub/mirrors/gentoo http://vlaai.snt.ipv6.utwente.nl/pub/os/linux/gentoo/ ftp://ftp.ipv6.uni-muenster.de/pub/linux/distributions/gentoo http://ftp6.uni-erlangen.de/pub/mirrors/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acpi aim alsa amd64 apache2 apm avi bash-completion berkdb bitmap-fonts bzlib cdr crypt ctype cups directfb divx4linux doc dvd dvdr encode esd ethereal f77 fam fftw flac fortran ftp gd gif gnome gpm gstreamer gtk gtk2 gtkhtml hardened icq innodb ipv6 java jikes joystick jp2 jpeg junit lzw lzw-tiff mad mozilla mpeg multilib mysql mysqli ncurses nls nocd offensive oggvorbis openal opengl oscar oss pam pcre pdflib perl png posix postgres python qt quicktime readline samba sdl shared sharedmem soap sockets spell ssl svg tcpd tidy tiff truetype unicode usb userlocales vhosts videos wxwindows xine xml2 xmms xpm xrandr xv xvid yahoo zlib"

Let me know if I can help! Thanks!
Comment 1 David Norris 2004-12-04 15:11:49 UTC
Running "gcc-config x86_64-pc-linux-gnu-3.4.2-vanilla" and then rebuilding xorg solves this problem. See relevant forum thread at <http://forums.gentoo.org/viewtopic.php?p=1841621#1841621>. Thanks!
Comment 2 Graeme Humphries 2005-03-11 13:20:12 UTC
I found that setting USE=dlloader also fixes this problem on my system. However, that totally breaks ati-drivers, and probably the nvidia drivers too.
Comment 3 Danny van Dyk (RETIRED) gentoo-dev 2005-03-27 07:41:22 UTC
Can someone running hardened on amd64 please try to confirm this BUG ?
Comment 4 Graeme Humphries 2005-03-28 07:11:12 UTC
Well, I can confirm I'm seeing the same behavior on my AMD64 system, which I resolved by just not using the hardened gcc to build xorg-x11. However, I was getting multiple different "Unsupported relocation type"s, the most common of which was type 9 (IIRC).
Comment 5 Mike Doty (RETIRED) gentoo-dev 2005-04-10 13:18:42 UTC
Hardened has a guide for running xorg at http://www.gentoo.org/proj/en/hardened/hardenedxorg.xml
Comment 6 Simon Stelling (RETIRED) gentoo-dev 2005-06-21 10:22:14 UTC
nobody in our team is working with a hardened setup, perhaps hardened can help :/
Comment 7 Stephen Bennett (RETIRED) gentoo-dev 2005-06-21 10:47:02 UTC
USE=dlloader, and/or see the URL in comment 5. nvidia drivers work with dlloader
as of a while ago, though ATI is dubious. However, both sets of binary drivers
are full of other problems and unlikely to be supported by hardened any time soon.
Comment 8 Simon Stelling (RETIRED) gentoo-dev 2005-08-31 09:08:54 UTC
looks like this bug is no bug ;) just USE=dlloader, which is default on hardened
anyway
Comment 9 Stephane Rodet 2005-09-18 15:13:58 UTC
I have the same problem without using hardened profile. How can this be ? 
 
=========================================================================== 
# emerge info 
Gentoo Base System version 1.6.13 
Portage 2.0.51.22-r2 (default-linux/amd64/2005.0, gcc-3.4.4, glibc-2.3.5-r1, 
2.6.12-gentoo-r9 x86_64) 
================================================================= 
System uname: 2.6.12-gentoo-r9 x86_64 AMD Athlon(tm) 64 Processor 3000+ 
ccache version 2.3 [disabled] 
dev-lang/python:     2.3.5-r2 
sys-apps/sandbox:    1.2.12 
sys-devel/autoconf:  2.13, 2.59-r6 
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.15.92.0.2-r10 
sys-devel/libtool:   1.5.18-r1 
virtual/os-headers:  2.6.11-r2 
ACCEPT_KEYWORDS="amd64" 
AUTOCLEAN="yes" 
CBUILD="x86_64-pc-linux-gnu" 
CFLAGS="-O2 -pipe" 
CHOST="x86_64-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/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 -pipe" 
DISTDIR="/usr/portage/distfiles" 
FEATURES="autoconfig distlocks sandbox sfperms strict" 
GENTOO_MIRRORS="http://distfiles.gentoo.org 
http://distro.ibiblio.org/pub/Linux/distributions/gentoo" 
PKGDIR="/usr/portage/packages" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR="/usr/portage" 
SYNC="rsync://rsync.gentoo.org/gentoo-portage" 
USE="amd64 X alsa arts avi bash-completion berkdb bitmap-fonts crypt cups curl 
eds emboss encode esd fam flac foomaticdb fortran gdbm gif gnome gpm gstreamer 
gtk gtk2 imagemagick imlib ipv6 jack java jpeg junit kde libwww lirc lzw 
lzw-tiff mad mikmod motif mp3 mpeg mysql ncurses nls ogg opengl pam pdflib perl 
png postgres python qt quicktime readline ruby sdl slang spell ssl tcltk tcpd 
tetex tiff truetype-fonts type1-fonts usb userlocales vorbis xine xml xml2 xmms 
xpm xv zlib userland_GNU kernel_linux elibc_glibc" 
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, 
PORTDIR_OVERLAY