All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/dpdk: fix example build issue when libvirt is present
@ 2026-08-28 22:11 Thomas Petazzoni via buildroot
  2026-08-28 22:11 ` [Buildroot] [PATCH 2/2] package/dpdk: make the libvirt dependency explicit Thomas Petazzoni via buildroot
  2026-09-01 14:10 ` [Buildroot] [PATCH 1/2] package/dpdk: fix example build issue when libvirt is present Peter Korsgaard
  0 siblings, 2 replies; 4+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-08-28 22:11 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Petazzoni, Vincent Jardin

When libvirt is present before DPDK is built, some additional examples
are compiled. One of them fails to build due to a missing <stdlib.h>
include. Let's import a patch from OpenSuse, that we have submitted
upstream, to fix this issue.

We couldn't find any autobuilder failure for this issue, but the
following defconfig allows to reproduce the failure:

BR2_aarch64=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64_GLIBC_STABLE=y
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_PACKAGE_DPDK=y
BR2_PACKAGE_DPDK_EXAMPLES=y
BR2_PACKAGE_LIBVIRT=y

The problem exists since DPDK v19.11, so it has been in Buildroot
since DPDK was introduced in commit
d17d1b6bde95d46376c4fe93e8ca1a1f9da6c179.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 ...r_manager-add-missing-stdlib.h-heade.patch | 46 +++++++++++++++++++
 1 file changed, 46 insertions(+)
 create mode 100644 package/dpdk/0002-examples-vm_power_manager-add-missing-stdlib.h-heade.patch

diff --git a/package/dpdk/0002-examples-vm_power_manager-add-missing-stdlib.h-heade.patch b/package/dpdk/0002-examples-vm_power_manager-add-missing-stdlib.h-heade.patch
new file mode 100644
index 0000000000..899842c2b2
--- /dev/null
+++ b/package/dpdk/0002-examples-vm_power_manager-add-missing-stdlib.h-heade.patch
@@ -0,0 +1,46 @@
+From 9f6c3191b3178294d698cdca859ce9dac78517ff Mon Sep 17 00:00:00 2001
+From: Guillaume Gardet <Guillaume.Gardet@arm.com>
+Date: Thu, 29 Aug 2024 16:33:19 +0200
+Subject: [PATCH] examples/vm_power_manager: add missing <stdlib.h> header
+ include for strtol
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+strtol is defined in stdlib.h
+
+Fixes the following build failure:
+
+../examples/vm_power_manager/guest_cli/vm_power_cli_guest.c: In function ‘cmd_query_freq_list_parsed’:
+../examples/vm_power_manager/guest_cli/vm_power_cli_guest.c:208:42: error: implicit declaration of function ‘strtol’; did you mean ‘strtok’? [-Wimplicit-function-declaration]
+  208 |                 lcore_id = (unsigned int)strtol(res->cpu_num, &ep, 10);
+      |                                          ^~~~~~
+      |                                          strtok
+
+Fixes: 0e8f47491f090f44a4956429cb27f6942b6618b0 ("examples/vm_power: add command to query CPU frequency")
+Signed-off-by: Guillaume Gardet <guillaume.gardet@arm.com>
+[Thomas:
+- retrieve patch from
+https://build.opensuse.org/projects/openSUSE:42:Factory-Candidates-Check/packages/dpdk/files/0001-examples-vm_power_manager-add-missing-header.patch?expand=1
+- improve commit message]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
+Upstream: https://mails.dpdk.org/archives/dev/2026-August/344552.html
+---
+ examples/vm_power_manager/guest_cli/vm_power_cli_guest.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
+index 4114593cee..63a59c8b10 100644
+--- a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
++++ b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
+@@ -6,6 +6,7 @@
+ #include <stdint.h>
+ #include <string.h>
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <termios.h>
+ 
+ #include <cmdline_rdline.h>
+-- 
+2.55.0
+
-- 
2.55.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 2/2] package/dpdk: make the libvirt dependency explicit
  2026-08-28 22:11 [Buildroot] [PATCH 1/2] package/dpdk: fix example build issue when libvirt is present Thomas Petazzoni via buildroot
@ 2026-08-28 22:11 ` Thomas Petazzoni via buildroot
  2026-09-01 14:11   ` Peter Korsgaard
  2026-09-01 14:10 ` [Buildroot] [PATCH 1/2] package/dpdk: fix example build issue when libvirt is present Peter Korsgaard
  1 sibling, 1 reply; 4+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-08-28 22:11 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Petazzoni, Vincent Jardin

examples/vm_power_manager/meson.build in DPDK detects the presence of
libvirt:

opt_dep = cc.find_library('virt', required : false)

and then builds some examples or not depending on the availability of
libvirt. Let's make this optional dependency explicit in dpdk.mk, even
if there's no explicit enable/disable option for it.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 package/dpdk/dpdk.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/dpdk/dpdk.mk b/package/dpdk/dpdk.mk
index 147bdb23d3..968a5a877d 100644
--- a/package/dpdk/dpdk.mk
+++ b/package/dpdk/dpdk.mk
@@ -112,6 +112,10 @@ ifeq ($(BR2_PACKAGE_LIBBPF),y)
 DPDK_DEPENDENCIES += libbpf
 endif
 
+ifeq ($(BR2_PACKAGE_LIBVIRT),y)
+DPDK_DEPENDENCIES += libvirt
+endif
+
 ifeq ($(BR2_PACKAGE_RDMA_CORE),y)
 DPDK_DEPENDENCIES += rdma-core
 endif
-- 
2.55.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/2] package/dpdk: fix example build issue when libvirt is present
  2026-08-28 22:11 [Buildroot] [PATCH 1/2] package/dpdk: fix example build issue when libvirt is present Thomas Petazzoni via buildroot
  2026-08-28 22:11 ` [Buildroot] [PATCH 2/2] package/dpdk: make the libvirt dependency explicit Thomas Petazzoni via buildroot
@ 2026-09-01 14:10 ` Peter Korsgaard
  1 sibling, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2026-09-01 14:10 UTC (permalink / raw)
  To: Thomas Petazzoni via buildroot; +Cc: Thomas Petazzoni, Vincent Jardin

>>>>> "Thomas" == Thomas Petazzoni via buildroot <buildroot@buildroot.org> writes:

 > When libvirt is present before DPDK is built, some additional examples
 > are compiled. One of them fails to build due to a missing <stdlib.h>
 > include. Let's import a patch from OpenSuse, that we have submitted
 > upstream, to fix this issue.

 > We couldn't find any autobuilder failure for this issue, but the
 > following defconfig allows to reproduce the failure:

 > BR2_aarch64=y
 > BR2_TOOLCHAIN_EXTERNAL=y
 > BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
 > BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64_GLIBC_STABLE=y
 > BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
 > BR2_PACKAGE_DPDK=y
 > BR2_PACKAGE_DPDK_EXAMPLES=y
 > BR2_PACKAGE_LIBVIRT=y

 > The problem exists since DPDK v19.11, so it has been in Buildroot
 > since DPDK was introduced in commit
 > d17d1b6bde95d46376c4fe93e8ca1a1f9da6c179.

 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 2/2] package/dpdk: make the libvirt dependency explicit
  2026-08-28 22:11 ` [Buildroot] [PATCH 2/2] package/dpdk: make the libvirt dependency explicit Thomas Petazzoni via buildroot
@ 2026-09-01 14:11   ` Peter Korsgaard
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2026-09-01 14:11 UTC (permalink / raw)
  To: Thomas Petazzoni via buildroot; +Cc: Thomas Petazzoni, Vincent Jardin

>>>>> "Thomas" == Thomas Petazzoni via buildroot <buildroot@buildroot.org> writes:

 > examples/vm_power_manager/meson.build in DPDK detects the presence of
 > libvirt:

 > opt_dep = cc.find_library('virt', required : false)

 > and then builds some examples or not depending on the availability of
 > libvirt. Let's make this optional dependency explicit in dpdk.mk, even
 > if there's no explicit enable/disable option for it.

 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2026-09-01 14:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-28 22:11 [Buildroot] [PATCH 1/2] package/dpdk: fix example build issue when libvirt is present Thomas Petazzoni via buildroot
2026-08-28 22:11 ` [Buildroot] [PATCH 2/2] package/dpdk: make the libvirt dependency explicit Thomas Petazzoni via buildroot
2026-09-01 14:11   ` Peter Korsgaard
2026-09-01 14:10 ` [Buildroot] [PATCH 1/2] package/dpdk: fix example build issue when libvirt is present Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.