Brooke's Notes

Experience, Record, Share.

[Solved] FFMPEG: Libmp3lame Not Found

| Comments

ERROR: libmp3lame >= 3.98.3 not found

This configure error occurs when building ffmpeg from with mp3 library (libmp3lame) enabled.

solution: add -lm to extra-libs, like this

1
2
3
./configure \
--extra-libs="-lpthread -lm"
...  # other configure options

Done!

HOW

Check ffbuild/config.log, which shows dynamic linking error of libmp3lame, which requires the math lib.

1
2
3
4
util.c:(.text+0x96d): undefined reference to `__exp_finite'
util.c:(.text+0xa41): undefined reference to `__pow_finite'      
layer3.c:(.text+0x2250): undefined reference to `sin'
layer3.c:(.text+0x226a): undefined reference to `cos'       

Yeah!

Comments