You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, prefer_static is false i.e. it will prefer shared libraries to static ones when setting up link paths. However, this is not something that PkgConfigCLI.libssupports.
This makes the linking process easy to break; assume a library b which depends on a, build both static-only, and then try to link to b in a separate project.
The link process will fail with missing symbol errors corresponding to all used symbols of a, e.g.
Clone this repo: https://github.com/amyspark/meson-bug-shared-static, build and install temp1 with -Ddefault_library=static. Then build temp2 setting -Dpkg_config_path=<install path of temp1>/lib/pkgconfig.
Expected behavior
After Meson finds that b is available statically only, it must repeat the pkg-config query with --static so that Libs.private and Requires.private are properly applied.
system parameters
Is this a cross build or just a plain native build (for the same computer)? No
what operating system (e.g. MacOS Catalina, Windows 10, CentOS 8.0, Ubuntu 18.04, etc.) Windows 10 22H2
what Python version are you using e.g. 3.8.0 3.10.7
Describe the bug
By default,
prefer_static
isfalse
i.e. it will prefer shared libraries to static ones when setting up link paths. However, this is not something thatPkgConfigCLI.libs
supports.This makes the linking process easy to break; assume a library
b
which depends ona
, build both static-only, and then try to link tob
in a separate project.The link process will fail with
missing symbol
errors corresponding to all used symbols ofa
, e.g.To Reproduce
Clone this repo: https://github.com/amyspark/meson-bug-shared-static, build and install
temp1
with-Ddefault_library=static
. Then buildtemp2
setting-Dpkg_config_path=<install path of temp1>/lib/pkgconfig
.Expected behavior
After Meson finds that
b
is available statically only, it must repeat the pkg-config query with--static
so thatLibs.private
andRequires.private
are properly applied.system parameters
meson --version
1.6.0ninja --version
if it's a Ninja build 1.10.2cc @nirbheek
The text was updated successfully, but these errors were encountered: