[FFmpeg-user] [EXTERNAL] Re: Cannot build ffmpeg with libx264

Moritz Barsnick barsnick at gmx.net
Mon Nov 20 23:15:00 EET 2017


On Mon, Nov 20, 2017 at 18:17:22 +0000, Peterson, David J wrote:

> Thanks for the reply.  I would be happy to act on any explanations it
> gives but there was no explanation I saw. This is most likely due to
> my ignorance. Excerpts from the .log files from configure attached
> (these are the last 4 of 11 times it hit). Do this make any sense to
> you perhaps why it would be thus throwing the error?

Yes, these messages make sense, that's why they're their and you should
show them to us, if you can't make sense of them.

> gcc -L /ffmpeg_installation/ffmpeg_build/lib -Wl,--as-needed -Wl,-z,noexecstack -static -o /tmp/ffconf.xsWlVzny/test /tmp/ffconf.xsWlVzny/test.o -lbz2 -pthread -pthread
> /usr/bin/ld: cannot find -lbz2

This doesn't matter. It's autodetect, and thereby disabled. The
Matroska demuxer can make use of it. To support it, your system needs
the package bzip2-devel. (Hint for Debian, Ubuntu users: it's called
libbz2-dev there.) Or you need to compile bzip2 in a similar manner to
your other stuff. (The wiki instructions are incorrect regarding
this.[*])

> gcc -L /ffmpeg_installation/ffmpeg_build/lib -Wl,--as-needed -Wl,-z,noexecstack -static -o /tmp/ffconf.xsWlVzny/test /tmp/ffconf.xsWlVzny/test.o -llzma -pthread -pthread
> /usr/bin/ld: cannot find -llzma

This doesn't matter. It's autodetect, and thereby disabled. The TIFF
decoder can apparently make use of it. To support it, your system needs
the package xz-devel. (Hint for Debian, Ubuntu users: it's called
liblzma5 or liblzma5-dev there.) Or you need to compile xz in a similar
manner to your other stuff. (The wiki instructions are incorrect or
incomplete regarding this.[*])

> ffmpeg_installation/ffmpeg_build/lib/libx264.a(mc-c.o): In function `x264_plane_copy_avx':mc-c.c:(.text+0x11ac): undefined reference to `_intel_fast_memcpy'
> collect2: error: ld returned 1 exit status
> 
> ffmpeg_installation/ffmpeg_build/lib/libx264.a(mc-c.o): In function `x264_plane_copy_avx':mc-c.c:(.text+0x11ac): undefined reference to `_intel_fast_memcpy'
> collect2: error: ld returned 1 exit status
> ERROR: libx264 not found

>From my humble experience, this probably means your x264 was built with
icc (the Intel Compiler Suite), but is missing some essential flag in
x264.pc. Is that what you did?
If so, and if you compile ffmpeg with ggc, I believe you need to set
Intel's linker as the linker. Something like "--ld=ild"

Hope this helps,
Moritz

[*] The wiki says:
$ yum install autoconf automake bzip2 cmake freetype-devel gcc gcc-c++ git libtool make mercurial pkgconfig zlib-devel


More information about the ffmpeg-user mailing list