diff mbox series

[meta-oe] sharutils: Check for intmax_t using configure

Message ID 20230910210811.2335948-1-raj.khem@gmail.com
State New
Headers show
Series [meta-oe] sharutils: Check for intmax_t using configure | expand

Commit Message

Khem Raj Sept. 10, 2023, 9:08 p.m. UTC
fixes
../../sharutils-4.15.2/lib/system.h:45:14: error: typedef redefinition with different types ('long' vs '__intmax_t' (aka 'long long'))
   45 | typedef long intmax_t;
      |              ^

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...re.ac-Check-and-define-intmax_t-type.patch | 32 +++++++++++++++++++
 .../sharutils/sharutils_4.15.2.bb             |  1 +
 2 files changed, 33 insertions(+)
 create mode 100644 meta-oe/recipes-support/sharutils/sharutils/0001-configure.ac-Check-and-define-intmax_t-type.patch

Comments

Martin Jansa Sept. 10, 2023, 9:18 p.m. UTC | #1
Hi,

thanks for this, I've seen it in my world builds yesterday as well. Do you
know what caused this to fail suddenly? Was it that gettext upgrade? as
there weren't many changes since last successful build and sharutils
doesn't depend on much.

Cheers,

On Sun, Sep 10, 2023 at 11:08 PM Khem Raj <raj.khem@gmail.com> wrote:

> fixes
> ../../sharutils-4.15.2/lib/system.h:45:14: error: typedef redefinition
> with different types ('long' vs '__intmax_t' (aka 'long long'))
>    45 | typedef long intmax_t;
>       |              ^
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  ...re.ac-Check-and-define-intmax_t-type.patch | 32 +++++++++++++++++++
>  .../sharutils/sharutils_4.15.2.bb             |  1 +
>  2 files changed, 33 insertions(+)
>  create mode 100644
> meta-oe/recipes-support/sharutils/sharutils/0001-configure.ac-Check-and-define-intmax_t-type.patch
>
> diff --git
> a/meta-oe/recipes-support/sharutils/sharutils/0001-configure.ac-Check-and-define-intmax_t-type.patch
> b/meta-oe/recipes-support/sharutils/sharutils/0001-configure.ac-Check-and-define-intmax_t-type.patch
> new file mode 100644
> index 0000000000..32562a08bc
> --- /dev/null
> +++
> b/meta-oe/recipes-support/sharutils/sharutils/0001-configure.ac-Check-and-define-intmax_t-type.patch
> @@ -0,0 +1,32 @@
> +From ea6f7a4c22f1b6f28cf426566cccd65eb9a0e9de Mon Sep 17 00:00:00 2001
> +From: Khem Raj <raj.khem@gmail.com>
> +Date: Sun, 10 Sep 2023 13:52:31 -0700
> +Subject: [PATCH] configure.ac: Check and define intmax_t type
> +
> +If stdint.h or inttypes.h defines the type intmax_t, define HAVE_INTMAX_T.
> +Otherwise, define intmax_t to the widest signed integer type.
> +
> +intmax_t is defined in lib/system.h if system is not providing it but it
> +needs to be checked by configure for existence first.
> +
> +Upstream-Status: Submitted [https://savannah.gnu.org/bugs/index.php?64653
> ]
> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> +---
> + configure.ac | 1 +
> + 1 file changed, 1 insertion(+)
> +
> +diff --git a/configure.ac b/configure.ac
> +index 1242cb7..2ccaac9 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -72,6 +72,7 @@ AC_HEADER_STAT
> + AC_HEADER_STDC
> + AC_STRUCT_TIMEZONE
> + AC_TYPE_SIZE_T
> ++AC_TYPE_INTMAX_T
> + AC_CHECK_FUNCS([fchmod isascii strchr])
> + AC_FUNC_CLOSEDIR_VOID
> + AC_FUNC_FSEEKO
> +--
> +2.42.0
> +
> diff --git a/meta-oe/recipes-support/sharutils/sharutils_4.15.2.bb
> b/meta-oe/recipes-support/sharutils/sharutils_4.15.2.bb
> index bd2776e1bc..2a16b18288 100644
> --- a/meta-oe/recipes-support/sharutils/sharutils_4.15.2.bb
> +++ b/meta-oe/recipes-support/sharutils/sharutils_4.15.2.bb
> @@ -12,6 +12,7 @@ SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \
>             file://0001-Fix-build-with-recent-gettext.patch \
>             file://0001-Fix-building-with-GCC-10.patch \
>             file://0002-Do-not-include-lib-md5.c-into-src-shar.c.patch \
> +           file://0001-configure.ac-Check-and-define-intmax_t-type.patch \
>             "
>  SRC_URI[md5sum] = "32a51b23e25ad5e6af4b89f228be1800"
>  SRC_URI[sha256sum] =
> "ee336e68549664e7a19b117adf02edfdeac6307f22e5ba78baca457116914637"
> --
> 2.42.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#104830):
> https://lists.openembedded.org/g/openembedded-devel/message/104830
> Mute This Topic: https://lists.openembedded.org/mt/101280770/3617156
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [
> Martin.Jansa@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
Martin Jansa Sept. 10, 2023, 10:19 p.m. UTC | #2
Hi,

nevermind, I can confirm that after reverting "gettext: upgrade 0.21.1 ->
0.22"
https://git.openembedded.org/openembedded-core/commit/?id=7c29196f8e378cb12b82da31ab2a05f5e8d1b831
it built OK, so it was caused by that. Thanks for the fix.

Cheers,

On Sun, Sep 10, 2023 at 11:18 PM Martin Jansa via lists.openembedded.org
<Martin.Jansa=gmail.com@lists.openembedded.org> wrote:

> Hi,
>
> thanks for this, I've seen it in my world builds yesterday as well. Do you
> know what caused this to fail suddenly? Was it that gettext upgrade? as
> there weren't many changes since last successful build and sharutils
> doesn't depend on much.
>
> Cheers,
>
> On Sun, Sep 10, 2023 at 11:08 PM Khem Raj <raj.khem@gmail.com> wrote:
>
>> fixes
>> ../../sharutils-4.15.2/lib/system.h:45:14: error: typedef redefinition
>> with different types ('long' vs '__intmax_t' (aka 'long long'))
>>    45 | typedef long intmax_t;
>>       |              ^
>>
>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> ---
>>  ...re.ac-Check-and-define-intmax_t-type.patch | 32 +++++++++++++++++++
>>  .../sharutils/sharutils_4.15.2.bb             |  1 +
>>  2 files changed, 33 insertions(+)
>>  create mode 100644
>> meta-oe/recipes-support/sharutils/sharutils/0001-configure.ac-Check-and-define-intmax_t-type.patch
>>
>> diff --git
>> a/meta-oe/recipes-support/sharutils/sharutils/0001-configure.ac-Check-and-define-intmax_t-type.patch
>> b/meta-oe/recipes-support/sharutils/sharutils/0001-configure.ac-Check-and-define-intmax_t-type.patch
>> new file mode 100644
>> index 0000000000..32562a08bc
>> --- /dev/null
>> +++
>> b/meta-oe/recipes-support/sharutils/sharutils/0001-configure.ac-Check-and-define-intmax_t-type.patch
>> @@ -0,0 +1,32 @@
>> +From ea6f7a4c22f1b6f28cf426566cccd65eb9a0e9de Mon Sep 17 00:00:00 2001
>> +From: Khem Raj <raj.khem@gmail.com>
>> +Date: Sun, 10 Sep 2023 13:52:31 -0700
>> +Subject: [PATCH] configure.ac: Check and define intmax_t type
>> +
>> +If stdint.h or inttypes.h defines the type intmax_t, define
>> HAVE_INTMAX_T.
>> +Otherwise, define intmax_t to the widest signed integer type.
>> +
>> +intmax_t is defined in lib/system.h if system is not providing it but it
>> +needs to be checked by configure for existence first.
>> +
>> +Upstream-Status: Submitted [
>> https://savannah.gnu.org/bugs/index.php?64653]
>> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> +---
>> + configure.ac | 1 +
>> + 1 file changed, 1 insertion(+)
>> +
>> +diff --git a/configure.ac b/configure.ac
>> +index 1242cb7..2ccaac9 100644
>> +--- a/configure.ac
>> ++++ b/configure.ac
>> +@@ -72,6 +72,7 @@ AC_HEADER_STAT
>> + AC_HEADER_STDC
>> + AC_STRUCT_TIMEZONE
>> + AC_TYPE_SIZE_T
>> ++AC_TYPE_INTMAX_T
>> + AC_CHECK_FUNCS([fchmod isascii strchr])
>> + AC_FUNC_CLOSEDIR_VOID
>> + AC_FUNC_FSEEKO
>> +--
>> +2.42.0
>> +
>> diff --git a/meta-oe/recipes-support/sharutils/sharutils_4.15.2.bb
>> b/meta-oe/recipes-support/sharutils/sharutils_4.15.2.bb
>> index bd2776e1bc..2a16b18288 100644
>> --- a/meta-oe/recipes-support/sharutils/sharutils_4.15.2.bb
>> +++ b/meta-oe/recipes-support/sharutils/sharutils_4.15.2.bb
>> @@ -12,6 +12,7 @@ SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \
>>             file://0001-Fix-build-with-recent-gettext.patch \
>>             file://0001-Fix-building-with-GCC-10.patch \
>>             file://0002-Do-not-include-lib-md5.c-into-src-shar.c.patch \
>> +           file://0001-configure.ac-Check-and-define-intmax_t-type.patch
>> \
>>             "
>>  SRC_URI[md5sum] = "32a51b23e25ad5e6af4b89f228be1800"
>>  SRC_URI[sha256sum] =
>> "ee336e68549664e7a19b117adf02edfdeac6307f22e5ba78baca457116914637"
>> --
>> 2.42.0
>>
>>
>>
>>
>>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#104831):
> https://lists.openembedded.org/g/openembedded-devel/message/104831
> Mute This Topic: https://lists.openembedded.org/mt/101280770/3617156
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [
> Martin.Jansa@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
diff mbox series

Patch

diff --git a/meta-oe/recipes-support/sharutils/sharutils/0001-configure.ac-Check-and-define-intmax_t-type.patch b/meta-oe/recipes-support/sharutils/sharutils/0001-configure.ac-Check-and-define-intmax_t-type.patch
new file mode 100644
index 0000000000..32562a08bc
--- /dev/null
+++ b/meta-oe/recipes-support/sharutils/sharutils/0001-configure.ac-Check-and-define-intmax_t-type.patch
@@ -0,0 +1,32 @@ 
+From ea6f7a4c22f1b6f28cf426566cccd65eb9a0e9de Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 10 Sep 2023 13:52:31 -0700
+Subject: [PATCH] configure.ac: Check and define intmax_t type
+
+If stdint.h or inttypes.h defines the type intmax_t, define HAVE_INTMAX_T.
+Otherwise, define intmax_t to the widest signed integer type.
+
+intmax_t is defined in lib/system.h if system is not providing it but it
+needs to be checked by configure for existence first.
+
+Upstream-Status: Submitted [https://savannah.gnu.org/bugs/index.php?64653]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure.ac | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure.ac b/configure.ac
+index 1242cb7..2ccaac9 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -72,6 +72,7 @@ AC_HEADER_STAT
+ AC_HEADER_STDC
+ AC_STRUCT_TIMEZONE
+ AC_TYPE_SIZE_T
++AC_TYPE_INTMAX_T
+ AC_CHECK_FUNCS([fchmod isascii strchr])
+ AC_FUNC_CLOSEDIR_VOID
+ AC_FUNC_FSEEKO
+-- 
+2.42.0
+
diff --git a/meta-oe/recipes-support/sharutils/sharutils_4.15.2.bb b/meta-oe/recipes-support/sharutils/sharutils_4.15.2.bb
index bd2776e1bc..2a16b18288 100644
--- a/meta-oe/recipes-support/sharutils/sharutils_4.15.2.bb
+++ b/meta-oe/recipes-support/sharutils/sharutils_4.15.2.bb
@@ -12,6 +12,7 @@  SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \
            file://0001-Fix-build-with-recent-gettext.patch \
            file://0001-Fix-building-with-GCC-10.patch \
            file://0002-Do-not-include-lib-md5.c-into-src-shar.c.patch \
+           file://0001-configure.ac-Check-and-define-intmax_t-type.patch \
            "
 SRC_URI[md5sum] = "32a51b23e25ad5e6af4b89f228be1800"
 SRC_URI[sha256sum] = "ee336e68549664e7a19b117adf02edfdeac6307f22e5ba78baca457116914637"