Skip to contentSkip to conversation

tools/meson.build: Error on enabling virtiofsd and have_system is false

PATCH In review Mahmoud Mandour 3 participants 6 messages Apr 28, 2021 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/meson.build: Error on enabling virtiofsd and have_system is false

Previously, on configuring with --enable-virtiofsd and specifying a target list that does not contain a full-system emulation target, a spurious error message is emitted. This patch introduces a meaningful error message for such case.

---
 tools/meson.build | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
tools/meson.build +3 -1
index 3e5a0abfa2..f6a4ced2f4 100644
@@ -5,7 +5,9 @@ have_virtiofsd = (targetos == 'linux' and
     'CONFIG_VHOST_USER' in config_host)
 
 if get_option('virtiofsd').enabled()
-  if not have_virtiofsd
+  if not have_system
+    error('virtiofsd requires full-system emulation target(s)')
+  elif not have_virtiofsd
     if targetos != 'linux'
       error('virtiofsd requires Linux')
     elif not seccomp.found() or not libcap_ng.found()
Signature · 1 line
2.25.1
#1 lore raw
Quoted 15 lines · Mahmoud Mandour

Previously, on configuring with --enable-virtiofsd and specifying a target list that does not contain a full-system emulation target, a spurious error message is emitted. This patch introduces a meaningful error message for such case.

---
 tools/meson.build | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
tools/meson.build +0 -0
index 3e5a0abfa2..f6a4ced2f4 100644

tools/meson.build have_virtiofsd = (targetos == 'linux' and · line 9

Quoted 6 lines
tools/meson.build +2 -1
@@ -5,7 +5,9 @@ have_virtiofsd = (targetos == 'linux' and
     'CONFIG_VHOST_USER' in config_host)
 
 if get_option('virtiofsd').enabled()
-  if not have_virtiofsd
+  if not have_system
+    error('virtiofsd requires full-system emulation target(s)')

I am not entirely sure if this is true. The error message before this patch is applied is:

../tools/meson.build:12:6: ERROR: Problem encountered: virtiofsd requires libcap-ng-devel and seccomp-devel

From what I know about virtiofsd, I know it definitely depends on those two things.

Is it possible that the error here is that the top-level meson.build is not properly collecting the seccomp and libcap-ng dependencies if the configure invocation doesn't require a system emulation target?

Thanks,

Connor

Quoted 5 lines
tools/meson.build +1 -0
+  elif not have_virtiofsd
     if targetos != 'linux'
       error('virtiofsd requires Linux')
     elif not seccomp.found() or not libcap_ng.found()
#2 lore raw
Quoted 32 lines · Connor Kuehl
Quoted 15 lines · Mahmoud Mandour

Previously, on configuring with --enable-virtiofsd and specifying a target list that does not contain a full-system emulation target, a spurious error message is emitted. This patch introduces a meaningful error message for such case.

---
 tools/meson.build | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
tools/meson.build +0 -0
index 3e5a0abfa2..f6a4ced2f4 100644

tools/meson.build have_virtiofsd = (targetos == 'linux' and · line 9

Quoted 6 lines
tools/meson.build +2 -1
@@ -5,7 +5,9 @@ have_virtiofsd = (targetos == 'linux' and
     'CONFIG_VHOST_USER' in config_host)
 
 if get_option('virtiofsd').enabled()
-  if not have_virtiofsd
+  if not have_system
+    error('virtiofsd requires full-system emulation target(s)')

I am not entirely sure if this is true. The error message before this patch is applied is:

../tools/meson.build:12:6: ERROR: Problem encountered: virtiofsd requires libcap-ng-devel and seccomp-devel

From what I know about virtiofsd, I know it definitely depends on those two things.

Quoted 15 lines

Is it possible that the error here is that the top-level meson.build is not properly collecting the seccomp and libcap-ng dependencies if the configure invocation doesn't require a system emulation target?

Thanks,

Connor

Quoted 5 lines
tools/meson.build +1 -0
+  elif not have_virtiofsd
     if targetos != 'linux'
       error('virtiofsd requires Linux')
     elif not seccomp.found() or not libcap_ng.found()

I also thought that this is the case since I also specifically get this error message
if I enable virtiofsd and specify a target list with only Linux-user targets while nothing
in tools/meson.build specifies so. But I think that even if it correctly managed the
dependencies it would include and build virtiofsd unnecessarily and that's not what we want(?)

Thanks,
Mahmoud

#3 lore raw
Quoted 12 lines · Mahmoud Mandour
Quoted 6 lines

I am not entirely sure if this is true. The error message before this patch is applied is:

../tools/meson.build:12:6: ERROR: Problem encountered: virtiofsd requires libcap-ng-devel and seccomp-devel

Quoted 6 lines

From what I know about virtiofsd, I know it definitely depends on those two things.

Is it possible that the error here is that the top-level meson.build is not properly collecting the seccomp and libcap-ng dependencies if the configure invocation doesn't require a system emulation target?

Quoted 8 lines

I also thought that this is the case since I also specifically get this error message
if I enable virtiofsd and specify a target list with only Linux-user targets while nothing
in tools/meson.build specifies so. But I think that even if it correctly managed the
dependencies it would include and build virtiofsd unnecessarily and that's not what we want(?)

I think that's exactly what we want for the default case because virtiofsd is enabled by default (../configure --help).

Even if the virtiofsd dependencies are satisfied, if one doesn't want to build virtiofsd, they can pass --disable-virtiofsd to the configure invocation.

Connor

#4 lore raw
Quoted 20 lines · Connor Kuehl
Quoted 12 lines · Mahmoud Mandour
Quoted 6 lines

I am not entirely sure if this is true. The error message before this patch is applied is:

../tools/meson.build:12:6: ERROR: Problem encountered: virtiofsd requires libcap-ng-devel and seccomp-devel

Quoted 6 lines

From what I know about virtiofsd, I know it definitely depends on those two things.

Is it possible that the error here is that the top-level meson.build is not properly collecting the seccomp and libcap-ng dependencies if the configure invocation doesn't require a system emulation target?

Quoted 7 lines

I also thought that this is the case since I also specifically get this error message
if I enable virtiofsd and specify a target list with only Linux-user targets while nothing
in tools/meson.build specifies so. But I think that even if it correctly managed the
dependencies it would include and build virtiofsd unnecessarily and

Quoted 5 lines

that's

Quoted 1 line

not what we want(?)

I think that's exactly what we want for the default case because virtiofsd is enabled by default (../configure --help).

Even if the virtiofsd dependencies are satisfied, if one doesn't want to

Quoted 6 lines

build virtiofsd, they can pass --disable-virtiofsd to the configure invocation.

Connor

That makes sense, I now understand. Thank you.

Mahmoud

#5 lore raw
In reply to Connor Kuehl
Quoted 29 lines · Connor Kuehl
Quoted 15 lines · Mahmoud Mandour

Previously, on configuring with --enable-virtiofsd and specifying a target list that does not contain a full-system emulation target, a spurious error message is emitted. This patch introduces a meaningful error message for such case.

---
 tools/meson.build | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
tools/meson.build +0 -0
index 3e5a0abfa2..f6a4ced2f4 100644

tools/meson.build have_virtiofsd = (targetos == 'linux' and · line 9

Quoted 6 lines
tools/meson.build +2 -1
@@ -5,7 +5,9 @@ have_virtiofsd = (targetos == 'linux' and
     'CONFIG_VHOST_USER' in config_host)
 
 if get_option('virtiofsd').enabled()
-  if not have_virtiofsd
+  if not have_system
+    error('virtiofsd requires full-system emulation target(s)')

I am not entirely sure if this is true. The error message before this patch is applied is:

../tools/meson.build:12:6: ERROR: Problem encountered: virtiofsd requires libcap-ng-devel and seccomp-devel

Quoted 6 lines

From what I know about virtiofsd, I know it definitely depends on those two things.

Is it possible that the error here is that the top-level meson.build is not properly collecting the seccomp and libcap-ng dependencies if the configure invocation doesn't require a system emulation target?

This series should fix your problems:
https://patchew.org/QEMU/[email protected]/