[vim/vim] Fix Perl 5.30 build issues, and remove GIMME_V usage (PR #12914)

54 views
Skip to first unread message

Yee Cheng Chin

unread,
Aug 24, 2023, 10:29:20 PM8/24/23
to vim/vim, Subscribed

This makes Perl 5.30 dynamic builds work again, by reverting GIMME_V back to GIMME. In Perl headers, GIMME_V requires usage of functions from inline.h which requires manual copy-paste into if_perl.xs which is fragile. Just use GIMME for now (which was the case before) as its implementation in Perl headers does not require using inline functions.

Also, fix the configure script so that if we are using dynamic linkage, we don't pass -lperl to the build flags, to avoid accidental external linkage. This is similar to how Python integration works.


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/12914

Commit Summary

  • 9b454af Fix Perl 5.30 build issues, and remove GIMME_V usage

File Changes

(3 files)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12914@github.com>

Yee Cheng Chin

unread,
Aug 24, 2023, 10:37:52 PM8/24/23
to vim/vim, Subscribed

See #12755 (comment) for more context.

I'm just reverting back to using GIMME (since that PR moved to using GIMME_V as a drive-by change) for now. That's because as mentioned in my comment there, GIMME_V uses inline functions defined in inline.h and it uses a different one in different versions (Perl switched to Perl_gimme_V in 5.32 but in previous versions it used Perl_block_gimme), and with the way if_perl.xs works we have to manually copy-pasting the implementation from inline.h into the file, which is quite fragile and vulnerable to each version changing the implementation. Just using GIMME is the safest as the header seems to not use any external function. If they remove support for that in a future release we can just fix it then.

I also made it so that this issue would have resulted in a build failure instead of an accidental external linkage. The core issue was that we were passing -lperl even if using dynamic linkage which was not correct.


I find the current way if_perl.xs is implemented to be really fragile because we define PERL_NO_INLINE_FUNCTIONS, which forces us to manually copying all the inline functions from inline.h to this file, and it may be different every time Perl updates. Looking through the code history I don't think there is a better way to do this though, unless Perl changes their API designs, see my comment at Perl/perl5#21164 (comment).


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12914/c1692672715@github.com>

codecov[bot]

unread,
Aug 24, 2023, 10:40:02 PM8/24/23
to vim/vim, Subscribed

Codecov Report

Merging #12914 (9b454af) into master (e750f8c) will increase coverage by 0.62%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master   #12914      +/-   ##
==========================================
+ Coverage   82.04%   82.66%   +0.62%     
==========================================
  Files         160      150      -10     
  Lines      194679   181464   -13215     
  Branches    43696    40793    -2903     
==========================================
- Hits       159717   150013    -9704     
+ Misses      22095    18473    -3622     
- Partials    12867    12978     +111     
Flag Coverage Δ
huge-clang-none 82.66% <ø> (+0.01%) ⬆️
linux 82.66% <ø> (+0.01%) ⬆️
mingw-x64-HUGE ?
mingw-x86-HUGE ?
windows ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
src/if_perl.xs 77.19% <ø> (+1.05%) ⬆️

... and 144 files with indirect coverage changes


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12914/c1692674054@github.com>

Yee Cheng Chin

unread,
Aug 24, 2023, 10:46:15 PM8/24/23
to vim/vim, Push

@ychin pushed 1 commit.

  • 1b81c40 Fix Perl 5.30 build issues, and remove GIMME_V usage


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12914/push/14800174221@github.com>

Yee Cheng Chin

unread,
Aug 24, 2023, 10:50:52 PM8/24/23
to vim/vim, Subscribed

I tested this with Perl 5.30 / 5.34 / 5.36, for both dynamic and static, on macOS and it seems to work so far.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12914/c1692681106@github.com>

Christian Brabandt

unread,
Aug 25, 2023, 2:33:28 AM8/25/23
to vim/vim, Subscribed

@pheiduck/@k-takata opinions?


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12914/c1692839793@github.com>

Philip H.

unread,
Aug 25, 2023, 7:06:14 AM8/25/23
to vim/vim, Subscribed

@pheiduck approved this pull request.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12914/review/1595469637@github.com>

Philip H.

unread,
Aug 25, 2023, 7:07:28 AM8/25/23
to vim/vim, Subscribed

We had only an deprecation warning. It's fine for me.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12914/c1693187837@github.com>

K.Takata

unread,
Aug 25, 2023, 8:11:18 AM8/25/23
to vim/vim, Subscribed

@k-takata approved this pull request.

I tested this on Perl 5.32 for dynamic, and it is okay.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12914/review/1595560658@github.com>

Yee Cheng Chin

unread,
Aug 25, 2023, 9:57:26 AM8/25/23
to vim/vim, Subscribed

Actually, I think I found a better way to do this, and it will make it much easier to be forward compatible. Basically, we can remove the PERL_NO_INLINE_FUNCTIONS ifdef, remove all the manual copy-pasting of S_SvREFCNT_dec, Perl_SvPVXtrue, etc.

All we need is to manually add this to the end of the file and it will work properly in dynamic linking:

#ifdef DYNAMIC_PERL

# if (PERL_REVISION == 5) && (PERL_VERSION >= 18)
#  undef Perl_sv_free2
void Perl_sv_free2(pTHX_ SV* sv, const U32 refcnt)
{
    (*dll_Perl_sv_free2)(aTHX_ sv, refcnt);
}
# else
#  undef Perl_sv_free2
void Perl_sv_free2(pTHX_ SV* sv)
{
    (*dll_Perl_sv_free2)(aTHX_ sv);
}
# endif

# if (PERL_REVISION == 5) && (PERL_VERSION >= 14)
#  undef Perl_sv_2bool_flags
bool Perl_sv_2bool_flags(pTHX_ SV* sv, I32 flags)
{
    return (*dll_Perl_sv_2bool_flags)(aTHX_ sv, flags);
}
# endif

# if (PERL_REVISION == 5) && (PERL_VERSION >= 28)
#  undef Perl_mg_get
int Perl_mg_get(pTHX_ SV* sv)
{
    return (*dll_Perl_mg_get)(aTHX_ sv);
}
# endif

#endif // DYNAMIC_PERL

I haven't tested this more extensively though and I don't know if it builds on Windows but it's a much cleaner solution than manual copy-pasting from each version's header.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12914/c1693401683@github.com>

Yee Cheng Chin

unread,
Aug 25, 2023, 10:27:54 AM8/25/23
to vim/vim, Push

@ychin pushed 1 commit.

  • e62dc60 Fix if_perl.xs not being able to build on all versions of Perl

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12914/push/14807195026@github.com>

Yee Cheng Chin

unread,
Aug 25, 2023, 10:29:47 AM8/25/23
to vim/vim, Subscribed

Ok I just pushed a new change with what I just described above. I believe this is a much better solution as it makes it more manageable in the future. It just requires stubbing a couple functions and forward them to the one from the DLL instead of needing copy-pasting a growing library of inlined functions from Perl headers verbatim.

Still want to see if it builds it CI / Windows machine first. If it works, then the first commit is mostly obsolete (but it should still be squashed with the 2nd one as it contains the configure.ac changes).


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12914/c1693454729@github.com>

K.Takata

unread,
Aug 25, 2023, 11:21:18 AM8/25/23
to vim/vim, Subscribed

@k-takata approved this pull request.

I confirmed with Perl 5.32 and 5.38.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12914/review/1595950925@github.com>

Yee Cheng Chin

unread,
Aug 25, 2023, 6:58:56 PM8/25/23
to vim/vim, Subscribed

I tested this on 5.18 as well. I don't have a way to test this on Windows atm though, unfortunately, and looking at CI it seems like we don't test it. Either way I'll squash the commits as the old commit is no longer relevant.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12914/c1694015268@github.com>

Yee Cheng Chin

unread,
Aug 25, 2023, 7:10:54 PM8/25/23
to vim/vim, Subscribed

@pheiduck if you have time do you mind trying again? I think it should work but want to make sure I didn't miss something as linking works differently on different platforms, and seems like Vim CI isn't checking for this. Thanks!


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12914/c1694021810@github.com>

Christian Brabandt

unread,
Aug 26, 2023, 12:26:35 PM8/26/23
to vim/vim, Subscribed

it doesn't seem to work for me dynamically:

 ./configure --with-features=huge --enable-gui=no --enable-perlinterp=dynamic  --with-compiledby="Christian Brabandt <c...@256bit.org>" --prefix=/home/chrisbra/local   && make -j3
[...]
gcc -c -I. -Iproto -DHAVE_CONFIG_H     -g -O2  -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1        version.c -o objects/version.o
link.sh: $LINK_AS_NEEDED set to 'yes': invoking linker directly.
  gcc   -Wl,-E   -L/usr/local/lib -Wl,--as-needed       -o vim objects/alloc.o objects/arabic.o objects/argliss/clientserver.o objects/clipboard.o objects/cmdexpand.o objects/cmdhist.o objects/crypt.o objects/crypt_zip.o/eval.o objects/evalbuffer.o objects/evalfunc.o objects/evalvars.o objects/evalwindow.o objects/ex_cmds.o objects/float.o objects/fold.o objects/getchar.o objects/gui_xim.o objects/hardcopy.o objects/hashtab.o objects/hele.o objects/logfile.o objects/map.o objects/mark.o objects/match.o objects/mbyte.o objects/memline.o objects/onstr.o objects/os_unix.o objects/pathdef.o objects/popupmenu.o objects/popupwin.o objects/profiler.o objects/n.o objects/sha256.o objects/sign.o objects/sound.o objects/spell.o objects/spellfile.o objects/spellsuggest.o/textobject.o objects/textprop.o objects/time.o objects/typval.o objects/ui.o objects/undo.o objects/usercmd.oim9expr.o objects/vim9instr.o objects/vim9script.o objects/vim9type.o objects/viminfo.o objects/window.o objecobjects/vterm_screen.o objects/vterm_state.o objects/vterm_unicode.o objects/vterm_vterm.o   objects/if_perl.o objects/xutils.o objects/xhistogram.o objects/xpatience.o  objects/charset.o objects/json.o objects/main.o obrt -lacl -lattr -lgpm -ldl
/usr/bin/ld: objects/if_perl.o: warning: relocation against `PL_sv_immortals' in read-only section `.text'
/usr/bin/ld: objects/if_perl.o: in function `Perl_POPMARK':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/inline.h:380: undefined reference to `PL_markst
/usr/bin/ld: /home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/inline.h:380: undefined reference
/usr/bin/ld: objects/if_perl.o: in function `XS_VIM_Windows':
/home/chrisbra/code/vim-upstream/src/if_perl.c:1881: undefined reference to `PL_stack_base'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.c:1881: undefined reference to `PL_stack_sp'
/usr/bin/ld: objects/if_perl.o: in function `Perl_SvIV':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/sv_inline.h:819: undefined reference to `Perl_s
/usr/bin/ld: objects/if_perl.o: in function `XS_VIM_Windows':
/home/chrisbra/code/vim-upstream/src/if_perl.xs:1662: undefined reference to `PL_stack_max'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.xs:1659: undefined reference to `PL_stack_base'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.xs:1647: undefined reference to `PL_op'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.xs:1652: undefined reference to `PL_stack_max'
/usr/bin/ld: objects/if_perl.o: in function `XS_VIM_Windows':
/home/chrisbra/code/vim-upstream/src/if_perl.c:1914: undefined reference to `PL_stack_sp'
/usr/bin/ld: objects/if_perl.o: in function `XS_VIM_Windows':
/home/chrisbra/code/vim-upstream/src/if_perl.xs:1648: undefined reference to `PL_stack_max'
/usr/bin/ld: objects/if_perl.o: in function `XS_VIM_Windows':
/home/chrisbra/code/vim-upstream/src/if_perl.c:1914: undefined reference to `PL_stack_sp'
/usr/bin/ld: objects/if_perl.o: in function `Perl_POPMARK':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/inline.h:380: undefined reference to `PL_markst
/usr/bin/ld: /home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/inline.h:380: undefined reference
/usr/bin/ld: objects/if_perl.o: in function `XS_VIWIN_DESTROY':
/home/chrisbra/code/vim-upstream/src/if_perl.c:1923: undefined reference to `PL_stack_base'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.c:1923: undefined reference to `PL_stack_sp'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.c:1930: undefined reference to `PL_stack_base'
/usr/bin/ld: objects/if_perl.o: in function `Perl_SvIV':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/sv_inline.h:819: undefined reference to `Perl_s
/usr/bin/ld: objects/if_perl.o: in function `XS_VIWIN_DESTROY':
/home/chrisbra/code/vim-upstream/src/if_perl.c:1943: undefined reference to `PL_stack_base'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.c:1943: undefined reference to `PL_stack_sp'
/usr/bin/ld: objects/if_perl.o: in function `Perl_POPMARK':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/inline.h:380: undefined reference to `PL_markst
/usr/bin/ld: /home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/inline.h:380: undefined reference
/usr/bin/ld: objects/if_perl.o: in function `XS_VIBUF_DESTROY':
/home/chrisbra/code/vim-upstream/src/if_perl.c:2071: undefined reference to `PL_stack_base'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.c:2071: undefined reference to `PL_stack_sp'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.c:2078: undefined reference to `PL_stack_base'
/usr/bin/ld: objects/if_perl.o: in function `Perl_SvIV':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/sv_inline.h:819: undefined reference to `Perl_s
/usr/bin/ld: objects/if_perl.o: in function `XS_VIBUF_DESTROY':
/home/chrisbra/code/vim-upstream/src/if_perl.c:2091: undefined reference to `PL_stack_base'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.c:2091: undefined reference to `PL_stack_sp'
/usr/bin/ld: objects/if_perl.o: in function `Perl_POPMARK':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/inline.h:380: undefined reference to `PL_markst
/usr/bin/ld: objects/if_perl.o: in function `XS_VIWIN_SetHeight':
/home/chrisbra/code/vim-upstream/src/if_perl.c:1981: undefined reference to `PL_stack_sp'
/usr/bin/ld: objects/if_perl.o: in function `Perl_POPMARK':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/inline.h:380: undefined reference to `PL_markst
/usr/bin/ld: objects/if_perl.o: in function `XS_VIWIN_SetHeight':
/home/chrisbra/code/vim-upstream/src/if_perl.c:1981: undefined reference to `PL_stack_base'
/usr/bin/ld: objects/if_perl.o: in function `Perl_SvIV':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/sv_inline.h:819: undefined reference to `Perl_s
/usr/bin/ld: objects/if_perl.o: in function `XS_VIWIN_SetHeight':
/home/chrisbra/code/vim-upstream/src/if_perl.c:1995: undefined reference to `PL_stack_base'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.c:1996: undefined reference to `PL_stack_base'
/usr/bin/ld: objects/if_perl.o: in function `Perl_SvIV':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/sv_inline.h:819: undefined reference to `Perl_s
/usr/bin/ld: objects/if_perl.o: in function `XS_VIWIN_SetHeight':
/home/chrisbra/code/vim-upstream/src/if_perl.c:2012: undefined reference to `PL_stack_sp'
/usr/bin/ld: objects/if_perl.o: in function `Perl_POPMARK':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/inline.h:380: undefined reference to `PL_markst
/usr/bin/ld: /home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/inline.h:380: undefined reference
/usr/bin/ld: objects/if_perl.o: in function `XS_VIWIN_Buffer':
/home/chrisbra/code/vim-upstream/src/if_perl.c:1950: undefined reference to `PL_stack_base'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.c:1950: undefined reference to `PL_stack_sp'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.c:1958: undefined reference to `PL_stack_base'
/usr/bin/ld: objects/if_perl.o: in function `Perl_SvIV':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/sv_inline.h:819: undefined reference to `Perl_s
/usr/bin/ld: objects/if_perl.o: in function `XS_VIWIN_Buffer':
/home/chrisbra/code/vim-upstream/src/if_perl.c:1972: undefined reference to `PL_stack_base'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.c:1974: undefined reference to `PL_stack_sp'
/usr/bin/ld: objects/if_perl.o: in function `Perl_POPMARK':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/inline.h:380: undefined reference to `PL_markst
/usr/bin/ld: objects/if_perl.o: in function `XS_VIBUF_Count':
/home/chrisbra/code/vim-upstream/src/if_perl.c:2164: undefined reference to `PL_stack_sp'
/usr/bin/ld: objects/if_perl.o: in function `Perl_POPMARK':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/inline.h:380: undefined reference to `PL_markst
/usr/bin/ld: objects/if_perl.o: in function `XS_VIBUF_Count':
/home/chrisbra/code/vim-upstream/src/if_perl.c:2164: undefined reference to `PL_stack_base'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.c:2173: undefined reference to `PL_stack_base'
/usr/bin/ld: objects/if_perl.o: in function `Perl_SvIV':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/sv_inline.h:819: undefined reference to `Perl_s
/usr/bin/ld: objects/if_perl.o: in function `XS_VIBUF_Count':
/home/chrisbra/code/vim-upstream/src/if_perl.xs:1770: undefined reference to `PL_stack_max'
/usr/bin/ld: objects/if_perl.o: in function `XS_VIBUF_Count':
/home/chrisbra/code/vim-upstream/src/if_perl.c:2186: undefined reference to `PL_stack_sp'
/usr/bin/ld: objects/if_perl.o: in function `Perl_POPMARK':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/inline.h:380: undefined reference to `PL_markst
/usr/bin/ld: objects/if_perl.o: in function `XS_VIBUF_Number':
/home/chrisbra/code/vim-upstream/src/if_perl.c:2133: undefined reference to `PL_stack_sp'
/usr/bin/ld: objects/if_perl.o: in function `Perl_POPMARK':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/inline.h:380: undefined reference to `PL_markst
/usr/bin/ld: objects/if_perl.o: in function `XS_VIBUF_Number':
/home/chrisbra/code/vim-upstream/src/if_perl.c:2133: undefined reference to `PL_stack_base'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.c:2142: undefined reference to `PL_stack_base'
/usr/bin/ld: objects/if_perl.o: in function `Perl_SvIV':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/sv_inline.h:819: undefined reference to `Perl_s
/usr/bin/ld: objects/if_perl.o: in function `XS_VIBUF_Number':
/home/chrisbra/code/vim-upstream/src/if_perl.xs:1761: undefined reference to `PL_stack_max'
/usr/bin/ld: objects/if_perl.o: in function `XS_VIBUF_Number':
/home/chrisbra/code/vim-upstream/src/if_perl.c:2155: undefined reference to `PL_stack_sp'
/usr/bin/ld: objects/if_perl.o: in function `Perl_POPMARK':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/inline.h:380: undefined reference to `PL_markst
/usr/bin/ld: objects/if_perl.o: in function `XS_VIBUF_Get':
/home/chrisbra/code/vim-upstream/src/if_perl.c:2195: undefined reference to `PL_stack_sp'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.c:2195: undefined reference to `PL_stack_base'
/usr/bin/ld: objects/if_perl.o: in function `Perl_POPMARK':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/inline.h:380: undefined reference to `PL_markst
/usr/bin/ld: objects/if_perl.o: in function `XS_VIBUF_Get':
/home/chrisbra/code/vim-upstream/src/if_perl.c:2209: undefined reference to `PL_stack_base'
/usr/bin/ld: objects/if_perl.o: in function `Perl_SvIV':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/sv_inline.h:819: undefined reference to `Perl_s
/usr/bin/ld: /home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/sv_inline.h:819: undefined referen
/usr/bin/ld: objects/if_perl.o: in function `XS_VIBUF_Get':
/home/chrisbra/code/vim-upstream/src/if_perl.xs:1785: undefined reference to `PL_stack_base'
/usr/bin/ld: objects/if_perl.o: in function `XS_VIBUF_Get':
/home/chrisbra/code/vim-upstream/src/if_perl.c:2231: undefined reference to `PL_stack_sp'
/usr/bin/ld: objects/if_perl.o: in function `XS_VIBUF_Get':
/home/chrisbra/code/vim-upstream/src/if_perl.xs:1789: undefined reference to `PL_stack_max'
/usr/bin/ld: objects/if_perl.o: in function `Perl_POPMARK':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/inline.h:380: undefined reference to `PL_markst
/usr/bin/ld: objects/if_perl.o: in function `XS_VIBUF_Name':
/home/chrisbra/code/vim-upstream/src/if_perl.c:2098: undefined reference to `PL_stack_sp'
/usr/bin/ld: objects/if_perl.o: in function `Perl_POPMARK':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/inline.h:380: undefined reference to `PL_markst
/usr/bin/ld: objects/if_perl.o: in function `XS_VIBUF_Name':
/home/chrisbra/code/vim-upstream/src/if_perl.c:2098: undefined reference to `PL_stack_base'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.c:2107: undefined reference to `PL_stack_base'
/usr/bin/ld: objects/if_perl.o: in function `Perl_SvIV':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/sv_inline.h:819: undefined reference to `Perl_s
/usr/bin/ld: objects/if_perl.o: in function `XS_VIBUF_Name':
/home/chrisbra/code/vim-upstream/src/if_perl.xs:1750: undefined reference to `PL_stack_max'
/usr/bin/ld: objects/if_perl.o: in function `XS_VIBUF_Name':
/home/chrisbra/code/vim-upstream/src/if_perl.c:2124: undefined reference to `PL_stack_sp'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.c:2124: undefined reference to `PL_stack_sp'
/usr/bin/ld: objects/if_perl.o: in function `Perl_POPMARK':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/inline.h:380: undefined reference to `PL_markst
/usr/bin/ld: objects/if_perl.o: in function `XS_VIWIN_Cursor':
/home/chrisbra/code/vim-upstream/src/if_perl.c:2021: undefined reference to `PL_stack_sp'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.c:2021: undefined reference to `PL_stack_base'
/usr/bin/ld: objects/if_perl.o: in function `Perl_POPMARK':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/inline.h:380: undefined reference to `PL_markst
/usr/bin/ld: objects/if_perl.o: in function `XS_VIWIN_Cursor':
/home/chrisbra/code/vim-upstream/src/if_perl.c:2030: undefined reference to `PL_stack_base'
/usr/bin/ld: objects/if_perl.o: in function `Perl_SvIV':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/sv_inline.h:819: undefined reference to `Perl_s
/usr/bin/ld: objects/if_perl.o: in function `XS_VIWIN_Cursor':
/home/chrisbra/code/vim-upstream/src/if_perl.c:2062: undefined reference to `PL_stack_sp'
/usr/bin/ld: objects/if_perl.o: in function `XS_VIWIN_Cursor':
/home/chrisbra/code/vim-upstream/src/if_perl.xs:1710: undefined reference to `PL_stack_max'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.xs:1722: undefined reference to `PL_stack_base'
/usr/bin/ld: objects/if_perl.o: in function `Perl_SvIV':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/sv_inline.h:819: undefined reference to `Perl_s
/usr/bin/ld: objects/if_perl.o: in function `XS_VIWIN_Cursor':
/home/chrisbra/code/vim-upstream/src/if_perl.xs:1723: undefined reference to `PL_stack_base'
/usr/bin/ld: objects/if_perl.o: in function `Perl_SvIV':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/sv_inline.h:819: undefined reference to `Perl_s
/usr/bin/ld: objects/if_perl.o: in function `XS_VIBUF_Set':
/home/chrisbra/code/vim-upstream/src/if_perl.c:2240: undefined reference to `PL_stack_sp'
/usr/bin/ld: objects/if_perl.o: in function `Perl_POPMARK':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/inline.h:380: undefined reference to `PL_markst
/usr/bin/ld: /home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/inline.h:380: undefined reference
/usr/bin/ld: objects/if_perl.o: in function `XS_VIBUF_Set':
/home/chrisbra/code/vim-upstream/src/if_perl.c:2240: undefined reference to `PL_stack_base'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.c:2254: undefined reference to `PL_stack_base'
/usr/bin/ld: objects/if_perl.o: in function `Perl_SvIV':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/sv_inline.h:819: undefined reference to `Perl_s
/usr/bin/ld: objects/if_perl.o: in function `XS_VIBUF_Set':
/home/chrisbra/code/vim-upstream/src/if_perl.xs:1808: undefined reference to `PL_stack_base'
/usr/bin/ld: objects/if_perl.o: in function `Perl_SvIV':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/sv_inline.h:819: undefined reference to `Perl_s
/usr/bin/ld: objects/if_perl.o: in function `XS_VIBUF_Set':
/home/chrisbra/code/vim-upstream/src/if_perl.xs:1811: undefined reference to `PL_stack_base'
/usr/bin/ld: objects/if_perl.o: in function `Perl_SvPV_helper':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/sv_inline.h:957: undefined reference to `PL_na'
/usr/bin/ld: objects/if_perl.o: in function `XS_VIBUF_Set':
/home/chrisbra/code/vim-upstream/src/if_perl.xs:1811: undefined reference to `PL_stack_base'
/usr/bin/ld: objects/if_perl.o: in function `Perl_SvPV_helper':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/sv_inline.h:926: undefined reference to `PL_na'
/usr/bin/ld: objects/if_perl.o: in function `XS_VIBUF_Set':
/home/chrisbra/code/vim-upstream/src/if_perl.c:2295: undefined reference to `PL_stack_sp'
/usr/bin/ld: objects/if_perl.o: in function `XS_VIBUF_Append':
/home/chrisbra/code/vim-upstream/src/if_perl.c:2385: undefined reference to `PL_stack_sp'
/usr/bin/ld: objects/if_perl.o: in function `Perl_POPMARK':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/inline.h:380: undefined reference to `PL_markst
/usr/bin/ld: /home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/inline.h:380: undefined reference
/usr/bin/ld: objects/if_perl.o: in function `XS_VIBUF_Append':
/home/chrisbra/code/vim-upstream/src/if_perl.c:2385: undefined reference to `PL_stack_base'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.c:2399: undefined reference to `PL_stack_base'
/usr/bin/ld: objects/if_perl.o: in function `Perl_SvIV':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/sv_inline.h:819: undefined reference to `Perl_s
/usr/bin/ld: objects/if_perl.o: in function `XS_VIBUF_Append':
/home/chrisbra/code/vim-upstream/src/if_perl.xs:1907: undefined reference to `PL_stack_base'
/usr/bin/ld: objects/if_perl.o: in function `Perl_SvIV':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/sv_inline.h:819: undefined reference to `Perl_s
/usr/bin/ld: objects/if_perl.o: in function `XS_VIBUF_Append':
/home/chrisbra/code/vim-upstream/src/if_perl.xs:1910: undefined reference to `PL_stack_base'
/usr/bin/ld: objects/if_perl.o: in function `Perl_SvPV_helper':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/sv_inline.h:957: undefined reference to `PL_na'
/usr/bin/ld: objects/if_perl.o: in function `XS_VIBUF_Append':
/home/chrisbra/code/vim-upstream/src/if_perl.xs:1910: undefined reference to `PL_stack_base'
/usr/bin/ld: objects/if_perl.o: in function `Perl_SvPV_helper':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/sv_inline.h:926: undefined reference to `PL_na'
/usr/bin/ld: objects/if_perl.o: in function `XS_VIBUF_Append':
/home/chrisbra/code/vim-upstream/src/if_perl.c:2442: undefined reference to `PL_stack_sp'
/usr/bin/ld: objects/if_perl.o: in function `XS_VIBUF_Delete':
/home/chrisbra/code/vim-upstream/src/if_perl.c:2304: undefined reference to `PL_stack_sp'
/usr/bin/ld: objects/if_perl.o: in function `Perl_POPMARK':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/inline.h:380: undefined reference to `PL_markst
/usr/bin/ld: /home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/inline.h:380: undefined reference
/usr/bin/ld: objects/if_perl.o: in function `XS_VIBUF_Delete':
/home/chrisbra/code/vim-upstream/src/if_perl.c:2304: undefined reference to `PL_stack_base'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.c:2316: undefined reference to `PL_stack_base'
/usr/bin/ld: objects/if_perl.o: in function `Perl_SvIV':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/sv_inline.h:819: undefined reference to `Perl_s
/usr/bin/ld: objects/if_perl.o: in function `XS_VIBUF_Delete':
/home/chrisbra/code/vim-upstream/src/if_perl.c:2376: undefined reference to `PL_stack_sp'
/usr/bin/ld: objects/if_perl.o: in function `XS_VIBUF_Delete':
/home/chrisbra/code/vim-upstream/src/if_perl.xs:1851: undefined reference to `PL_stack_base'
/usr/bin/ld: objects/if_perl.o: in function `Perl_SvIV':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/sv_inline.h:819: undefined reference to `Perl_s
/usr/bin/ld: objects/if_perl.o: in function `XS_VIBUF_Delete':
/home/chrisbra/code/vim-upstream/src/if_perl.xs:1852: undefined reference to `PL_stack_base'
/usr/bin/ld: objects/if_perl.o: in function `Perl_SvIV':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/sv_inline.h:819: undefined reference to `Perl_s
/usr/bin/ld: objects/if_perl.o: in function `XS_VIBUF_Delete':
/home/chrisbra/code/vim-upstream/src/if_perl.xs:1846: undefined reference to `PL_stack_base'
/usr/bin/ld: objects/if_perl.o: in function `Perl_SvIV':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/sv_inline.h:819: undefined reference to `Perl_s
/usr/bin/ld: objects/if_perl.o: in function `Perl_POPMARK':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/inline.h:380: undefined reference to `PL_markst
/usr/bin/ld: objects/if_perl.o: in function `XS_VIM_DoCommand':
/home/chrisbra/code/vim-upstream/src/if_perl.c:1727: undefined reference to `PL_stack_base'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.c:1727: undefined reference to `PL_stack_sp'
/usr/bin/ld: objects/if_perl.o: in function `Perl_POPMARK':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/inline.h:380: undefined reference to `PL_markst
/usr/bin/ld: objects/if_perl.o: in function `XS_VIM_DoCommand':
/home/chrisbra/code/vim-upstream/src/if_perl.c:1739: undefined reference to `PL_stack_sp'
/usr/bin/ld: objects/if_perl.o: in function `Perl_POPMARK':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/inline.h:380: undefined reference to `PL_markst
/usr/bin/ld: objects/if_perl.o: in function `XS_VIM_SetOption':
/home/chrisbra/code/vim-upstream/src/if_perl.c:1705: undefined reference to `PL_stack_base'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.c:1705: undefined reference to `PL_stack_sp'
/usr/bin/ld: objects/if_perl.o: in function `Perl_POPMARK':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/inline.h:380: undefined reference to `PL_markst
/usr/bin/ld: objects/if_perl.o: in function `XS_VIM_SetOption':
/home/chrisbra/code/vim-upstream/src/if_perl.c:1718: undefined reference to `PL_stack_sp'
/usr/bin/ld: objects/if_perl.o: in function `XS_VIM_Buffers':
/home/chrisbra/code/vim-upstream/src/if_perl.c:1817: undefined reference to `PL_stack_sp'
/usr/bin/ld: objects/if_perl.o: in function `Perl_POPMARK':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/inline.h:380: undefined reference to `PL_markst
/usr/bin/ld: /home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/inline.h:380: undefined reference
/usr/bin/ld: objects/if_perl.o: in function `XS_VIM_Buffers':
/home/chrisbra/code/vim-upstream/src/if_perl.c:1817: undefined reference to `PL_stack_base'
/usr/bin/ld: objects/if_perl.o: in function `Perl_SvIV':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/sv_inline.h:819: undefined reference to `Perl_s
/usr/bin/ld: objects/if_perl.o: in function `XS_VIM_Buffers':
/home/chrisbra/code/vim-upstream/src/if_perl.xs:1614: undefined reference to `PL_stack_base'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.xs:1632: undefined reference to `PL_stack_max'
/usr/bin/ld: objects/if_perl.o: in function `XS_VIM_Buffers':
/home/chrisbra/code/vim-upstream/src/if_perl.c:1872: undefined reference to `PL_stack_sp'
/usr/bin/ld: objects/if_perl.o: in function `XS_VIM_Buffers':
/home/chrisbra/code/vim-upstream/src/if_perl.xs:1596: undefined reference to `PL_op'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.xs:1607: undefined reference to `PL_stack_max'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.xs:1602: undefined reference to `PL_stack_max'
/usr/bin/ld: objects/if_perl.o: in function `XS_VIM_Blob':
/home/chrisbra/code/vim-upstream/src/if_perl.c:1782: undefined reference to `PL_stack_base'
/usr/bin/ld: objects/if_perl.o: in function `Perl_POPMARK':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/inline.h:380: undefined reference to `PL_markst
/usr/bin/ld: /home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/inline.h:380: undefined reference
/usr/bin/ld: objects/if_perl.o: in function `XS_VIM_Blob':
/home/chrisbra/code/vim-upstream/src/if_perl.c:1782: undefined reference to `PL_stack_sp'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.c:1808: undefined reference to `PL_stack_base'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.c:1810: undefined reference to `PL_stack_sp'
/usr/bin/ld: objects/if_perl.o: in function `Perl_POPMARK':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/inline.h:380: undefined reference to `PL_markst
/usr/bin/ld: objects/if_perl.o: in function `XS_VIM_Eval':
/home/chrisbra/code/vim-upstream/src/if_perl.c:1748: undefined reference to `PL_stack_sp'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.c:1748: undefined reference to `PL_stack_base'
/usr/bin/ld: objects/if_perl.o: in function `Perl_POPMARK':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/inline.h:380: undefined reference to `PL_markst
/usr/bin/ld: objects/if_perl.o: in function `XS_VIM_Eval':
/home/chrisbra/code/vim-upstream/src/if_perl.xs:1555: undefined reference to `PL_stack_max'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.xs:1561: undefined reference to `PL_stack_max'
/usr/bin/ld: objects/if_perl.o: in function `XS_VIM_Eval':
/home/chrisbra/code/vim-upstream/src/if_perl.c:1773: undefined reference to `PL_stack_sp'
/usr/bin/ld: objects/if_perl.o: in function `XS_VIM_Eval':
/home/chrisbra/code/vim-upstream/src/if_perl.xs:1556: undefined reference to `PL_stack_max'
/usr/bin/ld: objects/if_perl.o: in function `Perl_SvNV':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/sv_inline.h:837: undefined reference to `Perl_s
/usr/bin/ld: objects/if_perl.o: in function `Perl_SvIV':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/sv_inline.h:819: undefined reference to `Perl_s
/usr/bin/ld: objects/if_perl.o: in function `Perl_POPMARK':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/inline.h:380: undefined reference to `PL_markst
/usr/bin/ld: objects/if_perl.o: in function `XS_VIM_Msg':
/home/chrisbra/code/vim-upstream/src/if_perl.c:1667: undefined reference to `PL_stack_sp'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.c:1667: undefined reference to `PL_stack_base'
/usr/bin/ld: objects/if_perl.o: in function `Perl_POPMARK':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/inline.h:380: undefined reference to `PL_markst
/usr/bin/ld: objects/if_perl.o: in function `XS_VIM_Msg':
/home/chrisbra/code/vim-upstream/src/if_perl.c:1696: undefined reference to `PL_stack_sp'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.c:1684: undefined reference to `PL_stack_base'
/usr/bin/ld: objects/if_perl.o: in function `ex_perl':
/home/chrisbra/code/vim-upstream/src/if_perl.xs:979: undefined reference to `PL_stack_sp'
/usr/bin/ld: objects/if_perl.o: in function `Perl_SvTRUE_common':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/sv_inline.h:639: undefined reference to `PL_sv_
/usr/bin/ld: objects/if_perl.o: in function `ex_perl':
/home/chrisbra/code/vim-upstream/src/if_perl.xs:1000: undefined reference to `PL_markstack_ptr'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.xs:1000: undefined reference to `PL_markstack_max'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.xs:1000: undefined reference to `PL_markstack_ptr'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.xs:1000: undefined reference to `PL_stack_base'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.xs:1001: undefined reference to `PL_stack_max'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.xs:1002: undefined reference to `PL_stack_sp'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.xs:1012: undefined reference to `PL_errgv'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.xs:1014: undefined reference to `PL_tmps_floor'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.xs:1014: undefined reference to `PL_tmps_ix'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.xs:1002: undefined reference to `PL_stack_max'
/usr/bin/ld: objects/if_perl.o: in function `do_perleval':
/home/chrisbra/code/vim-upstream/src/if_perl.xs:1262: undefined reference to `PL_stack_sp'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.xs:1293: undefined reference to `PL_errgv'
/usr/bin/ld: objects/if_perl.o: in function `Perl_SvTRUE_common':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/sv_inline.h:639: undefined reference to `PL_sv_
/usr/bin/ld: objects/if_perl.o: in function `do_perleval':
/home/chrisbra/code/vim-upstream/src/if_perl.xs:1276: undefined reference to `PL_markstack_ptr'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.xs:1276: undefined reference to `PL_markstack_max'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.xs:1276: undefined reference to `PL_markstack_ptr'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.xs:1276: undefined reference to `PL_stack_base'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.xs:1277: undefined reference to `PL_stack_max'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.xs:1278: undefined reference to `PL_stack_sp'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.xs:1281: undefined reference to `PL_stack_sp'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.xs:1283: undefined reference to `PL_stack_sp'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.xs:1295: undefined reference to `PL_tmps_floor'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.xs:1295: undefined reference to `PL_tmps_ix'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.xs:1278: undefined reference to `PL_stack_max'
/usr/bin/ld: objects/if_perl.o: in function `ex_perldo':
/home/chrisbra/code/vim-upstream/src/if_perl.xs:1329: undefined reference to `PL_stack_sp'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.xs:1337: undefined reference to `PL_errgv'
/usr/bin/ld: objects/if_perl.o: in function `Perl_SvTRUE_common':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/sv_inline.h:639: undefined reference to `PL_sv_
/usr/bin/ld: objects/if_perl.o: in function `ex_perldo':
/home/chrisbra/code/vim-upstream/src/if_perl.xs:1351: undefined reference to `PL_defgv'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.xs:1352: undefined reference to `PL_markstack_ptr'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.xs:1352: undefined reference to `PL_markstack_max'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.xs:1352: undefined reference to `PL_markstack_ptr'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.xs:1352: undefined reference to `PL_stack_base'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.xs:1354: undefined reference to `PL_errgv'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.xs:1357: undefined reference to `PL_stack_sp'
/usr/bin/ld: objects/if_perl.o: in function `replace_line':
/home/chrisbra/code/vim-upstream/src/if_perl.xs:1030: undefined reference to `PL_defgv'
/usr/bin/ld: objects/if_perl.o: in function `Perl_SvPV_helper':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/sv_inline.h:957: undefined reference to `PL_na'
/usr/bin/ld: objects/if_perl.o: in function `ex_perldo':
/home/chrisbra/code/vim-upstream/src/if_perl.xs:1366: undefined reference to `PL_stack_sp'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.xs:1368: undefined reference to `PL_tmps_floor'
/usr/bin/ld: /home/chrisbra/code/vim-upstream/src/if_perl.xs:1368: undefined reference to `PL_tmps_ix'
/usr/bin/ld: objects/if_perl.o: in function `Perl_SvPV_helper':
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/sv_inline.h:926: undefined reference to `PL_na'
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE
collect2: error: ld returned 1 exit status
link.sh: Linking failed
make: *** [Makefile:2062: vim] Error 1


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12914/c1694402799@github.com>

Christian Brabandt

unread,
Aug 26, 2023, 12:29:20 PM8/26/23
to vim/vim, Subscribed

and compiling statically, I see this warning:

if_perl.xs: In function ‘XS_VIM_Buffers’:
if_perl.xs:1596:2: warning: ‘Perl_dowantarray’ is deprecated [-Wdeprecated-declarations]
 1596 |  if (GIMME == G_SCALAR)
      |  ^~
In file included from /home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/perl.h:6188,
                 from if_perl.xs:55:
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/proto.h:1019:1: note: declared here
 1019 | Perl_dowantarray(pTHX)
      | ^~~~~~~~~~~~~~~~
if_perl.xs: In function ‘XS_VIM_Windows’:
if_perl.xs:1647:2: warning: ‘Perl_dowantarray’ is deprecated [-Wdeprecated-declarations]
 1647 |  if (GIMME == G_SCALAR)
      |  ^~
In file included from /home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/perl.h:6188,
                 from if_perl.xs:55:
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/proto.h:1019:1: note: declared here
 1019 | Perl_dowantarray(pTHX)
      | ^~~~~~~~~~~~~~~~

all with perl 5.38 (self-compiled) on Debian


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12914/c1694403284@github.com>

Philip H.

unread,
Aug 26, 2023, 1:34:32 PM8/26/23
to vim/vim, Subscribed

and compiling statically, I see this warning:

if_perl.xs: In function ‘XS_VIM_Buffers’:
if_perl.xs:1596:2: warning: ‘Perl_dowantarray’ is deprecated [-Wdeprecated-declarations]
 1596 |  if (GIMME == G_SCALAR)
      |  ^~
In file included from /home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/perl.h:6188,
                 from if_perl.xs:55:
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/proto.h:1019:1: note: declared here
 1019 | Perl_dowantarray(pTHX)
      | ^~~~~~~~~~~~~~~~
if_perl.xs: In function ‘XS_VIM_Windows’:
if_perl.xs:1647:2: warning: ‘Perl_dowantarray’ is deprecated [-Wdeprecated-declarations]
 1647 |  if (GIMME == G_SCALAR)
      |  ^~
In file included from /home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/perl.h:6188,
                 from if_perl.xs:55:
/home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux/CORE/proto.h:1019:1: note: declared here
 1019 | Perl_dowantarray(pTHX)
      | ^~~~~~~~~~~~~~~~

all with perl 5.38 (self-compiled) on Debian

Yep, thats why I implemented GIMME_V but compiling works on my side without it. I see only this warning. build succeed


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12914/c1694418548@github.com>

Philip H.

unread,
Aug 26, 2023, 1:37:53 PM8/26/23
to vim/vim, Subscribed

I am not sure if we can do some version magic here?


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12914/c1694419157@github.com>

Yee Cheng Chin

unread,
Aug 26, 2023, 6:58:25 PM8/26/23
to vim/vim, Push

@ychin pushed 1 commit.

  • e296654 Fix GIMME_V deprecation warnings in Perl 5.38

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12914/push/14817906440@github.com>

Yee Cheng Chin

unread,
Aug 26, 2023, 6:59:18 PM8/26/23
to vim/vim, Subscribed

it doesn't seem to work for me dynamically:

I looked into this (as I could see it reproduced on a local Perl build as well), and this link error is because of changes in configure.ac, not the code changes in if_perl.xs. Even if you revert the if_perl.xs changes, you will still see this error.

This means that the linker flags change is working as intended, because previously it would just silently link against Perl even when using dynamic builds, which is not what we want, as we want to load all symbols from the user-provided library. Now it will just fail to link at build time, telling us that something is wrong.

From trial and error, I think what happens here is that your (and mine) local copy of Perl does not have MULTIPLICITY and USE_REENTRANT_API set, which somehow ends up linking against all these other external symbols. I think that means in order to get a dynamic Perl build working, you have to have a version of Perl that has those set? On macOS, seems like both the Apple-distributed Perl and Homebrew Perl have those set. I'm guessing you just built Perl locally with the minimum setting?

and compiling statically, I see this warning: (… some error about GIMME_V …)

I am not sure if we can do some version magic here?

Ok. I will just use GIMME_V as that seems to be heavily encouraged by Perl and has existed since 1998 judging from source history. I added a Perl version check so that 5.30 or below will just use GIMME, since I don't want to stub


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12914/c1694518057@github.com>

Yee Cheng Chin

unread,
Aug 26, 2023, 8:23:24 PM8/26/23
to vim/vim, Push

@ychin pushed 1 commit.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12914/push/14818174176@github.com>

Yee Cheng Chin

unread,
Aug 26, 2023, 8:25:54 PM8/26/23
to vim/vim, Subscribed

Also fixed up some issues with Perl 5.38, so it should work fine now (e72a9a1). One of the issue I fixed (Perl_get_context now being inline) is an existing issue where if you use a dynamic build with Perl 5.38 it would build fine but fail to run at runtime because the library no longer has a Perl_get_context function for us to load anymore. See that commit for details.

With this change I tested and it should work from 5.18 to 5.38.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12914/c1694531136@github.com>

Christian Brabandt

unread,
Aug 27, 2023, 4:42:11 AM8/27/23
to vim/vim, Subscribed

(Edit: I find that configuring Perl with -Dusethreads -Duseshrplib -Duselargefiles -Dusereentrant -Dusemultiplicity seems to work well, and built a version of Perl that works with Vim)

Oh, that could very well be the case. I have just been compiling my own perl, using default values and did not enable special things. Let me re-check it


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12914/c1694608224@github.com>

Christian Brabandt

unread,
Aug 27, 2023, 5:05:38 AM8/27/23
to vim/vim, Subscribed

Hm, I now re-compiled 5.38 using: ./Configure -des -Dprefix=//home/chrisbra/local/stow/perl538 -Dusethreads -Duseshrplib -Duselargefiles -Dusereentrant -Dusemultiplicity

and it still fails with:

link.sh: $LINK_AS_NEEDED set to 'yes': invoking linker directly.
  gcc   -Wl,-E -Wl,-rpath,//home/chrisbra/local/stow/perl538/lib/5.38.0/x86_64-linux-thread-multi/CORE   -L/usr/local/lib -Wl,--as-needed       -o vim objects/alloc.o objects/arabic.o objects/arglist.o objects/autocmd.o objects/beval.o objects/buffer.o objects/change.o objects/blob.o objects/blowfish.o objects/cindent.o objects/clientserver.o objects/clipboard.o objects/cmdexpand.o objects/cmdhist.o objects/crypt.o objects/crypt_zip.o objects/debugger.o objects/dict.o objects/diff.o objects/digraph.o objects/drawline.o objects/drawscreen.o objects/edit.o objects/eval.o objects/evalbuffer.o objects/evalfunc.o objects/evalvars.o objects/evalwindow.o objects/ex_cmds.o objects/ex_cmds2.o objects/ex_docmd.o objects/ex_eval.o objects/ex_getln.o objects/fileio.o objects/filepath.o objects/findfile.o objects/float.o objects/fold.o objects/getchar.o objects/gui_xim.o objects/hardcopy.o objects/hashtab.o objects/help.o objects/highlight.o objects/if_cscope.o objects/if_xcmdsrv.o objects/indent.o objects/insexpand.o objects/list.o objects/locale.o objects/logfile.o objects/map.o objects/mark.o objects/match.o objects/mbyte.o objects/memline.o objects/menu.o objects/misc1.o objects/misc2.o objects/mouse.o objects/move.o objects/normal.o objects/ops.o objects/option.o objects/optionstr.o objects/os_unix.o objects/pathdef.o objects/popupmenu.o objects/popupwin.o objects/profiler.o objects/pty.o objects/quickfix.o objects/regexp.o objects/register.o objects/screen.o objects/scriptfile.o objects/search.o objects/session.o objects/sha256.o objects/sign.o objects/sound.o objects/spell.o objects/spellfile.o objects/spellsuggest.o objects/strings.o objects/syntax.o objects/tag.o objects/term.o objects/terminal.o objects/testing.o objects/textformat.o objects/textobject.o objects/textprop.o objects/time.o objects/typval.o objects/ui.o objects/undo.o objects/usercmd.o objects/userfunc.o objects/version.o objects/vim9class.o objects/vim9cmds.o objects/vim9compile.o objects/vim9execute.o objects/vim9expr.o objects/vim9instr.o objects/vim9script.o objects/vim9type.o objects/viminfo.o objects/window.o objects/bufwrite.o  objects/vterm_encoding.o objects/vterm_keyboard.o objects/vterm_mouse.o objects/vterm_parser.o objects/vterm_pen.o objects/vterm_screen.o objects/vterm_state.o objects/vterm_unicode.o objects/vterm_vterm.o   objects/if_perl.o objects/if_perlsfio.o      objects/netbeans.o objects/job.o objects/channel.o objects/xdiffi.o objects/xemit.o objects/xprepare.o objects/xutils.o objects/xhistogram.o objects/xpatience.o  objects/charset.o objects/json.o objects/main.o objects/memfile.o objects/message.o    -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE  -lm -ltinfo  -lselinux -lcanberra -lsodium -lrt -lacl -lattr -lgpm -ldl
/usr/bin/ld: objects/if_perl.o: in function `newWINrv':
/home/chrisbra/code/vim-upstream/src/if_perl.xs:819: undefined reference to `PL_current_context'
/usr/bin/ld: objects/if_perl.o: in function `newBUFrv':
/home/chrisbra/code/vim-upstream/src/if_perl.xs:834: undefined reference to `PL_current_context'
/usr/bin/ld: objects/if_perl.o: in function `perl_init':
/home/chrisbra/code/vim-upstream/src/if_perl.xs:738: undefined reference to `PL_current_context'
/usr/bin/ld: objects/if_perl.o: in function `xs_init':
/home/chrisbra/code/vim-upstream/src/if_perl.xs:1529: undefined reference to `PL_current_context'
/usr/bin/ld: objects/if_perl.o: in function `boot_VIM':
/home/chrisbra/code/vim-upstream/src/if_perl.c:2486: undefined reference to `PL_current_context'
/usr/bin/ld: objects/if_perl.o:/home/chrisbra/code/vim-upstream/src/if_perl.xs:906: more undefined references to `PL_current_context' follow
collect2: error: ld returned 1 exit status
link.sh: Linking failed
make: *** [Makefile:2062: vim] Error 1

am I still missing one extra configure flag for Perl?


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12914/c1694613014@github.com>

Christian Brabandt

unread,
Aug 27, 2023, 5:07:45 AM8/27/23
to vim/vim, Subscribed

Also, can you please mention at doc/if_perl.txt what configure flags are required for perl to allow dynamic linking?


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12914/c1694613612@github.com>

Yee Cheng Chin

unread,
Aug 28, 2023, 8:33:02 PM8/28/23
to vim/vim, Push

@ychin pushed 1 commit.

  • 14ee23e Fix Perl 5.36/5.38 when thread local is used

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12914/push/14838403100@github.com>

Yee Cheng Chin

unread,
Aug 28, 2023, 8:35:56 PM8/28/23
to vim/vim, Subscribed

Hm, I now re-compiled 5.38 using: ./Configure -des -Dprefix=/home/chrisbra/local/stow/perl538 -Dusethreads -Duseshrplib -Duselargefiles -Dusereentrant -Dusemultiplicity

and it still fails with:

link.sh: $LINK_AS_NEEDED set to 'yes': invoking linker directly.
…
/usr/bin/ld: objects/if_perl.o: in function `newWINrv':
/home/chrisbra/code/vim-upstream/src/if_perl.xs:819: undefined reference to `PL_current_context'
…
/usr/bin/ld: objects/if_perl.o:/home/chrisbra/code/vim-upstream/src/if_perl.xs:906: more undefined references to `PL_current_context' follow
collect2: error: ld returned 1 exit status
link.sh: Linking failed
make: *** [Makefile:2062: vim] Error 1

am I still missing one extra configure flag for Perl?

I took a look and seems like this only happens in Linux which is why I didn't see it on macOS. Taking a look, it's another instance of an existing issue: accidental linkage with libperl (which is now disallowed because I removed -lperl from the linker flags when building dynamic). It has been happening since 5.36, where Vim would accidentally link against libperl.so, even if you are building for dynamic Perl. If you build against 5.36/5.38 in master, you could see that it's depending on libperl.so if you do ldd src/vim.

The issue is due to Perl 5.36 added a change what uses a thread-local storage for the current context called PL_current_context but it's only turned on in certain situations (when the compiler is a pure C compiler and not a C++ compiler) and somehow that's the case in Linux and not in macOS 🤷‍♂️. I added a stub in the latest commit (14ee23e) but I will admit it's not a perfect solution because this will be a different value from the PL_current_context in the library. Even if we load the variable from the library though I'm afraid that it could be changed later, as there isn't an easy way to synchornize the two values. From testing though, it somehow works just fine…


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12914/c1696604617@github.com>

Yee Cheng Chin

unread,
Aug 28, 2023, 8:38:51 PM8/28/23
to vim/vim, Subscribed

Also, can you please mention at doc/if_perl.txt what configure flags are required for perl to allow dynamic linking?

I could, but it's actually a little… flaky. The flags I found are just from trial and error and following what individual platforms use. For example, upon closer inspection, the -Dusereentrant flag is only necessary on macOS, but not necessary on Linux. That only matches the popular Perl installations on the respective platforms (e.g. I checked Homebrew and system Perl on macOS: they both have reentrant API configured; I checked Fedora / Ubuntu Perl, and both do not have reentrant), but it seems more like a coincidence. The Perl ecosystem unfortunately isn't very friendly to a stable ABI.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12914/c1696606465@github.com>

Christian Brabandt

unread,
Aug 29, 2023, 2:22:37 AM8/29/23
to vim/vim, Subscribed

Okay, thanks. I'll test it later today.

So how about the following doc patch in addition then?

diff --git a/runtime/doc/if_perl.txt b/runtime/doc/if_perl.txt
index 7949e9173..71c61a62b 100644
--- a/runtime/doc/if_perl.txt
+++ b/runtime/doc/if_perl.txt
@@ -273,6 +273,15 @@ This means that Vim will search for the Perl DLL or shared library file only
 when needed.  When you don't use the Perl interface you don't need it, thus
 you can use Vim without this file.

+Note: for the dynamic linking to work with your local perl installation, the
+local perl must specifically be compiled with certain flags enabled. By
+trial and error we found, that the following flags should be present >
+
+ -Dusethreads -Duseshrplib -Duselargefiles -Dusereentrant -Dusemultiplicity
+
+This has been verified with Perl 5.32 and 5.38 on MacOS and Linux.  You can
+check the output of `perl -V` to verify the presence of those flags.  If those
+flags are not there, dynamically loading perl will most likely fail at runtime.


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12914/c1696838759@github.com>

Yee Cheng Chin

unread,
Aug 29, 2023, 3:02:37 AM8/29/23
to vim/vim, Push

@ychin pushed 1 commit.

  • b3e6703 Add docs for how to build Perl for dynamic linking to work

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12914/push/14841223259@github.com>

Yee Cheng Chin

unread,
Aug 29, 2023, 3:03:34 AM8/29/23
to vim/vim, Subscribed

I updated the docs with what I think are more reasonable suggestions. From playing with it I think only -Dusethreads is necessary as the other flags are derived from it. I don't think we need to specify -Duseshrplib in the docs because that's just the flags for building a dynamic lib. If someone is building Perl for dynamic lib they should already know to use it.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12914/c1696882395@github.com>

Christian Brabandt

unread,
Aug 29, 2023, 4:07:22 PM8/29/23
to vim/vim, Subscribed

verified using (self-compiled) Perl 5.32 and Perl 5.38 on Debian 11 with dynamic and static linking. Thanks! 🙇


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12914/c1698057654@github.com>

Christian Brabandt

unread,
Aug 29, 2023, 4:08:35 PM8/29/23
to vim/vim, Subscribed

Closed #12914 via 55460da.


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12914/issue_event/10225362902@github.com>

Reply all
Reply to author
Forward
0 new messages