We encountered the following error when building multipath-tools on qemuppc64 platform:
| In file included from /build/tmp/work/ppc64p9le-wrs-linux/multipath-tools/0.10.0/recipe-sysroot/usr/include/urcu/uatomic/ppc.h:228, | from /build/tmp/work/ppc64p9le-wrs-linux/multipath-tools/0.10.0/recipe-sysroot/usr/include/urcu/uatomic.h:73, | from lock.h:5, | from lock.c:1: | /build/tmp/work/ppc64p9le-wrs-linux/multipath-tools/0.10.0/recipe-sysroot/usr/include/urcu/uatomic/generic.h: In function '_uatomic_and': | /build/tmp/work/ppc64p9le-wrs-linux/multipath-tools/0.10.0/recipe-sysroot/usr/include/urcu/uatomic/generic.h:422:24: error: implicit declaration of function 'abort' [-Wimplicit-function-declaration] | 422 | oldt = uatomic_read((uint32_t *) addr); | | ^~~~~~~~~~~~ | /build/tmp/work/ppc64p9le-wrs-linux/multipath-tools/0.10.0/recipe-sysroot/usr/include/urcu/uatomic/generic.h:1:1: note: include '<stdlib.h>' or provide a declaration of 'abort' | +++ |+#include <stdlib.h> | 1 | // SPDX-FileCopyrightText: 1991-1994 by Xerox Corporation. All rights reserved. | make[1]: *** [../Makefile.inc:155: lock.o] Error 1 | make[1]: Leaving directory '/build/tmp/work/ppc64p9le-wrs-linux/multipath-tools/0.10.0/git/libmultipath' Add stdlib.h header file for abort() in uatomic/generic.h. Signed-off-by: Yi Zhao <yi.z...@windriver.com> --- ...h-add-missing-stdlib.h-header-file-f.patch | 45 +++++++++++++++++++ .../recipes-support/liburcu/liburcu_0.15.0.bb | 4 +- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-support/liburcu/liburcu/0001-uatomic-generic.h-add-missing-stdlib.h-header-file-f.patch diff --git a/meta/recipes-support/liburcu/liburcu/0001-uatomic-generic.h-add-missing-stdlib.h-header-file-f.patch b/meta/recipes-support/liburcu/liburcu/0001-uatomic-generic.h-add-missing-stdlib.h-header-file-f.patch new file mode 100644 index 0000000000..5872f45f43 --- /dev/null +++ b/meta/recipes-support/liburcu/liburcu/0001-uatomic-generic.h-add-missing-stdlib.h-header-file-f.patch @@ -0,0 +1,45 @@ +From c534091fc6924e76e6d24e861da9cf7272714231 Mon Sep 17 00:00:00 2001 +From: Yi Zhao <yi.z...@windriver.com> +Date: Tue, 21 Jan 2025 11:02:05 +0800 +Subject: [PATCH] uatomic/generic.h: add missing stdlib.h header file for + abort() + +We encountered the following error when building multipath-tools on +qemuppc64 platform: + +| In file included from /build/tmp/work/ppc64p9le-wrs-linux/multipath-tools/0.10.0/recipe-sysroot/usr/include/urcu/uatomic/ppc.h:228, +| from /build/tmp/work/ppc64p9le-wrs-linux/multipath-tools/0.10.0/recipe-sysroot/usr/include/urcu/uatomic.h:73, +| from lock.h:5, +| from lock.c:1: +| /build/tmp/work/ppc64p9le-wrs-linux/multipath-tools/0.10.0/recipe-sysroot/usr/include/urcu/uatomic/generic.h: In function '_uatomic_and': +| /build/tmp/work/ppc64p9le-wrs-linux/multipath-tools/0.10.0/recipe-sysroot/usr/include/urcu/uatomic/generic.h:422:24: error: implicit declaration of function 'abort' [-Wimplicit-function-declaration] +| 422 | oldt = uatomic_read((uint32_t *) addr); +| | ^~~~~~~~~~~~ +| /build/tmp/work/ppc64p9le-wrs-linux/multipath-tools/0.10.0/recipe-sysroot/usr/include/urcu/uatomic/generic.h:1:1: note: include '<stdlib.h>' or provide a declaration of 'abort' +| +++ |+#include <stdlib.h> +| 1 | // SPDX-FileCopyrightText: 1991-1994 by Xerox Corporation. All rights reserved. +| make[1]: *** [../Makefile.inc:155: lock.o] Error 1 +| make[1]: Leaving directory '/build/tmp/work/ppc64p9le-wrs-linux/multipath-tools/0.10.0/git/libmultipath' + +Upstream-Status: Submitted [https://github.com/urcu/userspace-rcu/pull/28] + +Signed-off-by: Yi Zhao <yi.z...@windriver.com> +--- + include/urcu/uatomic/generic.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/include/urcu/uatomic/generic.h b/include/urcu/uatomic/generic.h +index 5a81e00..5c8cb6c 100644 +--- a/include/urcu/uatomic/generic.h ++++ b/include/urcu/uatomic/generic.h +@@ -15,6 +15,7 @@ + */ + + #include <stdint.h> ++#include <stdlib.h> + #include <urcu/compiler.h> + #include <urcu/system.h> + +-- +2.25.1 + diff --git a/meta/recipes-support/liburcu/liburcu_0.15.0.bb b/meta/recipes-support/liburcu/liburcu_0.15.0.bb index 95d9ba17e1..a029b88111 100644 --- a/meta/recipes-support/liburcu/liburcu_0.15.0.bb +++ b/meta/recipes-support/liburcu/liburcu_0.15.0.bb @@ -12,7 +12,9 @@ LIC_FILES_CHKSUM = "file://LICENSE.md;md5=c2a92498b6e88e276f986877995425b8 \ " -SRC_URI = "http://lttng.org/files/urcu/userspace-rcu-${PV}.tar.bz2" +SRC_URI = "http://lttng.org/files/urcu/userspace-rcu-${PV}.tar.bz2 \ + file://0001-uatomic-generic.h-add-missing-stdlib.h-header-file-f.patch \ + " SRC_URI[sha256sum] = "4f2d839af67905ad396d6d53ba5649b66113d90840dcbc89941e0da64bccd38c" -- 2.25.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#211012): https://lists.openembedded.org/g/openembedded-core/message/211012 Mute This Topic: https://lists.openembedded.org/mt/111065831/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-