[MPlayer-dev-eng] [PATCH] Fix MPlayer to compile on Solaris

Alex Viskovatoff viskovatoff at imap.cc
Sun Jul 12 22:05:08 CEST 2009


Hello all,

For some time now, trying to compile MPlayer produces the following error:

gcc-4.3.2 -DHAVE_AV_CONFIG_H -I.. -I.. -Wundef -Wdisabled-optimization 
-Wno-pointer-sign -Wdeclaration-after-statement -std=gnu99 -Wall 
-Wno-switch -Wpointer-arith -Wredundant-decls -O4 -march=native 
-mtune=native -pipe -ffast-math -fomit-frame-pointer -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Ilibdvdread4 -I. 
-I/usr/X11/include -I/usr/include/SDL  -D_REENTRANT 
-I/usr/include/freetype2 -I/usr/include     -c -o x86/mlpdsp.o x86/mlpdsp.c
{standard input}: Assembler messages:
{standard input}:70: Error: unbalanced parenthesis in operand 1.
{standard input}:75: Error: unbalanced parenthesis in operand 1.
{standard input}:80: Error: unbalanced parenthesis in operand 1.
{standard input}:85: Error: unbalanced parenthesis in operand 1.
{standard input}:102: Error: unbalanced parenthesis in operand 2.
gmake[1]: *** [x86/mlpdsp.o] Error 1
gmake[1]: Leaving directory 
`/export/home/av/Download/software/src/mplayer/libavcodec'
gmake: *** [libavcodec/libavcodec.a] Error 2

The offending lines are like this:

     mov   0x0c+4*(8 + (40 * (192000 / 48000)))(%ebp), %eax

The error is produced because for some kind of compatibility reason, 
unlike the Linux GAS, the Solaris GAS interprets slashes as starting a 
comment. To avoid this behavior, the option "--divide" must be passed to 
the assembler.

The patch adds to configure a test for "sunos", and adds "-Wa,--divide" 
to extra_cflags in that case.

- Alex
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: solaris-divide.diff
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20090712/e0bce448/attachment.txt>


More information about the MPlayer-dev-eng mailing list