HeWhoWatches
9th June 2010, 08:27 AM
Hi, I'm trying to build ffmpeg with VP8 support but I've run into a problem with the svn HEAD version of ffmpeg which now apparently no longer requires the patches. I'm using rpmbuild and basing my SPEC files on the ones used at rpmfusion. I've already build the latest version of x264 as an RPM (the versions in rpmfusion are too old at present and I don't really want to switch to atrpms). Everything seems fine until the point where I run:
rpmbuild -ba ffmpeg.spec
At which point the following error appears:
ERROR: libvpx not found
I'm using libvpx / libvpx-devel packages from main fedora 13 repos (at version 0.9.0-5). I've also tried the newer koji build here to no avail: http://koji.fedoraproject.org/koji/buildinfo?buildID=176419
What I can't figure out is, why does the build process know where all of the other devel files are, but not libvpx?
The include files themselves appear to be stored under: /usr/include/vpx
I've previously managed to build the older svn version 23197 which required the webm patches based on a process shown here: http://lardbucket.org/blog/archives/2010/05/19/vp8-webm-and-ffmpeg/
However, since this svn build, the option to build with libvpx has changed from --enable-libvpx-vp8 to simply --enable-libvpx. Pretty sure this isn't the problem because ffmpeg won't recognise the older syntax now, so it must just be a problem finding the libvpxdevel files.
Trying to build on Fedora 13, x86_64 - I'm completely stumped - anyone have any good ideas?
Full output below:
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.mTelW3
+ umask 022
+ cd /home/rob/rpmbuild/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /home/rob/rpmbuild/BUILD
+ rm -rf ffmpeg-20100609
+ /usr/bin/bzip2 -dc /home/rob/rpmbuild/SOURCES/ffmpeg-20100609.tar.bz2
+ /bin/tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd ffmpeg-20100609
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.e9UcVc
+ umask 022
+ cd /home/rob/rpmbuild/BUILD
+ cd ffmpeg-20100609
+ LANG=C
+ export LANG
+ unset DISPLAY
+ mkdir generic
+ pushd generic
~/rpmbuild/BUILD/ffmpeg-20100609/generic ~/rpmbuild/BUILD/ffmpeg-20100609
+ ../configure --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 '--extra-cflags=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --extra-version=rpmfusion --enable-bzlib --enable-libdc1394 --enable-libdirac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avfilter-lavf --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect
ERROR: libvpx not found
If you think configure made a mistake, make sure you are using the latest
version from SVN. If the latest version fails, report the problem to the
ffmpeg-user@mplayerhq.hu mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.err" produced by configure as this will help
solving the problem.
error: Bad exit status from /var/tmp/rpm-tmp.vf2Q4h (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.vf2Q4h (%build)
Edit: Sorry, forgot to add that my initial successful build with the svn 23197 version (and patches), I had to modify the configure command in the SPEC file as below:
env CPPFLAGS="-I/usr/include/vpx" ../configure \\\
Unfortunately this does not work any longer. I'm sure there must be a more elegant way of achieving this but...
If it helps, the original ffmpeg.spec file can be extracted from the archive here:
http://download1.rpmfusion.org/free/fedora/releases/13/Everything/source/SRPMS/ffmpeg-0.6-0.3.20100429svn.fc13.src.rpm
Very few changes required to the spec file, just update the %svn version to the current date and run the ffmpeg-snapshot.sh script to download the current svn HEAD version.
Edit2:
Looking at the configure file for ffmpeg (revision 23544), I'm guessing that this is where it looks for the vpx files:
enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg
enabled libvorbis && require libvorbis vorbis/vorbisenc.h vorbis_info_init -lvorbisenc -lvorbis -logg
enabled libvpx && require2 libvpx "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_dec_init_ver" -lvpx &&
require2 libvpx "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_enc_init_ver" -lvpx
Looking through the file closer, the require2 function sets off a whole bunch of calls to other functions:
require2(){
name="$1"
headers="$2"
func="$3"
shift 3
check_lib2 "$headers" $func "$@" || die "ERROR: $name not found"
}
check_lib2(){
log check_lib2 "$@"
headers="$1"
func="$2"
shift 2
check_func_headers "$headers" $func "$@" && add_extralibs "$@"
}
check_func_headers(){
log check_func_headers "$@"
headers=$1
func=$2
shift 2
disable $func
incs=""
for hdr in $headers; do
incs="$incs
#include <$hdr>"
done
check_ld "$@" <<EOF && enable $func && enable_safe $headers
$incs
int main(int argc, char **argv){
return (long) $func;
}
EOF
}
check_ld(){
log check_ld "$@"
flags=''
libs=''
for f; do
test "${f}" = "${f#-l}" && flags="$flags $f" || libs="$libs $f"
done
check_cc $($filter_cflags $flags) || return
check_cmd $ld $LDFLAGS $flags -o $TMPE $TMPO $extralibs $libs
}
check_cc(){
log check_cc "$@"
cat > $TMPC
log_file $TMPC
check_cmd $cc $CPPFLAGS $CFLAGS "$@" -c -o $TMPO $TMPC
}
check_cmd(){
log "$@"
"$@" >> $logfile 2>&1
}
I'm wondering if somehow the libvpx files fail the one of the tests above, but to be honest it goes a bit beyond my coding knowledge!
It must be something simple, but I'm drawing a blank...
Any help much appreciated!
Thanks,
Rob
rpmbuild -ba ffmpeg.spec
At which point the following error appears:
ERROR: libvpx not found
I'm using libvpx / libvpx-devel packages from main fedora 13 repos (at version 0.9.0-5). I've also tried the newer koji build here to no avail: http://koji.fedoraproject.org/koji/buildinfo?buildID=176419
What I can't figure out is, why does the build process know where all of the other devel files are, but not libvpx?
The include files themselves appear to be stored under: /usr/include/vpx
I've previously managed to build the older svn version 23197 which required the webm patches based on a process shown here: http://lardbucket.org/blog/archives/2010/05/19/vp8-webm-and-ffmpeg/
However, since this svn build, the option to build with libvpx has changed from --enable-libvpx-vp8 to simply --enable-libvpx. Pretty sure this isn't the problem because ffmpeg won't recognise the older syntax now, so it must just be a problem finding the libvpxdevel files.
Trying to build on Fedora 13, x86_64 - I'm completely stumped - anyone have any good ideas?
Full output below:
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.mTelW3
+ umask 022
+ cd /home/rob/rpmbuild/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /home/rob/rpmbuild/BUILD
+ rm -rf ffmpeg-20100609
+ /usr/bin/bzip2 -dc /home/rob/rpmbuild/SOURCES/ffmpeg-20100609.tar.bz2
+ /bin/tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd ffmpeg-20100609
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.e9UcVc
+ umask 022
+ cd /home/rob/rpmbuild/BUILD
+ cd ffmpeg-20100609
+ LANG=C
+ export LANG
+ unset DISPLAY
+ mkdir generic
+ pushd generic
~/rpmbuild/BUILD/ffmpeg-20100609/generic ~/rpmbuild/BUILD/ffmpeg-20100609
+ ../configure --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 '--extra-cflags=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --extra-version=rpmfusion --enable-bzlib --enable-libdc1394 --enable-libdirac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avfilter-lavf --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect
ERROR: libvpx not found
If you think configure made a mistake, make sure you are using the latest
version from SVN. If the latest version fails, report the problem to the
ffmpeg-user@mplayerhq.hu mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.err" produced by configure as this will help
solving the problem.
error: Bad exit status from /var/tmp/rpm-tmp.vf2Q4h (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.vf2Q4h (%build)
Edit: Sorry, forgot to add that my initial successful build with the svn 23197 version (and patches), I had to modify the configure command in the SPEC file as below:
env CPPFLAGS="-I/usr/include/vpx" ../configure \\\
Unfortunately this does not work any longer. I'm sure there must be a more elegant way of achieving this but...
If it helps, the original ffmpeg.spec file can be extracted from the archive here:
http://download1.rpmfusion.org/free/fedora/releases/13/Everything/source/SRPMS/ffmpeg-0.6-0.3.20100429svn.fc13.src.rpm
Very few changes required to the spec file, just update the %svn version to the current date and run the ffmpeg-snapshot.sh script to download the current svn HEAD version.
Edit2:
Looking at the configure file for ffmpeg (revision 23544), I'm guessing that this is where it looks for the vpx files:
enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg
enabled libvorbis && require libvorbis vorbis/vorbisenc.h vorbis_info_init -lvorbisenc -lvorbis -logg
enabled libvpx && require2 libvpx "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_dec_init_ver" -lvpx &&
require2 libvpx "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_enc_init_ver" -lvpx
Looking through the file closer, the require2 function sets off a whole bunch of calls to other functions:
require2(){
name="$1"
headers="$2"
func="$3"
shift 3
check_lib2 "$headers" $func "$@" || die "ERROR: $name not found"
}
check_lib2(){
log check_lib2 "$@"
headers="$1"
func="$2"
shift 2
check_func_headers "$headers" $func "$@" && add_extralibs "$@"
}
check_func_headers(){
log check_func_headers "$@"
headers=$1
func=$2
shift 2
disable $func
incs=""
for hdr in $headers; do
incs="$incs
#include <$hdr>"
done
check_ld "$@" <<EOF && enable $func && enable_safe $headers
$incs
int main(int argc, char **argv){
return (long) $func;
}
EOF
}
check_ld(){
log check_ld "$@"
flags=''
libs=''
for f; do
test "${f}" = "${f#-l}" && flags="$flags $f" || libs="$libs $f"
done
check_cc $($filter_cflags $flags) || return
check_cmd $ld $LDFLAGS $flags -o $TMPE $TMPO $extralibs $libs
}
check_cc(){
log check_cc "$@"
cat > $TMPC
log_file $TMPC
check_cmd $cc $CPPFLAGS $CFLAGS "$@" -c -o $TMPO $TMPC
}
check_cmd(){
log "$@"
"$@" >> $logfile 2>&1
}
I'm wondering if somehow the libvpx files fail the one of the tests above, but to be honest it goes a bit beyond my coding knowledge!
It must be something simple, but I'm drawing a blank...
Any help much appreciated!
Thanks,
Rob