Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 31087 - xine-lib does not like -fpmath=sse
Summary: xine-lib does not like -fpmath=sse
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
: 35719 45371 45419 45877 46095 47796 47871 49071 49508 51122 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-10-13 20:01 UTC by George Shapovalov (RETIRED)
Modified: 2004-06-23 22:00 UTC (History)
14 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
xine-lib.diff (xine-lib.diff,348 bytes, patch)
2004-04-16 00:58 UTC, Diego Elio Pettenò (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description George Shapovalov (RETIRED) gentoo-dev 2003-10-13 20:01:20 UTC
Hi Arcady.

Sorry if I assigned the bug wrongly, but you seem to be the most prominent on the xine-lib bugs. Oh, and I did not find this reported either, although there are bunch of xine-lib related bugs. I hope I did not overlook something..

Apparently xine-lib (-1_rc1) does not like -fpmath=sse in CFLAGs, at least on pentium3. Build with -fpmath flag omitted proceeds fine.

George

Portage 2.0.49-r13 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1, 2.4.20-ck6)
System uname: 2.4.20-ck6 i686 Pentium III (Coppermine)
CFLAGS="-march=pentium3 -O2 -pipe -fforce-addr -fomit-frame-pointer -falign-functions=4 -mfpmath=sse"


 gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../../include -I../../include -I../../src -I../../src/xine-engine -I../../src/xine-engine -I../../src/xine-utils -Wall -D_REENTRANT -D_FILE_OFFSET_BITS=64 -DXINE_COMPILE -Wpointer-arith -Wnested-externs -Wcast-align -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -march=pentium3 -O2 -pipe -fforce-addr -fomit-frame-pointer -falign-functions=4 -mfpmath=sse -I/usr/kde/3.1/include/artsc -c cfft.c -MT cfft.lo -MD -MP -MF .deps/cfft.TPlo  -o .libs/cfft.o
cfft.c: In function `passf2':
cfft.c:99: unable to find a register to spill in class `SSE_REGS'
cfft.c:99: this is the insn:
(insn 337 335 358 (set (subreg:SF (reg/v:DI 29 rmm0 [138]) 0)
        (minus:SF (reg:SF 21 exmm0 [175])
            (mem:SF (reg/f:SI 0 eax [148]) [4 S4 A32]))) 547 {*fop_sf_1_sse} (insn_list 332 (nil))
    (expr_list:REG_DEAD (reg:SF 21 exmm0 [175])
        (nil)))
cfft.c:99: confused by earlier errors, bailing out
make[4]: *** [cfft.lo] Ошибка 1
Comment 1 Chris PeBenito (RETIRED) gentoo-dev 2003-11-20 21:45:56 UTC
I can verify the same thing happens with my p3.  Removing -mfpmath=sse allows it to compile.
Comment 2 Federico Fortini 2004-02-22 14:12:15 UTC
I can confirm it on a P4 2Ghz. Remove -fpmath=sse in CFLAGS works great. I remove the -msse2 flasg too for sure...
Comment 3 antoine marmignon 2004-03-23 01:31:43 UTC
You should use "-mfpmath=sse,387" instead.
This solves stability issues and compilation errors on a lot of things.
No problems compiling xine-lib with that flag.
You will also have to filter -fforce-addr.
Comment 4 Tuan Van (RETIRED) gentoo-dev 2004-03-27 13:02:20 UTC
*** Bug 45419 has been marked as a duplicate of this bug. ***
Comment 5 Martin Holzer (RETIRED) gentoo-dev 2004-03-28 03:06:32 UTC
*** Bug 45877 has been marked as a duplicate of this bug. ***
Comment 6 Martin Holzer (RETIRED) gentoo-dev 2004-03-28 03:17:13 UTC
*** Bug 45371 has been marked as a duplicate of this bug. ***
Comment 7 Daniel Ahlberg (RETIRED) gentoo-dev 2004-03-30 01:10:21 UTC
*** Bug 46095 has been marked as a duplicate of this bug. ***
Comment 8 Martin Holzer (RETIRED) gentoo-dev 2004-03-31 11:20:09 UTC
*** Bug 35719 has been marked as a duplicate of this bug. ***
Comment 9 Carl A. Dunham 2004-04-04 22:04:34 UTC
This isn't working for me. I tried setting CFLAGS to various things, including "" and "-mfpmath=sse,387", and I keep getting the same result:

gcc -DHAVE_CONFIG_H -I. -I. -I../../../.. -I../../../.. -I../../../../include -I../../../../include -I../../../../src -I../../../../src/xine-engine -I../../../../src/xine-engine -I../../../../src/xine-utils -I../../../../src/input -I../../../../src/input -DSIMPLE_IDCT -DHAVE_AV_CONFIG_H -DRUNTIME_CPUDETECT -DUSE_FASTMEMCPY -DCONFIG_RISKY -DCONFIG_DECODERS -DXINE_MPEG_ENCODER -DCONFIG_ZLIB -Wall -DNDEBUG -D_REENTRANT -D_FILE_OFFSET_BITS=64 -DXINE_COMPILE -Wnested-externs -Wcast-align -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -mfpmath=sse,387 -mno-sse2 -c dsputil_mmx.c -MT dsputil_mmx.lo -MD -MP -MF .deps/dsputil_mmx.TPlo
cc1: warning: SSE instruction set disabled, using 387 arithmetics
dsputil_mmx.c: In function `h263_h_loop_filter_mmx':
dsputil_mmx.c:614: error: can't find a register in class `GENERAL_REGS' while reloading `asm'
dsputil_mmx.c: In function `dsputil_init_mmx':
dsputil_mmx.c:2116: warning: unused variable `dct_algo'
dsputil_mmx.c: At top level:
dsputil_mmx_rnd.h:363: warning: `avg_no_rnd_pixels8_l2_mmx' defined but not used
dsputil_mmx_rnd.h:410: warning: `avg_no_rnd_pixels16_l2_mmx' defined but not used
dsputil_mmx_avg.h:57: warning: `put_pixels8_l2_3dnow' defined but not used
dsputil_mmx_avg.h:129: warning: `put_pixels16_l2_3dnow' defined but not used
dsputil_mmx_avg.h:57: warning: `put_pixels8_l2_mmx2' defined but not used
dsputil_mmx_avg.h:129: warning: `put_pixels16_l2_mmx2' defined but not used
dsputil_mmx.c:1976: warning: `try_8x8basis_mmx' defined but not used
dsputil_mmx.c:2024: warning: `add_8x8basis_mmx' defined but not used
make[5]: *** [dsputil_mmx.lo] Error 1
make[5]: Leaving directory `/space/var/tmp/portage/xine-lib-1_rc3-r2/work/xine-lib-1-rc3b/src/libffmpeg/libavcodec/i386'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/space/var/tmp/portage/xine-lib-1_rc3-r2/work/xine-lib-1-rc3b/src/libffmpeg/libavcodec'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/space/var/tmp/portage/xine-lib-1_rc3-r2/work/xine-lib-1-rc3b/src/libffmpeg'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/space/var/tmp/portage/xine-lib-1_rc3-r2/work/xine-lib-1-rc3b/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/space/var/tmp/portage/xine-lib-1_rc3-r2/work/xine-lib-1-rc3b'
make: *** [all] Error 2

!!! ERROR: media-libs/xine-lib-1_rc3-r2 failed.
!!! Function src_compile, Line 108, Exitcode 2
!!! Parallel make failed

Comment 10 Carl A. Dunham 2004-04-04 23:02:12 UTC
Heh, looks like this is a bug in gcc:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13850

fixed by using CFLAGS="-O" of all things.

Comment 11 Martin Holzer (RETIRED) gentoo-dev 2004-04-14 12:53:44 UTC
*** Bug 47796 has been marked as a duplicate of this bug. ***
Comment 12 Martin Holzer (RETIRED) gentoo-dev 2004-04-14 23:51:23 UTC
*** Bug 47871 has been marked as a duplicate of this bug. ***
Comment 13 Diego Elio Pettenò (RETIRED) gentoo-dev 2004-04-16 00:58:04 UTC
Created attachment 29404 [details, diff]
xine-lib.diff

This patch allows the ebuildto filter -fforce-addr which make xine-lib not
compilable.
It owrks well using this.
Comment 14 Martin Holzer (RETIRED) gentoo-dev 2004-04-30 03:47:23 UTC
*** Bug 49071 has been marked as a duplicate of this bug. ***
Comment 15 Martin Holzer (RETIRED) gentoo-dev 2004-05-01 13:56:26 UTC
*** Bug 49508 has been marked as a duplicate of this bug. ***
Comment 16 Julian Turner 2004-05-04 10:34:18 UTC
Doesn't even work with CFLAGS="-O2" for me.

USE="3dnow X aalib acpi alsa avi berkdb bonobo cdr crypt cups dvd encode fbcon flac flash foomaticdb gb gd gdbm gif gnome gphoto2 gpm gtk gtk2 guile imlib java jpeg ldap libg++ libwww mad matroska mbox mikmod mmx motif mozilla mpeg ncurses nls oggvorbis opengl oss pam pdflib perl png python quicktime readline samba sdl slang spell sse ssl svga tcltk tcpd theora tiff truetype usb v4l v4l2 x86 xml xml2 xmms xv zlib"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"

last words are:

dsputil_mmx.lo -MD -MP -MF .deps/dsputil_mmx.TPlo -o .libs/dsputil_mmx.o
dsputil_mmx.c: In function `h263_h_loop_filter_mmx':
dsputil_mmx.c:614: error: can't find a register in class `GENERAL_REGS' while reloading `asm'
dsputil_mmx.c: In function `dsputil_init_mmx':
dsputil_mmx.c:2116: warning: unused variable `dct_algo'
dsputil_mmx.c: At top level:
dsputil_mmx_rnd.h:363: warning: `avg_no_rnd_pixels8_l2_mmx' defined but not useddsputil_mmx_rnd.h:410: warning: `avg_no_rnd_pixels16_l2_mmx' defined but not used
dsputil_mmx_avg.h:57: warning: `put_pixels8_l2_3dnow' defined but not used
dsputil_mmx_avg.h:129: warning: `put_pixels16_l2_3dnow' defined but not used
dsputil_mmx_avg.h:57: warning: `put_pixels8_l2_mmx2' defined but not used
dsputil_mmx_avg.h:129: warning: `put_pixels16_l2_mmx2' defined but not used
dsputil_mmx.c:1976: warning: `try_8x8basis_mmx' defined but not used
dsputil_mmx.c:2024: warning: `add_8x8basis_mmx' defined but not used
make[5]: *** [dsputil_mmx.lo] Error 1
make[5]: Leaving directory `/var/tmp/portage/xine-lib-1_rc4/work/xine-lib-1-rc4/src/libffmpeg/libavcodec/i386'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/var/tmp/portage/xine-lib-1_rc4/work/xine-lib-1-rc4/src/libffmpeg/libavcodec'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/var/tmp/portage/xine-lib-1_rc4/work/xine-lib-1-rc4/src/libffmpeg'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/xine-lib-1_rc4/work/xine-lib-1-rc4/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/xine-lib-1_rc4/work/xine-lib-1-rc4'make: *** [all] Error 2
 
!!! ERROR: media-libs/xine-lib-1_rc4 failed.
!!! Function src_compile, Line 112, Exitcode 2
!!! Parallel make failed

I also tried  with -j1 because of the "Parallel make" thing. Still no luck. 
Comment 17 Patrick Kursawe (RETIRED) gentoo-dev 2004-05-12 01:19:11 UTC
Julian, which gcc version?
Comment 18 Martin Holzer (RETIRED) gentoo-dev 2004-05-15 18:02:39 UTC
*** Bug 51122 has been marked as a duplicate of this bug. ***
Comment 19 SpanKY gentoo-dev 2004-06-23 07:25:25 UTC
-fpmath=sse is filtered now
Comment 20 Meder Bakirov 2004-06-23 22:00:42 UTC
I have successfully built xine-lib with these CFLAGS:
 
CFLAGS="-march=athlon-xp -O3 -mfpmath=sse -fforce-addr -fomit-frame-pointer -funroll-loops -pipe"

But it always fails with these CFLAGS:

CFLAGS="-march=athlon-xp -O3 -mfpmath=sse -fforce-addr -fomit-frame-pointer -funroll-loops -funroll-all-loops -fprefetch-loop-arrays -maccumulate-outgoing-args -pipe"

i.e. xine-lib successfully builds, when I remove "-funroll-all-loops -fprefetch-loop-arrays -maccumulate-outgoing-args" from my CFLAGS.

Hope it helps! :)