[FFmpeg-devel] Compiling with Sun cc

Carl Eugen Hoyos cehoyos
Thu Oct 2 03:38:22 CEST 2008


Hi!

I tested compilation of ffmpeg with Sun's cc 5.10 Linux_i386 2008/07/10
asm was no problem, but mmx cannot be compiled, so I used --disable-mmx.
Dependencies do not work, not even with -xM1
(How are dependencies for one run of make disabled?)
I removed -fasm -fomit-frame-pointer -fno-math-errno -fno-signed-zeros
(They all produce warnings, no errors)
I removed -std=c99 (the compiler interprets this as -s -d=c99 or similar)
Compilation fails for libswscale, mpc.c (works with -O2), msmpeg4.c and
takes ages and >500MB for motion_estimation (but succeeds)
bswap_64 is not successfully defined on my system, so I patched bswap.h to
define __GCC__ to 2 before including byteswap.h (which needs __GCC__>=2 to
define bswap_64)
I removed inclusion of avfilter.h from cmdutils.c because it leads to an
undefined symbol (is that valid behaviour for a C compiler?)
Finally, the following inlined patch for mem.h was necessary:
(The only thing that should be necessary)
Index: libavutil/mem.h
===================================================================
--- libavutil/mem.h     (Revision 15506)
+++ libavutil/mem.h     (Arbeitskopie)
@@ -26,7 +26,7 @@
 #ifndef AVUTIL_MEM_H
 #define AVUTIL_MEM_H

-#ifdef __ICC
+#if defined(__ICC) || defined(__SUNPRO_C)
     #define DECLARE_ALIGNED(n,t,v)      t v __attribute__ ((aligned (n)))
     #define DECLARE_ASM_CONST(n,t,v)...
 #elif defined(__GNUC__)

Working configure line:
./configure --cc=/sunstudioceres/prod/bin/cc --disable-vhook --disable-mmx
--disable-devices --disable-encoder=wmv2 --disable-encoder=msmpeg4v1
--disable-encoder=msmpeg4v2 --disable-encoder=msmpeg4v3
--disable-decoder=wmv2 --disable-decoder=msmpeg4v1
--disable-decoder=msmpeg4v2 --disable-decoder=msmpeg4v3
--disable-decoder=mpc7 --disable-decoder=mpc8

A few errors for the curious:
msmpeg4.o:
assertion failed in function global_register_allocation() @ gra.c:1823
assert(iteration < 200)

cc: ube failed for libavcodec/msmpeg4.c

mpc.o (-O3):
iropt: ../src/var_df.c:2959: get_ud_singleton_triple: Assertion `use != 0'
failed.
cc: Fatal error in /sunstudioceres/prod/bin/iropt : Signal number = 6
cc: iropt failed for libavcodec/mpc.c

rgb2rgb.o:
assertion failed in function global_register_allocation() @ gra.c:1823
assert(iteration < 200)

cc: ube failed for libswscale/rgb2rgb.c

And my favorite warnings (all over the compilation):
"libavcodec/bitstream.h", line 60: warning: impossible constraint for "%1"
asm operand
"libavcodec/bitstream.h", line 67: warning: impossible constraint for "%1"
asm operand
"libavcodec/mpegvideo_enc.c", line 3288: warning: can not set non-default
alignment for automatic variable

Carl Eugen





More information about the ffmpeg-devel mailing list