qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PULL 3/9] Added parameter to take screenshot with screendump as PNG


From: Peter Maydell
Subject: Re: [PULL 3/9] Added parameter to take screenshot with screendump as PNG
Date: Fri, 6 May 2022 14:37:07 +0100

On Wed, 27 Apr 2022 at 18:33, Gerd Hoffmann <kraxel@redhat.com> wrote:
>
> From: Kshitij Suri <kshitij.suri@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.suri@nutanix.com>
>
> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
> Acked-by: Markus Armbruster <armbru@redhat.com>
> Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> Message-Id: <20220408071336.99839-3-kshitij.suri@nutanix.com>
> Signed-off-by: Gerd Hoffmann <kraxel@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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]