Message ID | 20241210162243.1541113-1-fiona.klute@gmx.de |
---|---|
State | Accepted |
Headers | show |
Series | [v2,1/4] package/bluez5_utils{, -headers}: bump version to 5.79 | expand |
On Tue, 10 Dec 2024 17:22:39 +0100 Fiona Klute via buildroot <buildroot@buildroot.org> wrote: > From: "Fiona Klute (WIWA)" <fiona.klute@gmx.de> > > Upstream changelog: > https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?h=5.79&id=0845b8f6ef2ac004b1c953cf4fe4ca3458cd8e36 > > Patch for musl compatibility taken from upstream "master". > > Signed-off-by: Fiona Klute (WIWA) <fiona.klute@gmx.de> > --- > .../bluez5_utils-headers.mk | 2 +- > ...0001-gdbus-define-MAX_INPUT-for-musl.patch | 33 +++++++++++++++++++ > package/bluez5_utils/bluez5_utils.hash | 2 +- > package/bluez5_utils/bluez5_utils.mk | 2 +- > 4 files changed, 36 insertions(+), 3 deletions(-) > create mode 100644 package/bluez5_utils/0001-gdbus-define-MAX_INPUT-for-musl.patch Thanks, great patch series, applied! Thomas
Hello Fiona, On Tue, 10 Dec 2024 17:22:39 +0100 Fiona Klute via buildroot <buildroot@buildroot.org> wrote: > From: "Fiona Klute (WIWA)" <fiona.klute@gmx.de> > > Upstream changelog: > https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?h=5.79&id=0845b8f6ef2ac004b1c953cf4fe4ca3458cd8e36 > > Patch for musl compatibility taken from upstream "master". > > Signed-off-by: Fiona Klute (WIWA) <fiona.klute@gmx.de> > --- > .../bluez5_utils-headers.mk | 2 +- > ...0001-gdbus-define-MAX_INPUT-for-musl.patch | 33 +++++++++++++++++++ > package/bluez5_utils/bluez5_utils.hash | 2 +- > package/bluez5_utils/bluez5_utils.mk | 2 +- > 4 files changed, 36 insertions(+), 3 deletions(-) > create mode 100644 package/bluez5_utils/0001-gdbus-define-MAX_INPUT-for-musl.patch It looks like this update is causing a few build failures: http://autobuild.buildroot.net/?reason=bluez5_utils-5.79 Like this: /home/autobuild/autobuild/instance-7/output-1/host/lib/gcc/mips-buildroot-linux-musl/13.3.0/../../../../mips-buildroot-linux-musl/bin/ld: profiles/input/bluetoothd-hog.o: in function `hog_disconnect': /home/autobuild/autobuild/instance-7/output-1/build/bluez5_utils-5.79/profiles/input/hog.c:211:(.text.hog_disconnect+0x3c): undefined reference to `input_get_userspace_hid' /home/autobuild/autobuild/instance-7/output-1/host/lib/gcc/mips-buildroot-linux-musl/13.3.0/../../../../mips-buildroot-linux-musl/bin/ld: /home/autobuild/autobuild/instance-7/output-1/build/bluez5_utils-5.79/profiles/input/hog.c:211:(.text.hog_disconnect+0x44): undefined reference to `input_get_userspace_hid' collect2: error: ld returned 1 exit status Could you have a look perhaps? Thanks a lot! Thomas
Hi Thomas! Am 31.12.24 um 12:54 schrieb Thomas Petazzoni: > Hello Fiona, > > On Tue, 10 Dec 2024 17:22:39 +0100 > Fiona Klute via buildroot <buildroot@buildroot.org> wrote: > >> From: "Fiona Klute (WIWA)" <fiona.klute@gmx.de> >> >> Upstream changelog: >> https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?h=5.79&id=0845b8f6ef2ac004b1c953cf4fe4ca3458cd8e36 >> >> Patch for musl compatibility taken from upstream "master". >> >> Signed-off-by: Fiona Klute (WIWA) <fiona.klute@gmx.de> >> --- >> .../bluez5_utils-headers.mk | 2 +- >> ...0001-gdbus-define-MAX_INPUT-for-musl.patch | 33 +++++++++++++++++++ >> package/bluez5_utils/bluez5_utils.hash | 2 +- >> package/bluez5_utils/bluez5_utils.mk | 2 +- >> 4 files changed, 36 insertions(+), 3 deletions(-) >> create mode 100644 package/bluez5_utils/0001-gdbus-define-MAX_INPUT-for-musl.patch > > It looks like this update is causing a few build failures: > > http://autobuild.buildroot.net/?reason=bluez5_utils-5.79 > > Like this: > > /home/autobuild/autobuild/instance-7/output-1/host/lib/gcc/mips-buildroot-linux-musl/13.3.0/../../../../mips-buildroot-linux-musl/bin/ld: profiles/input/bluetoothd-hog.o: in function `hog_disconnect': > /home/autobuild/autobuild/instance-7/output-1/build/bluez5_utils-5.79/profiles/input/hog.c:211:(.text.hog_disconnect+0x3c): undefined reference to `input_get_userspace_hid' > /home/autobuild/autobuild/instance-7/output-1/host/lib/gcc/mips-buildroot-linux-musl/13.3.0/../../../../mips-buildroot-linux-musl/bin/ld: /home/autobuild/autobuild/instance-7/output-1/build/bluez5_utils-5.79/profiles/input/hog.c:211:(.text.hog_disconnect+0x44): undefined reference to `input_get_userspace_hid' > collect2: error: ld returned 1 exit status > > Could you have a look perhaps? I can reproduce the failure with the combination of Bluez features selected in that autobuild run [1]: > BR2_PACKAGE_BLUEZ5_UTILS=y > > # > # OBEX support needs a toolchain w/ C++ > # > # BR2_PACKAGE_BLUEZ5_UTILS_CLIENT is not set > # BR2_PACKAGE_BLUEZ5_UTILS_MONITOR is not set > BR2_PACKAGE_BLUEZ5_UTILS_TOOLS=y > BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED=y > # BR2_PACKAGE_BLUEZ5_UTILS_EXPERIMENTAL is not set > # BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_AUDIO is not set > # BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_HEALTH is not set > # BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_HID is not set > BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_HOG=y > # BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_MESH is not set > # BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_MIDI is not set > # BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_NETWORK is not set > # BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_NFC is not set > # BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_SAP is not set The input_get_userspace_hid function is implemented in profiles/input/device.c, apparently that doesn't get compiled if BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_HID is not enabled. If I enable it, the build completes. That looks like an upstream bug to me, either --enable-hog needs to be fixed so everything it needs gets compiled, or it needs to require --enable-hid. I guess the quick fix for Buildroot would be to add a "depend on/select BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_HID" to BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_HOG, the tricky part is that "select" would create a loop because BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_HID already selects HOG, so it'd probably have to be "depends on". Or we could wrap them into a combined option, but I think it'd make sense to wait for an upstream opinion for that. I'll put making an upstream report on my list for next year, if you or anyone else wants to do it first please CC me. :-) Best regards, Fiona [1] http://autobuild.buildroot.net/results/312/312a63b8fee536d345e0e5cbbb0b0c155d81635e//config
Hello Fiona, On Tue, 31 Dec 2024 16:59:55 +0200 Fiona Klute <fiona.klute@gmx.de> wrote: > The input_get_userspace_hid function is implemented in > profiles/input/device.c, apparently that doesn't get compiled if > BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_HID is not enabled. If I enable it, the > build completes. That looks like an upstream bug to me, either > --enable-hog needs to be fixed so everything it needs gets compiled, or > it needs to require --enable-hid. > > I guess the quick fix for Buildroot would be to add a "depend on/select > BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_HID" to > BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_HOG, the tricky part is that "select" > would create a loop because BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_HID already > selects HOG, so it'd probably have to be "depends on". Or we could wrap > them into a combined option, but I think it'd make sense to wait for an > upstream opinion for that. > > I'll put making an upstream report on my list for next year, if you or > anyone else wants to do it first please CC me. :-) Thanks for the investigation! I agree it makes sense to report the issue upstream, and hopefully have a fix soon from them. I don't think anyone will beat you at doing the upstream bug report though :) Happy New Year in advance! Best regards, Thomas
diff --git a/package/bluez5_utils-headers/bluez5_utils-headers.mk b/package/bluez5_utils-headers/bluez5_utils-headers.mk index 1fd4e0fff3..7acf62b226 100644 --- a/package/bluez5_utils-headers/bluez5_utils-headers.mk +++ b/package/bluez5_utils-headers/bluez5_utils-headers.mk @@ -5,7 +5,7 @@ ################################################################################ # Keep the version and patches in sync with bluez5_utils -BLUEZ5_UTILS_HEADERS_VERSION = 5.78 +BLUEZ5_UTILS_HEADERS_VERSION = 5.79 BLUEZ5_UTILS_HEADERS_SOURCE = bluez-$(BLUEZ5_UTILS_VERSION).tar.xz BLUEZ5_UTILS_HEADERS_SITE = $(BR2_KERNEL_MIRROR)/linux/bluetooth BLUEZ5_UTILS_HEADERS_DL_SUBDIR = bluez5_utils diff --git a/package/bluez5_utils/0001-gdbus-define-MAX_INPUT-for-musl.patch b/package/bluez5_utils/0001-gdbus-define-MAX_INPUT-for-musl.patch new file mode 100644 index 0000000000..dc823e9277 --- /dev/null +++ b/package/bluez5_utils/0001-gdbus-define-MAX_INPUT-for-musl.patch @@ -0,0 +1,33 @@ +From 9d69dba21f1e46b34cdd8ae27fec11d0803907ee Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Gu=C3=B0ni=20M=C3=A1r=20Gilbert?= <gudni.m.g@gmail.com> +Date: Sat, 2 Nov 2024 16:10:18 +0000 +Subject: [PATCH] gdbus: define MAX_INPUT for musl + +This is the same solution as was done in src/shared/util.c + +Upstream: https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?id=9d69dba21f1e46b34cdd8ae27fec11d0803907ee +Signed-off-by: Fiona Klute <fiona.klute@gmx.de> +--- + gdbus/object.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/gdbus/object.c b/gdbus/object.c +index 84f116bf1..7b0476f1a 100644 +--- a/gdbus/object.c ++++ b/gdbus/object.c +@@ -20,6 +20,12 @@ + #include <dbus/dbus.h> + + #include "gdbus.h" ++ ++/* define MAX_INPUT for musl */ ++#ifndef MAX_INPUT ++#define MAX_INPUT _POSIX_MAX_INPUT ++#endif ++ + #include "src/shared/util.h" + + #define info(fmt...) +-- +2.45.2 + diff --git a/package/bluez5_utils/bluez5_utils.hash b/package/bluez5_utils/bluez5_utils.hash index 41e39e0b5c..9b39b19c08 100644 --- a/package/bluez5_utils/bluez5_utils.hash +++ b/package/bluez5_utils/bluez5_utils.hash @@ -1,5 +1,5 @@ # From https://www.kernel.org/pub/linux/bluetooth/sha256sums.asc: -sha256 830fed1915c5d375b8de0f5e6f45fcdea0dcc5ff5ffb3d31db6ed0f00d73c5e3 bluez-5.78.tar.xz +sha256 4164a5303a9f71c70f48c03ff60be34231b568d93a9ad5e79928d34e6aa0ea8a bluez-5.79.tar.xz # Locally computed sha256 b499eddebda05a8859e32b820a64577d91f1de2b52efa2a1575a2cb4000bc259 COPYING sha256 ec60b993835e2c6b79e6d9226345f4e614e686eb57dc13b6420c15a33a8996e5 COPYING.LIB diff --git a/package/bluez5_utils/bluez5_utils.mk b/package/bluez5_utils/bluez5_utils.mk index 717c10e870..1695aeb210 100644 --- a/package/bluez5_utils/bluez5_utils.mk +++ b/package/bluez5_utils/bluez5_utils.mk @@ -5,7 +5,7 @@ ################################################################################ # Keep the version and patches in sync with bluez5_utils-headers -BLUEZ5_UTILS_VERSION = 5.78 +BLUEZ5_UTILS_VERSION = 5.79 BLUEZ5_UTILS_SOURCE = bluez-$(BLUEZ5_UTILS_VERSION).tar.xz BLUEZ5_UTILS_SITE = $(BR2_KERNEL_MIRROR)/linux/bluetooth BLUEZ5_UTILS_INSTALL_STAGING = YES