Skip to contentSkip to conversation

gettext-minimal: Disable the unnecessary check in iconv.m4

PATCH In review Yu, Mingli 3 participants 8 messages Mar 22, 2021 – Mar 24, 2021 1 message not in the archive

lore
Share & tools
lore

Yu, Mingli

author
#1 lore raw

PATCH v3 1/2 gettext-minimal: Disable the unnecessary check in iconv.m4

In reply to a message not in the archive

From: Mingli Yu <[email protected]>

The below m4 macros files shipped with recipe will be removed if the recipe use AM_GNU_GETTEXT.
gettext.m4
iconv.m4
lib-ld.m4
lib-link.m4
lib-prefix.m4
nls.m4 po.m4
progtest.m4

After elfutils upgrades to 0.183, it begins to use AM_GNU_GETTEXT as the commit (dd52d2ab Modernize gettext infrastructure) included, so the above m4 macros files such as iconv.m4 is removed and it's bad as we need to patch against iconv.m4 shipped with elfutils.

BTW, the logic to Disable the unnecessary check in iconv.m4 comes since 2015 as [1], so move the related logic to gettext-minimal which provides iconv.m4 now to fix the gap.

[1] https://git.openembedded.org/openembedded-core/commit/?id=3dd269e027fda173ee40d671ea47da22300fd51d

---
 meta/recipes-core/gettext/gettext-minimal-0.21/aclocal/iconv.m4 | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-core/gettext/gettext-minimal-0.21/aclocal/iconv.m4 +2 -0
index e593b7270a..e04476bb7f 100644
@@ -166,6 +166,7 @@ AC_DEFUN([AM_ICONV_LINK],
       }
   }
 #endif
+#if 0
   /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
      provided.  */
   {
@@ -189,6 +190,7 @@ AC_DEFUN([AM_ICONV_LINK],
     if (cd4 != (iconv_t)(-1))
       iconv_close (cd4);
   }
+#endif
   return result;
 ]])],
           [am_cv_func_iconv_works=yes], ,
Signature · 1 line
2.17.1
author
#2 lore raw

PATCH v3 2/2 elfutils: remove 0004-Disable-the-test-to-convert-euc-jp.patch

From: Mingli Yu <[email protected]>

The below m4 macros files shipped with recipe will be removed if the recipe use AM_GNU_GETTEXT.
gettext.m4
iconv.m4
lib-ld.m4
lib-link.m4
lib-prefix.m4
nls.m4 po.m4
progtest.m4

After elfutils upgrades to 0.183, it begins to use AM_GNU_GETTEXT as the commit (dd52d2ab Modernize gettext infrastructure) included, so the above m4 macros files such as iconv.m4 is removed and it's bad as we need to patch against iconv.m4 shipped with elfutils.

So remove 0004-Disable-the-test-to-convert-euc-jp.patch and move the logic to gettext-mininal which provides iconv.m4 now to fix the gap and also fix the below build issue.

  $ bitbake elfutils -cconfigure && bitbake elfutils -cpatch -f
---
 .../elfutils/elfutils_0.183.bb                |  1 -
 ...4-Disable-the-test-to-convert-euc-jp.patch | 42 -------------------
 2 files changed, 43 deletions(-)
 delete mode 100644 meta/recipes-devtools/elfutils/files/0004-Disable-the-test-to-convert-euc-jp.patch
meta/recipes-devtools/elfutils/elfutils_0.183.bb +0 -1
index 16ed7c9ddb..c0833686de 100644
@@ -14,7 +14,6 @@ SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \
            file://0001-dso-link-change.patch \
            file://0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch \
            file://0003-fixheadercheck.patch \
-           file://0004-Disable-the-test-to-convert-euc-jp.patch \
            file://0006-Fix-build-on-aarch64-musl.patch \
            file://0001-libasm-may-link-with-libbz2-if-found.patch \
            file://0001-libelf-elf_end.c-check-data_list.data.d.d_buf-before.patch \
meta/recipes-devtools/elfutils/files/0004-Disable-the-test-to-convert-euc-jp.patch deleted +0 -42

42 lines not on this page · raw message

Signature · 1 line
2.17.1
#3 lore raw
In reply to Yu, Mingli

Note that this m4 file is copied verbatim from upstream gettext, and will be again overwritten on next gettext upgrade. You should figure out what’s wrong specifically in elfutils tree, and work with elfutils upstream to resolve it.

Alex

Quoted 58 lines · Mingli

From: Mingli Yu <[email protected]>

The below m4 macros files shipped with recipe will be removed if the recipe use AM_GNU_GETTEXT.
gettext.m4
iconv.m4
lib-ld.m4
lib-link.m4
lib-prefix.m4
nls.m4 po.m4
progtest.m4

After elfutils upgrades to 0.183, it begins to use AM_GNU_GETTEXT as the commit (dd52d2ab Modernize gettext infrastructure) included, so the above m4 macros files such as iconv.m4 is removed and it's bad as we need to patch against iconv.m4 shipped with elfutils.

BTW, the logic to Disable the unnecessary check in iconv.m4 comes since 2015 as [1], so move the related logic to gettext-minimal which provides iconv.m4 now to fix the gap.

[1]
https://git.openembedded.org/openembedded-core/commit/?id=3dd269e027fda173ee40d671ea47da22300fd51d

---
 meta/recipes-core/gettext/gettext-minimal-0.21/aclocal/iconv.m4 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-core/gettext/gettext-minimal-0.21/aclocal/iconv.m4 b/meta/recipes-core/gettext/gettext-minimal-0.21/aclocal/iconv.m4 index e593b7270a..e04476bb7f 100644

meta/recipes-core/gettext/gettext-minimal-0.21/aclocal/iconv.m4 +2 -1
@@ -166,6 +166,7 @@ AC_DEFUN([AM_ICONV_LINK],
       }
   }
 #endif
+#if 0
   /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
      provided.  */
   {
@@ -189,6 +190,7 @@ AC_DEFUN([AM_ICONV_LINK],
     if (cd4 != (iconv_t)(-1))
       iconv_close (cd4);
   }
+#endif
   return result;
 ]])],
           [am_cv_func_iconv_works=yes], ,
--

2.17.1

author
#4 lore raw
Quoted 3 lines · Alexander Kanavin

**[Please note: This e-mail is from an EXTERNAL e-mail address]

Note that this m4 file is copied verbatim from upstream gettext, and will be again overwritten on next gettext upgrade. You should figure out what’s wrong specifically in elfutils tree, and work with elfutils upstream to resolve it.

Hi Alex,

The reason why we care out iconv.m4 is because want to keep the logic in https://git.openembedded.org/openembedded-core/commit/?id=3dd269e027fda173ee40d671ea47da22300fd51d which oe specific.

I think there is nothing wrong for elfutils switches to use AM_GNU_GETTEXT.

Thanks,

Quoted 66 lines

Alex

On Mon 22. Mar 2021 at 10.51, Yu, Mingli <[email protected] <mailto:[email protected]>> wrote:

    From: Mingli Yu <[email protected]
    <mailto:[email protected]>>

    The below m4 macros files shipped with recipe will be removed if the
    recipe use AM_GNU_GETTEXT.
    gettext.m4
    iconv.m4
    lib-ld.m4
    lib-link.m4
    lib-prefix.m4
    nls.m4 po.m4
    progtest.m4

    After elfutils upgrades to 0.183, it begins to use AM_GNU_GETTEXT as the
    commit (dd52d2ab Modernize gettext infrastructure) included, so the
    above
    m4 macros files such as iconv.m4 is removed and it's bad as we need to
    patch against iconv.m4 shipped with elfutils.

    BTW, the logic to Disable the unnecessary check in iconv.m4 comes since
    2015 as [1], so move the related logic to gettext-minimal which provides
    iconv.m4 now to fix the gap.

    [1]
    https://git.openembedded.org/openembedded-core/commit/?id=3dd269e027fda173ee40d671ea47da22300fd51d

    Signed-off-by: Mingli Yu <[email protected]
    <mailto:[email protected]>>
    ---
      meta/recipes-core/gettext/gettext-minimal-0.21/aclocal/iconv.m4 | 2 ++
      1 file changed, 2 insertions(+)

    diff --git
    a/meta/recipes-core/gettext/gettext-minimal-0.21/aclocal/iconv.m4
    b/meta/recipes-core/gettext/gettext-minimal-0.21/aclocal/iconv.m4
    index e593b7270a..e04476bb7f 100644
    --- a/meta/recipes-core/gettext/gettext-minimal-0.21/aclocal/iconv.m4
    +++ b/meta/recipes-core/gettext/gettext-minimal-0.21/aclocal/iconv.m4
    @@ -166,6 +166,7 @@ AC_DEFUN([AM_ICONV_LINK],
            }
        }
      #endif
    +#if 0
        /* Test against HP-UX 11.11 bug: No converter from EUC-JP to
    UTF-8 is
           provided.  */
        {
    @@ -189,6 +190,7 @@ AC_DEFUN([AM_ICONV_LINK],
          if (cd4 != (iconv_t)(-1))
            iconv_close (cd4);
        }
    +#endif
        return result;
      ]])],
                [am_cv_func_iconv_works=yes], ,
    -- 
    2.17.1
#5 lore raw
In reply to Alexander Kanavin
Quoted 4 lines · Alexander Kanavin

Note that this m4 file is copied verbatim from upstream gettext, and will be again overwritten on next gettext upgrade. You should figure out what’s wrong specifically in elfutils tree, and work with elfutils upstream to resolve it.

It's more that there is a silly/pointless macro that breaks native builds for us, the issue is in gettext.

How about we set the cache value globally for this macro and drop the patch?

Cheers,

Richard

author
#6 lore raw
Quoted 8 lines · Richard Purdie

[Please note: This e-mail is from an EXTERNAL e-mail address]

Quoted 4 lines · Alexander Kanavin

Note that this m4 file is copied verbatim from upstream gettext, and will be again overwritten on next gettext upgrade. You should figure out what’s wrong specifically in elfutils tree, and work with elfutils upstream to resolve it.

Quoted 4 lines

It's more that there is a silly/pointless macro that breaks native builds for us, the issue is in gettext.

How about we set the cache value globally for this macro and drop the patch?

Hi Richard,

Do you mean define a cached value for the marco AM_ICONV_LINK which we patch against?

Seems the definition of the macro AM_ICONV_LINK we want to patch is too long and I have searched via "grep -Rn CACHED_CONFIGUREVARS *" in openembedded-core layer, didn't find this kind of usage. Not sure if it's appropriate.

Thanks,

Quoted 5 lines

Cheers,

Richard

#7 lore raw
Quoted 17 lines · Mingli
Quoted 8 lines · Richard Purdie

[Please note: This e-mail is from an EXTERNAL e-mail address]

Quoted 4 lines · Alexander Kanavin

Note that this m4 file is copied verbatim from upstream gettext, and will be again overwritten on next gettext upgrade. You should figure out what’s wrong specifically in elfutils tree, and work with elfutils upstream to resolve it.

Quoted 4 lines

It's more that there is a silly/pointless macro that breaks native builds for us, the issue is in gettext.

How about we set the cache value globally for this macro and drop the patch?

Hi Richard,

Quoted 7 lines

Do you mean define a cached value for the marco AM_ICONV_LINK which we patch against?

Seems the definition of the macro AM_ICONV_LINK we want to patch is too long and I have searched via "grep -Rn CACHED_CONFIGUREVARS *" in openembedded-core layer, didn't find this kind of usage. Not sure if it's appropriate.

I've sent out a patch showing what I mean, see:
"site/elfutils/libunistring: Drop patching for iconv and set in site file"

Hopefully that fixes the issue.

Cheers,

Richard

author
#8 lore raw
Quoted 23 lines · Richard Purdie

[Please note: This e-mail is from an EXTERNAL e-mail address]

Quoted 20 lines · Mingli
Quoted 8 lines · Richard Purdie

[Please note: This e-mail is from an EXTERNAL e-mail address]

Quoted 4 lines · Alexander Kanavin

Note that this m4 file is copied verbatim from upstream gettext, and will be again overwritten on next gettext upgrade. You should figure out what’s wrong specifically in elfutils tree, and work with elfutils upstream to resolve it.

Quoted 4 lines

It's more that there is a silly/pointless macro that breaks native builds for us, the issue is in gettext.

How about we set the cache value globally for this macro and drop the patch?

Hi Richard,

Do you mean define a cached value for the marco AM_ICONV_LINK which we patch against?

Quoted 7 lines
Quoted 4 lines

Seems the definition of the macro AM_ICONV_LINK we want to patch is too long and I have searched via "grep -Rn CACHED_CONFIGUREVARS *" in openembedded-core layer, didn't find this kind of usage. Not sure if it's appropriate.

I've sent out a patch showing what I mean, see:
"site/elfutils/libunistring: Drop patching for iconv and set in site file"

Thanks!

Quoted 7 lines

Hopefully that fixes the issue.

Cheers,

Richard