Skip to contentSkip to conversation

fio: Fix additional warnings seen with musl

PATCH New Khem Raj 1 participant 9 messages Aug 26, 2022

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/9 fio: Fix additional warnings seen with musl

---
 ...ring-Replace-pthread_self-with-s-tid.patch | 45 +++++++++++++++++++
 meta-oe/recipes-benchmark/fio/fio_3.31.bb     |  3 +-
 2 files changed, 47 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-benchmark/fio/fio/0001-io_uring-Replace-pthread_self-with-s-tid.patch
meta-oe/recipes-benchmark/fio/fio/0001-io_uring-Replace-pthread_self-with-s-tid.patch new file +45 -0
new file mode 100644
index 0000000000..766b1fe274
@@ -0,0 +1,45 @@
+From 269164337e0168b93661bb95c6a4e462ae6d8b61 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Wed, 24 Aug 2022 18:08:53 -0700
+Subject: [PATCH] io_uring: Replace pthread_self with s->tid
+
+__init_rand64 takes 64bit value and srand48 takes unsigned 32bit value,
+pthread_t is opaque type and some libcs ( e.g. musl ) do not define them
+in plain old data types and ends up with errors
+
+| t/io_uring.c:809:32: error: incompatible pointer to integer conversion passing 'pthread_t' (aka 'struct __pthread *') to parameter of type 'uint64_t' (aka 'unsigned long') [-Wint-conver
+sion]
+|         __init_rand64(&s->rand_state, pthread_self());
+|                                       ^~~~~~~~~~~~~~
+
+Upstream-Status: Submitted [https://github.com/axboe/fio/pull/1455]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ t/io_uring.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/t/io_uring.c b/t/io_uring.c
+index 35bf1956..f34a3554 100644
+--- a/t/io_uring.c
++++ b/t/io_uring.c
+@@ -799,15 +799,14 @@ static int submitter_init(struct submitter *s)
+ 	int i, nr_batch, err;
+ 	static int init_printed;
+ 	char buf[80];
+-
+ 	s->tid = gettid();
+ 	printf("submitter=%d, tid=%d, file=%s, node=%d\n", s->index, s->tid,
+ 							s->filename, s->numa_node);
+ 
+ 	set_affinity(s);
+ 
+-	__init_rand64(&s->rand_state, pthread_self());
+-	srand48(pthread_self());
++	__init_rand64(&s->rand_state, s->tid);
++	srand48(s->tid);
+ 
+ 	for (i = 0; i < MAX_FDS; i++)
+ 		s->files[i].fileno = i;
+-- 
+2.37.2
+
meta-oe/recipes-benchmark/fio/fio_3.31.bb +2 -1
index d655d6c98f..f8d63014ae 100644
@@ -24,7 +24,8 @@ PACKAGECONFIG[numa] = ",--disable-numa,numactl"
 
 SRCREV = "6cafe8445fd1e04e5f7d67bbc73029a538d1b253"
 SRC_URI = "git://git.kernel.dk/fio.git;branch=master \
-"
+           file://0001-io_uring-Replace-pthread_self-with-s-tid.patch \
+           "
 
 S = "${WORKDIR}/git"
 
Signature · 1 line
2.37.2
author
#1 lore raw

PATCH 2/9 ssmtp: Fix null pointer assignments

---
 ...e-null-pointer-assignment-to-char-po.patch | 51 +++++++++++++++++++
 .../recipes-support/ssmtp/ssmtp_2.64.bb       |  3 +-
 2 files changed, 53 insertions(+), 1 deletion(-)
 create mode 100644 meta-networking/recipes-support/ssmtp/ssmtp/0001-ssmtp-Correct-the-null-pointer-assignment-to-char-po.patch
meta-networking/recipes-support/ssmtp/ssmtp/0001-ssmtp-Correct-the-null-pointer-assignment-to-char-po.patch new file +51 -0
new file mode 100644
index 0000000000..c7468fe17f
@@ -0,0 +1,51 @@
+From 58cfb4f86b7fbf19eb643dfba87fdd890b3d4a4a Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Wed, 24 Aug 2022 19:27:31 -0700
+Subject: [PATCH] ssmtp: Correct the null pointer assignment to char pointers
+
+Fixes
+error: incompatible integer to pointer conversion initializing 'char *' with an expression of type 'char' [-Wint-conversion]
+| char *from = (char)NULL;                /* Use this as the From: address */
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+---
+ ssmtp.c | 20 ++++++++++----------
+ 1 file changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/ssmtp.c b/ssmtp.c
+index a74ba4e..0a719ac 100644
+--- a/ssmtp.c
++++ b/ssmtp.c
+@@ -55,21 +55,21 @@ bool_t use_oldauth = False;		/* use old AUTH LOGIN username style */
+ 
+ #define ARPADATE_LENGTH 32		/* Current date in RFC format */
+ char arpadate[ARPADATE_LENGTH];
+-char *auth_user = (char)NULL;
+-char *auth_pass = (char)NULL;
+-char *auth_method = (char)NULL;		/* Mechanism for SMTP authentication */
+-char *mail_domain = (char)NULL;
+-char *from = (char)NULL;		/* Use this as the From: address */
++char *auth_user = NULL;
++char *auth_pass = NULL;
++char *auth_method = NULL;		/* Mechanism for SMTP authentication */
++char *mail_domain = NULL;
++char *from = NULL;		/* Use this as the From: address */
+ char *hostname;
+ char *mailhost = "mailhub";
+-char *minus_f = (char)NULL;
+-char *minus_F = (char)NULL;
++char *minus_f = NULL;
++char *minus_F = NULL;
+ char *gecos;
+-char *prog = (char)NULL;
++char *prog = NULL;
+ char *root = NULL;
+ char *tls_cert = "/etc/ssl/certs/ssmtp.pem";	/* Default Certificate */
+-char *uad = (char)NULL;
+-char *config_file = (char)NULL;		/* alternate configuration file */
++char *uad = NULL;
++char *config_file = NULL;		/* alternate configuration file */
+ 
+ headers_t headers, *ht;
+ 
meta-networking/recipes-support/ssmtp/ssmtp_2.64.bb +2 -1
index b0e921d423..05d2bb18ff 100644
@@ -7,7 +7,8 @@ SRC_URI = "${DEBIAN_MIRROR}/main/s/${BPN}/${BPN}_${PV}.orig.tar.bz2 \
            file://ssmtp-bug584162-fix.patch \
            file://build-ouside_srcdir.patch \
            file://use-DESTDIR.patch \
-"
+           file://0001-ssmtp-Correct-the-null-pointer-assignment-to-char-po.patch \
+           "
 
 SRC_URI[md5sum] = "65b4e0df4934a6cd08c506cabcbe584f"
 SRC_URI[sha256sum] = "22c37dc90c871e8e052b2cab0ad219d010fa938608cd66b21c8f3c759046fa36"
Signature · 1 line
2.37.2
author
#2 lore raw

PATCH 3/9 gst-editing-services: Add recipe

In reply to Khem Raj
---
 .../gst-editing-services_1.20.3.bb            | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 meta-oe/recipes-devtools/gst-editing-services/gst-editing-services_1.20.3.bb
meta-oe/recipes-devtools/gst-editing-services/gst-editing-services_1.20.3.bb new file +26 -0
new file mode 100644
index 0000000000..d14869b06b
@@ -0,0 +1,26 @@
+# Copyright (C) 2022 Khem Raj <[email protected]>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "Gstreamer editing services"
+HOMEPAGE = "http://cgit.freedesktop.org/gstreamer/gst-editing-services/"
+
+LICENSE = "GPL-2.0-on-later & LGPL-2.1-or-later"
+LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \
+                    file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d"
+
+DEPENDS = "flex-native gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad python3-pygobject"
+
+REQUIRED_DISTRO_FEATURES = "gobject-introspection-data"
+GIR_MESON_OPTION = ""
+
+inherit meson pkgconfig upstream-version-is-even gobject-introspection features_check bash-completion
+
+EXTRA_OEMESON = "-Dvalidate=disabled"
+
+SRC_URI = "http://gstreamer.freedesktop.org/src/gst-editing-services/gst-editing-services-${PV}.tar.xz"
+SRC_URI[sha256sum] = "5fd896de69fbe24421eb6b0ff8d2f8b4c3cba3f3025ceacd302172f39a8abaa2"
+
+PACKAGES += "gst-validate-launcher libges"
+
+FILES:gst-validate-launcher = "${nonarch_libdir}/gst-validate-launcher ${datadir}/gstreamer-1.0/validate"
+FILES:libges = "${libdir}/gstreamer-1.0/*.so"
Signature · 1 line
2.37.2
author
#3 lore raw

PATCH 4/9 rygel: Upgrade to 0.40.4

In reply to Khem Raj

Switch to meson build system
Fix build with clang

---
 .../{rygel_0.38.3.bb => rygel_0.40.4.bb}      | 49 +++++++++++++------
 1 file changed, 35 insertions(+), 14 deletions(-)
 rename meta-multimedia/recipes-connectivity/rygel/{rygel_0.38.3.bb => rygel_0.40.4.bb} (60%)
meta-multimedia/recipes-connectivity/rygel/rygel_0.40.4.bb renamed from meta-multimedia/recipes-connectivity/rygel/rygel_0.38.3.bb +35 -14
similarity index 60%
rename from meta-multimedia/recipes-connectivity/rygel/rygel_0.38.3.bb
rename to meta-multimedia/recipes-connectivity/rygel/rygel_0.40.4.bb
index ec7824b60d..8bc8767d8f 100644
@@ -8,34 +8,55 @@ HOMEPAGE = "http://live.gnome.org/Rygel"
 LICENSE = "LGPL-2.1-only"
 LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
 
-DEPENDS = "libxml2 glib-2.0 gssdp gupnp gupnp-av gupnp-dlna gstreamer1.0 gstreamer1.0-plugins-base libgee libsoup-2.4 libmediaart-2.0 libunistring sqlite3 intltool-native"
+DEPENDS = "libxml2 glib-2.0 gssdp gupnp gupnp-av gupnp-dlna gstreamer1.0 \
+           gstreamer1.0-plugins-base libgee libsoup-2.4 libmediaart-2.0 \
+           libunistring sqlite3 intltool-native gst-editing-services"
+
 RDEPENDS:${PN} = "gstreamer1.0-plugins-base-playback shared-mime-info"
 RRECOMMENDS:${PN} = "rygel-plugin-media-export"
 
-inherit gnomebase vala gobject-introspection gettext systemd features_check
+inherit gnomebase features_check vala gobject-introspection gettext systemd meson
 
 # gobject-introspection is mandatory for libmediaart-2.0 and cannot be configured
 REQUIRED_DISTRO_FEATURES = "gobject-introspection-data"
 
-SRC_URI[archive.md5sum] = "7f95401903a3f855b464d5152b9d4c07"
-SRC_URI[archive.sha256sum] = "08c21a577f7bdad26446a75ffa32778b26842c3b1188165f0b19818559747d00"
-
-EXTRA_OECONF = "--disable-tracker-plugin --with-media-engine=gstreamer"
+SRC_URI[archive.sha256sum] = "736d8adbe8615f6cbc8fcfff9845dc985fd10e16629da236b4b52dbedf0a348b"
 
-PACKAGECONFIG ?= "external mpris ruih media-export gst-launch"
+GNOMEBASEBUILDCLASS = "meson"
+GIR_MESON_ENABLE_FLAG = 'enabled'
+GIR_MESON_DISABLE_FLAG = 'disabled'
 
+EXTRA_OEMESON = "-Dengines=gstreamer -Dplugins=${@strip_comma('${RYGEL_PLUGINS}')}"
 PACKAGECONFIG:append = "${@bb.utils.contains("DISTRO_FEATURES", "x11", " gtk+3", "", d)}"
 
-PACKAGECONFIG[external] = "--enable-external-plugin,--disable-external-plugin"
-PACKAGECONFIG[mpris] = "--enable-mpris-plugin,--disable-mpris-plugin"
-PACKAGECONFIG[ruih] = "--enable-ruih-plugin,--disable-ruih-plugin"
-PACKAGECONFIG[media-export] = "--enable-media-export-plugin,--disable-media-export-plugin"
-PACKAGECONFIG[gst-launch] = "--enable-gst-launch-plugin,--disable-gst-launch-plugin"
-PACKAGECONFIG[gtk+3] = ",--without-ui,gtk+3"
-PACKAGECONFIG[lms] = "--enable-lms-plugin,--disable-lms-plugin"
+PACKAGECONFIG ?= "external mpris ruih media-export gst-launch"
+
+PACKAGECONFIG[external] = ""
+PACKAGECONFIG[mpris] = ""
+PACKAGECONFIG[ruih] = ""
+PACKAGECONFIG[media-export] = ""
+PACKAGECONFIG[gst-launch] = ""
+PACKAGECONFIG[lms] = ""
+PACKAGECONFIG[tracker3] = ""
+PACKAGECONFIG[gtk+3] = ",-Dgtk=false,gtk+3"
+
+RYGEL_PLUGINS = ""
+RYGEL_PLUGINS:append ="${@bb.utils.contains('PACKAGECONFIG', 'external', ',external', '', d)}"
+RYGEL_PLUGINS:append ="${@bb.utils.contains('PACKAGECONFIG', 'mpris', ',mpris', '', d)}"
+RYGEL_PLUGINS:append ="${@bb.utils.contains('PACKAGECONFIG', 'ruih', ',ruih', '', d)}"
+RYGEL_PLUGINS:append ="${@bb.utils.contains('PACKAGECONFIG', 'gst-launch', ',gst-launch', '', d)}"
+RYGEL_PLUGINS:append ="${@bb.utils.contains('PACKAGECONFIG', 'lms', ',lms', '', d)}"
+RYGEL_PLUGINS:append ="${@bb.utils.contains('PACKAGECONFIG', 'media-export', ',media-export', '', d)}"
+RYGEL_PLUGINS:append ="${@bb.utils.contains('PACKAGECONFIG', 'tracker3', ',tracker3', '', d)}"
+RYGEL_PLUGINS:append ="${@bb.utils.contains('PACKAGECONFIG', 'playbin', ',playbin', '', d)}"
 
 LIBV = "2.6"
 
+CFLAGS:append:toolchain-clang = " -Wno-error=int-conversion"
+
+def strip_comma(s):
+    return s.strip(',')
+
 do_install:append() {
        # Remove .la files for loadable modules
        rm -f ${D}/${libdir}/rygel-${LIBV}/engines/*.la
Signature · 1 line
2.37.2
author
#4 lore raw

PATCH 5/9 libesmtp: Define _GNU_SOURCE

In reply to Khem Raj

Needed for strlcpy

---
 meta-networking/recipes-support/libesmtp/libesmtp_1.1.0.bb | 2 ++
 1 file changed, 2 insertions(+)
meta-networking/recipes-support/libesmtp/libesmtp_1.1.0.bb +2 -0
index bf1a12d48f..164c8c2612 100644
@@ -30,5 +30,7 @@ EXTRA_OEMESON = " \
     -Dntlm=disabled \
 "
 
+CFLAGS += "-D_GNU_SOURCE"
+
 FILES:${PN} = "${libdir}/lib*${SOLIBS} \
                ${libdir}/esmtp-plugins-6.2.0/*${SOLIBSDEV}"
Signature · 1 line
2.37.2
author
#5 lore raw

PATCH 6/9 python3-grpcio: Enable largefile support explicitly

In reply to Khem Raj

This ensures that third party packages like zlib can get this in CFLAGS

---
 meta-python/recipes-devtools/python/python3-grpcio_1.47.0.bb | 2 ++
 1 file changed, 2 insertions(+)
meta-python/recipes-devtools/python/python3-grpcio_1.47.0.bb +2 -0
index 24c6e53447..0950114b02 100644
@@ -23,6 +23,8 @@ RDEPENDS:${PN} = "${PYTHON_PN}-protobuf \
 inherit setuptools3
 inherit pypi
 
+CFLAGS += "-D_LARGEFILE64_SOURCE"
+
 export GRPC_PYTHON_DISABLE_LIBC_COMPATIBILITY = "1"
 
 BORING_SSL_PLATFORM:arm = "linux-arm"
Signature · 1 line
2.37.2
author
#6 lore raw

PATCH 7/9 libteam: Include missing headers for strrchr and memcmp

In reply to Khem Raj
---
 ...ssing-headers-for-strrchr-and-memcmp.patch | 46 +++++++++++++++++++
 .../recipes-support/libteam/libteam_1.31.bb   |  1 +
 2 files changed, 47 insertions(+)
 create mode 100644 meta-oe/recipes-support/libteam/libteam/0001-teamd-Include-missing-headers-for-strrchr-and-memcmp.patch
meta-oe/recipes-support/libteam/libteam/0001-teamd-Include-missing-headers-for-strrchr-and-memcmp.patch new file +46 -0
new file mode 100644
index 0000000000..5f8e56177e
@@ -0,0 +1,46 @@
+From 49693cac37ee35ff673240c8060201efe0d999c2 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Wed, 24 Aug 2022 22:27:03 -0700
+Subject: [PATCH] teamd: Include missing headers for strrchr and memcmp
+
+Compiler does not see the prototype for these functions otherwise and
+build fails e.g.
+
+| ../../git/teamd/teamd_phys_port_check.c:52:10: error: call to undeclared library function 'strrchr' with type 'char *(const char *, int)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
+|         start = strrchr(link, '/');
+|                 ^
+
+Upstream-Status: Submitted [https://github.com/jpirko/libteam/pull/68]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ teamd/teamd_phys_port_check.c    | 1 +
+ teamd/teamd_runner_loadbalance.c | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/teamd/teamd_phys_port_check.c b/teamd/teamd_phys_port_check.c
+index 1eec129..c2454ab 100644
+--- a/teamd/teamd_phys_port_check.c
++++ b/teamd/teamd_phys_port_check.c
+@@ -19,6 +19,7 @@
+ 
+ #include <stdio.h>
+ #include <errno.h>
++#include <string.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
+diff --git a/teamd/teamd_runner_loadbalance.c b/teamd/teamd_runner_loadbalance.c
+index a581472..421a7c6 100644
+--- a/teamd/teamd_runner_loadbalance.c
++++ b/teamd/teamd_runner_loadbalance.c
+@@ -17,6 +17,7 @@
+  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+  */
+ 
++#include <string.h>
+ #include <sys/socket.h>
+ #include <linux/netdevice.h>
+ #include <team.h>
+-- 
+2.37.2
+
meta-oe/recipes-support/libteam/libteam_1.31.bb +1 -0
index ad84389013..023cea9039 100644
@@ -13,6 +13,7 @@ SRC_URI = "git://github.com/jpirko/libteam;branch=master;protocol=https \
            file://0001-team_basic_test.py-disable-RedHat-specific-test.patch \
            file://0001-team_basic_test.py-switch-to-python3.patch \
            file://0001-team_basic_test.py-check-the-return-value.patch \
+           file://0001-teamd-Include-missing-headers-for-strrchr-and-memcmp.patch \
            file://run-ptest \
            "
 SRCREV = "3ee12c6d569977cf1cd30d0da77807a07aa77158"
Signature · 1 line
2.37.2
author
#7 lore raw

PATCH 8/9 neon: Upgrade to 0.32.2

In reply to Khem Raj

Drop libxml2-config patch, its not needed anymore Do not install documentation, it does not cross build

---
 ...001-Disable-installing-documentation.patch | 28 +++++++++++
 .../neon/fix-package-check-for-libxml2.patch  | 50 -------------------
 .../neon/{neon_0.30.2.bb => neon_0.32.2.bb}   | 29 +++++++----
 3 files changed, 48 insertions(+), 59 deletions(-)
 create mode 100644 meta-oe/recipes-support/neon/neon/0001-Disable-installing-documentation.patch
 delete mode 100644 meta-oe/recipes-support/neon/neon/fix-package-check-for-libxml2.patch
 rename meta-oe/recipes-support/neon/{neon_0.30.2.bb => neon_0.32.2.bb} (63%)
meta-oe/recipes-support/neon/neon/0001-Disable-installing-documentation.patch new file +28 -0
new file mode 100644
index 0000000000..1f63df27ac
@@ -0,0 +1,28 @@
+From f477408f1c24ce6e5589e5a99d369279916c7c6e Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Wed, 24 Aug 2022 13:11:12 -0700
+Subject: [PATCH] Disable installing documentation
+
+It does not build
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index ed87a69..c32405c 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -125,7 +125,7 @@ Makefile: $(srcdir)/Makefile.in
+ neon-config: $(srcdir)/neon-config.in
+ 	@./config.status neon-config
+ 
+-install-docs: install-man install-html
++install-docs:
+ 
+ install-html:
+ 	$(INSTALL) -d $(DESTDIR)$(docdir)/html
+-- 
+2.37.2
+
meta-oe/recipes-support/neon/neon/fix-package-check-for-libxml2.patch deleted +0 -50

50 lines not on this page · raw message

meta-oe/recipes-support/neon/neon_0.32.2.bb renamed from meta-oe/recipes-support/neon/neon_0.30.2.bb +20 -9
similarity index 63%
rename from meta-oe/recipes-support/neon/neon_0.30.2.bb
rename to meta-oe/recipes-support/neon/neon_0.32.2.bb
index 646a9eca13..0f4e971982 100644
@@ -3,35 +3,46 @@ HOMEPAGE = "http://www.webdav.org/neon/"
 SECTION = "libs"
 LICENSE = "LGPL-2.0-or-later"
 LIC_FILES_CHKSUM = "file://src/COPYING.LIB;md5=f30a9716ef3762e3467a2f62bf790f0a \
-                    file://src/ne_utils.h;beginline=1;endline=20;md5=2caca609538eddaa6f6adf120a218037"
+                    file://src/ne_utils.h;beginline=1;endline=20;md5=34c8e338bfa0237561e68d30c3c71133"
 
 SRC_URI = "${DEBIAN_MIRROR}/main/n/neon27/neon27_${PV}.orig.tar.gz \
            file://pkgconfig.patch \
-           file://fix-package-check-for-libxml2.patch \
+           file://0001-Disable-installing-documentation.patch \
            file://run-ptest \
-          "
+           "
 
-SRC_URI[md5sum] = "e28d77bf14032d7f5046b3930704ef41"
-SRC_URI[sha256sum] = "db0bd8cdec329b48f53a6f00199c92d5ba40b0f015b153718d1b15d3d967fbca"
+SRC_URI[sha256sum] = "7a25ba2c9223676b9aaec22a585a0ca118127bad71deed0b9ed6cd960fe5c353"
 
-inherit autotools binconfig-disabled lib_package pkgconfig ptest
+inherit autotools-brokensep binconfig-disabled lib_package pkgconfig ptest
 
 # Enable gnutls or openssl, not both
-PACKAGECONFIG ?= "expat gnutls libproxy webdav zlib"
-PACKAGECONFIG:class-native = "expat gnutls webdav zlib"
+PACKAGECONFIG ?= "expat gnutls libproxy webdav zlib nls"
+PACKAGECONFIG:class-native = "expat gnutls webdav zlib nls"
+PACKAGECONFIG:remove:libc-musl = "nls"
 
 PACKAGECONFIG[expat] = "--with-expat,--without-expat,expat"
 PACKAGECONFIG[gnutls] = "--with-ssl=gnutls,,gnutls"
 PACKAGECONFIG[gssapi] = "--with-gssapi,--without-gssapi,krb5"
 PACKAGECONFIG[libproxy] = "--with-libproxy,--without-libproxy,libproxy"
 PACKAGECONFIG[libxml2] = "--with-libxml2,--without-libxml2,libxml2"
+PACKAGECONFIG[nls] = ",--disable-nls,gettext-native"
 PACKAGECONFIG[openssl] = "--with-ssl=openssl,,openssl"
 PACKAGECONFIG[webdav] = "--enable-webdav,--disable-webdav,"
 PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
 
-EXTRA_OECONF += "--enable-shared"
+EXTRA_OECONF += "--enable-shared --enable-threadsafe-ssl=posix"
+
+# Do not install into /usr/local
+EXTRA_OEMAKE:append:class-native = "prefix=${prefix_native}"
+
+do_configure:prepend() {
+    echo "${PV}" > ${S}/.version
+}
 
 do_compile:append() {
+    if ${@bb.utils.contains('PACKAGECONFIG', 'nls', 'true', 'false', d)}; then
+        oe_runmake compile-gmo
+    fi
     oe_runmake -C test
 }
 
Signature · 1 line
2.37.2
author
#8 lore raw

PATCH 9/9 satyr: Fix build on musl/clang

In reply to Khem Raj

Fixes

| py_base_stacktrace.c:301:5: error: call to undeclared function 'g_free'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
|     g_free(text);
|     ^
---
 ...-py_base_stacktrace.c-include-glib.h.patch | 29 +++++++++++++++++++
 meta-oe/recipes-support/satyr/satyr_0.39.bb   |  1 +
 2 files changed, 30 insertions(+)
 create mode 100644 meta-oe/recipes-support/satyr/files/0001-py_base_stacktrace.c-include-glib.h.patch
meta-oe/recipes-support/satyr/files/0001-py_base_stacktrace.c-include-glib.h.patch new file +29 -0
new file mode 100644
index 0000000000..fe3b1c12d2
@@ -0,0 +1,29 @@
+From 3b84fe4375292d00ebb605a5917e66129fe5f0cb Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Wed, 24 Aug 2022 23:26:46 -0700
+Subject: [PATCH] py_base_stacktrace.c: include glib.h
+
+This file has references to g_free from glib-2.0 which needs this header
+
+Upstream-Status: Submitted [https://github.com/abrt/satyr/pull/333]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ python/py_base_stacktrace.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/python/py_base_stacktrace.c b/python/py_base_stacktrace.c
+index b9bd16c..301db84 100644
+--- a/python/py_base_stacktrace.c
++++ b/python/py_base_stacktrace.c
+@@ -17,7 +17,7 @@
+     with this program; if not, write to the Free Software Foundation, Inc.,
+     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+-
++#include <glib.h>
+ #include "py_common.h"
+ #include "py_base_thread.h"
+ #include "py_base_stacktrace.h"
+-- 
+2.37.2
+
meta-oe/recipes-support/satyr/satyr_0.39.bb +1 -0
index 32f27f5cbd..be1ef3f790 100644
@@ -9,6 +9,7 @@ inherit autotools-brokensep python3native pkgconfig
 
 SRC_URI = "git://github.com/abrt/satyr.git;branch=master;protocol=https \
            file://0002-fix-compile-failure-against-musl-C-library.patch \
+           file://0001-py_base_stacktrace.c-include-glib.h.patch \
 "
 SRCREV = "f8a0dbfe7fcc6e44f03d66ca5c81363aea318380"
 S = "${WORKDIR}/git"
Signature · 1 line
2.37.2