diff mbox series

[1/1] package/git: fix build with iconv

Message ID 20220510044636.3061290-1-james.hilliard1@gmail.com
State Accepted
Headers show
Series [1/1] package/git: fix build with iconv | expand

Commit Message

James Hilliard May 10, 2022, 4:46 a.m. UTC
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

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
 package/git/git.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Arnout Vandecappelle May 13, 2022, 9:56 p.m. UTC | #1
On 10/05/2022 06:46, James Hilliard wrote:
> 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
> 
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>

  Applied to master, thanks.

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

  Regards,
  Arnout

> ---
>   package/git/git.mk | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/package/git/git.mk b/package/git/git.mk
> index 0127ba5129..981a238acb 100644
> --- a/package/git/git.mk
> +++ b/package/git/git.mk
> @@ -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
James Hilliard May 14, 2022, 8:25 a.m. UTC | #2
On Fri, May 13, 2022 at 3:56 PM Arnout Vandecappelle <arnout@mind.be> wrote:
>
>
>
> On 10/05/2022 06:46, James Hilliard wrote:
> > 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
> >
> > Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
>
>   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

>
>   Regards,
>   Arnout
>
> > ---
> >   package/git/git.mk | 3 ++-
> >   1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/package/git/git.mk b/package/git/git.mk
> > index 0127ba5129..981a238acb 100644
> > --- a/package/git/git.mk
> > +++ b/package/git/git.mk
> > @@ -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
Peter Korsgaard May 28, 2022, 7:27 p.m. UTC | #3
>>>>> "James" == James Hilliard <james.hilliard1@gmail.com> 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

 > Signed-off-by: James Hilliard <james.hilliard1@gmail.com>

Committed to 2022.02.x, thanks.
diff mbox series

Patch

diff --git a/package/git/git.mk b/package/git/git.mk
index 0127ba5129..981a238acb 100644
--- a/package/git/git.mk
+++ b/package/git/git.mk
@@ -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