Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 34736 - media-libs/xine-lib-1_rc2/rc3 BREG with -fPIC
Summary: media-libs/xine-lib-1_rc2/rc3 BREG with -fPIC
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 36789
  Show dependency tree
 
Reported: 2003-11-29 19:43 UTC by Scott Taylor (RETIRED)
Modified: 2004-03-28 03:10 UTC (History)
0 users

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 Scott Taylor (RETIRED) gentoo-dev 2003-11-29 19:43:36 UTC
In file included from dsputil_mmx.c:22:
../dsputil.h:492: warning: static declaration for `lrintf' follows non-static
In file included from dsputil_mmx.c:125:
dsputil_mmx_rnd.h: In function `put_no_rnd_pixels8_l2_mmx':
dsputil_mmx_rnd.h:60: error: can't find a register in class `BREG' while reloading `asm'


needs filter-flags -fPIC
Comment 1 Arent Groebner 2003-12-07 12:48:48 UTC
Same problem.


Portage 2.0.49-r15 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r8, 2.4.22-gentoo-test-r1)
=================================================================
System uname: 2.4.22-gentoo-test-r1 i686 AMD Athlon(tm) XP 2500+
Gentoo Base System version 1.4.3.10
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="no"
CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer -fPIC"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /opt/tomcat/conf /usr/kde/3.2/share/config /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer -fPIC"
DISTDIR="/usr/portage/distfiles"
FEATURES="sandbox ccache autoaddcvs"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="oss apm encode foomaticdb gtk2 libg++ mad mikmod ncurses nls quicktime spell xv gtkhtml gdbm berkdb slang readline tetex aalib bonobo svga tcltk guile ruby sdl gpm tcpd pam libwww perl esd imlib motif opengl mozilla cdr scanner acpi alsa arts avi crypt cups dga doc emacs ethereal gif -gnome gphoto2 -gtk java jpeg kde mmx mpeg oggvorbis pdflib png python qt ruby18 sip ssl tiff truetype usb X xml xml2 x86 xmms zlib"
Comment 2 Alexander Gabert (RETIRED) gentoo-dev 2003-12-09 12:59:28 UTC
ONFIG_ENCODERS `echo -Wall -D_REENTRANT -D_FILE_OFFSET_BITS=64 -DXINE_COMPILE  -Wpointer-arith -Wnested-externs -Wcast-align -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -O2 -mcpu=i686 -fomit-frame-pointer     | sed -e 's/-funroll-loops//g'` -c -o cputest.lo `test -f 'cputest.c' || echo './'`cputest.c
rm: cannot remove `': Invalid argument
In file included from ../dsputil.h:31,
                 from cputest.c:4:
../avcodec.h:674: error: syntax error before numeric constant
../avcodec.h:683: error: syntax error before numeric constant
../avcodec.h:1395: error: syntax error before numeric constant
../avcodec.h:1396: error: syntax error before numeric constant
../common.h:560: warning: `get_bits_count' defined but not used
../common.h:340: warning: `put_bits' defined but not used
../common.h:459: warning: `pbBufPtr' defined but not used
../common.h:699: warning: `get_xbits' defined but not used
../common.h:717: warning: `get_sbits' defined but not used
../common.h:731: warning: `get_bits' defined but not used
../common.h:766: warning: `get_bits1' defined but not used
../common.h:781: warning: `show_bits1' defined but not used
../common.h:785: warning: `skip_bits1' defined but not used
../common.h:860: warning: `get_vlc' defined but not used
../common.h:883: warning: `get_vlc2' defined but not used
../common.h:977: warning: `av_log2' defined but not used
../common.h:995: warning: `av_log2_16bit' defined but not used
../common.h:1011: warning: `mid_pred' defined but not used
../common.h:1028: warning: `clip' defined but not used
../common.h:1043: warning: `ff_sqrt' defined but not used
../common.h:1063: warning: `ff_get_fourcc' defined but not used
../common.h:1112: warning: `rdtsc' defined but not used
../dsputil.h:294: warning: `rnd_avg32' defined but not used
../dsputil.h:299: warning: `no_rnd_avg32' defined but not used
../dsputil.h:456: warning: `fft_calc' defined but not used
../dsputil.h:492: warning: `lrintf' defined but not used
make[5]: *** [cputest.lo] Error 1
make[5]: Leaving directory `/var/tmp/portage/xine-lib-1_rc2/work/xine-lib-1-rc2/src/libffmpeg/libavcodec/i386'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/var/tmp/portage/xine-lib-1_rc2/work/xine-lib-1-rc2/src/libffmpeg/libavcodec'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/var/tmp/portage/xine-lib-1_rc2/work/xine-lib-1-rc2/src/libffmpeg'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/xine-lib-1_rc2/work/xine-lib-1-rc2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/xine-lib-1_rc2/work/xine-lib-1-rc2'
make: *** [all] Error 2

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

is this related to this bug?

i cannot reproduce it here
Comment 3 Scott Taylor (RETIRED) gentoo-dev 2004-02-07 09:51:42 UTC
For a while this ebuild was filtering -fPIC (which allows it to compile) but
somehow filter-flags -fstack-protector creeped back into this ebuild, which
does not help anything [in the rc2-r1 ebuild].

source='mpegvideo_mmx.c' object='mpegvideo_mmx.lo' libtool=yes \
depfile='.deps/mpegvideo_mmx.Plo' tmpdepfile='.deps/mpegvideo_mmx.TPlo' \
depmode=gcc3 /bin/sh ../../../../depcomp \
/bin/sh ../../../../libtool-nofpic --mode=compile 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 `echo -Wall -DNDEBUG -D_REENTRANT -D_FILE_OFFSET_BITS=64 -DXINE_COMPILE  -Wpointer-arith -Wnested-externs -Wcast-align -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -march=athlon-xp -O2 | sed -e 's/-funroll-loops//g'` -c -o mpegvideo_mmx.lo `test -f 'mpegvideo_mmx.c' || echo './'`mpegvideo_mmx.c
In file included from mpegvideo_mmx.c:493:
mpegvideo_mmx_template.c: In function `dct_quantize_MMX':
mpegvideo_mmx_template.c:89: error: can't find a register in class `GENERAL_REGS' while reloading `asm'
mpegvideo_mmx_template.c:141: error: can't find a register in class `GENERAL_REGS' while reloading `asm'
make[5]: *** [mpegvideo_mmx.lo] Error 1



mpegvideo_mmx_template.c:89 is as follows:
        asm volatile(
            "movd %%eax, %%mm3                  \n\t" // last_non_zero_p1
            SPREADW(%%mm3)
            "pxor %%mm7, %%mm7                  \n\t" // 0
            "pxor %%mm4, %%mm4                  \n\t" // 0
            "movq (%2), %%mm5                   \n\t" // qmat[0]
            "pxor %%mm6, %%mm6                  \n\t"
            "psubw (%3), %%mm6                  \n\t" // -bias[0]
            "movl $-128, %%eax                  \n\t"
            ".balign 16                         \n\t"
            "1:                                 \n\t"
            "pxor %%mm1, %%mm1                  \n\t" // 0
            "movq (%1, %%eax), %%mm0            \n\t" // block[i]
            "pcmpgtw %%mm0, %%mm1               \n\t" // block[i] <= 0 ? 0xFF : 0x00
            "pxor %%mm1, %%mm0                  \n\t"
            "psubw %%mm1, %%mm0                 \n\t" // ABS(block[i])
            "psubusw %%mm6, %%mm0               \n\t" // ABS(block[i]) + bias[0]
            "pmulhw %%mm5, %%mm0                \n\t" // (ABS(block[i])*qmat[0] - bias[0]*qmat[0])>>16
            "por %%mm0, %%mm4                   \n\t"
            "pxor %%mm1, %%mm0                  \n\t"
            "psubw %%mm1, %%mm0                 \n\t" // out=((ABS(block[i])*qmat[0] - bias[0]*qmat[0])>>16)*sign(block[i])
            "movq %%mm0, (%5, %%eax)            \n\t"
            "pcmpeqw %%mm7, %%mm0               \n\t" // out==0 ? 0xFF : 0x00
            "movq (%4, %%eax), %%mm1            \n\t"
            "movq %%mm7, (%1, %%eax)            \n\t" // 0
            "pandn %%mm1, %%mm0                 \n\t"
            PMAXW(%%mm0, %%mm3)
            "addl $8, %%eax                     \n\t"
            " js 1b                             \n\t"
            "movq %%mm3, %%mm0                  \n\t"
            "psrlq $32, %%mm3                   \n\t"
            PMAXW(%%mm0, %%mm3)
            "movq %%mm3, %%mm0                  \n\t"
            "psrlq $16, %%mm3                   \n\t"
            PMAXW(%%mm0, %%mm3)
            "movd %%mm3, %%eax                  \n\t"
            "movzbl %%al, %%eax                 \n\t" // last_non_zero_p1
            : "+a" (last_non_zero_p1)
            : "r" (block+64), "r" (qmat), "r" (bias),
              "r" (inv_zigzag_direct16+64), "r" (temp_block+64)
        );
        // note the asm is split cuz gcc doesnt like that many operands ...
Comment 4 Brandon Hale (RETIRED) gentoo-dev 2004-03-11 06:31:32 UTC
Are you guys still having problems with this? Please let me know.
Comment 5 Scott Taylor (RETIRED) gentoo-dev 2004-03-11 07:34:35 UTC
filter-flags -fPIC gets it to compile and run.
i'm not enough of a PIC ninja yet to actually fix the code
Comment 6 solar (RETIRED) gentoo-dev 2004-03-11 18:09:36 UTC
this one comes up pretty often.
seeing as swtaylor is now a dev lets reassign the bug to him 
so he can fix it and tell us what the fix was :)
Comment 7 Martin Holzer (RETIRED) gentoo-dev 2004-03-28 03:10:36 UTC
don't use this flag in CFLAGS

just use it in USE flags