Skip to contentSkip to conversation

package/git: fix build with iconv

PATCH Applied James Hilliard 3 participants 4 messages May 10, 2022 – May 28, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/git: fix build with iconv

Our libiconv shouldn't need the ICONV_OMITS_BOM workaround.

We also need to correctly set the iconv path so that we don't use the host iconv path.

Fixes:
- http://autobuild.buildroot.net/results/027/027602a750fd0989f9861773a2c4672667590acc

---
 package/git/git.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/git/git.mk +2 -1
index 0127ba5129..981a238acb 100644
@@ -49,7 +49,8 @@ endif
 ifeq ($(BR2_PACKAGE_LIBICONV),y)
 GIT_DEPENDENCIES += libiconv
 GIT_CONF_ENV_LIBS += -liconv
-GIT_CONF_OPTS += --with-iconv=/usr/lib
+GIT_CONF_OPTS += --with-iconv=$(STAGING_DIR)/usr
+GIT_CONF_ENV += ac_cv_iconv_omits_bom=no
 else
 GIT_CONF_OPTS += --without-iconv
 endif
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 9 lines · James Hilliard

Our libiconv shouldn't need the ICONV_OMITS_BOM workaround.

We also need to correctly set the iconv path so that we don't use the host iconv path.

Fixes:
- http://autobuild.buildroot.net/results/027/027602a750fd0989f9861773a2c4672667590acc

Applied to master, thanks.

Weird that this only comes up now - the incorrect --with-iconv has been there
since 9 years ago...

Regards,
Arnout

Quoted 9 lines
---
  package/git/git.mk | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
package/git/git.mk +0 -0
index 0127ba5129..981a238acb 100644

package/git/git.mk endif · line 56

Quoted 9 lines
package/git/git.mk +2 -1
@@ -49,7 +49,8 @@ endif
  ifeq ($(BR2_PACKAGE_LIBICONV),y)
  GIT_DEPENDENCIES += libiconv
  GIT_CONF_ENV_LIBS += -liconv
-GIT_CONF_OPTS += --with-iconv=/usr/lib
+GIT_CONF_OPTS += --with-iconv=$(STAGING_DIR)/usr
+GIT_CONF_ENV += ac_cv_iconv_omits_bom=no
  else
  GIT_CONF_OPTS += --without-iconv
  endif

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw
Quoted 12 lines · Arnout Vandecappelle
Quoted 8 lines · James Hilliard

Our libiconv shouldn't need the ICONV_OMITS_BOM workaround.

We also need to correctly set the iconv path so that we don't use the host iconv path.

Fixes:
- http://autobuild.buildroot.net/results/027/027602a750fd0989f9861773a2c4672667590acc

Quoted 6 lines
Quoted 1 line

Applied to master, thanks.

Weird that this only comes up now - the incorrect --with-iconv has been there
since 9 years ago...

Well at least when it comes to the autobuilders it seems to have only started getting hit when I started building with toolchain randomization.

There's been a whole bunch of issues that were not showing up in general due to using mostly only prebuilt toolchains for autobuilders.

I'm guessing the prebuilt toolchains select BR2_ENABLE_LOCALE which would cause this issue to never get hit:
depends on !BR2_ENABLE_LOCALE
https://github.com/buildroot/buildroot/blob/7fa88b8eb637f5ec4927ac1bd05309dea7d60bc9/package/libiconv/Config.in#L3

It seems that

Quoted 8 lines

Regards,
Arnout

Quoted 4 lines
---
  package/git/git.mk | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
Quoted 14 lines
Quoted 5 lines
package/git/git.mk +0 -0
index 0127ba5129..981a238acb 100644

package/git/git.mk endif · line 56

Quoted 9 lines
package/git/git.mk +2 -1
@@ -49,7 +49,8 @@ endif
  ifeq ($(BR2_PACKAGE_LIBICONV),y)
  GIT_DEPENDENCIES += libiconv
  GIT_CONF_ENV_LIBS += -liconv
-GIT_CONF_OPTS += --with-iconv=/usr/lib
+GIT_CONF_OPTS += --with-iconv=$(STAGING_DIR)/usr
+GIT_CONF_ENV += ac_cv_iconv_omits_bom=no
  else
  GIT_CONF_OPTS += --without-iconv
  endif

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#3 lore raw
In reply to James Hilliard
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"James" == James Hilliard <[email protected]> writes:

Our libiconv shouldn't need the ICONV_OMITS_BOM workaround. We also need to correctly set the iconv path so that we don't use the host iconv path.

Fixes:
- http://autobuild.buildroot.net/results/027/027602a750fd0989f9861773a2c4672667590acc

Committed to 2022.02.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot