Skip to contentSkip to conversation

package/android-tools: add patch to fix GCC 15.x build issue

PATCH Applied Thomas Petazzoni via buildroot 2 participants 3 messages May 16, 2025 – May 18, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/android-tools: add patch to fix GCC 15.x build issue

host-android-tools fails to build when the host gcc version is >= 15.x. A simple patch allows to fix the issue by adjusting how allocate_inode() gets called.

Fixes:

https://autobuild.buildroot.org/results/e8152490540ee1968182f4eb7813e5e940f3e9b3/

---
 ...s-contents.c-allocate_inode-doesn-t-.patch | 57 +++++++++++++++++++
 1 file changed, 57 insertions(+)
 create mode 100644 package/android-tools/0017-extras-ext4_utils-contents.c-allocate_inode-doesn-t-.patch
package/android-tools/0017-extras-ext4_utils-contents.c-allocate_inode-doesn-t-.patch new file +57 -0
new file mode 100644
index 0000000000..a9baf4dc29
@@ -0,0 +1,57 @@
+From b822c8e2f380ba6158601e621a12927a4264ff67 Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <[email protected]>
+Date: Fri, 16 May 2025 15:32:00 +0200
+Subject: [PATCH] extras/ext4_utils/contents.c: allocate_inode() doesn't take
+ any argument
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes:
+
+/home/thomas/projets/buildroot/output/build/host-android-tools-4.2.2+git20130218/extras/ext4_utils/contents.c: In function ‘make_directory’:
+/home/thomas/projets/buildroot/output/build/host-android-tools-4.2.2+git20130218/extras/ext4_utils/contents.c:102:29: error: too many arguments to function ‘allocate_inode’; expected 0, have 1
+  102 |                 inode_num = allocate_inode(info);
+
+and similar build failures that occur with GCC 15.x.
+
+Upstream: N/A, we're too far from upstream
+Signed-off-by: Thomas Petazzoni <[email protected]>
+---
+ extras/ext4_utils/contents.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/extras/ext4_utils/contents.c b/extras/ext4_utils/contents.c
+index 6300680..b0336a4 100644
+--- a/extras/ext4_utils/contents.c
++++ b/extras/ext4_utils/contents.c
+@@ -99,7 +99,7 @@ u32 make_directory(u32 dir_inode_num, u32 entries, struct dentry *dentries,
+ 	len = blocks * info.block_size;
+ 
+ 	if (dir_inode_num) {
+-		inode_num = allocate_inode(info);
++		inode_num = allocate_inode();
+ 	} else {
+ 		dir_inode_num = EXT4_ROOT_INO;
+ 		inode_num = EXT4_ROOT_INO;
+@@ -167,7 +167,7 @@ u32 make_file(const char *filename, u64 len)
+ 	struct ext4_inode *inode;
+ 	u32 inode_num;
+ 
+-	inode_num = allocate_inode(info);
++	inode_num = allocate_inode();
+ 	if (inode_num == EXT4_ALLOCATE_FAILED) {
+ 		error("failed to allocate inode\n");
+ 		return EXT4_ALLOCATE_FAILED;
+@@ -196,7 +196,7 @@ u32 make_link(const char *filename, const char *link)
+ 	u32 inode_num;
+ 	u32 len = strlen(link);
+ 
+-	inode_num = allocate_inode(info);
++	inode_num = allocate_inode();
+ 	if (inode_num == EXT4_ALLOCATE_FAILED) {
+ 		error("failed to allocate inode\n");
+ 		return EXT4_ALLOCATE_FAILED;
+-- 
+2.49.0
+
Signature · 6 lines
2.49.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 10 lines · Thomas Petazzoni via buildroot

host-android-tools fails to build when the host gcc version is >= 15.x. A simple patch allows to fix the issue by adjusting how allocate_inode() gets called.

Fixes:

https://autobuild.buildroot.org/results/e8152490540ee1968182f4eb7813e5e940f3e9b3/

Applied to master, thanks.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw
In reply to Thomas Petazzoni via buildroot
Quoted 9 lines · Thomas Petazzoni via buildroot

host-android-tools fails to build when the host gcc version is >= 15.x. A simple patch allows to fix the issue by adjusting how allocate_inode() gets called.

Fixes:

   https://autobuild.buildroot.org/results/e8152490540ee1968182f4eb7813e5e940f3e9b3/

Applied to 2025.02.x, thanks.

Regards,
Arnout

Quoted 58 lines
---
  ...s-contents.c-allocate_inode-doesn-t-.patch | 57 +++++++++++++++++++
  1 file changed, 57 insertions(+)

create mode 100644 package/android-tools/0017-extras-ext4_utils-contents.c-allocate_inode-doesn-t-.patch

package/android-tools/0017-extras-ext4_utils-contents.c-allocate_inode-doesn-t-.patch new file +47 -0
new file mode 100644
index 0000000000..a9baf4dc29
@@ -0,0 +1,57 @@
+From b822c8e2f380ba6158601e621a12927a4264ff67 Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <[email protected]>
+Date: Fri, 16 May 2025 15:32:00 +0200
+Subject: [PATCH] extras/ext4_utils/contents.c: allocate_inode() doesn't take
+ any argument
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes:
+
+/home/thomas/projets/buildroot/output/build/host-android-tools-4.2.2+git20130218/extras/ext4_utils/contents.c: In function ‘make_directory’:
+/home/thomas/projets/buildroot/output/build/host-android-tools-4.2.2+git20130218/extras/ext4_utils/contents.c:102:29: error: too many arguments to function ‘allocate_inode’; expected 0, have 1
+  102 |                 inode_num = allocate_inode(info);
+
+and similar build failures that occur with GCC 15.x.
+
+Upstream: N/A, we're too far from upstream
+Signed-off-by: Thomas Petazzoni <[email protected]>
+---
+ extras/ext4_utils/contents.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/extras/ext4_utils/contents.c b/extras/ext4_utils/contents.c
+index 6300680..b0336a4 100644
+--- a/extras/ext4_utils/contents.c
++++ b/extras/ext4_utils/contents.c
+@@ -99,7 +99,7 @@ u32 make_directory(u32 dir_inode_num, u32 entries, struct dentry *dentries,
+ 	len = blocks * info.block_size;
+
+ 	if (dir_inode_num) {
+-		inode_num = allocate_inode(info);
++		inode_num = allocate_inode();
+ 	} else {
+ 		dir_inode_num = EXT4_ROOT_INO;
+ 		inode_num = EXT4_ROOT_INO;
+@@ -167,7 +167,7 @@ u32 make_file(const char *filename, u64 len)
+ 	struct ext4_inode *inode;
+ 	u32 inode_num;
+
+-	inode_num = allocate_inode(info);
++	inode_num = allocate_inode();
+ 	if (inode_num == EXT4_ALLOCATE_FAILED) {
+ 		error("failed to allocate inode\n");
+ 		return EXT4_ALLOCATE_FAILED;
+@@ -196,7 +196,7 @@ u32 make_link(const char *filename, const char *link)
+ 	u32 inode_num;

package/android-tools/0017-extras-ext4_utils-contents.c-allocate_inode-doesn-t-.patch line 57

Quoted 10 lines
package/android-tools/0017-extras-ext4_utils-contents.c-allocate_inode-doesn-t-.patch new file +10 -0
+ 	u32 len = strlen(link);
+
+-	inode_num = allocate_inode(info);
++	inode_num = allocate_inode();
+ 	if (inode_num == EXT4_ALLOCATE_FAILED) {
+ 		error("failed to allocate inode\n");
+ 		return EXT4_ALLOCATE_FAILED;
+--
+2.49.0
+

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