Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 212194 - libtheora-1.0_beta2-r1 not compiling on hardened-x86
Summary: libtheora-1.0_beta2-r1 not compiling on hardened-x86
Status: RESOLVED DUPLICATE of bug 200549
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: The Gentoo Linux Hardened Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-03 14:18 UTC by Victor Mataré
Modified: 2008-03-03 17:25 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 Victor Mataré 2008-03-03 14:18:54 UTC
it's that mmx stuff again. Dunno what's wrong with mmx on hardened, but this is what happens:
 i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../lib -I../lib/dec -I../lib/enc -Wall -Wno-parentheses -O2 -march=k8 -pipe -fforce-addr -c enc/x86_32/dct_decode_mmx.c  -fPIC -DPIC -o .libs/libtheora_la-dct_decode_mmx.o
enc/x86_32/dct_decode_mmx.c: In function `FilterHoriz__mmx':
enc/x86_32/dct_decode_mmx.c:93: error: can't find a register in class `GENERAL_REGS' while reloading `asm'
enc/x86_32/dct_decode_mmx.c:95: error: can't find a register in class `GENERAL_REGS' while reloading `asm'
make[2]: *** [libtheora_la-dct_decode_mmx.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
 i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../lib -I../lib/dec -I../lib/enc -Wall -Wno-parentheses -O2 -march=k8 -pipe -fforce-addr -c dec/state.c -o libtheora_la-state.o >/dev/null 2>&1
make[2]: Leaving directory `/var/tmp/portage/media-libs/libtheora-1.0_beta2-r1/work/libtheora-1.0beta2/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/media-libs/libtheora-1.0_beta2-r1/work/libtheora-1.0beta2'
make: *** [all] Error 2


Reproducible: Always
Comment 1 Victor Mataré 2008-03-03 14:21:44 UTC
# emerge --info
Portage 2.1.4.4 (hardened/x86/2.6, gcc-3.4.6, glibc-2.6.1-r0, 2.6.23-hardened-r7_horst64 x86_64)
=================================================================
System uname: 2.6.23-hardened-r7_horst64 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4200+
Timestamp of tree: Mon, 03 Mar 2008 01:47:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [disabled]
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.1.4
dev-lang/python:     2.4.4-r6
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=k8 -pipe -fforce-addr"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/modules.autoload.d /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/bind /var/www/localhost/htdocs/phpmyadmin/libraries /var/www/localhost/htdocs/wordpress"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/init.d /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d /lib/modules/*"
CXXFLAGS="-O2 -march=k8 -pipe -fforce-addr"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext 7zip X a52 aac acl acpi alsa apache2 audiofile bash-completion berkdb bzip2 caps cdparanoia cgi cracklib crypt css ctype curl dbus dhcp dvd dvdread encode fam fbcon ffmpeg fftw flac fping gif hardened id3 idn iproute2 jpeg kde kerberos lame lm_sensors logrotate lzo mad midi mjpeg mmap mmx mmxext mng mp3 mp4 mpeg musicbrainz mysql nptl nptlonly ogg pam pcre pdf pic png portaudio posix postgres ppds python qt3support readline replaygain samba sndfile sse sse2 ssl tcpd tga theora tiff tordns truetype unicode urandom vcd vhosts vorbis win32codecs x264 x86 xinetd xorg xpm xvid xvmc zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif so status unique_id userdir usertrack vhost_alias chroot" APACHE2_MPMS="worker" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="dummy fbdev nv none"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Yes, I'm running a 64bit Kernel and a 32bit userland. I guess that shouldn't be causing the problem...
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2008-03-03 15:28:18 UTC
Stop using -fforce-addr..
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2008-03-03 15:31:11 UTC

*** This bug has been marked as a duplicate of bug 200549 ***
Comment 4 Gordon Malm (RETIRED) gentoo-dev 2008-03-03 15:51:42 UTC
(In reply to comment #3)
> 
> *** This bug has been marked as a duplicate of bug 200549 ***
> 

(In reply to comment #2)
> Stop using -fforce-addr..
> 

CFLAGS="-fforce-addr" is the default in hardened/x86/2.6 profile's make.defaults.  If the ebuild has problems with it, the flag needs to be filtered.
Comment 5 solar (RETIRED) gentoo-dev 2008-03-03 16:01:30 UTC
> CFLAGS="-fforce-addr" is the default in hardened/x86/2.6 profile's
> make.defaults.  If the ebuild has problems with it, the flag needs to be
> filtered.

Gordon,
It's not a profile default. It's only used in release media. Also if it's causing a bug with compiling this is the first documented case that I'm aware of.
Can you confirm that removing it actually allows this to compile?
Comment 6 Gordon Malm (RETIRED) gentoo-dev 2008-03-03 16:59:42 UTC
> Gordon,
> It's not a profile default. It's only used in release media. Also if it's
> causing a bug with compiling this is the first documented case that I'm aware
> of.

CFLAGS="-fforce-addr" is in hardened/x86/2.6/make.defaults.  I thought that makes it the default if no CFLAGS are set?  I thought I remember seeing a comment about it being put in defaults because it helped against certain ret2libc attacks.

> Can you confirm that removing it actually allows this to compile?

Yes.
Comment 7 Victor Mataré 2008-03-03 17:25:25 UTC
yep. works alright when removing -fforce-addr from CFLAGS in make.conf. Sorry I didn't realize CFLAGS in make.conf circumvent an ebuild's CFLAGS filtering.