mpv-player / mpv-build

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

hopefully fix shared / private mess for mpv meson build #210

Closed kevmitch closed 1 year ago

kevmitch commented 1 year ago

Using meson to build mpv with prefer_static=true would try to link everything statically including things provided by the system. For example, if both shared and static versions of libarchive are were available, it would choose the static version. This would work until it tried to actulaly link the mpv binary which would additionally require static versions of -lacl, lzlib, etc. These build dependencies can be avoided if it instead links to shared libarchive.

To avoid this, don't use -Dprefer_static=true. It should already be preferring the specifically statically built libs in build_libs because they are added first in the pkg-config path.

Of course, we still run into the same -lstdc++ issue that we saw with waf, so that hack needs to be made general to both build systems.