[MPlayer-dev-eng] Compile with gcc4 on x86
Genady Okrain
mafteah at gmail.com
Wed Apr 20 15:37:44 CEST 2005
I have problem to compile mplayer with gcc4 when mmx is enabled too:
make[1]: Entering directory
`/t/portage/mplayer-1.0_pre7/work/MPlayer-1.0pre7/libvo'
cc -c -I../libvo -I../../libvo -I/usr/X11R6/include -fno-PIC -O4
-march=athlon-4 -mtune=athlon-4 -pipe -ffast-math -fomit-frame-pointer
-D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include
-I/usr/X11R6/include -I. -I.. -I../osdep -I/usr/include/freetype2
-I/usr/X11R6/include -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2
-I/usr/lib/glib/include -I/usr/X11R6/include -DMPG12PLAY -o aclib.o
aclib.c
In file included from aclib.c:84:
aclib_template.c: In function 'fast_memcpy_MMX2':
aclib_template.c:252: error: invalid lvalue in assignment
aclib_template.c:253: error: invalid lvalue in assignment
aclib_template.c:341: error: invalid lvalue in assignment
aclib_template.c:342: error: invalid lvalue in assignment
make[1]: *** [aclib.o] Error 1
make[1]: Leaving directory
`/t/portage/mplayer-1.0_pre7/work/MPlayer-1.0pre7/libvo'
On 18 Apr 2005 00:51:28 -0500, Bret Hughes <bhughes at elevating.com> wrote:
> On Thu, 2005-04-14 at 09:01, Vladimir Kondratiev wrote:
> > Hi,
> > attached is patch to compile mplayer with gcc4.
> > number of problems fixed.
> > Most "real" ones are (1) "X" vs. "m" in inline asm in mmx.h and (2)
> > several cases when expression was specified for "m" (memory) for inline
> > asm. gcc4 generates incorrect asm in 1-st case and report "memory
> > location not directly addressable" in 2-nd.
> > Rest of fixes are trivial.
> >
> > I verified on all movies I have that it works.
> >
> > Patch applies to last CVS version I downloaded, MPlayer-20050413
> >
> > Regards, Vladimir
> >
> > ----
> >
>
> I am trying to compile cvs 20040417 on a fedora core 4 test2 box and got
> a lot further with this patch than without. I am not a c coder and do
> not know the proper way to fix following lvalue error:
>
> cc -c -I../libvo -I../../libvo -I/usr/X11R6/include -fno-PIC -O4
> -march=i586 -mtune=i586 -pipe -ffast-math -fomit-frame-pointer
> -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I. -I..
> -I../osdep -I/usr/include/freetype2 -I/usr/include/SDL -D_REENTRANT
> -I/usr/X11R6/include -DMPG12PLAY -o aclib.o aclib.c
> In file included from aclib.c:84:
> aclib_template.c: In function 'fast_memcpy_MMX2':
> aclib_template.c:252: error: invalid lvalue in assignment
> aclib_template.c:253: error: invalid lvalue in assignment
> aclib_template.c:341: error: invalid lvalue in assignment
> aclib_template.c:342: error: invalid lvalue in assignment
> make[1]: *** [aclib.o] Error 1
>
> I am assuming this is one of the lvalue/rvalue deals that gcc4 has
> disallowed :
>
> from aclib_template.c
> 251 :: "r" (from), "r" (to) : "memory");
> 252 ((const unsigned char *)from)+=64;
> 253 ((unsigned char *)to)+=64;
>
> lines 341 and 342 are the same deal.
>
> I do not understand enough about what is happening to fix it. It looks
> like the value of from is being treated as a pointer and incremented by
> 64 or something like that but is declared as type memory? If someone can
> give me a hint I will try to fix it.
>
> Bret
>
>
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
>
--
Genady Okrain AKA Mafteah
http://www.mafteah.co.il
More information about the MPlayer-dev-eng
mailing list