Am 16.02.2016 um 03:30 schrieb matt clark:
Using the wiki https://trac.ffmpeg.org/wiki/CompilationGuide/Centos to successfully compile ffmpeg on Fedora 21 I hit an error and needed to make a fix so I thought I'd post it here in case someone wants to add it to the wiki (not sure if I can do this?). Anyway I was getting a "freetype2 not found" error on compiling before this. I had freetype-devel installed but there was an additional missing dependancy: yum install bzip2-devel I installed this package based on the following error in config.log after trying to configure the source: /usr/bin/ld: cannot find -lbz2 collect2: error: ld returned 1 exit status I have bzip2 installed but needed the devel package so configure could find the lbz2 library.
normal for building software from sources
I also did the following (as root) - not sure if it was needed though as I did it before installing the bzip2-devel package. Source - http://ffmpeg.org/pipermail/ffmpeg-user/2014-July/022603.html ln -sf /usr/include/freetype2 /usr/include/freetype2/freetype Hope this helps someone!
what are you doing here? "make install" without packages defining build and runtime dependencies?
fetch the src.rpm from rpmfusion, modify the SPEC file and you are donesee attachments to get ffmpeg static with a static libx264 on Fedora working fine for many years now and the point is: it don't collide with rpmfusion packages
%global debug_package %{nil}
%global snapshot 20160126
Summary: H264/AVC video encoder (static build)
Name: x264-latest
Version: 0.148.2665
Release: 2%{?dist}
License: GPLv2+
Group: System Environment/Libraries
URL: http://developers.videolan.org/x264.html
Source0: x264-%{snapshot}.tar.xz
Source1: x264-snapshot-latest.sh
BuildRequires: yasm
%description
x264 is a free library for encoding H264/AVC video streams, written from scratch
%prep
%setup -q -n x264-%{snapshot}
%build
./configure \
--prefix=%{_prefix}/local \
--exec-prefix=%{_prefix}/local \
--bindir=%{_prefix}/local/bin \
--libdir=%{_prefix}/local/lib64 \
--includedir=%{_prefix}/local/include \
--extra-cflags="%{optflags} -Ofast -ffast-math -funsafe-math-optimizations -funroll-loops -funswitch-loops -Wno-pointer-sign -minline-all-stringops -flto -ffat-lto-objects -fuse-ld=gold -fuse-linker-plugin" \
--extra-ldflags="-Wl,-z,now -Wl,-z,relro,-z,noexecstack,-fuse-ld=gold %{optflags} -Ofast -ffast-math -funsafe-math-optimizations -funroll-loops -funswitch-loops -Wno-pointer-sign -minline-all-stringops -flto -ffat-lto-objects -fuse-ld=gold -fuse-linker-plugin" \
--enable-static \
--disable-avs \
--disable-cli \
--disable-ffms \
--disable-gpac \
--disable-lavf \
--disable-opencl \
--disable-swscale
%{__make} %{?_smp_mflags}
%install
make install DESTDIR=%{buildroot}
rm -rf %{buildroot}%{_prefix}/local/bin/
rm -rf %{buildroot}%{_prefix}/local/lib64/pkgconfig/x264.pc
mkdir %{buildroot}%{_prefix}/local/x264/
mv %{buildroot}%{_prefix}/local/lib64/libx264.a %{buildroot}%{_prefix}/local/x264/
mv %{buildroot}%{_prefix}/local/include/x264.h %{buildroot}%{_prefix}/local/x264/
mv %{buildroot}%{_prefix}/local/include/x264_config.h %{buildroot}%{_prefix}/local/x264/
strip --strip-unneeded --strip-debug %{buildroot}%{_prefix}/local/x264/libx264.a
%files
%{_prefix}/local/x264/libx264.a
%{_prefix}/local/x264/x264.h
%{_prefix}/local/x264/x264_config.h
%changelog
* Sun Jan 17 2016 Reindl Harald <[email protected]>
- update to latest upstream-snapshot
* Sun Oct 11 2015 Reindl Harald <[email protected]>
- update to latest upstream-snapshot
* Tue Sep 15 2015 Reindl Harald <[email protected]>
- enable link-time-optimization
* Mon Jul 27 2015 Reindl Harald <[email protected]>
- update to latest upstream-snapshot
* Sun Mar 1 2015 Reindl Harald <[email protected]>
- update to latest upstream-snapshot
* Sat Dec 20 2014 Reindl Harald <[email protected]>
- update to latest upstream-snapshot
* Sun Nov 16 2014 Reindl Harald <[email protected]>
- update to latest upstream-snapshot
* Sat Aug 30 2014 Reindl Harald <[email protected]>
- update to latest upstream-snapshot
* Mon Jul 21 2014 Reindl Harald <[email protected]>
- update to latest upstream-snapshot
* Sun Jul 20 2014 Reindl Harald <[email protected]>
- update to latest upstream-snapshot
* Mon Apr 28 2014 Reindl Harald <[email protected]>
- update to latest upstream-snapshot
* Tue Apr 22 2014 Reindl Harald <[email protected]>
- update to latest upstream-snapshot
* Thu Mar 13 2014 Reindl Harald <[email protected]>
- update to latest upstream-snapshot
* Wed Jan 22 2014 Reindl Harald <[email protected]>
- update to latest upstream-snapshot
* Tue Dec 24 2013 Reindl Harald <[email protected]>
- update to latest upstream-snapshot
* Wed Oct 30 2013 Reindl Harald <[email protected]>
- update to latest upstream-snapshot
* Thu Sep 5 2013 Reindl Harald <[email protected]>
- update to latest upstream-snapshot
* Sat Aug 24 2013 Reindl Harald <[email protected]>
- update to latest upstream-snapshot
* Thu Jul 4 2013 Reindl Harald <[email protected]>
- update to latest upstream-snapshot
* Fri Oct 12 2012 Reindl Harald <[email protected]>
- static snapshot-build
- used for static ffmpeg-latest package
%global debug_package %{nil}
%global snapshot 20160215
Summary: Audio/Video-Encoder (static build)
Name: ffmpeg-latest
Version: 3.0
Release: 3%{?dist}
License: GPLv3+
Group: Applications/Multimedia
URL: http://ffmpeg.org/
Source0: ffmpeg-%{snapshot}.tar.xz
Source1: ffmpeg-snapshot-latest.sh
BuildRequires: bzip2-devel
BuildRequires: imlib2-devel
BuildRequires: lame-devel
BuildRequires: libtheora-devel
BuildRequires: x264-latest
BuildRequires: zlib-devel
BuildRequires: libvpx-devel
BuildRequires: openssl-devel
BuildRequires: yasm
Provides: ffmpeg
Obsoletes: ffmpeg
%description
FFMpeg is a complete and free Internet live audio and video broadcasting solution for Linux
%package manpages
Group: Manpages
Summary: Manpages for ffmpeg-latest
BuildArch: noarch
%description manpages
%prep
%setup -q -n ffmpeg-%{snapshot}
%build
mkdir generic
pushd generic
../configure \
--prefix=%{_prefix}/local \
--bindir=%{_prefix}/local/bin \
--mandir=%{_prefix}/local/man \
--extra-cflags="-I%{_prefix}/local/x264 %{optflags} -Ofast -ffast-math -funsafe-math-optimizations -funroll-loops -funswitch-loops -Wno-pointer-sign -minline-all-stringops" \
--extra-ldflags="-I%{_prefix}/local/x264 -L%{_prefix}/local/x264 -ldl -Wl,-z,now -Wl,-z,relro,-z,noexecstack %{optflags} -Ofast -ffast-math -funsafe-math-optimizations -funroll-loops -funswitch-loops -Wno-pointer-sign -minline-all-stringops" \
--enable-pic \
--enable-nonfree \
--enable-gpl \
--enable-version3 \
--enable-libmp3lame \
--enable-libtheora \
--enable-libx264 \
--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-libfaac \
--disable-libfreetype \
--disable-libgsm \
--disable-libopencore-amrnb \
--disable-libopencore-amrwb \
--disable-libopencv \
--disable-libopenjpeg \
--disable-libopus \
--disable-librtmp \
--disable-libschroedinger \
--disable-libspeex \
--disable-libvorbis \
--disable-libxvid \
--disable-podpages \
--disable-postproc \
--disable-protocol=gopher \
--disable-shared \
--disable-txtpages
%{__make} %{?_smp_mflags}
make documentation
popd
CURRENT_DIR=`pwd`
mkdir -p %{buildroot}%{_prefix}/local/bin/
gcc -fPIC -fPIE -pie -Wl,-z,now -Wl,-z,relro,-z,noexecstack $CURRENT_DIR/tools/qt-faststart.c -o qt-faststart
%install
pushd generic
make install DESTDIR=%{buildroot}
popd
install -D -m0755 qt-faststart "%{buildroot}%{_prefix}/local/bin/qt-faststart"
mkdir %{buildroot}%{_bindir}
ln -s %{_prefix}/local/bin/ffmpeg %{buildroot}%{_bindir}/ffmpeg
rm -rf %{buildroot}%{_prefix}/local/include %{buildroot}%{_prefix}/local/lib %{buildroot}%{_prefix}/local/lib64 %{buildroot}%{_prefix}/local/share
strip -s %{buildroot}%{_prefix}/local/bin/qt-faststart %{buildroot}%{_prefix}/local/bin/ffmpeg
%files
%{_prefix}/local/bin/ffmpeg
%{_prefix}/local/bin/qt-faststart
%{_bindir}/ffmpeg
%files manpages
%{_prefix}/local/man/man1/*
%{_prefix}/local/man/man3/*
%changelog
* Mon Feb 15 2016 Reindl Harald <[email protected]>
- update to 3.0
* Thu Feb 4 2016 Reindl Harald <[email protected]>
- update to 2.8.6
* Sun Jan 17 2016 Reindl Harald <[email protected]>
- update to 2.8.5
* Sun Dec 20 2015 Reindl Harald <[email protected]>
- update to 2.8.4
* Sat Nov 28 2015 Reindl Harald <[email protected]>
- update to 2.8.3
* Thu Nov 12 2015 Reindl Harald <[email protected]>
- update to 2.8.2
* Thu Oct 15 2015 Reindl Harald <[email protected]>
- update to 2.8.1
* Thu Sep 10 2015 Reindl Harald <[email protected]>
- update to 2.8.0
* Tue Jul 21 2015 Reindl Harald <[email protected]>
- update to 2.7.2
* Sun Jun 21 2015 Reindl Harald <[email protected]>
- update to 2.7.1
* Thu Jun 11 2015 Reindl Harald <[email protected]>
- update to 2.7.0
* Sun May 17 2015 Reindl Harald <[email protected]>
- update to 2.6.3
* Mon Apr 13 2015 Reindl Harald <[email protected]>
- update to 2.6.2
* Tue Mar 17 2015 Reindl Harald <[email protected]>
- update to 2.6.1
* Mon Mar 9 2015 Reindl Harald <[email protected]>
- update to 2.6.0
* Sat Feb 14 2015 Reindl Harald <[email protected]>
- update to 2.5.4
* Wed Jan 14 2015 Reindl Harald <[email protected]>
- update to 2.5.3
* Fri Dec 26 2014 Reindl Harald <[email protected]>
- update to 2.5.2
* Wed Dec 17 2014 Reindl Harald <[email protected]>
- update to 2.5.1
* Sat Dec 6 2014 Reindl Harald <[email protected]>
- update to 2.5.0
* Mon Dec 1 2014 Reindl Harald <[email protected]>
- update to 2.4.4
* Mon Nov 3 2014 Reindl Harald <[email protected]>
- update to 2.4.3
* Tue Oct 7 2014 Reindl Harald <[email protected]>
- update to 2.4.2
* Sat Sep 27 2014 Reindl Harald <[email protected]>
- update to 2.4.1
* Thu Sep 18 2014 Reindl Harald <[email protected]>
- update to 2.4.0
* Mon Aug 18 2014 Reindl Harald <[email protected]>
- update to 2.3.3
* Wed Aug 13 2014 Reindl Harald <[email protected]>
- update to 2.3.2
* Thu Jul 31 2014 Reindl Harald <[email protected]>
- update to 2.3.1
* Wed Jul 16 2014 Reindl Harald <[email protected]>
- update to 2.3.0
* Tue Jun 24 2014 Reindl Harald <[email protected]>
- update to 2.2.4
* Thu Jun 5 2014 Reindl Harald <[email protected]>
- update to 2.2.3
* Tue May 6 2014 Reindl Harald <[email protected]>
- update to 2.2.2
* Mon Apr 14 2014 Reindl Harald <[email protected]>
- update to 2.2.1
* Mon Mar 24 2014 Reindl Harald <[email protected]>
- update to 2.2.0
* Mon Feb 24 2014 Reindl Harald <[email protected]>
- update to 2.1.4
* Sun Jan 19 2014 Reindl Harald <[email protected]>
- update to 2.1.3
* Wed Jan 15 2014 Reindl Harald <[email protected]>
- update to 2.1.2
* Thu Nov 21 2013 Reindl Harald <[email protected]>
- update to 2.1.1
* Thu Oct 10 2013 Reindl Harald <[email protected]>
- update to 2.1.0
* Thu Oct 10 2013 Reindl Harald <[email protected]>
- update to 2.0.2
* Mon Aug 12 2013 Reindl Harald <[email protected]>
- update to 2.0.1
* Wed Jul 10 2013 Reindl Harald <[email protected]>
- update to 2.0.0
* Mon May 27 2013 Reindl Harald <[email protected]>
- update to latest upstream-snapshot
- build without 'libfaac', 'libvorbis' and 'libxvidcore'
- change 'fwx_module_ffmpeg.inc.php' to use internal aac/vorbis-encoder
* Sun May 12 2013 Reindl Harald <[email protected]>
- update to 1.2.1
* Wed Apr 17 2013 Reindl Harald <[email protected]>
- update to 1.2.0
* Tue Dec 04 2012 Reindl Harald <[email protected]>
- update to 1.0.1
* Fri Oct 12 2012 Reindl Harald <[email protected]>
- refresh snapshot
- link x264-latest also static
* Wed Oct 03 2012 Reindl Harald <[email protected]>
- build ffmpeg 1.0 as package under %{_prefix}/local/
- static build to not collide with fedora packages
signature.asc
Description: OpenPGP digital signature
_______________________________________________ ffmpeg-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/ffmpeg-user
