[FFmpeg-user] Unable to compile with libx264
Reindl Harald
h.reindl at thelounge.net
Thu Jan 4 18:02:40 EET 2018
Am 04.01.2018 um 10:15 schrieb Moritz Barsnick:
> On Wed, Jan 03, 2018 at 18:41:08 -0800, Chao-Chin Yang wrote:
>
>> I am trying to compile ffmpeg from source with libx264. Because I
>> don’t have any super-user privileges, I am building it under my home.
>
> Even if you have superuser priviliges, you should build (and execute)
> as a regular user. Only for installation should you ever use those
> priviliges. (And you don't even need to "install", normally.)
>
>> The problem was that the variable x264_bit_depth is undefined. I tried to look for this variable in any possible headers, especially x264_config.h and x264.h generated by the x264 installation, but nothing exists.
>> Am I missing something in all this process?
>
> Yes. You should get the latest git master source of ffmpeg, not a
> release or something too old. As far as I can tell, this issue was
> fixed in the last few days/weeks.
>
> If you can't check out the source from git, grab the snapshot
> ("Download Snapshot" link) from https://ffmpeg.org/download.html
latest snapshot still don't compile with latest x264 and that all sounds
exactly like what i reported at 2017-12-25 with no response
older ffmpeg had errors similar to the OP with x264 0.155.2893 while
recent snaphots even no longer finds
x264-latest-0.155.2893-1.fc26.20171225.rh.x86_64 and so stop long before
the error
since that static x264 is built with "profile guided optimization" it
works for sure but not with ffmpeg
[builduser at testserver:/rpmbuild/SPECS]$ rpmbuild -bb ffmpeg-latest.spec
Ausführung(%prep): /bin/sh -e /var/tmp/rpm-tmp.NSzXpr
+ umask 022
+ cd /home/builduser/rpmbuild/BUILD
+ cd /home/builduser/rpmbuild/BUILD
+ rm -rf ffmpeg-20180104
+ /usr/bin/xz -dc /home/builduser/rpmbuild/SOURCES/ffmpeg-20180104.tar.xz
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd ffmpeg-20180104
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Ausführung(%build): /bin/sh -e /var/tmp/rpm-tmp.mgeCpv
+ umask 022
+ cd /home/builduser/rpmbuild/BUILD
+ cd ffmpeg-20180104
+ mkdir generic
+ pushd generic
~/rpmbuild/BUILD/ffmpeg-20180104/generic ~/rpmbuild/BUILD/ffmpeg-20180104
+ ../configure --prefix=/usr/local --bindir=/usr/local/bin
--mandir=/usr/local/man '--extra-cflags=-I/usr/local/x264 -m64 -O2 -g0
-mfpmath=sse -mavx -msse2avx -march=sandybridge -mtune=sandybridge
-fopenmp -pipe -fno-strict-aliasing -fomit-frame-pointer -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=6 -D_FORTIFY_SOURCE=2
-Wstack-protector -Wformat -Werror=format-security -Ofast -ffast-math
-funsafe-math-optimizations -Wno-pointer-sign -minline-all-stringops
-fno-strict-aliasing -fuse-ld=gold -fuse-linker-plugin
-Wa,--noexecstack' '--extra-ldflags=-I/usr/local/x264 -L/usr/local/x264
-ldl -Wl,--as-needed -Wl,-z,now -Wl,-z,relro -Wl,-z,noexecstack -m64 -O2
-g0 -mfpmath=sse -mavx -msse2avx -march=sandybridge -mtune=sandybridge
-fopenmp -pipe -fno-strict-aliasing -fomit-frame-pointer -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=6 -D_FORTIFY_SOURCE=2
-Wstack-protector -Wformat -Werror=format-security -Ofast -ffast-math
-funsafe-math-optimizations -Wno-pointer-sign -minline-all-stringops
-fno-strict-aliasing -pie -fPIE -fuse-ld=gold -fuse-linker-plugin
-Wa,--noexecstack' --ar=gcc-ar --ranlib=true --enable-nonfree
--enable-gpl --enable-pic --enable-version3 --enable-libmp3lame
--enable-libtheora --enable-libx264 --enable-libx265 --enable-libvpx
--enable-openssl --enable-static --enable-runtime-cpudetect
--disable-amd3dnow --disable-amd3dnowext --disable-avdevice
--disable-debug --disable-devices --disable-ffplay --disable-ffprobe
--disable-ffserver --disable-htmlpages --disable-hwaccels
--disable-iconv --disable-libdc1394 --disable-libfreetype
--disable-libgsm --disable-libopencore-amrnb --disable-libopencore-amrwb
--disable-libopencv --disable-libopenjpeg --disable-libopus
--disable-librtmp --disable-libspeex --disable-libvorbis
--disable-libxvid --disable-podpages --disable-postproc
--disable-protocol=gopher --disable-shared --disable-txtpages
ERROR: libx264 not found
[builduser at testserver:/rpmbuild/BUILD/ffmpeg-20180104/ffbuild]$ ls
insgesamt 28K
-rw-r--r-- 1 builduser builduser 829 2017-06-22 18:20 arch.mak
-rw-r--r-- 1 builduser builduser 5,0K 2017-11-12 18:20 common.mak
-rw-r--r-- 1 builduser builduser 3,7K 2017-11-12 18:20 library.mak
-rwxr-xr-x 1 builduser builduser 478 2017-05-18 18:20 libversion.sh
-rwxr-xr-x 1 builduser builduser 1,5K 2017-05-05 18:20 pkgconfig_generate.sh
-rwxr-xr-x 1 builduser builduser 1,9K 2017-05-03 18:20 version.sh
[builduser at testserver:~]$ rpm -q x264-latest
x264-latest-0.155.2893-1.fc26.20171225.rh.x86_64
[builduser at testserver:~]$ rpm -q --filesbypkg
x264-latest-0.155.2893-1.fc26.20171225.rh.x86_64
x264-latest /usr/local/x264/libx264.a
x264-latest /usr/local/x264/x264.h
x264-latest /usr/local/x264/x264_config.h
-------- Weitergeleitete Nachricht --------
Betreff: [FFmpeg-user] x264 0.155.2893 (very recent changes)
Datum: Mon, 25 Dec 2017 22:24:24 +0100
Von: Reindl Harald <h.reindl at thelounge.net>
Antwort an: FFmpeg user questions <ffmpeg-user at ffmpeg.org>
Organisation: the lounge interactive design
An: Mailing-List ffmpeg <ffmpeg-user at ffmpeg.org>
FYI:
ffmpeg 3.4.1
src/libavcodec/libx264.c: In function 'X264_init_static':
src/libavcodec/libx264.c:892:9: error: 'x264_bit_depth' undeclared
(first use in this function); did you mean 'x264_picture_t'?
if (x264_bit_depth == 8)
^~~~~~~~~~~~~~
x264_picture_t
make: ***
[/home/builduser/rpmbuild/BUILD/ffmpeg-20171212/ffbuild/common.mak:60:
libavcodec/libx264.o] Error 1
make: *** Waiting for unfinis
_____________________________
fresh snapshot from git
[builduser at buildserver:/rpmbuild/SPECS]$ rpmbuild -bb ffmpeg-latest.spec
Ausführung(%prep): /bin/sh -e /var/tmp/rpm-tmp.IXDZ1x
+ umask 022
+ cd /home/builduser/rpmbuild/BUILD
+ cd /home/builduser/rpmbuild/BUILD
+ rm -rf ffmpeg-20171225
+ /usr/bin/xz -dc /home/builduser/rpmbuild/SOURCES/ffmpeg-20171225.tar.xz
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd ffmpeg-20171225
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Ausführung(%build): /bin/sh -e /var/tmp/rpm-tmp.3J4UGz
+ umask 022
+ cd /home/builduser/rpmbuild/BUILD
+ cd ffmpeg-20171225
+ mkdir generic
+ pushd generic
~/rpmbuild/BUILD/ffmpeg-20171225/generic ~/rpmbuild/BUILD/ffmpeg-20171225
+ ../configure --prefix=/usr/local --bindir=/usr/local/bin
--mandir=/usr/local/man '--extra-cflags=-I/usr/local/x264 -m64 -O2 -g0
-mfpmath=sse -mavx -msse2avx -march=sandybridge -mtune=sandybridge
-fopenmp -pipe -fno-strict-aliasing -fomit-frame-pointer -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=6 -D_FORTIFY_SOURCE=2
-Wstack-protector -Wformat -Werror=format-security -Ofast -ffast-math
-funsafe-math-optimizations -Wno-pointer-sign -minline-all-stringops
-fno-strict-aliasing -fuse-ld=gold -fuse-linker-plugin
-Wa,--noexecstack' '--extra-ldflags=-I/usr/local/x264 -L/usr/local/x264
-ldl -Wl,--as-needed -Wl,-z,now -Wl,-z,relro -Wl,-z,noexecstack -m64 -O2
-g0 -mfpmath=sse -mavx -msse2avx -march=sandybridge -mtune=sandybridge
-fopenmp -pipe -fno-strict-aliasing -fomit-frame-pointer -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=6 -D_FORTIFY_SOURCE=2
-Wstack-protector -Wformat -Werror=format-security -Ofast -ffast-math
-funsafe-math-optimizations -Wno-pointer-sign -minline-all-stringops
-fno-strict-aliasing -pie -fPIE -fuse-ld=gold -fuse-linker-plugin
-Wa,--noexecstack' --ar=gcc-ar --ranlib=true --enable-nonfree
--enable-gpl --enable-pic --enable-version3 --enable-libmp3lame
--enable-libtheora --enable-libx264 --enable-libx265 --enable-libvpx
--enable-openssl --enable-static --enable-runtime-cpudetect
--disable-amd3dnow --disable-amd3dnowext --disable-avdevice
--disable-debug --disable-devices --disable-ffplay --disable-ffprobe
--disable-ffserver --disable-htmlpages --disable-hwaccels
--disable-iconv --disable-libdc1394 --disable-libfreetype
--disable-libgsm --disable-libopencore-amrnb --disable-libopencore-amrwb
--disable-libopencv --disable-libopenjpeg --disable-libopus
--disable-librtmp --disable-libspeex --disable-libvorbis
--disable-libxvid --disable-podpages --disable-postproc
--disable-protocol=gopher --disable-shared --disable-txtpages
ERROR: libx264 not found
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
ffmpeg-user at ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "ffbuild/config.log" produced by configure as this
will help
solve the problem.
Fehler: Fehler-Status beim Beenden von /var/tmp/rpm-tmp.3J4UGz (%build)
[builduser at buildserver:/rpmbuild/BUILD/ffmpeg-20171225/ffbuild]$ ls
insgesamt 28K
-rw-r--r-- 1 builduser builduser 829 2017-12-25 22:17 arch.mak
-rw-r--r-- 1 builduser builduser 5,0K 2017-12-25 22:17 common.mak
-rw-r--r-- 1 builduser builduser 3,7K 2017-12-25 22:17 library.mak
-rwxr-xr-x 1 builduser builduser 478 2017-12-25 22:17 libversion.sh
-rwxr-xr-x 1 builduser builduser 1,5K 2017-12-25 22:17 pkgconfig_generate.sh
-rwxr-xr-x 1 builduser builduser 1,9K 2017-12-25 22:17 version.sh
____________________________
[builduser at testserver:/rpmbuild/SOURCES]$ ./ffmpeg-snapshot-latest.sh
/tmp/tmp.rvMGzIfP04
Klone nach 'ffmpeg' ...
remote: Counting objects: 536649, done.
remote: Compressing objects: 100% (113806/113806), done.
remote: Total 536649 (delta 430087), reused 526982 (delta 421777)
Empfange Objekte: 100% (536649/536649), 93.44 MiB | 302.00 KiB/s, Fertig.
Löse Unterschiede auf: 100% (430087/430087), Fertig.
/tmp/tmp.rvMGzIfP04/ffmpeg-20171225/libswscale
/tmp/tmp.rvMGzIfP04/ffmpeg-20171225
/tmp/tmp.rvMGzIfP04/ffmpeg-20171225
[builduser at testserver:/rpmbuild/SOURCES]$ ls | grep ffmpeg | grep tar
-rw-r----- 1 builduser builduser 8,2M 2017-10-16 12:00
ffmpeg-20171016.tar.xz
-rw-r----- 1 builduser builduser 8,3M 2017-12-25 22:17
ffmpeg-20171225.tar.xz
-rw-r----- 1 builduser builduser 7,9M 2017-10-26 21:25 ffmpeg-3.3.5.tar.xz
[builduser at buildserver:/rpmbuild/BUILD/ffmpeg-20171225/ffbuild]$ cat
/rpmbuild/SOURCES/ffmpeg-snapshot-latest.sh
#!/usr/bin/bash
set -e
tmp=$(mktemp -d)
trap cleanup EXIT
cleanup() {
set +e
[ -z "$tmp" -o ! -d "$tmp" ] || rm -rf "$tmp"
}
unset CDPATH
pwd=$(pwd)
date=$(date +%Y%m%d)
echo "$tmp"
cd "$tmp"
git clone git://git.videolan.org/ffmpeg.git
mv ffmpeg ffmpeg-$date
cd ffmpeg-$date
pushd libswscale
popd
find . -type d -name .git -print0 | xargs -0r rm -rf
cd ..
tar Jcf "$pwd"/ffmpeg-$date.tar.xz ffmpeg-$date
cd - >/dev/null
More information about the ffmpeg-user
mailing list