Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 197052 - media-tv/mythtv-0.20.2_p14680 & 0.20.2_p14814 fail with -march=native
Summary: media-tv/mythtv-0.20.2_p14680 & 0.20.2_p14814 fail with -march=native
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal
Assignee: Television related Applications in Gentoo's Portage
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-25 16:11 UTC by Chris Smith
Modified: 2011-07-03 13:48 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 Chris Smith 2007-10-25 16:11:12 UTC
media-tv/mythtv-0.20.2_p14680 dies during compile

Reproducible: Always

Actual Results:  
gcc -c -pipe -march=native -w -O3 -Wall -Wno-switch -fomit-frame-pointer -D_REENTRANT -DPIC -fPIC  -DMMX -Di386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DPREFIX=\"/usr\" -DLIBDIR=\"/usr/lib64\" -DHAVE_AV_CONFIG_H -D_LARGEFILE_SOURCE -DHAVE_XVMC -DHAVE_XVMC_VLD -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/qt/3/mkspecs/linux-g++ -I. -I.. -I../.. -I../libavutil -I/usr/qt/3/include -o dsputil_mmx.o i386/dsputil_mmx.c
{standard input}: Assembler messages:
{standard input}:35: Error: suffix or operands invalid for `add'
{standard input}:36: Error: suffix or operands invalid for `add'
{standard input}:55: Error: suffix or operands invalid for `add'
{standard input}:56: Error: suffix or operands invalid for `add'
{standard input}:114: Error: suffix or operands invalid for `add'
{standard input}:115: Error: suffix or operands invalid for `add'
{standard input}:152: Error: suffix or operands invalid for `add'
{standard input}:153: Error: suffix or operands invalid for `add'
{standard input}:177: Error: `(%rsi,%eax)' is not a valid base/index expression
{standard input}:192: Error: suffix or operands invalid for `add'
{standard input}:193: Error: suffix or operands invalid for `add'
<snip>
{standard input}:107062: Error: suffix or operands invalid for `add'
{standard input}:107063: Error: `(%rsi,%eax)' is not a valid base/index expression
{standard input}:107064: Error: `1(%rsi,%eax)' is not a valid base/index expression
{standard input}:107079: Error: `(%rdi,%eax)' is not a valid base/index expression
{standard input}:107089: Error: `(%rdi,%eax)' is not a valid base/index expression
{standard input}:107090: Error: suffix or operands invalid for `add'
make[2]: *** [dsputil_mmx.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/media-tv/mythtv-0.20.2_p14680/work/mythtv-0.20.2/libs/libavcodec'
make[1]: *** [sub-libavcodec] Error 2
make[1]: Leaving directory `/var/tmp/portage/media-tv/mythtv-0.20.2_p14680/work/mythtv-0.20.2/libs'
make: *** [sub-libs] Error 2
 *
 * ERROR: media-tv/mythtv-0.20.2_p14680 failed.



emerge --info
Portage 2.1.3.16 (default-linux/amd64/2007.0, gcc-4.2.2, glibc-2.6.1-r0, 2.6.23-gentoo x86_64)
=================================================================
System uname: 2.6.23-gentoo x86_64 Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz
Timestamp of tree: Thu, 25 Oct 2007 07:50:01 +0000
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.1.2-r1
dev-lang/python:     2.4.4-r4, 2.5.1-r2
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.10-r5
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 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.24
virtual/os-headers:  2.6.23
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -fomit-frame-pointer -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=native -O2 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://gentoo.mirrors.tds.net/gentoo http://gentoo.cites.uiuc.edu/pub/gentoo/ ftp://gentoo.chem.wisc.edu/gentoo/ http://prometheus.cs.wmich.edu/gentoo http://gentoo.chem.wisc.edu/gentoo/"
LC_ALL="en_US.UTF-8"
LINGUAS="en"
MAKEOPTS="-j1"
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 --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/overlays/xeffects/trunk"
SYNC="rsync://davinci.mw.realcomputerguy.com/gentoo-portage"
USE="X a52 aac aalib acl acpi alsa amd64 amr apache2 audiofile avi bash-completion berkdb bitmap-fonts bzip2 cairo cdparanoia cdr cli cracklib crypt cups curl dbus dri dts dv dvb dvd dvdr dvdread encode exif fam ffmpeg flac fortran gdbm gif glitz gphoto2 gpm gstreamer gtk2 hal iconv imagemagick imap imlib ipv6 isdnlog jack java jpeg jpeg2k kde kdeenablefinal lame lcd lcms ldap mad midi mmap mmx mozcalendar mozilla mp3 mudflap musicbrainz ncurses nls nodrm nptl nptlonly nsplugin nvidia ofx ogg oggvorbis openexr opengl openmp pam pcre pda pdf perl png pppd python qt3 qt4 quicktime readline reflection samba sasl scanner sdl session slp sndfile spell spl sse sse2 ssl subversion svg tcltk tcpd theora threads tiff tk transparency truetype truetype-fonts type1-fonts unicode usb utf8 v4l v4l2 vcd vorbis wmf xattr xcomposite xine xml xorg xscreensaver xv xvid xvmc zlib" ALSA_CARDS="hda-intel hdsp" 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" CAMERAS="ptp2" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="nvidia nv vesa fbdev vmware v4l"
Unset:  CTARGET, INSTALL_MASK, LANG, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Chris Smith 2007-10-25 20:18:19 UTC
This seems to be some weird CFLAGS issue.

If I change make.conf to read:
CFLAGS="-march=nocona -mtune=generic -O2 -fomit-frame-pointer -pipe"

instead of:
CFLAGS="-march=native -O2 -fomit-frame-pointer -pipe"

Then mythtv compiles.

AFAIK "-march=native" with a core2duo using amd64 install is equivalent to "-march=nocona -mtune=generic".

Comment 2 Chris Smith 2007-10-25 22:27:04 UTC
It does seem to be a problem with the mangling that the ebuild does with the CFLAGS as "-march=native" gets passed literally instead of "-march=nocona -mtune=generic".
Comment 3 Chris Smith 2007-11-15 18:28:03 UTC
Problem still exists with 0.20.2_p14814
Comment 4 Doug Goldstein (RETIRED) gentoo-dev 2007-11-15 20:12:51 UTC
-march=native is suppose to be literally passed. it's gcc that converts that to your native arches.

The ebuild is not doing anything to your -march's
Comment 5 Chris Smith 2007-11-15 20:48:02 UTC
(In reply to comment #4)
> -march=native is suppose to be literally passed. it's gcc that converts that to
> your native arches.
> 
> The ebuild is not doing anything to your -march's
> 

OK. But it doesn't work - and only with mythtv.
Comment 6 Doug Goldstein (RETIRED) gentoo-dev 2007-11-15 20:53:42 UTC
Doesn't mean it's not a gcc failure still.
Comment 7 Chris Smith 2007-11-15 21:53:47 UTC
(In reply to comment #6)
> Doesn't mean it's not a gcc failure still.
> 

How true. That's why we have you guys :)
Comment 8 Chris Smith 2007-12-03 15:23:55 UTC
still a problem with media-tv/mythtv-0.20.2_p14972

noticed that when "-march=native" was changed to "-march-nocona mtune=generic" in order to get it to compile, that the "-mtune-generic" flag seemed to be dropped


Comment 9 Doug Goldstein (RETIRED) gentoo-dev 2007-12-03 15:45:42 UTC
This code comes straight from ffmpeg. You are having issues with libavcodec and it's usage of hand tuned MMX asm. Which is known to fail when optimized too much and built assuming PIC. By providing -march=native -mtune=generic, this is exactly what GCC is doing.

In the future, this ebuild will strip -march=native
Comment 10 Doug Goldstein (RETIRED) gentoo-dev 2008-12-15 19:50:44 UTC
At this point you should switch to 0.21, where the issue should be resolved.