diff --git a/vim-8.0-ftbfs-perl526.patch b/vim-8.0-ftbfs-perl526.patch new file mode 100644 index 0000000..994ecd2 --- /dev/null +++ b/vim-8.0-ftbfs-perl526.patch @@ -0,0 +1,81 @@ +From 6abca28cf208f4b263b2308a2b4e1e2ace4ae020 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Mon, 29 May 2017 13:57:40 +0200 +Subject: [PATCH] Restore compatiblity wih Perl 5.26.0 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Since Perl 5.25.4, S_POPMARK() macro is in Perl's inline.h (Perl's commit +33a4312b882). But vim decided to define PERL_NO_INLINE_FUNCTIONS to prevent +from including inline.h because Perl 5.18.0. And that prevents from having +S_POPMARK() available when building against dynamic Perl 5.26.0: + +gcc -L. -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,--enable-new-dtags -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -L/usr/local/lib -Wl,--as-needed -o vim objects/arabic.o objects/buffer.o objects/blowfish.o objects/crypt.o objects/crypt_zip.o objects/dict.o objects/diff.o objects/digraph.o objects/edit.o objects/eval.o objects/evalfunc.o objects/ex_cmds.o objects/ex_cmds2.o objects/ex_docmd.o objects/ex_eval.o objects/ex_getln.o objects/farsi.o objects/fileio.o objects/fold.o objects/getchar.o objects/hardcopy.o objects/hashtab.o objects/if_cscope.o objects/if_xcmdsrv.o objects/list.o objects/mark.o objects/memline.o objects/menu.o objects/misc1.o objects/misc2.o objects/move.o objects/mbyte.o objects/normal.o objects/ops.o objects/option.o objects/os_unix.o objects/pathdef.o objects/popupmnu.o objects/quickfix.o objects/regexp.o objects/screen.o objects/search.o objects/sha256.o objects/spell.o objects/spellfile.o objects/syntax.o objects/tag.o objects/term.o objects/ui.o objects/undo.o objects/userfunc.o objects/version.o objects/window.o objects/gui.o objects/gui_gtk.o objects/gui_gtk_x11.o objects/pty.o objects/gui_gtk_f.o objects/gui_beval.o objects/gui_gtk_gresources.o objects/if_lua.o objects/if_perl.o objects/if_perlsfio.o objects/if_python.o objects/if_python3.o objects/if_ruby.o objects/netbeans.o objects/channel.o objects/charset.o objects/json.o objects/main.o objects/memfile.o objects/message.o -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lSM -lICE -lXpm -lXt -lX11 -lSM -lICE -lm -lelf -lnsl -lselinux -lncurses -lacl -lattr -lgpm -ldl -Wl,--enable-new-dtags -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -fstack-protector-strong -L/usr/local/lib -L/usr/lib64/perl5/CORE -lperl -lpthread -lresolv -lnsl -ldl -lm -lcrypt -lutil -lc +objects/if_perl.o: In function `XS_VIBUF_Count': +/home/test/fedora/vim/vim80/src/if_perl.c:2085: undefined reference to `S_POPMARK' +objects/if_perl.o: In function `XS_VIBUF_Number': +/home/test/fedora/vim/vim80/src/if_perl.c:2054: undefined reference to `S_POPMARK' +objects/if_perl.o: In function `XS_VIBUF_Name': +/home/test/fedora/vim/vim80/src/if_perl.c:2019: undefined reference to `S_POPMARK' +objects/if_perl.o: In function `XS_VIBUF_DESTROY': +/home/test/fedora/vim/vim80/src/if_perl.c:1992: undefined reference to `S_POPMARK' +objects/if_perl.o: In function `XS_VIBUF_Append': +/home/test/fedora/vim/vim80/src/if_perl.c:2299: undefined reference to `S_POPMARK' +objects/if_perl.o:/home/test/fedora/vim/vim80/src/if_perl.c:2222: more undefined references to `S_POPMARK' follow +collect2: error: ld returned 1 exit status + +This patch removes the PERL_NO_INLINE_FUNCTIONS definition and +S_SvREFCNT_dec redefinition from src/if_perl.xs to restore +compatibility with Perl 5.26.0. + +Signed-off-by: Petr Písař +--- + src/if_perl.xs | 24 ------------------------ + 1 file changed, 24 deletions(-) + +diff --git a/src/if_perl.xs b/src/if_perl.xs +index 2bf72c5..7dedfba 100644 +--- a/src/if_perl.xs ++++ b/src/if_perl.xs +@@ -37,13 +37,6 @@ + + #include "vim.h" + +-/* 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 +-# define PERL_NO_INLINE_FUNCTIONS +-#endif +- + /* Work around for using MSVC and ActivePerl 5.18. */ + #ifdef _MSC_VER + # define __inline__ __inline +@@ -616,23 +609,6 @@ static struct { + {"", NULL}, + }; + +-/* Work around for perl-5.18. +- * For now, only the definitions of S_SvREFCNT_dec are needed in +- * "perl\lib\CORE\inline.h". */ +-# if (PERL_REVISION == 5) && (PERL_VERSION >= 18) +-static void +-S_SvREFCNT_dec(pTHX_ SV *sv) +-{ +- if (LIKELY(sv != NULL)) { +- U32 rc = SvREFCNT(sv); +- if (LIKELY(rc > 1)) +- SvREFCNT(sv) = rc - 1; +- else +- Perl_sv_free2(aTHX_ sv, rc); +- } +-} +-# endif +- + /* + * Make all runtime-links of perl. + * +-- +2.9.4 + diff --git a/vim.spec b/vim.spec index ff96a54..4cfdcd9 100644 --- a/vim.spec +++ b/vim.spec @@ -24,7 +24,7 @@ Summary: The VIM editor URL: http://www.vim.org/ Name: vim Version: %{baseversion}.%{patchlevel} -Release: 1%{?dist} +Release: 2%{?dist} License: Vim Group: Applications/Editors Source0: ftp://ftp.vim.org/pub/vim/unix/vim-%{baseversion}-%{patchlevel}.tar.bz2 @@ -69,6 +69,7 @@ Patch3014: vim-7.4-releasestring-1318991.patch Patch3015: vim-8.0-rhbz1365258.patch Patch3016: vim-8.0-copy-paste.patch Patch3017: vim-8.0-bindsyntax.patch +Patch3018: vim-8.0-ftbfs-perl526.patch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python-devel python3-devel ncurses-devel gettext perl-devel @@ -225,6 +226,7 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk %patch3015 -p1 %patch3016 -p1 %patch3017 -p1 +%patch3018 -p1 %build cp -f %{SOURCE6} . @@ -770,6 +772,9 @@ rm -rf %{buildroot} %{_datadir}/icons/locolor/*/apps/* %changelog +* Mon May 29 2017 Zdenek Dohnal - 2:8.0.606-2 +- 1456455 - vim-8.0.600-1.fc27 FTBFS with Perl 5.26.0 + * Mon May 29 2017 Karsten Hopp 8.0.606-1 - patchlevel 606