qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Thomas Huth <thuth@redhat.com>,
	Qemu-block <qemu-block@nongnu.org>,
	QEMU Developers <qemu-devel@nongnu.org>
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Denis Plotnikov" <dplotnikov@virtuozzo.com>,
	"Max Reitz" <mreitz@redhat.com>
Subject: Re: QEMU build error with --disable-qcow1
Date: Fri, 28 Aug 2020 19:27:39 +0200	[thread overview]
Message-ID: <2a3c48d9-cc5e-844b-f3ea-b3917237615d@redhat.com> (raw)
In-Reply-To: <5e1817af-afde-2839-98b2-c7a50678756a@redhat.com>

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	other threads:[~2020-08-28 17:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-28 16:34 QEMU build error with --disable-qcow1 Thomas Huth
2020-08-28 17:27 ` Paolo Bonzini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2a3c48d9-cc5e-844b-f3ea-b3917237615d@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=dplotnikov@virtuozzo.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).