[FFmpeg-user] ffmpeg with static x264 -> thank you!
Reindl Harald
h.reindl at thelounge.net
Fri Oct 12 14:32:30 CEST 2012
Am 11.10.2012 13:26, schrieb Stefano Sabatini:
>> sorry - i am not qualified to find out what is the
>> "relevant part" so excuse me to attach the compressed
>> file as it is
>
> The ending part of the file:
>
> /usr/local/lib64/libx264.a(display-x11.o): In function `disp_sync':
> (.text+0x34d): undefined reference to `XSync'
> /usr/local/lib64/libx264.a(display-x11.o): In function `disp_point':
> (.text+0x834): undefined reference to `XDrawPoint'
> collect2: error: ld returned 1 exit status
> ERROR: libx264 not found
>
> So apparently libx264 is being fancy and including other libraries,
> and since it doesn't provide a .pc file (doesn't it?, or
> ffmpeg/configure doesn't use it) there is no way to tell which
> libraries it uses and fails with static linking. As a workaround you
> can try to disable the foreign components (display-x11) in your
> libx264 build.
thank you very much!
"--enable-visualize" was the problem as i took the SPEC from rpmfusion
and refreshed the sources, added cpu-optimize-params without changing
any other things
with this SPEC below you get a static libx264 under /usr/local
and ffmpeg is happy to link it static, so my goal is reached
to have a ffmpeg/x264 static bundle not colliding with
any other fedora-packages/dependencies
thank you!
_______________________________________
%global snapshot 20121006
Summary: H264/AVC video streams encoder
Name: x264-latest
Version: 0.128.2216
Release: 9%{?dist}
License: GPLv2+
Group: System Environment/Libraries
URL: http://developers.videolan.org/x264.html
Source0: x264-%{snapshot}.tar.bz2
Source1: x264-snapshot.sh
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n)
BuildRequires: gpac-devel-static
BuildRequires: libX11-devel
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 \
--host=x86_64-redhat-linux \
--prefix=/usr/local \
--exec-prefix=/usr/local \
--bindir=/usr/local/bin \
--libdir=/usr/local/lib64 \
--includedir=/usr/local/include \
--extra-cflags="-O3 -march=corei7 -mtune=corei7 -mmmx -msse2 -msse3 -msse4.1 -msse4.2 -fopenmp -mfpmath=sse
-fstack-protector --param=ssp-buffer-size=4 -pipe -D_FORTIFY_SOURCE=2 -fexceptions" \
--disable-avs \
--disable-swscale \
--disable-lavf \
--disable-ffms \
--disable-gpac \
--enable-strip \
--enable-static
%{__make} %{?_smp_mflags}
%install
%{__rm} -rf %{buildroot}
%{__make} DESTDIR=%{buildroot} install
rm -rf $RPM_BUILD_ROOT/usr/local/bin/
rm -rf $RPM_BUILD_ROOT/usr/local/lib64/pkgconfig/x264.pc
%clean
%{__rm} -rf %{buildroot}
%files
/usr/local/lib64/libx264.a
/usr/local/include/x264.h
/usr/local/include/x264_config.h
%changelog
* Thu Oct 06 2012 Reindl Harald <h.reindl at thelounge.net>
- Static Snapshot-Build
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 259 bytes
Desc: OpenPGP digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20121012/5ef5a0a8/attachment.asc>
More information about the ffmpeg-user
mailing list