All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/iwd: fix build with uclibc-ng
@ 2021-09-20 16:30 Fabrice Fontaine
  2021-09-20 18:31 ` Peter Seiderer
  2021-09-22 19:25 ` Arnout Vandecappelle
  0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2021-09-20 16:30 UTC (permalink / raw)
  To: buildroot; +Cc: Peter Seiderer, Matt Weber, Fabrice Fontaine

Fix the following build failure with uclibc-ng raised since bump to
version 1.17 in commit 9badccc9d4887aa2365d7350e3b26bd4250dad48:

/home/giuliobenetti/autobuild/run/instance-3/output-1/host/lib/gcc/xtensa-buildroot-linux-uclibc/10.3.0/../../../../xtensa-buildroot-linux-uclibc/bin/ld: src/sae.o: in function `sae_rx_authenticate':
sae.c:(.text+0xd74): undefined reference to `reallocarray'

Fixes:
 - http://autobuild.buildroot.org/results/c6d3f86282c44645b4f1c61882dc63ccfc8eb35a

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...-build-Add-reallocarray-to-missing-h.patch | 55 +++++++++++++++++++
 package/iwd/iwd.mk                            |  2 +
 2 files changed, 57 insertions(+)
 create mode 100644 package/iwd/0001-build-Add-reallocarray-to-missing-h.patch

diff --git a/package/iwd/0001-build-Add-reallocarray-to-missing-h.patch b/package/iwd/0001-build-Add-reallocarray-to-missing-h.patch
new file mode 100644
index 0000000000..ef6114f1af
--- /dev/null
+++ b/package/iwd/0001-build-Add-reallocarray-to-missing-h.patch
@@ -0,0 +1,55 @@
+From ec1c348b4fd67619fa0c2f55ae644f6a8014d971 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Sun, 19 Sep 2021 21:17:44 +0200
+Subject: build: Add reallocarray to missing.h
+
+reallocarray has been added to glibc relatively recently (version 2.26,
+from 2017) and apparently not all users run new enough glibc. Moreover,
+reallocarray is not available with uclibc-ng. So use realloc if
+reallocarray is not available to avoid the following build failure
+raised since commit 891b78e9e892a3bcd800eb3a298e6380e9a15dd1:
+
+/home/giuliobenetti/autobuild/run/instance-3/output-1/host/lib/gcc/xtensa-buildroot-linux-uclibc/10.3.0/../../../../xtensa-buildroot-linux-uclibc/bin/ld: src/sae.o: in function `sae_rx_authenticate':
+sae.c:(.text+0xd74): undefined reference to `reallocarray'
+
+Fixes:
+ - http://autobuild.buildroot.org/results/c6d3f86282c44645b4f1c61882dc63ccfc8eb35a
+
+[Retrieved from:
+https://git.kernel.org/pub/scm/network/wireless/iwd.git/commit/?id=ec1c348b4fd67619fa0c2f55ae644f6a8014d971]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ configure.ac  | 1 +
+ src/missing.h | 7 +++++++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index c6250401..51d9da93 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -129,6 +129,7 @@ AC_DEFINE_UNQUOTED(WIRED_STORAGEDIR, "${wired_storagedir}",
+ 
+ AC_CHECK_FUNCS(explicit_bzero)
+ AC_CHECK_FUNCS(rawmemchr)
++AC_CHECK_FUNCS(reallocarray)
+ 
+ AC_CHECK_HEADERS(linux/types.h linux/if_alg.h)
+ 
+diff --git a/src/missing.h b/src/missing.h
+index 2cc80aee..a5b92952 100644
+--- a/src/missing.h
++++ b/src/missing.h
+@@ -37,3 +37,10 @@ _Pragma("GCC diagnostic ignored \"-Wstringop-overflow=\"")
+ _Pragma("GCC diagnostic pop")
+ }
+ #endif
++
++#ifndef HAVE_REALLOCARRAY
++static inline void *reallocarray(void *ptr, size_t nmemb, size_t size)
++{
++	return realloc(ptr, nmemb * size);
++}
++#endif
+-- 
+cgit 1.2.3-1.el7
+
diff --git a/package/iwd/iwd.mk b/package/iwd/iwd.mk
index 9737f2c626..58535b1aa1 100644
--- a/package/iwd/iwd.mk
+++ b/package/iwd/iwd.mk
@@ -12,6 +12,8 @@ IWD_LICENSE_FILES = COPYING
 IWD_CPE_ID_VENDOR = intel
 IWD_CPE_ID_PRODUCT = inet_wireless_daemon
 IWD_SELINUX_MODULES = networkmanager
+# We're patching configure.ac
+IWD_AUTORECONF = YES
 
 IWD_CONF_OPTS = \
 	--disable-manual-pages \
-- 
2.33.0

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

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

* Re: [Buildroot] [PATCH 1/1] package/iwd: fix build with uclibc-ng
  2021-09-20 16:30 [Buildroot] [PATCH 1/1] package/iwd: fix build with uclibc-ng Fabrice Fontaine
@ 2021-09-20 18:31 ` Peter Seiderer
  2021-09-22 19:25 ` Arnout Vandecappelle
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Seiderer @ 2021-09-20 18:31 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: Matt Weber, buildroot

Hello Fabrice,

On Mon, 20 Sep 2021 18:30:31 +0200, Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> Fix the following build failure with uclibc-ng raised since bump to
> version 1.17 in commit 9badccc9d4887aa2365d7350e3b26bd4250dad48:
>
> /home/giuliobenetti/autobuild/run/instance-3/output-1/host/lib/gcc/xtensa-buildroot-linux-uclibc/10.3.0/../../../../xtensa-buildroot-linux-uclibc/bin/ld: src/sae.o: in function `sae_rx_authenticate':
> sae.c:(.text+0xd74): undefined reference to `reallocarray'
>
> Fixes:
>  - http://autobuild.buildroot.org/results/c6d3f86282c44645b4f1c61882dc63ccfc8eb35a
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Thanks for fixing the failure!

Reviewed-by: Peter Seiderer <ps.report@gmx.net>

Regards,
Peter

> ---
>  ...-build-Add-reallocarray-to-missing-h.patch | 55 +++++++++++++++++++
>  package/iwd/iwd.mk                            |  2 +
>  2 files changed, 57 insertions(+)
>  create mode 100644 package/iwd/0001-build-Add-reallocarray-to-missing-h.patch
>
> diff --git a/package/iwd/0001-build-Add-reallocarray-to-missing-h.patch b/package/iwd/0001-build-Add-reallocarray-to-missing-h.patch
> new file mode 100644
> index 0000000000..ef6114f1af
> --- /dev/null
> +++ b/package/iwd/0001-build-Add-reallocarray-to-missing-h.patch
> @@ -0,0 +1,55 @@
> +From ec1c348b4fd67619fa0c2f55ae644f6a8014d971 Mon Sep 17 00:00:00 2001
> +From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +Date: Sun, 19 Sep 2021 21:17:44 +0200
> +Subject: build: Add reallocarray to missing.h
> +
> +reallocarray has been added to glibc relatively recently (version 2.26,
> +from 2017) and apparently not all users run new enough glibc. Moreover,
> +reallocarray is not available with uclibc-ng. So use realloc if
> +reallocarray is not available to avoid the following build failure
> +raised since commit 891b78e9e892a3bcd800eb3a298e6380e9a15dd1:
> +
> +/home/giuliobenetti/autobuild/run/instance-3/output-1/host/lib/gcc/xtensa-buildroot-linux-uclibc/10.3.0/../../../../xtensa-buildroot-linux-uclibc/bin/ld: src/sae.o: in function `sae_rx_authenticate':
> +sae.c:(.text+0xd74): undefined reference to `reallocarray'
> +
> +Fixes:
> + - http://autobuild.buildroot.org/results/c6d3f86282c44645b4f1c61882dc63ccfc8eb35a
> +
> +[Retrieved from:
> +https://git.kernel.org/pub/scm/network/wireless/iwd.git/commit/?id=ec1c348b4fd67619fa0c2f55ae644f6a8014d971]
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +---
> + configure.ac  | 1 +
> + src/missing.h | 7 +++++++
> + 2 files changed, 8 insertions(+)
> +
> +diff --git a/configure.ac b/configure.ac
> +index c6250401..51d9da93 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -129,6 +129,7 @@ AC_DEFINE_UNQUOTED(WIRED_STORAGEDIR, "${wired_storagedir}",
> +
> + AC_CHECK_FUNCS(explicit_bzero)
> + AC_CHECK_FUNCS(rawmemchr)
> ++AC_CHECK_FUNCS(reallocarray)
> +
> + AC_CHECK_HEADERS(linux/types.h linux/if_alg.h)
> +
> +diff --git a/src/missing.h b/src/missing.h
> +index 2cc80aee..a5b92952 100644
> +--- a/src/missing.h
> ++++ b/src/missing.h
> +@@ -37,3 +37,10 @@ _Pragma("GCC diagnostic ignored \"-Wstringop-overflow=\"")
> + _Pragma("GCC diagnostic pop")
> + }
> + #endif
> ++
> ++#ifndef HAVE_REALLOCARRAY
> ++static inline void *reallocarray(void *ptr, size_t nmemb, size_t size)
> ++{
> ++	return realloc(ptr, nmemb * size);
> ++}
> ++#endif
> +--
> +cgit 1.2.3-1.el7
> +
> diff --git a/package/iwd/iwd.mk b/package/iwd/iwd.mk
> index 9737f2c626..58535b1aa1 100644
> --- a/package/iwd/iwd.mk
> +++ b/package/iwd/iwd.mk
> @@ -12,6 +12,8 @@ IWD_LICENSE_FILES = COPYING
>  IWD_CPE_ID_VENDOR = intel
>  IWD_CPE_ID_PRODUCT = inet_wireless_daemon
>  IWD_SELINUX_MODULES = networkmanager
> +# We're patching configure.ac
> +IWD_AUTORECONF = YES
>
>  IWD_CONF_OPTS = \
>  	--disable-manual-pages \

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

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

* Re: [Buildroot] [PATCH 1/1] package/iwd: fix build with uclibc-ng
  2021-09-20 16:30 [Buildroot] [PATCH 1/1] package/iwd: fix build with uclibc-ng Fabrice Fontaine
  2021-09-20 18:31 ` Peter Seiderer
@ 2021-09-22 19:25 ` Arnout Vandecappelle
  1 sibling, 0 replies; 3+ messages in thread
From: Arnout Vandecappelle @ 2021-09-22 19:25 UTC (permalink / raw)
  To: Fabrice Fontaine, buildroot; +Cc: Peter Seiderer, Matt Weber



On 20/09/2021 18:30, Fabrice Fontaine wrote:
> Fix the following build failure with uclibc-ng raised since bump to
> version 1.17 in commit 9badccc9d4887aa2365d7350e3b26bd4250dad48:
> 
> /home/giuliobenetti/autobuild/run/instance-3/output-1/host/lib/gcc/xtensa-buildroot-linux-uclibc/10.3.0/../../../../xtensa-buildroot-linux-uclibc/bin/ld: src/sae.o: in function `sae_rx_authenticate':
> sae.c:(.text+0xd74): undefined reference to `reallocarray'
> 
> Fixes:
>   - http://autobuild.buildroot.org/results/c6d3f86282c44645b4f1c61882dc63ccfc8eb35a
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

  Applied to master, thanks.

  Regards,
  Arnout

> ---
>   ...-build-Add-reallocarray-to-missing-h.patch | 55 +++++++++++++++++++
>   package/iwd/iwd.mk                            |  2 +
>   2 files changed, 57 insertions(+)
>   create mode 100644 package/iwd/0001-build-Add-reallocarray-to-missing-h.patch
> 
> diff --git a/package/iwd/0001-build-Add-reallocarray-to-missing-h.patch b/package/iwd/0001-build-Add-reallocarray-to-missing-h.patch
> new file mode 100644
> index 0000000000..ef6114f1af
> --- /dev/null
> +++ b/package/iwd/0001-build-Add-reallocarray-to-missing-h.patch
> @@ -0,0 +1,55 @@
> +From ec1c348b4fd67619fa0c2f55ae644f6a8014d971 Mon Sep 17 00:00:00 2001
> +From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +Date: Sun, 19 Sep 2021 21:17:44 +0200
> +Subject: build: Add reallocarray to missing.h
> +
> +reallocarray has been added to glibc relatively recently (version 2.26,
> +from 2017) and apparently not all users run new enough glibc. Moreover,
> +reallocarray is not available with uclibc-ng. So use realloc if
> +reallocarray is not available to avoid the following build failure
> +raised since commit 891b78e9e892a3bcd800eb3a298e6380e9a15dd1:
> +
> +/home/giuliobenetti/autobuild/run/instance-3/output-1/host/lib/gcc/xtensa-buildroot-linux-uclibc/10.3.0/../../../../xtensa-buildroot-linux-uclibc/bin/ld: src/sae.o: in function `sae_rx_authenticate':
> +sae.c:(.text+0xd74): undefined reference to `reallocarray'
> +
> +Fixes:
> + - http://autobuild.buildroot.org/results/c6d3f86282c44645b4f1c61882dc63ccfc8eb35a
> +
> +[Retrieved from:
> +https://git.kernel.org/pub/scm/network/wireless/iwd.git/commit/?id=ec1c348b4fd67619fa0c2f55ae644f6a8014d971]
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +---
> + configure.ac  | 1 +
> + src/missing.h | 7 +++++++
> + 2 files changed, 8 insertions(+)
> +
> +diff --git a/configure.ac b/configure.ac
> +index c6250401..51d9da93 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -129,6 +129,7 @@ AC_DEFINE_UNQUOTED(WIRED_STORAGEDIR, "${wired_storagedir}",
> +
> + AC_CHECK_FUNCS(explicit_bzero)
> + AC_CHECK_FUNCS(rawmemchr)
> ++AC_CHECK_FUNCS(reallocarray)
> +
> + AC_CHECK_HEADERS(linux/types.h linux/if_alg.h)
> +
> +diff --git a/src/missing.h b/src/missing.h
> +index 2cc80aee..a5b92952 100644
> +--- a/src/missing.h
> ++++ b/src/missing.h
> +@@ -37,3 +37,10 @@ _Pragma("GCC diagnostic ignored \"-Wstringop-overflow=\"")
> + _Pragma("GCC diagnostic pop")
> + }
> + #endif
> ++
> ++#ifndef HAVE_REALLOCARRAY
> ++static inline void *reallocarray(void *ptr, size_t nmemb, size_t size)
> ++{
> ++	return realloc(ptr, nmemb * size);
> ++}
> ++#endif
> +--
> +cgit 1.2.3-1.el7
> +
> diff --git a/package/iwd/iwd.mk b/package/iwd/iwd.mk
> index 9737f2c626..58535b1aa1 100644
> --- a/package/iwd/iwd.mk
> +++ b/package/iwd/iwd.mk
> @@ -12,6 +12,8 @@ IWD_LICENSE_FILES = COPYING
>   IWD_CPE_ID_VENDOR = intel
>   IWD_CPE_ID_PRODUCT = inet_wireless_daemon
>   IWD_SELINUX_MODULES = networkmanager
> +# We're patching configure.ac
> +IWD_AUTORECONF = YES
>   
>   IWD_CONF_OPTS = \
>   	--disable-manual-pages \
> 
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2021-09-22 19:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-20 16:30 [Buildroot] [PATCH 1/1] package/iwd: fix build with uclibc-ng Fabrice Fontaine
2021-09-20 18:31 ` Peter Seiderer
2021-09-22 19:25 ` Arnout Vandecappelle

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.