Thanks, Jon. I'm cc'ing ffmpeg's maintainer.
On 14/09/2009, at 12:21, Jon Connell wrote:
> ffmpeg fails to build on x86_64 (OS 10.6). Here's an example of a
> compilation failure (gas barfing on the inline assembler):
>
> gcc -I/sw64/include
> -I"/sw64/src/fink.build/ffmpeg-0.4.20071217-6/ffmpeg-0.4.20071217"/
> libswscale
> -I"/sw64/src/fink.build/ffmpeg-0.4.20071217-6/ffmpeg-0.4.20071217"/
> libavcodec
> -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
> -D_ISOC9X_SOURCE
> -I"/sw64/src/fink.build/ffmpeg-0.4.20071217-6/ffmpeg-0.4.20071217"
> -I"/sw64/src/fink.build/ffmpeg-0.4.20071217-6/ffmpeg-0.4.20071217"
> -I"/sw64/src/fink.build/ffmpeg-0.4.20071217-6/ffmpeg-0.4.20071217"/
> libavutil
> -I/sw64/include -no-cpp-precomp -pipe -force_cpusubtype_ALL
> -Wno-sign-compare -fomit-frame-pointer -g -Wdeclaration-after-
> statement
> -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith
> -Wredundant-decls -Wno-pointer-sign -O3 -c -o h264.o h264.c
> In file included from h264.h:32,
> from h264.c:31:
> cabac.h: In function ‘decode_significance_x86’:
> cabac.h:693: warning: cast from pointer to integer of different size
> cabac.h:694: warning: cast from pointer to integer of different size
> cabac.h: In function ‘decode_significance_8x8_x86’:
> cabac.h:742: warning: cast from pointer to integer of different size
> h264.c: In function ‘hl_decode_mb_internal’:
> h264.c:2413: warning: suggest parentheses around arithmetic in
> operand of ^
> h264.c:2419: warning: suggest parentheses around arithmetic in
> operand of ^
> {standard input}:9509:suffix or operands invalid for `add'
> {standard input}:9521:suffix or operands invalid for `add'
>
>
> Some googling suggests that this is a problem associated with gcc 4.2,
> and configuring with "--cc=gcc-4.0" does get this bit of ffmpeg to
> build.
>
> However, the configure architecture is still x86_32, however (gcc
> -dumpmachine returns i686), so you need some more configure options:
>
> --cc=gcc-4.0 --arch=x86_64 \
> --extra-cflags="-I/sw64/include -m64" \
> --extra-ldflags=-m64
>
> and you need to hack the configure script to always select x86_64 when
> that's what you tell it (not portable outside of Fink, but enough to
> hack the build):
>
> Index: ffmpeg.info
> ===================================================================
> RCS file:
> /cvsroot/fink/dists/10.4/unstable/main/finkinfo/graphics/ffmpeg.info,v
> retrieving revision 1.12
> diff -c -r1.12 ffmpeg.info
> *** ffmpeg.info 27 Jan 2009 07:41:16 -0000 1.12
> --- ffmpeg.info 14 Sep 2009 15:03:24 -0000
> ***************
> *** 19,24 ****
> --- 19,26 ----
> perl -pi -e
> 's;-install_name,\$\(SHLIBDIR\)/\$\(SLIBNAME\);-install_name,\$\
> (SHLIBDIR\)/\$\(SLIBNAME_WITH_MAJOR\);g'
> configure
> ### Fix for 10.5 ASM problem with ld: absolute addressing (perhaps
> -mdynamic-no-pic) used in _rgb24tobgr24_MMX from rgb2rgb.o not allowed
> in slidable image
> perl -pi -e 's,defined\(ARCH_X86\) \&\&
> defined\(CONFIG_GPL\),defined\(ARCH_X86\) \&\& defined\(CONFIG_GPL\)
> \&\& \!defined\(__APPLE__\),g' libswscale/rgb2rgb.c
> + ### Fix for selecting x86_32 in spite of --arch=x86_64
> + perl -pi -e '$c++ if m,arch="x86_32",;
> s,arch="x86_32",arch="x86_64", if $c==2' configure
> <<
> ###
> DocFiles: COPYING.GPL COPYING.LGPL CREDITS Changelog INSTALL README
> doc/TODO doc/*.txt
> ***************
> *** 26,32 ****
> # gets included "too early" in gcc calls if also set during "make"
> #SetCFLAGS: -I%p/include
> ###
> ! ConfigureParams: --mandir=%p/share/man --enable-shared --enable-gpl
> --enable-pp --enable-swscaler --enable-pthreads --enable-x11grab
> --enable-liba52 --enable-libamr-nb --enable-libfaac --enable-libfaad
> --enable-libgsm --enable-libmp3lame --enable-libtheora
> --enable-libvorbis --enable-libx264 --enable-libxvid --disable-mmx
> --disable-iwmmxt (%m = powerpc) --enable-powerpc-perf (%m = i386)
> --disable-altivec
> ###
> CompileScript: <<
> CFLAGS=-I%p/include ./configure %c
> --- 28,34 ----
> # gets included "too early" in gcc calls if also set during "make"
> #SetCFLAGS: -I%p/include
> ###
> ! ConfigureParams: --mandir=%p/share/man --enable-shared --enable-gpl
> --enable-pp --enable-swscaler --enable-pthreads --enable-x11grab
> --enable-liba52 --enable-libamr-nb --enable-libfaac --enable-libfaad
> --enable-libgsm --enable-libmp3lame --enable-libtheora
> --enable-libvorbis --enable-libx264 --enable-libxvid --disable-mmx
> --disable-iwmmxt (%m = powerpc) --enable-powerpc-perf (%m = i386)
> --disable-altivec --cc=gcc-4.0 --arch=x86_64
> --extra-cflags="-I/sw64/include -m64" --extra-ldflags=-m64
> ###
> CompileScript: <<
> CFLAGS=-I%p/include ./configure %c
>
>
> So it builds, but since I no diddly about ffmpeg, I can't be certain
> it's actually usable. All the movies I have are QuickTime and they all
> generate "Pulse coding not allowed in short blocks" errors on
> convert to
> (say) flv.
>
> Jon
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Fink-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-users