[Buildroot] [PATCH v3 1/1] package/guile: Fix build failure due to missing libiconv
Pedro Aguilar
paguilar at paguilar.org
Wed Feb 9 22:59:57 UTC 2022
When building package guile with BR2_ENABLE_LOCALE=n
we get the following error:
```
In file included from filesys.c:95:
ports-internal.h:26:10: fatal error: iconv.h: No such file or directory
26 | #include <iconv.h>
| ^~~~~~~~~
compilation terminated.
```
So let's fix it by selecting BR2_PACKAGE_LIBICONV and
adding libiconv package as dependency.
Signed-off-by: Pedro Aguilar <paguilar at paguilar.org>
---
Changes v2 -> v3:
- Improve commit message (thanks to Giulio comments)
Changes v1 -> v2:
- Use BR2_ENABLE_LOCALE if selected, otherwise use libiconv
as before (pointed out by Thomas and Giulio)
---
package/guile/Config.in | 1 +
package/guile/guile.mk | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/package/guile/Config.in b/package/guile/Config.in
index b1182a4cee..f70e674018 100644
--- a/package/guile/Config.in
+++ b/package/guile/Config.in
@@ -9,6 +9,7 @@ config BR2_PACKAGE_GUILE
select BR2_PACKAGE_LIBFFI
select BR2_PACKAGE_GMP
select BR2_PACKAGE_BDWGC
+ select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
help
Guile is an interpreter and compiler for the Scheme
programming language, a clean and elegant dialect of Lisp.
diff --git a/package/guile/guile.mk b/package/guile/guile.mk
index 0f245fca76..03420407f8 100644
--- a/package/guile/guile.mk
+++ b/package/guile/guile.mk
@@ -18,6 +18,10 @@ GUILE_CPE_ID_VENDOR = gnu
GUILE_DEPENDENCIES = host-guile libunistring libffi gmp bdwgc host-pkgconf
HOST_GUILE_DEPENDENCIES = host-libunistring host-libffi host-gmp host-bdwgc host-flex host-pkgconf host-gettext
+ifeq ($(BR2_ENABLE_LOCALE),)
+GUILE_DEPENDENCIES += libiconv
+endif
+
# The HAVE_GC* CFLAGS specify that we will use internal callbacks
# instead of the ones provided by
# bdwgc. Eg. HAVE_GC_SET_FINALIZER_NOTIFIER specifies that we won't
--
2.25.1
More information about the buildroot
mailing list