Bug 3325 - ffmpeg fails to build
Summary: ffmpeg fails to build
Status: RESOLVED FIXED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: PC Linux
: P5 minor
Target Milestone: ---
Assignee: Gustavo Zacarias
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-24 11:55 UTC by Bartłomiej Palmowski
Modified: 2011-02-28 15:09 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments
Fix ffmpeg build on low end x86 (1.18 KB, patch)
2011-02-28 14:21 UTC, Gustavo Zacarias
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bartłomiej Palmowski 2011-02-24 11:55:33 UTC
/mnt/usb/repos/buildroot/output/host/usr/bin/i586-unknown-linux-uclibc-gcc -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I. -I"/mnt/usb/repos/buildroot/output/build/ffmpeg-0.5.3" -pipe -Os  -mtune=i586 -march=i586 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/mnt/usb/repos/buildroot/output/host/usr/i586-unknown-linux-uclibc/sysroot/usr/include -I/mnt/usb/repos/buildroot/output/host/usr/i586-unknown-linux-uclibc/sysroot/include -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -fPIC --sysroot=/mnt/usb/repos/buildroot/output/host/usr/i586-unknown-linux-uclibc/sysroot -std=c99 -fomit-frame-pointer -pthread -g -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef -O3 -fno-math-errno -fno-signed-zeros       -c -o libavcodec/x86/dsputil_mmx.o libavcodec/x86/dsputil_mmx.c
In file included from libavcodec/x86/dsputil_mmx.c:31:0:
libavcodec/x86/mmx.h:24:2: warning: #warning Everything in this header is deprecated, use plain __asm__()! New code using this header will be rejected.
In file included from libavcodec/x86/dsputil_mmx.c:1772:0:
libavcodec/x86/h264dsp_mmx.c: In function 'put_h264_qpel4_h_lowpass_3dnow':
libavcodec/x86/h264dsp_mmx.c:2058:1: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
libavcodec/x86/h264dsp_mmx.c:2058:1: error: 'asm' operand has impossible constraints
make[1]: *** [libavcodec/x86/dsputil_mmx.o] Error 1
make[1]: Leaving directory `/mnt/usb/repos/buildroot/output/build/ffmpeg-0.5.3'
make: *** [/mnt/usb/repos/buildroot/output/build/ffmpeg-0.5.3/.stamp_built] Error 2

ffmpeg 0.5.2 also breaks in this place,

host: i686
target: i586
toolchain: buildroot
Comment 1 Sérgio 2011-02-26 09:51:37 UTC
(In reply to comment #0)
> In file included from libavcodec/x86/dsputil_mmx.c:31:0:
> libavcodec/x86/mmx.h:24:2: warning: #warning Everything in this header is
> deprecated, use plain __asm__()! New code using this header will be rejected.
> In file included from libavcodec/x86/dsputil_mmx.c:1772:0:
> libavcodec/x86/h264dsp_mmx.c: In function 'put_h264_qpel4_h_lowpass_3dnow':
> libavcodec/x86/h264dsp_mmx.c:2058:1: error: can't find a register in class
> 'GENERAL_REGS' while reloading 'asm'
> libavcodec/x86/h264dsp_mmx.c:2058:1: error: 'asm' operand has impossible
> constraints
> make[1]: *** [libavcodec/x86/dsputil_mmx.o] Error 1
> make[1]: Leaving directory `/mnt/usb/repos/buildroot/output/build/ffmpeg-0.5.3'
> make: *** [/mnt/usb/repos/buildroot/output/build/ffmpeg-0.5.3/.stamp_built]
> Error 2


this have similarities to https://bugs.busybox.net/show_bug.cgi?id=2839
So "try using gcc 4.3.x instead of the (experimental) 4.5.x, this will probably fix
most of your constraint issues."
Comment 2 Bartłomiej Palmowski 2011-02-28 12:44:09 UTC
I did as you suggested but it still doesn't work

libavcodec/x86/h264dsp_mmx.c: In function 'h264_h_loop_filter_luma_mmx2':
libavcodec/x86/dsputil_mmx.c:681: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
libavcodec/x86/dsputil_mmx.c:681: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
libavcodec/x86/dsputil_mmx.c:681: error: 'asm' operand has impossible constraints
Comment 3 Gustavo Zacarias 2011-02-28 14:21:01 UTC
Created attachment 3031 [details]
Fix ffmpeg build on low end x86

Try the attached patch.
Comment 4 Peter Korsgaard 2011-02-28 15:09:35 UTC
Committed Gustavo's fix, thanks