I'm getting the following errors when trying to build vim 8.2.2879 with Perl 5.34:
In file included from /usr/lib/perl5/5.34/core_perl/CORE/perl.h:5744,
from if_perl.xs:62:
if_perl.xs: In function ‘Perl_SvTRUE’:
/usr/lib/perl5/5.34/core_perl/CORE/embed.h:36:33: warning: implicit declaration of function ‘Perl_SvTRUE_common’; did you mean ‘Perl_hv_common’? [-Wimplicit-function-declaration]
36 | #define SvTRUE_common(a,b) Perl_SvTRUE_common(aTHX_ a,b)
| ^~~~~~~~~~~~~~~~~~
/usr/lib/perl5/5.34/core_perl/CORE/embed.h:36:33: note: in definition of macro ‘SvTRUE_common’
36 | #define SvTRUE_common(a,b) Perl_SvTRUE_common(aTHX_ a,b)
| ^~~~~~~~~~~~~~~~~~
if_perl.xs:710:12: note: in expansion of macro ‘SvTRUE_nomg_NN’
710 | return SvTRUE_nomg_NN(sv);
| ^~~~~~~~~~~~~~
...
/usr/bin/ld: objects/if_perl.o: in function `ex_perl':
if_perl.c:(.text+0x4ea6): undefined reference to `Perl_SvTRUE_common'
/usr/bin/ld: objects/if_perl.o: in function `do_perleval':
if_perl.c:(.text+0x5385): undefined reference to `Perl_SvTRUE_common'
/usr/bin/ld: objects/if_perl.o: in function `ex_perldo':
if_perl.c:(.text+0x5afb): undefined reference to `Perl_SvTRUE_common'
collect2: error: ld returned 1 exit status
It appears that a fix similar to #6310 is needed, though looking at Perl/perl5@4eff5eb I'm not entirely sure if Perl_SvTRUE_common can be copied to vim as-is, and whether or not vim's copy of Perl_SvTRUE needs to be tweaked to add PERL_ARGS_ASSERT_SVTRUE.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
Is it possible that if_perl.xs can be simplified by removing the duplicated inline functions and the PERL_NO_INLINE_FUNCTIONS definition? With the attached diff, vim appears to build fine against Perl 5.34 and passes all tests. It's unlikely the diff is good to merge as is but I used it to unblock our Perl 5.34 rebuilds in Arch Linux.
use-perls-inline-functions.diff.txt
It is mostly for dynamic linking.
Does it build with --enable-perlinterp=dynamic?
Our vim is built with --enable-perlinterp=dynamic (and perl listed as an optional dependency of the vim package). However, now that you mentioned it, I tested if vim starts without perl installed and it does not because it can't find libperl.so. Our stable package built against Perl 5.32 without the above diff starts up fine even if libperl.so is missing.
It does appear that my diff makes vim link to libperl.so regardless of --enable-perlinterp=dynamic and thus breaking it. :(