diff options
author | Kevin Mitchell <kevmitch@gmail.com> | 2023-01-22 16:50:04 -0800 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-01-23 03:28:19 +0000 |
commit | 3ec52b9c80bc900a5c2aa409aaa6cad515d5ea5f (patch) | |
tree | 6f20e3d4e1a974a71d42ed090972f0f2a22f7c70 | |
parent | a5caba288ff9a9b4f5bc63451c4a3cf7abc5d2a1 (diff) | |
download | mpv-build-3ec52b9c80bc900a5c2aa409aaa6cad515d5ea5f.tar.bz2 mpv-build-3ec52b9c80bc900a5c2aa409aaa6cad515d5ea5f.tar.xz |
hopefully fix shared / private mess for mpv meson build
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.
-rwxr-xr-x | scripts/mpv-config | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/mpv-config b/scripts/mpv-config index fcbab2c..fe9ce49 100755 --- a/scripts/mpv-config +++ b/scripts/mpv-config @@ -24,13 +24,13 @@ echo Using mpv options: "$@" cd "$BUILD"/mpv +# add missing private dependencies from libass.pc +# this is necessary due to the hybrid static / dynamic nature of the build +# need to link against stdc++ in case libplacebo was built with glslang, +# which requires that +export LDFLAGS="$LDFLAGS $(pkg-config --libs fontconfig harfbuzz fribidi) -lstdc++" if [ "$BUILDSYSTEM" = "waf" ]; then - # add missing private dependencies from libass.pc - # this is necessary due to the hybrid static / dynamic nature of the build - # need to link against stdc++ in case libplacebo was built with glslang, - # which requires that - export LDFLAGS="$LDFLAGS $(pkg-config --libs fontconfig harfbuzz fribidi) -lstdc++" python3 ./waf configure "$@" else - meson setup build -Dprefer_static=true -Dbuildtype=release "$@" + meson setup build -Dbuildtype=release "$@" fi |