All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert (git)" <dgilbert@redhat.com>
To: qemu-devel@nongnu.org, quintela@redhat.com, peterx@redhat.com,
	leobras@redhat.com, berrange@redhat.com
Subject: [PULL 10/17] meson.build: Fix docker-test-build@alpine when including linux/errqueue.h
Date: Mon, 16 May 2022 16:38:05 +0100	[thread overview]
Message-ID: <20220516153812.127155-11-dgilbert@redhat.com> (raw)
In-Reply-To: <20220516153812.127155-1-dgilbert@redhat.com>

From: Leonardo Bras <leobras@redhat.com>

A build error happens in alpine CI when linux/errqueue.h is included
in io/channel-socket.c, due to redefining of 'struct __kernel_timespec':

===
ninja: job failed: [...]
In file included from /usr/include/linux/errqueue.h:6,
                 from ../io/channel-socket.c:29:
/usr/include/linux/time_types.h:7:8: error: redefinition of 'struct __kernel_timespec'
    7 | struct __kernel_timespec {
      |        ^~~~~~~~~~~~~~~~~
In file included from /usr/include/liburing.h:19,
                 from /builds/user/qemu/include/block/aio.h:18,
                 from /builds/user/qemu/include/io/channel.h:26,
                 from /builds/user/qemu/include/io/channel-socket.h:24,
                 from ../io/channel-socket.c:24:
/usr/include/liburing/compat.h:9:8: note: originally defined here
    9 | struct __kernel_timespec {
      |        ^~~~~~~~~~~~~~~~~
ninja: subcommand failed
===

As above error message suggests, 'struct __kernel_timespec' was already
defined by liburing/compat.h.

Fix alpine CI by adding test to disable liburing in configure step if a
redefinition happens between linux/errqueue.h and liburing/compat.h.

[dgilbert: This has been fixed in Alpine issue 13813 and liburing]

Signed-off-by: Leonardo Bras <leobras@redhat.com>
Message-Id: <20220513062836.965425-2-leobras@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
 meson.build | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/meson.build b/meson.build
index 93aa31a9e4..53a4728250 100644
--- a/meson.build
+++ b/meson.build
@@ -515,12 +515,23 @@ if not get_option('linux_aio').auto() or have_block
                            required: get_option('linux_aio'),
                            kwargs: static_kwargs)
 endif
+
+linux_io_uring_test = '''
+  #include <liburing.h>
+  #include <linux/errqueue.h>
+
+  int main(void) { return 0; }'''
+
 linux_io_uring = not_found
 if not get_option('linux_io_uring').auto() or have_block
   linux_io_uring = dependency('liburing', version: '>=0.3',
                               required: get_option('linux_io_uring'),
                               method: 'pkg-config', kwargs: static_kwargs)
+  if not cc.links(linux_io_uring_test)
+    linux_io_uring = not_found
+  endif
 endif
+
 libnfs = not_found
 if not get_option('libnfs').auto() or have_block
   libnfs = dependency('libnfs', version: '>=1.9.3',
-- 
2.36.1



  parent reply	other threads:[~2022-05-16 16:58 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-16 15:37 [PULL 00/17] migration queue Dr. David Alan Gilbert (git)
2022-05-16 15:37 ` [PULL 01/17] tests: fix encoding of IP addresses in x509 certs Dr. David Alan Gilbert (git)
2022-05-16 15:37 ` [PULL 02/17] tests: add more helper macros for creating TLS " Dr. David Alan Gilbert (git)
2022-05-16 15:37 ` [PULL 03/17] tests: add migration tests of TLS with PSK credentials Dr. David Alan Gilbert (git)
2022-05-16 15:37 ` [PULL 04/17] tests: add migration tests of TLS with x509 credentials Dr. David Alan Gilbert (git)
2022-05-16 15:38 ` [PULL 05/17] tests: convert XBZRLE migration test to use common helper Dr. David Alan Gilbert (git)
2022-05-16 15:38 ` [PULL 06/17] tests: convert multifd migration tests " Dr. David Alan Gilbert (git)
2022-05-16 15:38 ` [PULL 07/17] tests: add multifd migration tests of TLS with PSK credentials Dr. David Alan Gilbert (git)
2022-05-16 15:38 ` [PULL 08/17] tests: add multifd migration tests of TLS with x509 credentials Dr. David Alan Gilbert (git)
2022-05-16 15:38 ` [PULL 09/17] tests: ensure migration status isn't reported as failed Dr. David Alan Gilbert (git)
2022-05-16 15:38 ` Dr. David Alan Gilbert (git) [this message]
2022-05-16 15:38 ` [PULL 11/17] QIOChannel: Add flags on io_writev and introduce io_flush callback Dr. David Alan Gilbert (git)
2022-05-16 15:38 ` [PULL 12/17] QIOChannelSocket: Implement io_writev zero copy flag & io_flush for CONFIG_LINUX Dr. David Alan Gilbert (git)
2022-05-16 15:38 ` [PULL 13/17] migration: Add zero-copy-send parameter for QMP/HMP for Linux Dr. David Alan Gilbert (git)
2022-05-16 15:38 ` [PULL 14/17] migration: Add migrate_use_tls() helper Dr. David Alan Gilbert (git)
2022-05-16 15:38 ` [PULL 15/17] multifd: multifd_send_sync_main now returns negative on error Dr. David Alan Gilbert (git)
2022-05-16 15:38 ` [PULL 16/17] multifd: Send header packet without flags if zero-copy-send is enabled Dr. David Alan Gilbert (git)
2022-05-16 15:38 ` [PULL 17/17] multifd: Implement zero copy write in multifd migration (multifd-zero-copy) Dr. David Alan Gilbert (git)
2022-05-16 21:21 ` [PULL 00/17] migration queue Richard Henderson

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=20220516153812.127155-11-dgilbert@redhat.com \
    --to=dgilbert@redhat.com \
    --cc=berrange@redhat.com \
    --cc=leobras@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.