patch 9.0.1681: Build Failure with Perl 5.38

31 views
Skip to first unread message

Christian Brabandt

unread,
Aug 9, 2023, 2:15:08 PM8/9/23
to vim...@googlegroups.com
patch 9.0.1681: Build Failure with Perl 5.38

Commit: https://github.com/vim/vim/commit/1d7caa58e3c87f75a4becbceabbd1af181ace11e
Author: Philip H <47042125...@users.noreply.github.com>
Date: Thu Jun 22 08:55:47 2023 +0200

patch 9.0.1681: Build Failure with Perl 5.38

Problem: Build Failure with Perl 5.38
Solution: Fix Build Failure

closes: #12543, closes: #12575

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 3481bcb8f..47c68ea7d 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -276,7 +276,6 @@ jobs:
run: |
brew install lua
echo "LUA_PREFIX=/usr/local" >> $GITHUB_ENV
- brew uninstall perl

- name: Set up environment
run: |
diff --git a/ci/config.mk.sed b/ci/config.mk.sed
index 51e7ec903..f672edd9e 100644
--- a/ci/config.mk.sed
+++ b/ci/config.mk.sed
@@ -1,3 +1,3 @@
/^CFLAGS[[:blank:]]*=/s/$/ -Wall -Wextra -Wshadow -Werror/
-/^PERL_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unused-function/
+/^PERL_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unused-function -Wno-shadow/
/^RUBY_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unused-parameter/
diff --git a/src/if_perl.xs b/src/if_perl.xs
index c69ed9ef1..6c1003c41 100644
--- a/src/if_perl.xs
+++ b/src/if_perl.xs
@@ -40,7 +40,7 @@
/* Work around for perl-5.18.
* Don't include "perl\lib\CORE\inline.h" for now,
* include it after Perl_sv_free2 is defined. */
-#ifdef DYNAMIC_PERL
+#if (PERL_REVISION == 5) && (PERL_VERSION >= 18)
# define PERL_NO_INLINE_FUNCTIONS
#endif

@@ -402,14 +402,14 @@ static bool (*Perl_sv_2bool)(pTHX_ SV*);
static IV (*Perl_sv_2iv)(pTHX_ SV*);
static SV* (*Perl_sv_2mortal)(pTHX_ SV*);
# if (PERL_REVISION == 5) && (PERL_VERSION >= 8)
-static char* (*Perl_sv_2pv_flags)(pTHX_ SV*, STRLEN*, I32);
+static char* (*Perl_sv_2pv_flags)(pTHX_ SV*, STRLEN* const, const U32);
static char* (*Perl_sv_2pv_nolen)(pTHX_ SV*);
# else
static char* (*Perl_sv_2pv)(pTHX_ SV*, STRLEN*);
# endif
static char* (*Perl_sv_2pvbyte)(pTHX_ SV*, STRLEN*);
# if (PERL_REVISION == 5) && (PERL_VERSION >= 32)
-static char* (*Perl_sv_2pvbyte_flags)(pTHX_ SV*, STRLEN*, I32);
+static char* (*Perl_sv_2pvbyte_flags)(pTHX_ SV*, STRLEN* const, const U32);
# endif
static SV* (*Perl_sv_bless)(pTHX_ SV*, HV*);
# if (PERL_REVISION == 5) && (PERL_VERSION >= 8)
@@ -710,7 +710,7 @@ S_POPMARK(pTHX)
# endif

/* perl-5.34 needs Perl_SvTRUE_common; used in SvTRUE_nomg_NN */
-# if (PERL_REVISION == 5) && (PERL_VERSION >= 34)
+# if (PERL_REVISION == 5) && (PERL_VERSION == 34)
PERL_STATIC_INLINE bool
Perl_SvTRUE_common(pTHX_ SV * sv, const bool sv_2bool_is_fallback)
{
@@ -737,7 +737,7 @@ Perl_SvTRUE_common(pTHX_ SV * sv, const bool sv_2bool_is_fallback)
# endif

/* perl-5.32 needs Perl_SvTRUE */
-# if (PERL_REVISION == 5) && (PERL_VERSION >= 32)
+# if (PERL_REVISION == 5) && (PERL_VERSION == 32)
PERL_STATIC_INLINE bool
Perl_SvTRUE(pTHX_ SV *sv) {
if (!LIKELY(sv))
@@ -1649,7 +1649,7 @@ Buffers(...)
PPCODE:
if (items == 0)
{
- if (GIMME == G_SCALAR)
+ if (GIMME_V == G_SCALAR)
{
i = 0;
FOR_ALL_BUFFERS(vimbuf)
@@ -1700,7 +1700,7 @@ Windows(...)
PPCODE:
if (items == 0)
{
- if (GIMME == G_SCALAR)
+ if (GIMME_V == G_SCALAR)
XPUSHs(sv_2mortal(newSViv(win_count())));
else
{
diff --git a/src/version.c b/src/version.c
index cc86bb60d..39f637c18 100644
--- a/src/version.c
+++ b/src/version.c
@@ -695,6 +695,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1681,
/**/
1680,
/**/

Cesar

unread,
Aug 10, 2023, 10:57:16 PM8/10/23
to vim_dev
May your soul rest in peace, dear Bram. You will be missed forever and always.
I'm building vim under Windows 10 using MinGW64 and perl 5.32. After patch 9.0.1681 I'm getting:

if_perl.xs:742:1: error: redefinition of 'Perl_SvTRUE'
  742 | Perl_SvTRUE(pTHX_ SV *sv) {
      | ^~~~~~~~~~~
In file included from C:/Perl/perl/lib/Core/perl.h:6158,
                 from if_perl.xs:62:
C:/Perl/perl/lib/Core/inline.h:199:1: note: previous definition of 'Perl_SvTRUE' was here
  199 | Perl_SvTRUE(pTHX_ SV *sv) {
      | ^~~~~~~~~~~
make: *** [Make_cyg_ming.mak:1306: gobjx86-64/if_perl.o] Error 1
Error by compiling gvim.exe

Regards,

--
Cesar
Reply all
Reply to author
Forward
0 new messages