[MPlayer-users] OS/X Altivec build problem
Steven M. Schultz
sms at 2BSD.COM
Wed Oct 8 08:13:28 CEST 2003
On Tue, 7 Oct 2003, Steven M. Schultz wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> Hi -
>
> Ran into a bit of difficulty building MPlayer on OS/X 10.2.8
> tonight:
>
> gcc -Wall -O4 -maltivec -mabi=altivec -pipe -ffast-math -fomit-frame-pointer -no-cpp-precomp -DSYS_DARWIN -DCONFIG_DARWIN -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o ppc/dsputil_altivec.o ppc/dsputil_altivec.c
> ppc/dsputil_altivec.c: In function `pix_abs16x16_x2_altivec':
> ppc/dsputil_altivec.c:52: syntax error before "unsigned"
> ppc/dsputil_altivec.c:53: `vector' undeclared (first use in this function)
> ppc/dsputil_altivec.c:53: (Each undeclared identifier is reported only once
> ppc/dsputil_altivec.c:53: for each function it appears in.)
> ppc/dsputil_altivec.c:59: `sad' undeclared (first use in this function)
> ppc/dsputil_altivec.c:59: parse error before "unsigned"
> ...
The problem seems to be the check for Altivec capability in the
compiler.
The gcc 3.1 that is the default on OS/X (not every one has
registerd and installed the 3.3 update) accepts WITHOUT ERROR
the -maltivec and -mabi=altivec BUT they have NO effect! For
gcc 3.1 the switch to use is the older "-faltivec".
./configure then sets "#undef HAVE_ALTIVEC" and the compilation
fails.
I manually edited the config.mak and config.h to see if the
build would proceed. It does but exposed a problem in the
libavcodec/ppc directory - but that's a matter for posting to
the ffmpeg-devel list ;)
The PPC/Altivec check needs to pay attention to the version of
gcc - if it's 3.1 then -faltivec needs to be used it seems.
Steven Schultz
More information about the MPlayer-users
mailing list