mpv-player/mpv-build

"--enable-libmp3lame" yields "libmp3lame >= 3.98.3 not found"

forthrin opened this issue · 4 comments

$ cd mpv-build

$ time ./scripts/ffmpeg-config 
ERROR: libmp3lame >= 3.98.3 not found

$ brew info lame
==> lame: stable 3.100 (bottled)

$ git -C ffmpeg log -1 --format="%h %cd"
cda5f5c Fri Aug 9 13:40:26 2024 +0800

https://github.com/mpv-player/mpv-build/issues?q=lame
No results matched your search.

Possible related, albeit old, and fix doesn't work.
https://trac.ffmpeg.org/ticket/6918

post ffmpeg's config.log, we are no psychic here.

Found Die Antwoord by checking said log file:

$ tail ./ffmpeg_build/ffbuild/config.log
#include <lame/lame.h>
1 error generated.

$ export C_INCLUDE_PATH=/opt/homebrew/Cellar/lame/3.100/include
$ ./configure

$ tail ./ffmpeg_build/ffbuild/config.log
gcc -lstdc++ -Wl,-dynamic,-search_paths_first ... -lmp3lame -lm
ld: library 'mp3lame' not found
ERROR: libmp3lame >= 3.98.3 not found

export LDFLAGS=-L/opt/homebrew/Cellar/lame/3.100/lib
$ ./configure && HURRAY
...
HURRAY

Should mpv-build detect and set this, lest others have the same trouble?

No, putting files in a non-standard location is a choice Homebrew makes and it should be user's responsibility to deal with it.

From how your putting it, sounds like a Homebrew convention set in stone, thus "by design" and not addressable.