Skip to contentSkip to conversation

meson: always include contrib/libvhost-user

PATCH Applied Stefan Hajnoczi 4 participants 4 messages Nov 6, 2020 – Nov 9, 2020 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 meson: always include contrib/libvhost-user

libvhost-user is needed when CONFIG_LINUX is set. The CONFIG_VHOST_USER check in meson.build is incorrect.

In fact, no explicit check is needed since this dependency is not built by default. If something declares a dependency on libvhost-user then it will be built, otherwise it won't be built (i.e. on non-Linux hosts).

This fixes ./configure --disable-vhost-user && make.

Fixes bc15e44cb2191bbb2318878acdf5038134e56394 ("configure: introduce --enable-vhost-user-blk-server")
---
 meson.build | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
meson.build +1 -5
index f5175010df..b473620321 100644
@@ -1450,11 +1450,7 @@ trace_events_subdirs += [
   'util',
 ]
 
-vhost_user = not_found
-if 'CONFIG_VHOST_USER' in config_host
-  subdir('contrib/libvhost-user')
-endif
-
+subdir('contrib/libvhost-user')
 subdir('qapi')
 subdir('qobject')
 subdir('stubs')
Signature · 1 line
2.28.0
#1 lore raw
Quoted 7 lines · Stefan Hajnoczi

libvhost-user is needed when CONFIG_LINUX is set. The CONFIG_VHOST_USER check in meson.build is incorrect.

In fact, no explicit check is needed since this dependency is not built by default. If something declares a dependency on libvhost-user then it will be built, otherwise it won't be built (i.e. on non-Linux hosts).

Quoted 6 lines

This fixes ./configure --disable-vhost-user && make.

Fixes bc15e44cb2191bbb2318878acdf5038134e56394 ("configure: introduce --enable-vhost-user-blk-server")

Applied, thanks!

It's probably time to move libvhost-user out of contrib.

Quoted 24 lines
---
 meson.build | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
meson.build +1 -5
index f5175010df..b473620321 100644
@@ -1450,11 +1450,7 @@ trace_events_subdirs += [
   'util',
 ]
 
-vhost_user = not_found
-if 'CONFIG_VHOST_USER' in config_host
-  subdir('contrib/libvhost-user')
-endif
-
+subdir('contrib/libvhost-user')
 subdir('qapi')
 subdir('qobject')
 subdir('stubs')
Signature · 1 line
2.28.0
#2 lore raw
In reply to Stefan Hajnoczi
Quoted 22 lines · Stefan Hajnoczi

libvhost-user is needed when CONFIG_LINUX is set. The CONFIG_VHOST_USER check in meson.build is incorrect.

In fact, no explicit check is needed since this dependency is not built by default. If something declares a dependency on libvhost-user then it will be built, otherwise it won't be built (i.e. on non-Linux hosts).

This fixes ./configure --disable-vhost-user && make.

Fixes bc15e44cb2191bbb2318878acdf5038134e56394 ("configure: introduce --enable-vhost-user-blk-server")
---
 meson.build | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
meson.build +0 -0
index f5175010df..b473620321 100644

meson.build trace_events_subdirs += [ · line 1453

Quoted 9 lines
meson.build +1 -5
@@ -1450,11 +1450,7 @@ trace_events_subdirs += [
   'util',
 ]
 
-vhost_user = not_found
-if 'CONFIG_VHOST_USER' in config_host
-  subdir('contrib/libvhost-user')
-endif
-
+subdir('contrib/libvhost-user')

I haven't reviewed what this code does, but testing it I see:

 $ ../configure --disable-vhost-user

vhost-user support: YES

which doesn't look correct...

Quoted 4 lines
meson.build +0 -0
 subdir('qapi')
 subdir('qobject')
 subdir('stubs')
#3 lore raw
Quoted 35 lines · Philippe Mathieu-Daudé
Quoted 22 lines · Stefan Hajnoczi

libvhost-user is needed when CONFIG_LINUX is set. The CONFIG_VHOST_USER check in meson.build is incorrect.

In fact, no explicit check is needed since this dependency is not built by default. If something declares a dependency on libvhost-user then it will be built, otherwise it won't be built (i.e. on non-Linux hosts).

This fixes ./configure --disable-vhost-user && make.

Fixes bc15e44cb2191bbb2318878acdf5038134e56394 ("configure: introduce --enable-vhost-user-blk-server")
---
 meson.build | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
meson.build +0 -0
index f5175010df..b473620321 100644

meson.build trace_events_subdirs += [ · line 1453

Quoted 9 lines
meson.build +1 -5
@@ -1450,11 +1450,7 @@ trace_events_subdirs += [
   'util',
 ]
 
-vhost_user = not_found
-if 'CONFIG_VHOST_USER' in config_host
-  subdir('contrib/libvhost-user')
-endif
-
+subdir('contrib/libvhost-user')

I haven't reviewed what this code does, but testing it I see:

Quoted 5 lines
 $ ../configure --disable-vhost-user

vhost-user support: YES

which doesn't look correct...

I think it's a bug in meson.build: It says "vhost-user" but then uses the CONFIG_VHOST_KERNEL switch instead. I just sent a patch to fix this.

Thomas