-
Notifications
You must be signed in to change notification settings - Fork 556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vim not able to build with Perl >=5.37 #21164
Comments
In the posted log file, the points in Vim's build where built-time warnings related to perl code (their
While I suspect that the fix should be done on the Vim side, it would be good for our devs to take a look at this. @demerphq @richardleach This was reported on the vim-dev list at: https://groups.google.com/g/vim_dev/c/4zPpgHznm8k ... and on Vim's issue tracker here: Thank you very much. |
That Anyway, the root cause is that we have a new header, |
Just to note, I am worked on a Patch on the vim side so for now its working from 5.36 until 5.38. |
This looks promising. Please keep us informed of the developments in that vim pull request. |
The developments are done on this PR, I wait until the maintainer will pull it into the main branch. |
more improvements are suggested by other vim developers, so it's not really done :D |
I have been looking at this issue as I think the Vim fixes didn't account for all Perl versions (e.g. it doesn't work on Perl 5.30). Looking at this history though, I think the reason why the Vim supports embedding Perl either via static or dynamic linking (meaning that the binary has no dependency on Perl at all and only loads it in dynamically at runtime via If you just include I think one solution would be to first define /* Perl-5.18 has a different Perl_sv_free2 signature. */
# if (PERL_REVISION == 5) && (PERL_VERSION >= 18)
static void (*Perl_sv_free2)(pTHX_ SV*, const U32);
# else
static void (*Perl_sv_free2)(pTHX_ SV*);
# endif We need @xenu Is there a better way to do this? Looking at the code history I think this was the only way that actually works if you want to link against Perl completely dynamically. Vim needs this functionality because we need to build Vim in a way that allows for Perl functionality as needed, but doesn't force users to install Perl if they don't have it installed. |
silly question - will that work: create intermediate .so, statically linked to perl, which is dynamically loaded from vim? |
Actually, I think I found a simpler way. Basically the issue here is that inline.h is trying to link against random functions like void Perl_sv_free2(pTHX_ SV* sv, const U32 refcnt)
{
(*dll_Perl_sv_free2)(aTHX_ sv, refcnt);
} |
Yeah, that is the more conventional approach. |
I think the issue is we want people to just install their version of Perl (matched with the version compiled against Vim) and then just load in the lib dynamically. The user won't have to compile anything like a custom .so file. But I think the solution I said would work (by just manually stubbing functions like |
On Fri, Aug 25, 2023 at 03:54:47PM -0700, Yee Cheng Chin wrote:
> silly question - will that work: create intermediate .so, statically linked to perl, which is dynamically loaded from vim?
I think the issue is we want people to just install their
version of Perl (matched with the version compiled against Vim)
and then just load in the lib dynamically. The user won't have
to compile anything like a custom .so file.
Why user? If at all - intermediate_perl_for_vim.so has to be
build by vim project and distributed with vim. That way vim can
dlopen("intermediate_perl_for_vim.so") instead of
dlopen("libperl.so") directly...
… But I think the
solution I said would work (by just manually stubbing functions
like `Perl_sv_free2` to help inline functions work).
--
Reply to this email directly or view it on GitHub:
#21164 (comment)
You are receiving this because you commented.
Message ID: ***@***.***>
|
Maybe stepping back, the issue here is really that if you include In the end the solution wasn't too hard (we removed the original method of copy-pasting inline functions from Perl headers which was really fragile): just stub the necessary functions and call the DLL ones (vim/vim#12914). It's just a necessary step. There's a caveat that when a new Perl version comes out sometimes we need to stub more functions since the inline implementation got changed to refer to more functions but it's a few lines of changes usually. |
Description
Not possible to build vim with perl >= 5.37
Steps to Reproduce
Expected behavior
no build errors by Perl
Perl configuration
The text was updated successfully, but these errors were encountered: