On Wed, 27 Apr 2022 at 18:33, Gerd Hoffmann <kra...@redhat.com> wrote: > > From: Kshitij Suri <kshitij.s...@nutanix.com> > > Currently screendump only supports PPM format, which is un-compressed. Added > a "format" parameter to QMP and HMP screendump command to support PNG image > capture using libpng. > > QMP example usage: > { "execute": "screendump", "arguments": { "filename": "/tmp/image", > "format":"png" } } > > HMP example usage: > screendump /tmp/image -f png > > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/718 > > Signed-off-by: Kshitij Suri <kshitij.s...@nutanix.com> > > Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> > Acked-by: Markus Armbruster <arm...@redhat.com> > Acked-by: Dr. David Alan Gilbert <dgilb...@redhat.com> > Message-Id: <20220408071336.99839-3-kshitij.s...@nutanix.com> > Signed-off-by: Gerd Hoffmann <kra...@redhat.com>
This change seems to have broken building the system emulator with --disable-vnc unless I also add --disable-png. Specifically: > diff --git a/ui/console.c b/ui/console.c > index 1752f2ec8897..15d0f6affd4c 100644 > --- a/ui/console.c > +++ b/ui/console.c > + png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, > + NULL, NULL); ui/console.c now makes calls to functions from libpng, but the commit didn't do anything in ui/meson.build to tell the build system that this object file must now be linked with libpng. Because vnc *does* correctly state its dependency on libpng, builds that happen to include vnc will link OK by accident, but builds without vnc will fail: $ mkdir build/tst $ (cd build/tst && ../../configure --target-list=i386-softmmu --disable-tools --disable-vnc --enable-debug) $ make -C build/tst -j8 [...] /usr/bin/ld: libcommon.fa.p/ui_console.c.o: undefined reference to symbol 'png_init_io@@PNG16_0' /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libpng16.so.16: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status thanks -- PMM