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

[XEN PATCH] tools: Fix configure of upstream QEMU


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Wed, 23 Sep 2020 12:03:23 +0100
  • Authentication-results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Paul Durrant <paul@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Wed, 23 Sep 2020 11:04:43 +0000
  • Ironport-sdr: soLdDUUyYssFVJPPcqgcfqVQS2BeUxBzsEfFIfKEtA4OxxpeUaD/VMHo6Um+T4zOz2x+K4WPTz xye3PZpQnuU+Bt06kZqmswuGgHA2EEEevVOYk7If+22TFBySrFAhMVEA9Xzf/MQIQw1YsC0UNB qoPsS+ukiywI7VoAbzFP2093A6TCY3BBkqY9jfK1KTCM9bBO86w/uHJ36Bk4IKWULEd3I0Rmo0 QbbrTGmAYXcbeYT4qJf/F9+CEov706V6IZ3ZZuMt6Z1KixVqkwqfTbXKMTT8CKzImUZiL5mIuU VRg=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

QEMU as recently switch its build system to use meson and the
./configure step with meson is more restrictive that the step used to
be, most installation path wants to be within prefix, otherwise we
have this error message:

    ERROR: The value of the 'datadir' option is '/usr/share/qemu-xen' which 
must be a subdir of the prefix '/usr/lib/xen'.

In order to workaround the limitation, we will set prefix to the same
one as for the rest of Xen installation, and set all the other paths.

For reference, a thread in qemu-devel:
    "configure with datadir outside of --prefix fails with meson"
    
https://lore.kernel.org/qemu-devel/20200918133012.GH2024@xxxxxxxxxxxxxxxxxxxxxxx/t/

And an issue in meson:
    "artificial limitation of directories (forced to be in prefix)"
    https://github.com/mesonbuild/meson/issues/2561

Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>

---

I've tested the change with an oldish QEMU, qemu-xen-4.12, and the
layout of the tarball generated by osstest doesn't change.
---
 tools/Makefile | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/Makefile b/tools/Makefile
index 198b239edcc1..ff21f1125f66 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -238,7 +238,7 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find
        $$source/configure --enable-xen --target-list=i386-softmmu \
                $(QEMU_XEN_ENABLE_DEBUG) \
                $$enable_trace_backend \
-               --prefix=$(LIBEXEC) \
+               --prefix=$(prefix) \
                --libdir=$(LIBEXEC_LIB) \
                --includedir=$(LIBEXEC_INC) \
                --extra-cflags="-DXC_WANT_COMPAT_EVTCHN_API=1 \
@@ -274,6 +274,10 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find
                --bindir=$(LIBEXEC_BIN) \
                --datadir=$(SHAREDIR)/qemu-xen \
                --localstatedir=$(localstatedir) \
+               --docdir=$(LIBEXEC)/share/doc \
+               --mandir=$(LIBEXEC)/share/man \
+               --libexecdir=$(LIBEXEC)/libexec \
+               --firmwarepath=$(LIBEXEC)/share/qemu-firmware \
                --disable-kvm \
                --disable-docs \
                --disable-guest-agent \
-- 
Anthony PERARD




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.