Buildroot Archive on 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

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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox