Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 136362 - gcc-3.4.5 errors out while building hardened specs
Summary: gcc-3.4.5 errors out while building hardened specs
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: AMD64 Linux
: High major (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-11 00:43 UTC by Joseph Carnes
Modified: 2007-02-11 14:13 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 Joseph Carnes 2006-06-11 00:43:16 UTC
xorg-server asked me to recompile gcc 3.4.5 without hardened specs.  When doing it, I got this:

In file included from /var/tmp/portage/gcc-3.4.5/work/gcc-3.4.5/gcc/gcc.c:148:
./configargs.h:2: warning: string length `781' is greater than the length
`509'
ISO C89 compilers are required to support
/var/tmp/portage/gcc-3.4.5/work/gcc-3.4.5/gcc/gcc.c:745: warning: string
length
`553' is greater than the length `509' ISO C89 compilers are required to
support/var/tmp/portage/gcc-3.4.5/work/gcc-3.4.5/gcc/gcc.c:792: warning:
string length
`645' is greater than the length `509' ISO C89 compilers are required to
support/var/tmp/portage/gcc-3.4.5/work/gcc-3.4.5/gcc/gcc.c:930: warning:
string length
`529' is greater than the length `509' ISO C89 compilers are required to
support/var/tmp/portage/gcc-3.4.5/work/gcc-3.4.5/gcc/gcc.c:948: warning:
string length
`608' is greater than the length `509' ISO C89 compilers are required to
support/var/tmp/portage/gcc-3.4.5/work/gcc-3.4.5/gcc/gcc.c:1530: warning:
string length `833' is greater than the length `509' ISO C89 compilers are
required to support
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.5/../../../../x86_64-pc-linux-gnu/bin/ld:
gccspec.o: relocation R_X86_64_32 against `a local symbol' can not be used
when making a shared object; recompile with -fPIC
gccspec.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [xgcc] Error 1
/usr/portage/eclass/toolchain.eclass: line 578:
/var/tmp/portage/gcc-3.4.5/work/build/gcc/xgcc: No such file or directory
[ !! ]
!!! ERROR: sys-devel/gcc-3.4.5 failed.

!!! ERROR: sys-devel/gcc-3.4.5 failed.
Call stack:
ebuild.sh, line 1539:   Called dyn_compile
ebuild.sh, line 939:   Called src_compile
ebuild.sh, line 1248:   Called toolchain_src_compile
toolchain.eclass, line 24:   Called gcc_src_compile
toolchain.eclass, line 1466:   Called die

!!! failed to split out specs
!!! If you need support, post the topmost build error, and the call stack if relevant.
	  
my make.conf is:

# These settings were set by the catalyst build script that automatically built this stage
# Please consult /etc/make.conf.example for a more detailed example
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
USE="X a52 aac aalib acl acpi adns aim alsa apache apache2 apm arts audiofile bash-completion bcmath blas bluetooth bmp bonobo bzip2 calendar caps cdb cdinstall cdparanoia cdr crypt cscope ctype cups curl curlwrappers dba dbase dbm dbmaker dbus dbx dga dio directfb dri dts dv dvb dvd dvdread dvdr emul-linux-x86 encode esd ethereal evo examples exif fam fastcgi fbcon fdftk ffmpeg ffw filepro flac flash flatfile foomaticdb freetds ftp gb gcj gd gdbm ggi gif ginac glut gmp gnome gnustep gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile hal hardenedphp howl icq ieee1394 imagemagick imap imlib inifile ipv6 jabber jack java javascript jikes jpeg jpeg2k kde kerberos krb4 ladcca lapack lcms ldap lesstif libedit libg++ libgda libwww lirc lm_sensors mad maildir mailwrapper mcal mhash mikmod milter mime ming mmap mng mono motif mozilla mp3 mpeg mpi mysql mysqli nas ncurses netboot nis nocd nptl nsplugin offensive ogg openal opengl osc oscar oss pam pcntl pcre pda pdf perl php plotutils png portaudio posix ppds python qt quicktime radius readline ruby samba sasl sdl sharedext sharedmem shorten skey slang slp sndfile snmp soap sockets sox speex spell spl sse sse2 ssl svg svga szip tcltk tcpd tetex theora threads tiff tokenizer truetype uclibc unicode usb v4l videos vorbis wifi win32codecs wmf wxwindows xface xine xinerama xml xml2 xml-rpc xmms xosd xpm xprint xv xvid yahoo zeo zlib"
INPUT_DEVICES="keyboard mouse"
VIDEO_DEVICES="ati radeon"

recompiling with -fPIC gives me a "warning!  might break packages", so I'm hesitant to try that.
Comment 1 SpanKY gentoo-dev 2006-06-11 03:23:54 UTC
post `emerge info`
Comment 2 Joseph Carnes 2006-06-11 04:44:28 UTC
Portage 2.1 (default-linux/x86/2005.1, gcc-3.4.6, glibc-2.3.6-r3, 2.6.16-gentoo-r9 i686)
=================================================================
System uname: 2.6.16-gentoo-r9 i686 Intel(R) Pentium(R) M processor 1.86GHz
Gentoo Base System version 1.6.14
dev-lang/python:     2.3.5-r2, 2.4.2
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
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-r1
sys-devel/binutils:  2.16.1-r2
sys-devel/gcc-config: 1.3.13-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib/mozilla/defaults/pref /usr/share/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/"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -march=pentium4 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
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"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="x86 X alsa apm arts avi berkdb bitmap-fonts cli crypt cups dbus dri eds emboss encode foomaticdb fortran gdbm gif glut gnome gpm gstreamer gtk gtk2 imlib ipv6 isdnlog jpeg kde libg++ libwww mad mikmod motif mp3 mpeg ncurses nls ogg oggvorbis opengl oss pam pcre pdflib perl png pppd python qt quicktime readline reflection sdl session spell spl ssl tcpd truetype truetype-fonts type1-fonts vorbis xml2 xmms xorg xscreensaver xv zlib elibc_glibc kernel_linux userland_GNU"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 3 Kevin F. Quinn (RETIRED) gentoo-dev 2006-06-11 05:51:02 UTC
(In reply to comment #0)
> xorg-server asked me to recompile gcc 3.4.5 without hardened specs.

No it didn't; it asked you to switch to vanilla specs, _not_ to rebuild gcc, i.e.

# gcc-config -l
to get list of installed compilers

# gcc-config [n]
to set the compiler to entry number n - choose 3.4.5/vanilla

or:
# eselect compiler set i686-pc-linux-gnu-3.4.6/vanilla
if you're using that, from ~x86


However that said, it doesn't look like you're using the hardened compiler anyway (not so easy to tell from emerge --info).

Something strange is going on, because:

/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.5/../../../../x86_64-pc-linux-gnu/bin/ld:
gccspec.o: relocation R_X86_64_32 against `a local symbol' can not be used
when making a shared object; recompile with -fPIC

implies 64-bit (i.e. amd64 not x86).  Are you sure you posted 'emerge --info' from the right box? It disagrees with what you pasted from make.conf in your first report.
Comment 4 Joseph Carnes 2006-06-11 11:37:12 UTC
F*ck...you're right..  Sorry...I must have put the emerge-info in from the box I was using, not from the ssh session...that's actually my laptop's 'emerge info'.  Sorry for the confusion.

I didn't know about the gcc-config, so when I saw:

emerge xorg-server
Calculating dependencies... done!
>>> Emerging (1 of 36) x11-base/xorg-server-1.1.0 to /
>>> checking ebuild checksums ;-)
>>> checking auxfile checksums ;-)
>>> checking miscfile checksums ;-)
>>> checking xorg-server-1.1.0.tar.bz2 ;-)
>>> checking MesaLib-6.5.tar.bz2 ;-)
 * Forcing on xorg-x11 for new enough glxtokens.h...
 Switching to xorg-x11 OpenGL interface... done
 >>> Unpacking source...
  * xorg-server does not work with hardened gcc specs. Switch to vanilla gcc
  * specs to emerge xorg-server.

  !!! ERROR: x11-base/xorg-server-1.1.0 failed.
  !!! ERROR: x11-base/xorg-server-1.1.0 failed.
  Call stack:
  ebuild.sh, line 1539:   Called dyn_unpack
  ebuild.sh, line 711:   Called src_unpack
  xorg-server-1.1.0.ebuild, line 534:   Called x-modular_specs_check
  x-modular.eclass, line 177:   Called die

  !!! xorg-server does not work with hardened gcc specs. Switch to vanilla gcc specs to emerge xorg-server.
  !!! If you need support, post the topmost build error, and the call stack if relevant.


I just assumed that "switch" meant a recompile.  

For your information, THIS is my 'emerge info':


Gentoo Base System version 1.6.14
*** Deprecated use of action 'info', use '--info' instead
Portage 2.1_rc4-r4 (default-linux/amd64/2006.0, gcc-3.4.5, glibc-2.3.6-r3, 2.6.15-gentoo-r5 x86_64)
=================================================================
System uname: 2.6.15-gentoo-r5 x86_64 AMD Athlon(tm) 64 Processor 3400+
dev-lang/python:     2.4.2
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
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-r1
sys-devel/binutils:  2.16.1-r2
sys-devel/gcc-config: 1.3.13-r2
sys-devel/libtool:   1.5.22
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/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
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"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X a52 aac aalib acl acpi adns aim alsa apache apache2 apm arts audiofile avi bash-completion bcmath berkdb bitmap-fonts blas bluetooth bonobo bzip2 calendar caps cdb cdinstall cdparanoia cdr cli crypt cscope ctype cups curl curlwrappers dba dbase dbm dbus dbx dga dio directfb dri dts dv dvb dvd dvdr dvdread eds emboss emul-linux-x86 encode esd ethereal evo examples exif fam fastcgi fbcon ffmpeg ffw flac flash flatfile foomaticdb fortran freetds ftp gb gcj gd gdbm ggi gif ginac glut gmp gnome gnustep gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile hal hardenedphp howl icq ieee1394 imagemagick imap imlib inifile ipv6 isdnlog jabber jack java javascript jikes jpeg jpeg2k kde kerberos krb4 ladcca lapack lcms ldap lesstif libedit libg++ libgda libwww lirc lm_sensors lzw lzw-tiff mad maildir mailwrapper mcal mhash mikmod milter mime ming mmap mng mono motif mozilla mp3 mpeg mpi mysql mysqli nas ncurses netboot nis nls nocd nptl nsplugin offensive ogg openal opengl osc oscar oss pam pcntl pcre pda pdf pdflib perl php plotutils png portaudio posix ppds pppd python qt quicktime radius readline reflection ruby samba sasl sdl session sharedext sharedmem shorten skey slang slp sndfile snmp soap sockets sox speex spell spl ssl svg szip tcltk tcpd tetex theora threads tiff tokenizer truetype truetype-fonts type1-fonts unicode usb v4l videos vorbis wifi wmf wxwindows xface xine xinerama xml xml-rpc xml2 xmms xorg xosd xpm xprint xv xvid yahoo zeo zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux userland_GNU"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 5 Kevin F. Quinn (RETIRED) gentoo-dev 2007-02-11 14:13:55 UTC
This has been superceded by events; X now manages the compiler differences intelligently so there's no need to switch around anyway.

For the record, the error comes from trying to build gcc/hardened with gcc/vanilla or vice versa.  The only safe way to do that it is to use gcc-config to switch to gcc/vanilla, before doing USE="-hardened" emerge gcc.
Similarly when going from vanilla to hardened, use gcc-config to switch to gcc/hardened before doing USE="hardened" emerge gcc.