Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/util-linux: fix build with uclibc-ng < 1.0.42
@ 2023-09-18 20:37 Fabrice Fontaine
  2023-09-20 20:20 ` Thomas Petazzoni via buildroot
  2023-09-25 11:45 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2023-09-18 20:37 UTC (permalink / raw)
  To: buildroot; +Cc: Fabrice Fontaine

Define static_assert if needed to avoid the following build failure with
uclibc-ng < 1.0.42 raised since bump to version 2.39 in commit
ad276d94a392fb13244e042851a44269e6254d61 and
https://github.com/util-linux/util-linux/commit/0ff57406522ba78ba829df7a64903b3066afb75f:

/home/buildroot/autobuild/run/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabihf/9.3.0/../../../../arm-buildroot-linux-uclibcgnueabihf/bin/ld: ./.libs/libsmartcols.so: undefined reference to `static_assert'

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

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/util-linux/util-linux-libs/util-linux-libs.mk | 3 +++
 package/util-linux/util-linux.mk                      | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/package/util-linux/util-linux-libs/util-linux-libs.mk b/package/util-linux/util-linux-libs/util-linux-libs.mk
index 20566345c6..30ab7970f9 100644
--- a/package/util-linux/util-linux-libs/util-linux-libs.mk
+++ b/package/util-linux/util-linux-libs/util-linux-libs.mk
@@ -52,6 +52,9 @@ UTIL_LINUX_LIBS_CONF_OPTS += --disable-widechar
 # No libs use ncurses
 UTIL_LINUX_LIBS_CONF_OPTS += --without-ncursesw --without-ncurses
 
+# workaround for static_assert on uclibc-ng < 1.0.42
+UTIL_LINUX_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -Dstatic_assert=_Static_assert"
+
 # Unfortunately, the util-linux does LIBS="" at the end of its
 # configure script. So we have to pass the proper LIBS value when
 # calling the configure script to make configure tests pass properly,
diff --git a/package/util-linux/util-linux.mk b/package/util-linux/util-linux.mk
index 73eda5c171..72126adb00 100644
--- a/package/util-linux/util-linux.mk
+++ b/package/util-linux/util-linux.mk
@@ -96,6 +96,9 @@ endif
 UTIL_LINUX_CONF_OPTS += --without-ncursesw --without-ncurses
 endif
 
+# workaround for static_assert on uclibc-ng < 1.0.42
+UTIL_LINUX_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -Dstatic_assert=_Static_assert"
+
 # Unfortunately, the util-linux does LIBS="" at the end of its
 # configure script. So we have to pass the proper LIBS value when
 # calling the configure script to make configure tests pass properly,
-- 
2.40.1

_______________________________________________
buildroot mailing list
buildroot@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/util-linux: fix build with uclibc-ng < 1.0.42
  2023-09-18 20:37 [Buildroot] [PATCH 1/1] package/util-linux: fix build with uclibc-ng < 1.0.42 Fabrice Fontaine
@ 2023-09-20 20:20 ` Thomas Petazzoni via buildroot
  2023-09-25 11:45 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-09-20 20:20 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: buildroot

On Mon, 18 Sep 2023 22:37:11 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> diff --git a/package/util-linux/util-linux.mk b/package/util-linux/util-linux.mk
> index 73eda5c171..72126adb00 100644
> --- a/package/util-linux/util-linux.mk
> +++ b/package/util-linux/util-linux.mk
> @@ -96,6 +96,9 @@ endif
>  UTIL_LINUX_CONF_OPTS += --without-ncursesw --without-ncurses
>  endif
>  
> +# workaround for static_assert on uclibc-ng < 1.0.42
> +UTIL_LINUX_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -Dstatic_assert=_Static_assert"

This should have been UTIL_LINUX_LIBS_CONF_ENV. make check-package is
smart enough to detect this:

WARNING: package/util-linux/util-linux-libs/util-linux-libs.mk:56: possible typo: UTIL_LINUX_CONF_ENV -> *UTIL_LINUX_LIBS*

I fixed that when applying.

However, overall, I think we should probably stop using those older
toolchains. Practically speaking for uClibc, we only support a
reasonably recent uClibc variant in Buildroot.

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] package/util-linux: fix build with uclibc-ng < 1.0.42
  2023-09-18 20:37 [Buildroot] [PATCH 1/1] package/util-linux: fix build with uclibc-ng < 1.0.42 Fabrice Fontaine
  2023-09-20 20:20 ` Thomas Petazzoni via buildroot
@ 2023-09-25 11:45 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2023-09-25 11:45 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: buildroot

>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:

 > Define static_assert if needed to avoid the following build failure with
 > uclibc-ng < 1.0.42 raised since bump to version 2.39 in commit
 > ad276d94a392fb13244e042851a44269e6254d61 and
 > https://github.com/util-linux/util-linux/commit/0ff57406522ba78ba829df7a64903b3066afb75f:

 > /home/buildroot/autobuild/run/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabihf/9.3.0/../../../../arm-buildroot-linux-uclibcgnueabihf/bin/ld:
 > ./.libs/libsmartcols.so: undefined reference to `static_assert'

 > Fixes:
 >  - http://autobuild.buildroot.org/results/c3d38d92557ee9e59b717b85f6307810d5de1487

 > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Committed to 2023.08.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2023-09-25 11:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-18 20:37 [Buildroot] [PATCH 1/1] package/util-linux: fix build with uclibc-ng < 1.0.42 Fabrice Fontaine
2023-09-20 20:20 ` Thomas Petazzoni via buildroot
2023-09-25 11:45 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox