Skip to contentSkip to conversation

sharutils: Check for intmax_t using configure

PATCH In review Khem Raj 2 participants 3 messages Sep 10, 2023 1 message not in the archive

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 sharutils: Check for intmax_t using configure

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;
| ^

---
 ...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
meta-oe/recipes-support/sharutils/sharutils/0001-configure.ac-Check-and-define-intmax_t-type.patch new file +32 -0
new file mode 100644
index 0000000000..32562a08bc
@@ -0,0 +1,32 @@
+From ea6f7a4c22f1b6f28cf426566cccd65eb9a0e9de Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+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 <[email protected]>
+---
+ 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
+
meta-oe/recipes-support/sharutils/sharutils_4.15.2.bb +1 -0
index bd2776e1bc..2a16b18288 100644
@@ -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"
Signature · 1 line
2.42.0
#1 lore raw

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,

Quoted 85 lines · Khem Raj

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;
| ^

---
 ...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

meta-oe/recipes-support/sharutils/sharutils/0001-configure.ac-Check-and-define-intmax_t-type.patch new file +12 -0
@@ -0,0 +1,32 @@
+From ea6f7a4c22f1b6f28cf426566cccd65eb9a0e9de Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+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

]

meta-oe/recipes-support/sharutils/sharutils/0001-configure.ac-Check-and-define-intmax_t-type.patch new file +20 -0
+Signed-off-by: Khem Raj <[email protected]>
+---
+ 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
+
meta-oe/recipes-support/sharutils/sharutils_4.15.2.bb +1 -0
index bd2776e1bc..2a16b18288 100644
@@ -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: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

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,

Quoted 101 lines · Martin Jansa via lists.openembedded.org

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,

Quoted 70 lines · Khem Raj

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;
| ^

---
 ...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

meta-oe/recipes-support/sharutils/sharutils/0001-configure.ac-Check-and-define-intmax_t-type.patch new file +6 -0
@@ -0,0 +1,32 @@
+From ea6f7a4c22f1b6f28cf426566cccd65eb9a0e9de Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+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.

meta-oe/recipes-support/sharutils/sharutils/0001-configure.ac-Check-and-define-intmax_t-type.patch new file +6 -0
+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]

meta-oe/recipes-support/sharutils/sharutils/0001-configure.ac-Check-and-define-intmax_t-type.patch new file +20 -0
+Signed-off-by: Khem Raj <[email protected]>
+---
+ 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
+
meta-oe/recipes-support/sharutils/sharutils_4.15.2.bb +1 -0
index bd2776e1bc..2a16b18288 100644
@@ -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"
Quoted 9 lines

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: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-