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

Carl Eugen Hoyos ceffmpeg at gmail.com
Mon Nov 20 22:53:28 EET 2017

2017-11-20 19:17 GMT+01:00 Peterson, David J <djpeter at sandia.gov>:
> Excerpts

Excerpts are typically a superbly bad idea because I then have to
guess what the issue is.

> 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

I suggest you fix this.

> collect2: error: ld returned 1 exit status

> 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


> 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

You used icc to compile libx264 and gcc to compile FFmpeg.
This does work in general but in combination with
--extra-cflags=-static you have to take care of the necessary


> As for yasm and nasm.  It was a while back but it griped unless I had both.

(It is of course possible that your installed nasm (or yasm) was too old
and instead of updating nasm (or yasm) installing current yasm (or nasm)
helped. But this is completely unrelated.)

> The compilation guide instructs to install both as well for RHEL.

Then it is probably time to ignore this instructions if you cannot
remove them.

Please do not top-post here, Carl Eugen

More information about the ffmpeg-user mailing list