All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/lshw: fix NLS build
@ 2022-08-15 16:34 Fabrice Fontaine
  2022-08-15 16:46 ` Fabrice Fontaine
  2022-08-21 21:10 ` Thomas Petazzoni via buildroot
  0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2022-08-15 16:34 UTC (permalink / raw)
  To: buildroot; +Cc: Fabrice Fontaine

Fix the following NLS build failure:

In file included from hw.cc:5:
config.h:10:10: fatal error: libintl.h: No such file or directory
   10 | #include <libintl.h>
      |          ^~~~~~~~~~~

Strangely enough this build failure is only raised by the autobuilders
since bump to latest head in commit
72a009fa98a37825624f70dc2a1cf825a5999a0a. However,libintl.h is
unconditionally used since version B.02.15 and
https://github.com/lyonel/lshw/commit/792eba3da1c38a164ddde999d188b11bc0e5abb0
so the build failure can be reproduced even when
72a009fa98a37825624f70dc2a1cf825a5999a0a is reverted

Fixes:
 - http://autobuild.buildroot.org/results/09fbc4948650f8f756cb5a9ca4b5c687cd2edc6c

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/lshw/lshw.mk | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/package/lshw/lshw.mk b/package/lshw/lshw.mk
index bf286647b6..c6c1ac671d 100644
--- a/package/lshw/lshw.mk
+++ b/package/lshw/lshw.mk
@@ -11,12 +11,18 @@ LSHW_LICENSE_FILES = COPYING
 
 LSHW_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES)
 
+LSHW_CFLAGS = $(TARGET_CFLAGS)
+
+ifeq ($(BR2_SYSTEM_ENABLE_NLS),)
+LSHW_CFLAGS += -DNONLS
+endif
+
 LSHW_MAKE_OPTS = \
 	CC="$(TARGET_CC)" \
 	CXX="$(TARGET_CXX)" \
 	AR="$(TARGET_AR)" \
 	LANGUAGES= \
-	RPM_OPT_FLAGS="$(TARGET_CFLAGS)"
+	RPM_OPT_FLAGS="$(LSHW_CFLAGS)"
 
 LSHW_MAKE_ENV = \
 	$(TARGET_MAKE_ENV) \
-- 
2.35.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/lshw: fix NLS build
  2022-08-15 16:34 [Buildroot] [PATCH 1/1] package/lshw: fix NLS build Fabrice Fontaine
@ 2022-08-15 16:46 ` Fabrice Fontaine
  2022-08-21 21:10 ` Thomas Petazzoni via buildroot
  1 sibling, 0 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2022-08-15 16:46 UTC (permalink / raw)
  To: buildroot


[-- Attachment #1.1: Type: text/plain, Size: 1940 bytes --]

Hello,

Le lun. 15 août 2022 à 18:34, Fabrice Fontaine <fontaine.fabrice@gmail.com>
a écrit :

> Fix the following NLS build failure:
>
> In file included from hw.cc:5:
> config.h:10:10: fatal error: libintl.h: No such file or directory
>    10 | #include <libintl.h>
>       |          ^~~~~~~~~~~
>
> Strangely enough this build failure is only raised by the autobuilders
> since bump to latest head in commit
> 72a009fa98a37825624f70dc2a1cf825a5999a0a. However,libintl.h is
> unconditionally used since version B.02.15 and
>
> https://github.com/lyonel/lshw/commit/792eba3da1c38a164ddde999d188b11bc0e5abb0
> so the build failure can be reproduced even when
> 72a009fa98a37825624f70dc2a1cf825a5999a0a is reverted
>

I found out that this patch is basically reverting
aac99867ce9c4b72e55bb886e9a6600c6407d3eb.
I don't master NLS enough but I assume it shouldn't be applied.
Perhaps, the issue is on the toolchain side?


>
> Fixes:
>  -
> http://autobuild.buildroot.org/results/09fbc4948650f8f756cb5a9ca4b5c687cd2edc6c
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  package/lshw/lshw.mk | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/package/lshw/lshw.mk b/package/lshw/lshw.mk
> index bf286647b6..c6c1ac671d 100644
> --- a/package/lshw/lshw.mk
> +++ b/package/lshw/lshw.mk
> @@ -11,12 +11,18 @@ LSHW_LICENSE_FILES = COPYING
>
>  LSHW_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES)
>
> +LSHW_CFLAGS = $(TARGET_CFLAGS)
> +
> +ifeq ($(BR2_SYSTEM_ENABLE_NLS),)
> +LSHW_CFLAGS += -DNONLS
> +endif
> +
>  LSHW_MAKE_OPTS = \
>         CC="$(TARGET_CC)" \
>         CXX="$(TARGET_CXX)" \
>         AR="$(TARGET_AR)" \
>         LANGUAGES= \
> -       RPM_OPT_FLAGS="$(TARGET_CFLAGS)"
> +       RPM_OPT_FLAGS="$(LSHW_CFLAGS)"
>
>  LSHW_MAKE_ENV = \
>         $(TARGET_MAKE_ENV) \
> --
> 2.35.1
>
> Best Regards,

Fabrice

[-- Attachment #1.2: Type: text/html, Size: 3343 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
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/lshw: fix NLS build
  2022-08-15 16:34 [Buildroot] [PATCH 1/1] package/lshw: fix NLS build Fabrice Fontaine
  2022-08-15 16:46 ` Fabrice Fontaine
@ 2022-08-21 21:10 ` Thomas Petazzoni via buildroot
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-08-21 21:10 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: Romain Naour, Alexey Brodkin, Yann E. MORIN, buildroot

Hello Fabrice,

+Romain, Yann and Alexey

On Mon, 15 Aug 2022 18:34:56 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> Fix the following NLS build failure:
> 
> In file included from hw.cc:5:
> config.h:10:10: fatal error: libintl.h: No such file or directory
>    10 | #include <libintl.h>
>       |          ^~~~~~~~~~~
> 
> Strangely enough this build failure is only raised by the autobuilders
> since bump to latest head in commit
> 72a009fa98a37825624f70dc2a1cf825a5999a0a. However,libintl.h is
> unconditionally used since version B.02.15 and
> https://github.com/lyonel/lshw/commit/792eba3da1c38a164ddde999d188b11bc0e5abb0
> so the build failure can be reproduced even when
> 72a009fa98a37825624f70dc2a1cf825a5999a0a is reverted
> 
> Fixes:
>  - http://autobuild.buildroot.org/results/09fbc4948650f8f756cb5a9ca4b5c687cd2edc6c
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

So, I had a look at what's happening here. You're right, there is
something "special".

What is "special" is that this build failure happens with the
pre-compiled ARC toolchain provided by Synopsys, and this uClibc-based
toolchain is built without the libintl stub (UCLIBC_HAS_LIBINTL is
disabled). However, in Buildroot, we assume that uClibc toolchains have
the libintl stub enabled (UCLIBC_HAS_LIBINTL is enabled).

This explains a lot of build failures caused by this toolchain:

  http://autobuild.buildroot.net/index.php?status=NOK&symbols%5BBR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC%5D=y

My suggestion would be to drop support for this pre-built toolchain,
and replace it with the glibc-based toolchain provided by Synopsys:
https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/tag/arc-2021.09-release

Of course, if Synopsys adjusts the uClibc toolchains to enable the
libintl stub, we will be able to again use those toolchains in the
future. That is why I have added Alexey in Cc.

Best regards,

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

end of thread, other threads:[~2022-08-21 21:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-15 16:34 [Buildroot] [PATCH 1/1] package/lshw: fix NLS build Fabrice Fontaine
2022-08-15 16:46 ` Fabrice Fontaine
2022-08-21 21:10 ` Thomas Petazzoni via buildroot

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.