[FFmpeg-user] Compiling ffmpeg with libx264
Steve Jones
steve at squaregoldfish.co.uk
Sun Aug 28 12:48:47 CEST 2011
On 27/08/11 22:43, Nicolas George wrote:
> Le decadi 10 fructidor, an CCXIX, Steve Jones a écrit :
>> I think you're right. I have two versions installed, one in /usr and one
>> in /usr/local. For some reason the configure script is finding the
>> version in /usr/local, but at compile time it's trying to use the one in
>> /usr. I don't really know how configure and make work, so how can I work
>> out why it's confused?
>
> The configure for ffmpeg has the unusual behaviour that it does not try to
> look in /usr/local like most autoconf-produced configure. You can tell it to
> with the following options:
>
> --extra-cflags="-I/usr/local/include"
> --extra-ldflags="-L/usr/local/lib"
>
> But before that, you should look at the compile and link lines, with
> make V=1, and look in config.log to see where the strange flags come from.
>
> Regards,
>
OK, so in config.log I'm seeing the following:
check_lib x264.h x264_encoder_encode -lx264
check_header x264.h
1 #include <x264.h>
/usr/local/include/x264.h:36:4: warning: #warning You must include
stdint.h or inttypes.h before x264.h
so the #include directive is picking up x264.h in /usr/local. This seems
to go against what you say about it only looking in /usr/lib, although
it could be that my build setup is overriding ffmpeg's wishes at this stage.
The compile line that fails is:
gcc -Llibavcodec -Llibavdevice -Llibavfilter -Llibavformat -Llibavutil
-Llibpostproc -Llibswscale -Wl,--as-needed -Wl,--warn-common
-Wl,-rpath-link=libpostproc:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil
-o ffmpeg_g ffmpeg.o cmdutils.o -lavdevice -lavfilter -lavformat
-lavcodec -lpostproc -lswscale -lavutil -ldl -lX11 -lXext -lXfixes
-lxvidcore -lx264 -lvorbisenc -lvorbis -logg -ltheoraenc -ltheoradec
-logg -lopencore-amrwb -lopencore-amrnb -lmp3lame
-L/usr/lib/x86_64-linux-gnu -lfreetype -lfaac -lm -pthread -lz
so there's no specific directive to look anywhere for libx264 (it's just
-lx264). This must be why it's falling back to /usr/lib without the
extra compile flags.
Using the explicit flags you mentioned above works perfectly.
Thanks for the help.
Steve.
PS If you want me to do more tests, just let me know.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 554 bytes
Desc: OpenPGP digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20110828/e1c450ad/attachment.asc>
More information about the ffmpeg-user
mailing list