ltib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Ltib] Re: build ffmpeg with H264 support


From: Stuart Hughes
Subject: [Ltib] Re: build ffmpeg with H264 support
Date: Mon, 25 Jan 2010 09:20:59 +0000
User-agent: Thunderbird 2.0.0.16 (X11/20080707)

Brilliantov Kirill Vladimirovich wrote:
Stuart Hughes wrote on 01/22/2010 05:23 PM:
Hi Kirill,

Brilliantov Kirill Vladimirovich wrote:
Hello!
I have to build ffmpeg with H264 support.
Default configure options, from ffmpeg.spec, ./configure --arch=$LINTARCH --disable-altivec --disable-mmx --disable-mmx2 --enable-cross-compile --prefix=%{_prefix} --mandir=%{_mandir} --extra-cflags=-I../linux/include. I don't understand what included -I../linux/include, I don't see directory linux. I successfully build x264 and install it. I try include absolute path (--extra-cflags=-I/home/kirill/FreeScale/rootfs/usr/include), but configure command exit with ERROR: x264 not found.
How must I include external library?
Thank you and excuse me for my bad english.


It looks to me like whoever added ../linux/include forgot to force on leaving the Linux kernel source unpacked. To fix this, run:
./ltib --configure
and then select: [*] Leave the sources after building

Regards, Stuart



Thank you Stuart!
I change my confugure options on:
./configure --arch=$LINTARCH --disable-altivec --disable-mmx --disable-mmx2 \ --enable-cross-compile --prefix=%{_prefix} --mandir=%{_mandir} --enable-libx264 \
--enable-gpl --extra-cflags=-I$DEV_IMAGE/usr/include \
--extra-ldflags=-L$DEV_IMAGE/usr/lib

./ltib -p ffmpeg.spec

Processing platform: Freescale MPC8377EWLAN-RDS board
=======================================================
using config/platform/mpc8377ewlan/.config

Processing: ffmpeg
====================
Build path taken because: directory build, no prebuilt rpm,
scbuild/scdeploy already unpacked package

Processing: ffmpeg
====================
Build path taken because: directory build, build key set, no prebuilt rpm,

rpmbuild --dbpath /home/kirill/FreeScale/rootfs//var/lib/rpm --target ppc --define '_unpackaged_files_terminate_build 0' --define '_target_cpu ppc' --define '__strip strip' --define '_topdir /home/kirill/FreeScale/rpm' --define '_prefix /usr' --define '_tmppath /home/kirill/FreeScale/tmp' --define '_rpmdir /home/kirill/FreeScale/rpm/RPMS' --define '_mandir /usr/share/man' --define '_sysconfdir /etc' --define '_localstatedir /var' -bc --short-circuit /home/kirill/FreeScale/dist/lfs-5.1/ffmpeg/ffmpeg.spec
Building target platforms: ppc
Building for target ppc
Executing(%build): /bin/sh -e /home/kirill/FreeScale/tmp/rpm-tmp.82907
+ umask 022
+ cd /home/kirill/FreeScale/rpm/BUILD
+ cd ffmpeg-0.5
+ ./configure --arch=ppc --disable-altivec --disable-mmx --disable-mmx2 --enable-cross-compile --prefix=/usr --mandir=/usr/share/man --enable-libx264 --enable-gpl --extra-cflags=-I/home/kirill/FreeScale/rootfs/usr/include --extra-ldflags=-L/home/kirill/FreeScale/rootfs/usr/lib
ERROR: libx264 not found

Last 20 lines from ffmpeg config.err:
BEGIN /tmp/ffmpeg-conf-15254-29820-10676.c
    1   #include <x264.h>
    2   int x;
END /tmp/ffmpeg-conf-15254-29820-10676.c
gcc -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -I/home/kirill/FreeScale/rootfs/usr/include -std=c99 -fomit-frame-pointer -E -o /tmp/ffmpeg-conf-3151-29820-19172.o /tmp/ffmpeg-conf-15254-29820-10676.c
In file included from /tmp/ffmpeg-conf-15254-29820-10676.c:1:
/home/kirill/FreeScale/rootfs/usr/include/x264.h:32:4: warning: #warning You must include stdint.h or inttypes.h before x264.h
check_func x264_encoder_open
check_ld
check_cc
BEGIN /tmp/ffmpeg-conf-15254-29820-10676.c
    1   extern int x264_encoder_open();
    2   int main(void){ x264_encoder_open(); }
END /tmp/ffmpeg-conf-15254-29820-10676.c
gcc -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -I/home/kirill/FreeScale/rootfs/usr/include -std=c99 -fomit-frame-pointer -c -o /tmp/ffmpeg-conf-3151-29820-19172.o /tmp/ffmpeg-conf-15254-29820-10676.c gcc -L/home/kirill/FreeScale/rootfs/usr/lib -o /tmp/ffmpeg-conf-135-29820-14418 /tmp/ffmpeg-conf-3151-29820-19172.o -lz -lm -lx264 -lm
/tmp/ffmpeg-conf-3151-29820-19172.o: In function `main':
ffmpeg-conf-15254-29820-10676.c:(.text+0xc): undefined reference to `x264_encoder_open'
collect2: ld returned 1 exit status
ERROR: libx264 not found

-rw-r--r-- 1 root root 22318 2010-01-25 10:44 rootfs/usr/include/x264.h
-rw-r--r-- 1 root root 681806 2010-01-25 10:44 rootfs/usr/lib/libx264.a
lrwxrwxrwx 1 root root 13 2010-01-25 10:44 rootfs/usr/lib/libx264.so -> libx264.so.80
-rwxr-xr-x 1 root root 604772 2010-01-25 10:44 rootfs/usr/lib/libx264.so.80

I see that include file found, but why I get linking error?



I'm not sure what's wrong here, but first of all remove:

> --extra-cflags=-I/home/kirill/FreeScale/rootfs/usr/include
> --extra-ldflags=-L/home/kirill/FreeScale/rootfs/usr/lib

From your configure lines. LTIB will automatically find headers/libs in these directories.

I think you need to look into the warning:

 In file included from /tmp/ffmpeg-conf-15254-29820-10676.c:1:
> /home/kirill/FreeScale/rootfs/usr/include/x264.h:32:4: warning: #warning
> You must include stdint.h or inttypes.h before x264.h
> check_func x264_encoder_open
> check_ld
> check_cc

And resolve that.

Regards, Stuart






reply via email to

[Prev in Thread] Current Thread [Next in Thread]