Skip to contentSkip to conversation

boot/syslinux: Fix building syslinux with GCC 14.x

PATCH Applied Lance Fredrickson 4 participants 5 messages Jun 23, 2024 – Jul 28, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 boot/syslinux: Fix building syslinux with GCC 14.x

From: Lance Fredrickson <[email protected]>

Add missing stdio.h include. Without it results in the following error under GCC 14.x

../../../com32/lib/syslinux/debug.c: In function ‘syslinux_debug’:
../../../com32/lib/syslinux/debug.c:91:5: error: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
91 | printf("Dynamic debug unavailable\n");

Upstream: dead (last release in 2014)

---
 .../0020-pull-in-stdio-h-for-gcc14.patch      | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 boot/syslinux/0020-pull-in-stdio-h-for-gcc14.patch
boot/syslinux/0020-pull-in-stdio-h-for-gcc14.patch new file +34 -0
new file mode 100644
index 0000000000..09a0074b31
@@ -0,0 +1,34 @@
+From dfa2705100a893bc017d23406daa9a383fbc3c95 Mon Sep 17 00:00:00 2001
+From: Lance Fredrickson <[email protected]>
+Date: Wed, 5 Jun 2024 14:31:38 -0600
+Subject: [PATCH] com32/lib/syslinux/debug.c: add missing stdio.h include.
+
+Fix building syslinux with GCC 14.x
+
+Add missing stdio.h include. Without it results in the following error under GCC 14.x
+
+../../../com32/lib/syslinux/debug.c: In function ‘syslinux_debug’:
+../../../com32/lib/syslinux/debug.c:91:5: error: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
+   91 |     printf("Dynamic debug unavailable\n");
+
+Upstream: dead (last release in 2014)
+Signed-off-by: Lance Fredrickson <[email protected]>
+---
+ com32/lib/syslinux/debug.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/com32/lib/syslinux/debug.c b/com32/lib/syslinux/debug.c
+index d9ab863f..e8f53d57 100644
+--- a/com32/lib/syslinux/debug.c
++++ b/com32/lib/syslinux/debug.c
+@@ -1,6 +1,7 @@
+ #include <linux/list.h>
+ #include <string.h>
+ #include <stdbool.h>
++#include <stdio.h>
+ 
+ #ifdef DYNAMIC_DEBUG
+ 
+-- 
+2.39.2
+
Signature · 6 lines
2.39.2

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

Hi Lance, All,

Quoted 9 lines · Lance Fredrickson

From: Lance Fredrickson <[email protected]>

Add missing stdio.h include. Without it results in the following error under GCC 14.x

../../../com32/lib/syslinux/debug.c: In function ‘syslinux_debug’:
../../../com32/lib/syslinux/debug.c:91:5: error: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
91 | printf("Dynamic debug unavailable\n");

Upstream: dead (last release in 2014)

Even syslinux had no release since 2014, its mailing list is still more or less operating: https://www.syslinux.org/archives/
The patch could be sent on that list, in case the project gets a new maintainer or get forked by somebody else...

See, for example:
https://gitlab.com/buildroot.org/buildroot/-/blob/2024.05/boot/syslinux/0019-stddef.h-add-wchar_t-type-definition.patch?ref_type=tags#L40

Quoted 52 lines
---
 .../0020-pull-in-stdio-h-for-gcc14.patch      | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 boot/syslinux/0020-pull-in-stdio-h-for-gcc14.patch
boot/syslinux/0020-pull-in-stdio-h-for-gcc14.patch new file +4 -0
new file mode 100644
index 0000000000..09a0074b31
@@ -0,0 +1,34 @@
+From dfa2705100a893bc017d23406daa9a383fbc3c95 Mon Sep 17 00:00:00 2001
+From: Lance Fredrickson <[email protected]>
+Date: Wed, 5 Jun 2024 14:31:38 -0600
+Subject: [PATCH] com32/lib/syslinux/debug.c: add missing stdio.h 

include.

boot/syslinux/0020-pull-in-stdio-h-for-gcc14.patch new file +4 -0
+
+Fix building syslinux with GCC 14.x
+
+Add missing stdio.h include. Without it results in the following error 

under GCC 14.x
+
+../../../com32/lib/syslinux/debug.c: In function ‘syslinux_debug’:
+../../../com32/lib/syslinux/debug.c:91:5: error: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]

boot/syslinux/0020-pull-in-stdio-h-for-gcc14.patch new file +23 -1
+   91 |     printf("Dynamic debug unavailable\n");
+
+Upstream: dead (last release in 2014)
+Signed-off-by: Lance Fredrickson <[email protected]>
+---
+ com32/lib/syslinux/debug.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/com32/lib/syslinux/debug.c b/com32/lib/syslinux/debug.c
+index d9ab863f..e8f53d57 100644
+--- a/com32/lib/syslinux/debug.c
++++ b/com32/lib/syslinux/debug.c
+@@ -1,6 +1,7 @@
+ #include <linux/list.h>
+ #include <string.h>
+ #include <stdbool.h>
++#include <stdio.h>
+
+ #ifdef DYNAMIC_DEBUG
+
+--
+2.39.2
+
--

2.39.2

Quoted 4 lines

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

Best regards,

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

#2 lore raw
Quoted 4 lines · On Sun, 23 Jun 2024 10:10:59 +0000 Julien Olivain <[email protected]> wrote:

Even syslinux had no release since 2014, its mailing list is still more or less operating: https://www.syslinux.org/archives/
The patch could be sent on that list, in case the project gets a new maintainer or get forked by somebody else...

I agree, but there's been no commit since 6 years in the Git repo, no release in 10 years, so I tend to agree also with the fact that upstream is dead. It's pretty crazy that no alternative upstream/maintainer has emerged for this project (though its code base is not amazing, so not very encouraging project to take over the maintenance of).

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw
In reply to Lance Fredrickson
Quoted 8 lines · On Sat, 22 Jun 2024 21:38:04 -0600 Lance Fredrickson <[email protected]>…

From: Lance Fredrickson <[email protected]>

Add missing stdio.h include. Without it results in the following error under GCC 14.x

../../../com32/lib/syslinux/debug.c: In function ‘syslinux_debug’:
../../../com32/lib/syslinux/debug.c:91:5: error: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
91 | printf("Dynamic debug unavailable\n");

Quoted 6 lines

Upstream: dead (last release in 2014)

---
 .../0020-pull-in-stdio-h-for-gcc14.patch      | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 boot/syslinux/0020-pull-in-stdio-h-for-gcc14.patch

Applied to master, thanks.

Thomas

Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#4 lore raw
In reply to Lance Fredrickson
Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Lance" == Lance Fredrickson <[email protected]> writes:

From: Lance Fredrickson <[email protected]>
Add missing stdio.h include. Without it results in the following error under GCC 14.x

../../../com32/lib/syslinux/debug.c: In function ‘syslinux_debug’:
../../../com32/lib/syslinux/debug.c:91:5: error: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
91 | printf("Dynamic debug unavailable\n");

Upstream: dead (last release in 2014)

Committed to 2024.02.x and 2024.05.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot