[FFmpeg-devel] Fix libx264

Felipe Contreras felipe.contreras
Wed Feb 3 14:23:56 CET 2010


I'm getting this error when trying to build with --enable-libx264:
gcc -o /tmp/ffconf.Ln1pzlRv /tmp/ffconf.PTBRiOvi.o -lz -lbz2 -lm
-lmp3lame -lm -lx264 -lm
/opt/x264/lib/libx264.a(encoder.o): In function `x264_encoder_frame_end':
encoder.c:(.text+0xe4a): undefined reference to `pthread_join'
/opt/x264/lib/libx264.a(encoder.o): In function `x264_encoder_close':
encoder.c:(.text+0x5035): undefined reference to `pthread_join'
/opt/x264/lib/libx264.a(encoder.o): In function `x264_encoder_encode':
encoder.c:(.text+0x8d6b): undefined reference to `pthread_create'
encoder.c:(.text+0x8f56): undefined reference to `pthread_join'
encoder.c:(.text+0x964c): undefined reference to `pthread_create'
/opt/x264/lib/libx264.a(lookahead.o): In function `x264_lookahead_delete':
lookahead.c:(.text+0x3a0): undefined reference to `pthread_join'
/opt/x264/lib/libx264.a(lookahead.o): In function `x264_lookahead_init':
lookahead.c:(.text+0x534): undefined reference to `pthread_create'
collect2: ld returned 1 exit status
ERROR: libx264 not found

Apparently this only happens when libx264 is built statically. In any
case, the solution is to add -lpthread.

But would we add other dependencies each time they change them?
Wouldn't it be easier to just use pkg-config?

I proposed that some time ago:

Anyway, even when I manage to compile and install it, I get this run-time error:
[libx264 @ 0x8117a40]broken ffmpeg default settings detected
[libx264 @ 0x8117a40]use an encoding preset (vpre)

Apparently '-vpre default' does the trick. But why isn't 'default' the default?


Felipe Contreras

More information about the ffmpeg-devel mailing list