[PATCH v2] build: validate libraries returned from meson find function
David Marchand
david.marchand at redhat.com
Thu Oct 2 09:53:15 CEST 2025
Hello Bruce,
On Wed, 24 Sept 2025 at 13:13, Bruce Richardson
<bruce.richardson at intel.com> wrote:
>
> The meson find_library() API call sometimes finds a library that is
> actually incompatible with the current build, for example, returning a
> 64-bit library when doing a 32-bit build. To avoid problems with this,
> check each library returned from a find_library() call and treat the
> library as unfound if its incompatible.
meson should have all it needs to double check itself that the "found"
library links fine...
But well, we need to live with existing behavior.
It's a pity meson refuses to define user helpers... so much copy/paste
in this patch.
>
> This checking is not necessary (or should not be necessary) for
> dependencies got using pkg-config, since the .pc files for each build
> type are stored in a different directory on the system.
Would it affect the library lookup if we pass has_headers to find_library()?
--
David Marchand
More information about the dev
mailing list