qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net/passt: Fix build failure due to missing GIO dependency
@ 2025-07-18 13:31 Laurent Vivier
  2025-07-18 13:41 ` Daniel P. Berrangé
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Laurent Vivier @ 2025-07-18 13:31 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Marc-André Lureau,
	Philippe Mathieu-Daudé, Thomas Huth, Daniel P. Berrangé,
	Laurent Vivier

The passt networking backend uses functions from the GIO library,
such as g_subprocess_launcher_new(), to manage its daemon process.
So, building with passt enabled requires GIO to be available.

If we enable passt and disable gio the build fails during linkage with
undefined reference errors:

  /usr/bin/ld: libsystem.a.p/net_passt.c.o: in function `net_passt_start_daemon':
  net/passt.c:250: undefined reference to `g_subprocess_launcher_new'
  /usr/bin/ld: net/passt.c:251: undefined reference to `g_subprocess_launcher_take_fd'
  /usr/bin/ld: net/passt.c:253: undefined reference to `g_subprocess_launcher_spawnv'
  /usr/bin/ld: net/passt.c:256: undefined reference to `g_object_unref'
  /usr/bin/ld: net/passt.c:263: undefined reference to `g_subprocess_wait'
  /usr/bin/ld: net/passt.c:268: undefined reference to `g_subprocess_get_if_exited'
  /usr/bin/ld: libsystem.a.p/net_passt.c.o: in function `glib_autoptr_clear_GSubprocess':
  /usr/include/glib-2.0/gio/gio-autocleanups.h:132: undefined reference to `g_object_unref'
  /usr/bin/ld: libsystem.a.p/net_passt.c.o: in function `net_passt_start_daemon':
  net/passt.c:269: undefined reference to `g_subprocess_get_exit_status'

Fix this by adding an explicit weson dependency on GIO for the passt
option.
The existing dependency on linux is kept because passt is only available
on this OS.

Reported-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
---
 meson.build | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meson.build b/meson.build
index c2bc3eeedce9..5842dd026a6f 100644
--- a/meson.build
+++ b/meson.build
@@ -1287,6 +1287,7 @@ endif
 
 enable_passt = get_option('passt') \
   .require(host_os == 'linux', error_message: 'passt is supported only on Linux') \
+  .require(gio.found(), error_message: 'passt requires gio') \
   .allowed()
 
 vde = not_found
-- 
2.49.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] net/passt: Fix build failure due to missing GIO dependency
  2025-07-18 13:31 [PATCH] net/passt: Fix build failure due to missing GIO dependency Laurent Vivier
@ 2025-07-18 13:41 ` Daniel P. Berrangé
  2025-07-18 14:54 ` Thomas Huth
  2025-09-25 10:13 ` Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Daniel P. Berrangé @ 2025-07-18 13:41 UTC (permalink / raw)
  To: Laurent Vivier
  Cc: qemu-devel, Paolo Bonzini, Marc-André Lureau,
	Philippe Mathieu-Daudé, Thomas Huth

On Fri, Jul 18, 2025 at 03:31:10PM +0200, Laurent Vivier wrote:
> The passt networking backend uses functions from the GIO library,
> such as g_subprocess_launcher_new(), to manage its daemon process.
> So, building with passt enabled requires GIO to be available.
> 
> If we enable passt and disable gio the build fails during linkage with
> undefined reference errors:
> 
>   /usr/bin/ld: libsystem.a.p/net_passt.c.o: in function `net_passt_start_daemon':
>   net/passt.c:250: undefined reference to `g_subprocess_launcher_new'
>   /usr/bin/ld: net/passt.c:251: undefined reference to `g_subprocess_launcher_take_fd'
>   /usr/bin/ld: net/passt.c:253: undefined reference to `g_subprocess_launcher_spawnv'
>   /usr/bin/ld: net/passt.c:256: undefined reference to `g_object_unref'
>   /usr/bin/ld: net/passt.c:263: undefined reference to `g_subprocess_wait'
>   /usr/bin/ld: net/passt.c:268: undefined reference to `g_subprocess_get_if_exited'
>   /usr/bin/ld: libsystem.a.p/net_passt.c.o: in function `glib_autoptr_clear_GSubprocess':
>   /usr/include/glib-2.0/gio/gio-autocleanups.h:132: undefined reference to `g_object_unref'
>   /usr/bin/ld: libsystem.a.p/net_passt.c.o: in function `net_passt_start_daemon':
>   net/passt.c:269: undefined reference to `g_subprocess_get_exit_status'
> 
> Fix this by adding an explicit weson dependency on GIO for the passt
> option.
> The existing dependency on linux is kept because passt is only available
> on this OS.
> 
> Reported-by: Thomas Huth <thuth@redhat.com>
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> ---
>  meson.build | 1 +
>  1 file changed, 1 insertion(+)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] net/passt: Fix build failure due to missing GIO dependency
  2025-07-18 13:31 [PATCH] net/passt: Fix build failure due to missing GIO dependency Laurent Vivier
  2025-07-18 13:41 ` Daniel P. Berrangé
@ 2025-07-18 14:54 ` Thomas Huth
  2025-09-25 10:13 ` Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Huth @ 2025-07-18 14:54 UTC (permalink / raw)
  To: Laurent Vivier, qemu-devel
  Cc: Paolo Bonzini, Marc-André Lureau,
	Philippe Mathieu-Daudé, Daniel P. Berrangé

On 18/07/2025 15.31, Laurent Vivier wrote:
> The passt networking backend uses functions from the GIO library,
> such as g_subprocess_launcher_new(), to manage its daemon process.
> So, building with passt enabled requires GIO to be available.
> 
> If we enable passt and disable gio the build fails during linkage with
> undefined reference errors:
> 
>    /usr/bin/ld: libsystem.a.p/net_passt.c.o: in function `net_passt_start_daemon':
>    net/passt.c:250: undefined reference to `g_subprocess_launcher_new'
>    /usr/bin/ld: net/passt.c:251: undefined reference to `g_subprocess_launcher_take_fd'
>    /usr/bin/ld: net/passt.c:253: undefined reference to `g_subprocess_launcher_spawnv'
>    /usr/bin/ld: net/passt.c:256: undefined reference to `g_object_unref'
>    /usr/bin/ld: net/passt.c:263: undefined reference to `g_subprocess_wait'
>    /usr/bin/ld: net/passt.c:268: undefined reference to `g_subprocess_get_if_exited'
>    /usr/bin/ld: libsystem.a.p/net_passt.c.o: in function `glib_autoptr_clear_GSubprocess':
>    /usr/include/glib-2.0/gio/gio-autocleanups.h:132: undefined reference to `g_object_unref'
>    /usr/bin/ld: libsystem.a.p/net_passt.c.o: in function `net_passt_start_daemon':
>    net/passt.c:269: undefined reference to `g_subprocess_get_exit_status'
> 
> Fix this by adding an explicit weson dependency on GIO for the passt
> option.
> The existing dependency on linux is kept because passt is only available
> on this OS.
> 
> Reported-by: Thomas Huth <thuth@redhat.com>
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> ---
>   meson.build | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/meson.build b/meson.build
> index c2bc3eeedce9..5842dd026a6f 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -1287,6 +1287,7 @@ endif
>   
>   enable_passt = get_option('passt') \
>     .require(host_os == 'linux', error_message: 'passt is supported only on Linux') \
> +  .require(gio.found(), error_message: 'passt requires gio') \
>     .allowed()
>   
>   vde = not_found

Reviewed-by: Thomas Huth <thuth@redhat.com>



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] net/passt: Fix build failure due to missing GIO dependency
  2025-07-18 13:31 [PATCH] net/passt: Fix build failure due to missing GIO dependency Laurent Vivier
  2025-07-18 13:41 ` Daniel P. Berrangé
  2025-07-18 14:54 ` Thomas Huth
@ 2025-09-25 10:13 ` Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2025-09-25 10:13 UTC (permalink / raw)
  To: Laurent Vivier
  Cc: qemu-devel, Paolo Bonzini, Marc-André Lureau,
	Philippe Mathieu-Daudé, Thomas Huth, Daniel P. Berrangé

On Fri, 18 Jul 2025 at 14:32, Laurent Vivier <lvivier@redhat.com> wrote:
>
> The passt networking backend uses functions from the GIO library,
> such as g_subprocess_launcher_new(), to manage its daemon process.
> So, building with passt enabled requires GIO to be available.
>
> If we enable passt and disable gio the build fails during linkage with
> undefined reference errors:
>
>   /usr/bin/ld: libsystem.a.p/net_passt.c.o: in function `net_passt_start_daemon':
>   net/passt.c:250: undefined reference to `g_subprocess_launcher_new'
>   /usr/bin/ld: net/passt.c:251: undefined reference to `g_subprocess_launcher_take_fd'
>   /usr/bin/ld: net/passt.c:253: undefined reference to `g_subprocess_launcher_spawnv'
>   /usr/bin/ld: net/passt.c:256: undefined reference to `g_object_unref'
>   /usr/bin/ld: net/passt.c:263: undefined reference to `g_subprocess_wait'
>   /usr/bin/ld: net/passt.c:268: undefined reference to `g_subprocess_get_if_exited'
>   /usr/bin/ld: libsystem.a.p/net_passt.c.o: in function `glib_autoptr_clear_GSubprocess':
>   /usr/include/glib-2.0/gio/gio-autocleanups.h:132: undefined reference to `g_object_unref'
>   /usr/bin/ld: libsystem.a.p/net_passt.c.o: in function `net_passt_start_daemon':
>   net/passt.c:269: undefined reference to `g_subprocess_get_exit_status'
>
> Fix this by adding an explicit weson dependency on GIO for the passt
> option.
> The existing dependency on linux is kept because passt is only available
> on this OS.
>
> Reported-by: Thomas Huth <thuth@redhat.com>
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>


I've picked this up via target-arm.next, and added some tags:
Cc: qemu-stable@nongnu.org
Fixes: 854ee02b222 ("net: Add passt network backend")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3121

-- PMM


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-09-25 10:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-18 13:31 [PATCH] net/passt: Fix build failure due to missing GIO dependency Laurent Vivier
2025-07-18 13:41 ` Daniel P. Berrangé
2025-07-18 14:54 ` Thomas Huth
2025-09-25 10:13 ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).