diff mbox series

[3/4] package/alsa-utils: Fix musl build

Message ID 20231013184554.337101-3-bernd@kuhls.net
State Superseded
Headers show
Series [1/4] package/alsa-lib: fix musl build | expand

Commit Message

Bernd Kuhls Oct. 13, 2023, 6:45 p.m. UTC
Fixes:
http://autobuild.buildroot.net/results/bce/bce46fd8aab9ef4918228e8cfc5f8b5abe71e859/

This musl-related autobuilder error occured when building alsa-lib and
is fixed by
https://patchwork.ozlabs.org/project/buildroot/patch/20230927052204.231589-1-bernd@kuhls.net/

When continuing the build of this defconfig we see a build error with
alsa-utils which is fixed by this patch.

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
 .../0009-topology-include-locale.h.patch      | 33 +++++++++++++++++++
 ...nhlt-dmic-info.c-include-sys-types.h.patch | 33 +++++++++++++++++++
 package/alsa-utils/Config.in                  |  1 +
 3 files changed, 67 insertions(+)
 create mode 100644 package/alsa-utils/0009-topology-include-locale.h.patch
 create mode 100644 package/alsa-utils/0010-nhlt-dmic-info.c-include-sys-types.h.patch

Comments

Baruch Siach Oct. 14, 2023, 6:13 p.m. UTC | #1
Hi Bernd,

On Fri, Oct 13 2023, Bernd Kuhls wrote:

> Fixes:
> http://autobuild.buildroot.net/results/bce/bce46fd8aab9ef4918228e8cfc5f8b5abe71e859/
>
> This musl-related autobuilder error occured when building alsa-lib and
> is fixed by
> https://patchwork.ozlabs.org/project/buildroot/patch/20230927052204.231589-1-bernd@kuhls.net/
>
> When continuing the build of this defconfig we see a build error with
> alsa-utils which is fixed by this patch.
>
> Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
> ---
>  .../0009-topology-include-locale.h.patch      | 33 +++++++++++++++++++
>  ...nhlt-dmic-info.c-include-sys-types.h.patch | 33 +++++++++++++++++++
>  package/alsa-utils/Config.in                  |  1 +
>  3 files changed, 67 insertions(+)
>  create mode 100644 package/alsa-utils/0009-topology-include-locale.h.patch
>  create mode 100644 package/alsa-utils/0010-nhlt-dmic-info.c-include-sys-types.h.patch

[...]

> diff --git a/package/alsa-utils/Config.in b/package/alsa-utils/Config.in
> index 3429d0b406..be222501b9 100644
> --- a/package/alsa-utils/Config.in
> +++ b/package/alsa-utils/Config.in
> @@ -65,6 +65,7 @@ config BR2_PACKAGE_ALSA_UTILS_APLAY
>  
>  config BR2_PACKAGE_ALSA_UTILS_APLAYMIDI
>  	bool "aplaymidi"
> +	select BR2_PACKAGE_ALSA_LIB_RAWMIDI

Is this related to the musl build fix?

baruch

>  	select BR2_PACKAGE_ALSA_LIB_SEQ
>  
>  config BR2_PACKAGE_ALSA_UTILS_ARECORDMIDI
Bernd Kuhls Oct. 15, 2023, 9:34 a.m. UTC | #2
Am Sat, 14 Oct 2023 21:13:52 +0300 schrieb Baruch Siach via buildroot:

>>  config BR2_PACKAGE_ALSA_UTILS_APLAYMIDI
>>  	bool "aplaymidi"
>> +	select BR2_PACKAGE_ALSA_LIB_RAWMIDI
> 
> Is this related to the musl build fix?

Hi,

oops, no, this is a left-over from a previous try to fix http://
autobuild.buildroot.net/results/e26/
e269f862ebade30cf870d783a1006aba8fedc129/

Sent v2 of the series:
https://patchwork.ozlabs.org/project/buildroot/list/?series=377655

Regards, Bernd
diff mbox series

Patch

diff --git a/package/alsa-utils/0009-topology-include-locale.h.patch b/package/alsa-utils/0009-topology-include-locale.h.patch
new file mode 100644
index 0000000000..14a059cbf6
--- /dev/null
+++ b/package/alsa-utils/0009-topology-include-locale.h.patch
@@ -0,0 +1,33 @@ 
+From 8c229270f6bae83b705a03714c46067a7aa57b02 Mon Sep 17 00:00:00 2001
+From: Michael Opdenacker <michael.opdenacker@bootlin.com>
+Date: Tue, 19 Sep 2023 13:14:29 +0200
+Subject: [PATCH] topology: include locale.h
+
+This solves an issue compiling with the musl libc.
+
+Fixes: https://github.com/alsa-project/alsa-utils/issues/239
+Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
+Signed-off-by: Jaroslav Kysela <perex@perex.cz>
+
+Upstream: https://github.com/alsa-project/alsa-utils/commit/8c229270f6bae83b705a03714c46067a7aa57b02
+
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ topology/topology.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/topology/topology.c b/topology/topology.c
+index 1840ffe..5d03a8b 100644
+--- a/topology/topology.c
++++ b/topology/topology.c
+@@ -32,6 +32,7 @@
+ #include <sys/stat.h>
+ #include <getopt.h>
+ #include <assert.h>
++#include <locale.h>
+ 
+ #include <alsa/asoundlib.h>
+ #include <alsa/topology.h>
+-- 
+2.39.2
+
diff --git a/package/alsa-utils/0010-nhlt-dmic-info.c-include-sys-types.h.patch b/package/alsa-utils/0010-nhlt-dmic-info.c-include-sys-types.h.patch
new file mode 100644
index 0000000000..b5f8489703
--- /dev/null
+++ b/package/alsa-utils/0010-nhlt-dmic-info.c-include-sys-types.h.patch
@@ -0,0 +1,33 @@ 
+From 0925ad7f09b2dc77015784f9ac2f5e34dd0dd5c3 Mon Sep 17 00:00:00 2001
+From: Michael Opdenacker <michael.opdenacker@bootlin.com>
+Date: Tue, 19 Sep 2023 13:14:30 +0200
+Subject: [PATCH] nhlt-dmic-info.c: include sys/types.h
+
+This fixes an issue compiling with the musl libc.
+
+Fixes: https://github.com/alsa-project/alsa-utils/issues/238
+Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
+Signed-off-by: Jaroslav Kysela <perex@perex.cz>
+
+Upstream: https://github.com/alsa-project/alsa-utils/commit/0925ad7f09b2dc77015784f9ac2f5e34dd0dd5c3
+
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ nhlt/nhlt-dmic-info.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/nhlt/nhlt-dmic-info.c b/nhlt/nhlt-dmic-info.c
+index 3f6c64d..331555a 100644
+--- a/nhlt/nhlt-dmic-info.c
++++ b/nhlt/nhlt-dmic-info.c
+@@ -33,6 +33,7 @@
+ #include <fcntl.h>
+ #include <getopt.h>
+ #include <sys/stat.h>
++#include <sys/types.h>
+ #include <arpa/inet.h>
+ 
+ int debug = 0;
+-- 
+2.39.2
+
diff --git a/package/alsa-utils/Config.in b/package/alsa-utils/Config.in
index 3429d0b406..be222501b9 100644
--- a/package/alsa-utils/Config.in
+++ b/package/alsa-utils/Config.in
@@ -65,6 +65,7 @@  config BR2_PACKAGE_ALSA_UTILS_APLAY
 
 config BR2_PACKAGE_ALSA_UTILS_APLAYMIDI
 	bool "aplaymidi"
+	select BR2_PACKAGE_ALSA_LIB_RAWMIDI
 	select BR2_PACKAGE_ALSA_LIB_SEQ
 
 config BR2_PACKAGE_ALSA_UTILS_ARECORDMIDI