qemu-devel
[Top][All Lists]
Advanced

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

Re: QEMU build error with --disable-qcow1


From: Paolo Bonzini
Subject: Re: QEMU build error with --disable-qcow1
Date: Fri, 28 Aug 2020 19:27:39 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0

On 28/08/20 18:34, Thomas Huth wrote:
> 
> Linking target qemu-nbd
> libblock.fa(block_qcow2-threads.c.o): In function `qcow2_zlib_compress':
> /tmp/qemu-test/../../home/thuth/devel/qemu/block/qcow2-threads.c:101:
> undefined reference to `deflateInit2_'
> /tmp/qemu-test/../../home/thuth/devel/qemu/block/qcow2-threads.c:116:
> undefined reference to `deflate'
> /tmp/qemu-test/../../home/thuth/devel/qemu/block/qcow2-threads.c:123:
> undefined reference to `deflateEnd'
> libblock.fa(block_qcow2-threads.c.o): In function `qcow2_zlib_decompress':
> /tmp/qemu-test/../../home/thuth/devel/qemu/block/qcow2-threads.c:152:
> undefined reference to `inflateInit2_'
> /tmp/qemu-test/../../home/thuth/devel/qemu/block/qcow2-threads.c:157:
> undefined reference to `inflate'
> /tmp/qemu-test/../../home/thuth/devel/qemu/block/qcow2-threads.c:169:
> undefined reference to `inflateEnd'
> etc.
> 
> Not sure whether this is due to the recent conversion to meson, or a
> recent change to that file ... anybody got a clue what's going on here?

It's a missing zlib dependency for the qcow2 files:

diff --git a/block/meson.build b/block/meson.build
index 4dbbfe60b4..a3e56b7cd1 100644
--- a/block/meson.build
+++ b/block/meson.build
@@ -40,9 +40,9 @@ block_ss.add(files(
   'vmdk.c',
   'vpc.c',
   'write-threshold.c',
-), zstd)
+), zstd, zlib)

-block_ss.add(when: [zlib, 'CONFIG_QCOW1'], if_true: files('qcow.c'))
+block_ss.add(when: 'CONFIG_QCOW1', if_true: files('qcow.c'))
 block_ss.add(when: 'CONFIG_VDI', if_true: files('vdi.c'))
 block_ss.add(when: 'CONFIG_CLOOP', if_true: files('cloop.c'))
 block_ss.add(when: 'CONFIG_BOCHS', if_true: files('bochs.c'))

(and then it becomes redundant for qcow1).  I'll send a formal patch
shortly.

Paolo




reply via email to

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