Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 118836 - games-emulation/advancemame doesnt build on hardened systems
Summary: games-emulation/advancemame doesnt build on hardened systems
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: x86 Linux
: Lowest trivial
Assignee: The Gentoo Linux Hardened Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-12 20:08 UTC by Mark Glines
Modified: 2006-07-30 21:43 UTC (History)
2 users (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 Mark Glines 2006-01-12 20:08:45 UTC
+++ This bug was initially created as a clone of Bug #74899 +++

It would appear that I've run into an issue similar to the old -fPIC bug reported in #74899.  Same error message, anyway.

obj/mame/linux/blend/advance/osd/safequit.o
obj/mame/linux/blend/advance/osd/fileio.o
obj/mame/linux/blend/advance/osd/fuzzy.o
obj/mame/linux/blend/advance/blit/blit.o
advance/blit/icopy.h: In function `internal_copy8_step_mmx':
advance/blit/icopy.h:195: error: can't find a register in class `BREG' while reloading `asm'
make: *** [obj/mame/linux/blend/advance/blit/blit.o] Error 1

gcc -v reports:
gcc version 3.4.5 (Gentoo 3.4.5, ssp-3.4.5-1.0, pie-8.7.9)


Gentoo Base System version 1.12.0_pre13
Portage 2.1_pre3-r1 (default-linux/x86/2005.1, gcc-3.4.5-hardened, glibc-2.3.5-r3, 2.6.14.3 i686)
=================================================================
System uname: 2.6.14.3 i686 AMD Athlon(tm) MP 1700+
ccache version 2.4 [enabled]
dev-lang/python:     2.3.5-r2, 2.4.2
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-r1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-Os -march=athlon-xp -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-Os -march=athlon-xp -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks fixpackages sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.osuosl.org/"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://206.169.166.57/gentoo-portage"
USE="x86 X acpi alsa apache2 arts atlas audiofile avi berkdb bitmap-fonts bzip2 crypt cups curl dga divx4linux dlloader doc dvdread eds emboss encode esd ethereal exif expat fam fbcon fbdev ffmpeg fftw flac flash foomaticdb fortran gdbm gif glut gmp gnome gpm gstreamer gtk gtk2 idn imagemagick imlib ipv6 ithreads jack java jpeg junit kde kerberos lcms libg++ libgda libwww live lzo mad matroska mikmod mmx mng mozilla moznoirc mp3 mpeg mpm-worker musicbrainz ncurses network nfsv4 nptl nsplugin nvidia ogg oggvorbis opengl oss pam pcre pdflib perl png pnp ppds python qt quicktime readline real sdl slang speex spell sse ssl subtitles tcpd theora threads tiff truetype truetype-fonts type1-fonts udev unicode usb vorbis win32codecs xine xinerama xml2 xmms xv xvid zlib elibc_glibc kernel_linux userland_GNU"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTDIR_OVERLAY
Comment 1 Mark Glines 2006-01-13 05:19:01 UTC
FYI, games-emulation/advancemenu-2.4.12 fails with the same error message.

obj/menu/linux/blend/lib/error.o
obj/menu/linux/blend/lib/filter.o
obj/menu/linux/blend/lib/complex.o
obj/menu/linux/blend/blit/clear.o
obj/menu/linux/blend/blit/blit.o
advance/blit/icopy.h: In function `internal_copy8_step_mmx':
advance/blit/icopy.h:195: error: can't find a register in class `BREG' while reloading `asm'
make: *** [obj/menu/linux/blend/blit/blit.o] Error 1

!!! ERROR: games-emulation/advancemenu-2.4.12 failed.
Comment 2 Mark Glines 2006-01-13 05:28:38 UTC
the above errors occur with gcc-config set to i686-pc-linux-gnu-3.4.5-hardened.  With i686-pc-linux-gnu-3.4.5-hardenednopie, both packages build just fine.  Maybe -fno-pic in the CFLAGS would be a workaround?
Comment 3 solar (RETIRED) gentoo-dev 2006-01-13 06:52:47 UTC
(In reply to comment #2)
> the above errors occur with gcc-config set to i686-pc-linux-gnu-3.4.5-hardened.
>  With i686-pc-linux-gnu-3.4.5-hardenednopie, both packages build just fine. 
> Maybe -fno-pic in the CFLAGS would be a workaround?

No that would make it worse. 

Try to regain a register with -fomit-frame-pointer till somebody finds time to review the code in question. If that fails then you can maybe try -fno-pie
Comment 4 Mark Glines 2006-01-16 10:24:14 UTC
I just rebuilt advancemame and advancemenu.  In both cases, -fomit-frame-pointer did not help.  -fno-pie did successfully build both packages, with a warning and a QA notice about TEXTREL stuff.
Comment 5 Mr. Bones. (RETIRED) gentoo-dev 2006-07-27 18:07:06 UTC
Well, it seems like the pic patch for advancemame was dropped at some point.  No idea why.  I added it back in for 0.106.0 so can you give that a try please?
Comment 6 Mark Glines 2006-07-27 22:33:14 UTC
(In reply to comment #5)
> Well, it seems like the pic patch for advancemame was dropped at some point. 
> No idea why.  I added it back in for 0.106.0 so can you give that a try please?

0.106.0 builds fine for me with gcc-3.4.6-hardened.  Thanks!
Comment 7 Mr. Bones. (RETIRED) gentoo-dev 2006-07-28 10:13:41 UTC
Great!  Thanks for testing.  I'll try to get the pic patch in upstream and make sure it doesn't get dropped going forward.
Comment 8 SpanKY gentoo-dev 2006-07-30 21:43:03 UTC
well that patch ignores the real issue ... try and fix the inline asm to be PIC