mpv-player / mpv-build

🔨 Helper scripts to compile mpv on Linux
http://mpv.io
403 stars 104 forks source link

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

Closed forthrin closed 1 month ago

forthrin commented 1 month ago
$ 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

kasper93 commented 1 month ago

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

forthrin commented 1 month ago

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?

sfan5 commented 1 month ago

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

forthrin commented 1 month ago

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