* [Buildroot] [PATCH 1/1] package/zsh: fix build with gcc >= 14
@ 2024-07-20 19:55 Fabrice Fontaine
2024-07-20 21:05 ` Thomas Petazzoni via buildroot
2024-08-29 6:15 ` Peter Korsgaard
0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2024-07-20 19:55 UTC (permalink / raw)
To: buildroot; +Cc: Phil Eichinger, Fabrice Fontaine
Fix the following build failure with gcc >= 14:
termcap.c:45:14: error: conflicting types for 'boolcodes'; have 'char *[]'
45 | static char *boolcodes[] = {
| ^~~~~~~~~
In file included from ../../Src/zshterm.h:1,
from ../../Src/zsh_system.h:932,
from ../../Src/zsh.mdh:17,
from termcap.mdh:17,
from termcap.c:38:
/home/autobuild/autobuild/instance-0/output-1/host/or1k-buildroot-linux-uclibc/sysroot/usr/include/term.h:764:56: note: previous declaration of 'boolcodes' with type 'const char * const[]'
764 | extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolcodes[];
| ^~~~~~~~~
Fixes:
- http://autobuild.buildroot.org/results/fe2f7170465e96cc1de3dae139a25f615331f4b9
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
...er-types-in-terminfo-global-variable.patch | 51 +++++++++++++++++++
package/zsh/zsh.mk | 2 +
2 files changed, 53 insertions(+)
create mode 100644 package/zsh/0001-52383-Avoid-incompatible-pointer-types-in-terminfo-global-variable.patch
diff --git a/package/zsh/0001-52383-Avoid-incompatible-pointer-types-in-terminfo-global-variable.patch b/package/zsh/0001-52383-Avoid-incompatible-pointer-types-in-terminfo-global-variable.patch
new file mode 100644
index 0000000000..c67c374918
--- /dev/null
+++ b/package/zsh/0001-52383-Avoid-incompatible-pointer-types-in-terminfo-global-variable.patch
@@ -0,0 +1,51 @@
+From 4c89849c98172c951a9def3690e8647dae76308f Mon Sep 17 00:00:00 2001
+From: Florian Weimer <fweimer@redhat.com>
+Date: Fri, 8 Dec 2023 21:58:07 +0100
+Subject: [PATCH] 52383: Avoid incompatible pointer types in terminfo global
+ variable checks
+
+Upstream: https://sourceforge.net/p/zsh/code/ci/4c89849c98172c951a9def3690e8647dae76308f
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ ChangeLog | 3 +++
+ configure.ac | 12 ++++++------
+ 2 files changed, 9 insertions(+), 6 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 2a8221e1f..2871dcb7c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1768,27 +1768,27 @@ if test x$zsh_cv_path_term_header != xnone; then
+ fi
+
+ AC_MSG_CHECKING(if boolcodes is available)
+- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = boolcodes; puts(*test);]])],[AC_DEFINE(HAVE_BOOLCODES) boolcodes=yes],[boolcodes=no])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)boolcodes; puts(*test);]])],[AC_DEFINE(HAVE_BOOLCODES) boolcodes=yes],[boolcodes=no])
+ AC_MSG_RESULT($boolcodes)
+
+ AC_MSG_CHECKING(if numcodes is available)
+- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = numcodes; puts(*test);]])],[AC_DEFINE(HAVE_NUMCODES) numcodes=yes],[numcodes=no])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)numcodes; puts(*test);]])],[AC_DEFINE(HAVE_NUMCODES) numcodes=yes],[numcodes=no])
+ AC_MSG_RESULT($numcodes)
+
+ AC_MSG_CHECKING(if strcodes is available)
+- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = strcodes; puts(*test);]])],[AC_DEFINE(HAVE_STRCODES) strcodes=yes],[strcodes=no])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)strcodes; puts(*test);]])],[AC_DEFINE(HAVE_STRCODES) strcodes=yes],[strcodes=no])
+ AC_MSG_RESULT($strcodes)
+
+ AC_MSG_CHECKING(if boolnames is available)
+- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = boolnames; puts(*test);]])],[AC_DEFINE(HAVE_BOOLNAMES) boolnames=yes],[boolnames=no])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)boolnames; puts(*test);]])],[AC_DEFINE(HAVE_BOOLNAMES) boolnames=yes],[boolnames=no])
+ AC_MSG_RESULT($boolnames)
+
+ AC_MSG_CHECKING(if numnames is available)
+- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = numnames; puts(*test);]])],[AC_DEFINE(HAVE_NUMNAMES) numnames=yes],[numnames=no])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)numnames; puts(*test);]])],[AC_DEFINE(HAVE_NUMNAMES) numnames=yes],[numnames=no])
+ AC_MSG_RESULT($numnames)
+
+ AC_MSG_CHECKING(if strnames is available)
+- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = strnames; puts(*test);]])],[AC_DEFINE(HAVE_STRNAMES) strnames=yes],[strnames=no])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)strnames; puts(*test);]])],[AC_DEFINE(HAVE_STRNAMES) strnames=yes],[strnames=no])
+ AC_MSG_RESULT($strnames)
+
+ dnl There are apparently defective terminal library headers on some
diff --git a/package/zsh/zsh.mk b/package/zsh/zsh.mk
index e790bf4c5e..7e577fa9e1 100644
--- a/package/zsh/zsh.mk
+++ b/package/zsh/zsh.mk
@@ -13,6 +13,8 @@ ZSH_CONF_ENV = zsh_cv_sys_nis=no zsh_cv_sys_nis_plus=no
ZSH_LICENSE = MIT-like
ZSH_LICENSE_FILES = LICENCE
ZSH_CPE_ID_VENDOR = zsh
+# 0001-52383-Avoid-incompatible-pointer-types-in-terminfo-global-variable.patch
+ZSH_AUTORECONF = YES
# zsh uses TRY_RUN to determine these
ZSH_CONF_OPTS += \
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/zsh: fix build with gcc >= 14
2024-07-20 19:55 [Buildroot] [PATCH 1/1] package/zsh: fix build with gcc >= 14 Fabrice Fontaine
@ 2024-07-20 21:05 ` Thomas Petazzoni via buildroot
2024-08-29 6:15 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-07-20 21:05 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: Phil Eichinger, buildroot
On Sat, 20 Jul 2024 21:55:05 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> Fix the following build failure with gcc >= 14:
>
> termcap.c:45:14: error: conflicting types for 'boolcodes'; have 'char *[]'
> 45 | static char *boolcodes[] = {
> | ^~~~~~~~~
> In file included from ../../Src/zshterm.h:1,
> from ../../Src/zsh_system.h:932,
> from ../../Src/zsh.mdh:17,
> from termcap.mdh:17,
> from termcap.c:38:
> /home/autobuild/autobuild/instance-0/output-1/host/or1k-buildroot-linux-uclibc/sysroot/usr/include/term.h:764:56: note: previous declaration of 'boolcodes' with type 'const char * const[]'
> 764 | extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolcodes[];
> | ^~~~~~~~~
>
> Fixes:
> - http://autobuild.buildroot.org/results/fe2f7170465e96cc1de3dae139a25f615331f4b9
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> ...er-types-in-terminfo-global-variable.patch | 51 +++++++++++++++++++
> package/zsh/zsh.mk | 2 +
> 2 files changed, 53 insertions(+)
> create mode 100644 package/zsh/0001-52383-Avoid-incompatible-pointer-types-in-terminfo-global-variable.patch
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/zsh: fix build with gcc >= 14
2024-07-20 19:55 [Buildroot] [PATCH 1/1] package/zsh: fix build with gcc >= 14 Fabrice Fontaine
2024-07-20 21:05 ` Thomas Petazzoni via buildroot
@ 2024-08-29 6:15 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2024-08-29 6:15 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: Phil Eichinger, buildroot
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:
> Fix the following build failure with gcc >= 14:
> termcap.c:45:14: error: conflicting types for 'boolcodes'; have 'char *[]'
> 45 | static char *boolcodes[] = {
> | ^~~~~~~~~
> In file included from ../../Src/zshterm.h:1,
> from ../../Src/zsh_system.h:932,
> from ../../Src/zsh.mdh:17,
> from termcap.mdh:17,
> from termcap.c:38:
> /home/autobuild/autobuild/instance-0/output-1/host/or1k-buildroot-linux-uclibc/sysroot/usr/include/term.h:764:56: note: previous declaration of 'boolcodes' with type 'const char * const[]'
> 764 | extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolcodes[];
> | ^~~~~~~~~
> Fixes:
> - http://autobuild.buildroot.org/results/fe2f7170465e96cc1de3dae139a25f615331f4b9
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Committed to 2024.05.x, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-08-29 6:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-20 19:55 [Buildroot] [PATCH 1/1] package/zsh: fix build with gcc >= 14 Fabrice Fontaine
2024-07-20 21:05 ` Thomas Petazzoni via buildroot
2024-08-29 6:15 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox