Closed nathanfranke closed 3 years ago
you want lower case l, not upper case L.
-L
adds a library search path. -lfoo
links a library named "libfoo"
you want lower case l, not upper case L.
-L
adds a library search path.-lfoo
links a library named "libfoo"
thanks but I get the same behaviour with -lmpv
echo "--enable-libmpv-static" > mpv_options
This will make the build attempt to link everything statically, but I don't think it guarantees that libmpv ends up fully static, because it will only link statically libs which you have static on your system.
So you need to also use pkg-config
to get the C flags/libs which libmpv requires.
I assume you figured it out.
I am not sure what I am supposed to do with pkg-config
. If I try to run pkg-config --libs --cflags ./build_libs/lib/pkgconfig/libpostproc.pc
with almost any library it says something like this:
Package dependency requirement 'libavutil >= 57.0.100' could not be satisfied.
Package 'libavutil' has version '56.70.100', required version is '>= 57.0.100'
Even if I link to every library in mpv/build/libmpv/mpv.pc
, Libs.private
and these CFLAGS
:
-fPIC -L./build_libs/lib -Wl,-Bstatic -lavutil -lswscale -lavcodec -lswresample -llua5.2 -lcaca -ldrm -lEGL -lgbm -lwayland-egl -ljack -lpthread -ljpeg -llcms2 -larchive -lass -lavdevice -lxcb -lxcb-shm -lxcb-shape -lxcb-xfixes -lasound -lSDL2 -lavfilter -lswscale -lpostproc -lavformat -lbz2 -lgnutls -lavcodec -llzma -lswresample -lavutil -lbluray -ldl -lm -lplacebo -lrt -lpulse -lshaderc_shared -lva-drm -lva-wayland -lva-x11 -lva -lvdpau -lvulkan -lwayland-client -lwayland-cursor -lxkbcommon -lX11 -lXss -lXext -lXinerama -lXrandr -lXv -lzimg -lz
The result library libmpv.a
is essentially unchanged (Still 13.8MiB)
Build script: