On Thu, 24 Jun 2021 at 22:05, Paolo Bonzini <pbonz...@redhat.com> wrote: > > On 24/06/21 21:09, Peter Maydell wrote: > > This generates a new warning on one of my boxes: > > > > [...] > > Has header "sasl/sasl.h" : YES (cached) > > Library sasl2 found: YES > > Has header "security/pam_appl.h" : YES > > Library pam found: YES > > ../meson.build:926: WARNING: could not link libpam, disabling > > This is probably too old a libpam, or something like that. What distro > is it, and could you please attach the resulting meson-logs/meson-log.txt?
I saw this on Ubuntu 18.04.5 LTS and also on Debian bullseye; I've uploaded the full meson-log.txt for the Ubuntu box to https://people.linaro.org/~peter.maydell/meson-log.txt but the important part seems to be: Running compile: Working directory: /home/peter.maydell/qemu-netbsd/build/meson-private/tmp97iric39 Command line: cc /home/peter.maydell/qemu-netbsd/build/meson-private/tmp97iric39/testfile.c -o /home/peter.maydell/qemu-netbsd/build/ meson-private/tmp97iric39/output.exe -pipe -D_FILE_OFFSET_BITS=64 -O0 -std=gnu99 -Wl,--start-group -lpam -Wl,--end-group Code: #include <security/pam_appl.h> int main(void) { const char *service_name = "qemu"; const char *user = "frank"; const struct pam_conv pam_conv = { 0 }; pam_handle_t *pamh = NULL; pam_start(service_name, user, &pam_conv, &pamh); return 0; } Compiler stdout: Compiler stderr: /home/peter.maydell/qemu-netbsd/build/meson-private/tmp97iric39/testfile.c: In function 'main': /home/peter.maydell/qemu-netbsd/build/meson-private/tmp97iric39/testfile.c:7:27: error: 'NULL' undeclared (first use in this function) pam_handle_t *pamh = NULL; ^~~~ /home/peter.maydell/qemu-netbsd/build/meson-private/tmp97iric39/testfile.c:7:27: note: each undeclared identifier is reported only onc e for each function it appears in ../meson.build:926: WARNING: could not link libpam, disabling Looks like a missing #include <stddef.h> in the test code, rather than anything specifically libpam related. More generally, I think if meson probes for some library and can't find it, the correct response is that it should just print "Library libpam found: NO", not a "WARNING". "You don't have an optional library, we'll skip that optional feature" is a normal situation. thanks -- PMM