Hi,

I have sent the fix out at https://lists.gnu.org/archive/html/qemu-devel/2022-05/msg01980.html.
Would be grateful for your review.

Regards,

Kshitij Suri

On 06/05/22 7:07 pm, Peter Maydell wrote:
On Wed, 27 Apr 2022 at 18:33, Gerd Hoffmann <[email protected]> wrote:
From: Kshitij Suri <[email protected]>

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://urldefense.proofpoint.com/v2/url?u=https-3A__gitlab.com_qemu-2Dproject_qemu_-2D_issues_718&d=DwIFaQ&c=s883GpUCOChKOHiocYtGcg&r=utjv19Ej9Fb0TB7_DX0o3faQ-OAm2ypPniPyqVSoj_w&m=0pq2lv0SrogWXtqObS7lzBUp-Bbw4WYpJvheEOrvaMJrptl2ORkHDcDVKGuyG95V&s=T8YakRJNie_5nF8LIdJvsiSogf9iS7Ytlc205JIcaYQ&e=

Signed-off-by: Kshitij Suri <[email protected]>

Reviewed-by: Daniel P. BerrangĂ© <[email protected]>
Acked-by: Markus Armbruster <[email protected]>
Acked-by: Dr. David Alan Gilbert <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
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