pkgsrc-Bugs archive

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

pkg/55049: emulators/qemu build fail after merge nvmm on netbsd/amd64-8



>Number:         55049
>Category:       pkg
>Synopsis:       emulators/qemu build fail after merge nvmm on netbsd/amd64-8
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 05 16:30:01 +0000 2020
>Originator:     Yasushi Oshima
>Release:        pkgsrc-current
>Organization:
>Environment:
NetBSD amanatsu4 8.1 NetBSD 8.1 (XEN3_DOMU) #0: Fri May 31 08:43:59 UTC 2019  mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/xen/compile/XEN3_DOMU amd64
>Description:
The nvmm patch for qemu always enables nvmm option when OS is NetBSD.
But nvmm is only available on NetBSD/amd64 9.0 and later now.

When in the case of another version, (netbsd/amd64-8, netbsd/i386-any, or so on), make configure says:

ERROR: User requested feature NVMM
       configure was not able to find it.
       NVMM is not available

*** Error code 1

Stop.
make[1]: stopped in /usr/pkgsrc/emulators/qemu
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/emulators/qemu

>How-To-Repeat:
make in pkgsrc/emulators/qemu on NetBSD/amd64 8.1

>Fix:
This patch change to:
- Set default off when netbsd.
- Add nvmm PKG_OPTION when NetBSD/amd64 9 and later.
  - add --enable-nvmm CONFIGURE_ARGS.
  - another case, add --disable-nvmm.
It will need more considerations for other OS cases.

diff --git a/emulators/qemu/options.mk b/emulators/qemu/options.mk
index 5da2584b4f0..94291eb3584 100644
--- a/emulators/qemu/options.mk
+++ b/emulators/qemu/options.mk
@@ -14,6 +14,11 @@ PKG_SUPPORTED_OPTIONS+=	virtfs-proxy-helper
 PKG_SUGGESTED_OPTIONS+=	sdl
 .endif
 
+.if ${OPSYS} == "NetBSD" && ${MACHINE_ARCH} == "x86_64" && ${OS_VERSION:R} >= 9
+PKG_SUPPORTED_OPTIONS+=	nvmm
+PKG_SUGGESTED_OPTIONS+=	nvmm
+.endif
+
 .include "../../mk/bsd.options.mk"
 
 PLIST_VARS+=		gtk virtfs-proxy-helper
@@ -49,3 +54,9 @@ CONFIGURE_ARGS+=	--enable-spice
 .else
 CONFIGURE_ARGS+=	--disable-spice
 .endif
+
+.if !empty(PKG_OPTIONS:Mnvmm)
+CONFIGURE_ARGS+=	--enable-nvmm
+.else
+CONFIGURE_ARGS+=	--disable-nvmm
+.endif
diff --git a/emulators/qemu/patches/patch-configure b/emulators/qemu/patches/patch-configure
index e2900d98e9a..8eb5631cd6d 100644
--- a/emulators/qemu/patches/patch-configure
+++ b/emulators/qemu/patches/patch-configure
@@ -43,7 +43,7 @@ Add NVMM support.
  NetBSD)
    bsd="yes"
    hax="yes"
-+  nvmm="yes"
++  nvmm="no"
    make="${MAKE-gmake}"
    audio_drv_list="oss try-sdl"
    audio_possible_drivers="oss sdl"


Home | Main Index | Thread Index | Old Index