Hi,
I tried to use +perl/dyn on Cygwin and Linux, but it seems that
Vim is statically linked to the perl library.
On Cygwin (with Perl 5.14):
$ ./configure --with-feature=huge --enable-perlinterp=dynamic
$ make
$ ./vim
/cygdrive/c/(snip)/vim/src/vim.exe: error while loading shared libraries:
cygperl5_14.dll: cannot open shared object file: No such file or directory
(if cygperl5_14.dll is not available)
On Linux (Ubuntu 12.04 with Perl 5.14):
$ ./configure --with-feature=huge --enable-perlinterp=dynamic
$ make
$ objdump -p ./vim | grep perl
NEEDED libperl.so.5.14
The cause is that the symbol PL_thr_key is linked statically.
Attached patch fixes this problem when used with Perl 5.14+.
I'm not sure about the older versions of Perl. (5.12, 5.10, ...)
Best regards,
Ken Takata
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
# HG changeset patch
# Parent 3caaaa02641495388fd8595343f55b3ffe33802c
diff --git a/src/if_perl.xs b/src/if_perl.xs
--- a/src/if_perl.xs
+++ b/src/if_perl.xs
@@ -225,6 +225,9 @@
# define Perl_call_list dll_Perl_call_list
# define Perl_Iscopestack_ix_ptr dll_Perl_Iscopestack_ix_ptr
# define Perl_Iunitcheckav_ptr dll_Perl_Iunitcheckav_ptr
+# if (PERL_REVISION == 5) && (PERL_VERSION >= 14)
+# define PL_thr_key *dll_PL_thr_key
+# endif
/*
* Declare HANDLE for perl.dll and function pointers.
@@ -336,6 +339,9 @@
static SV* (*Perl_Isv_yes_ptr)(register PerlInterpreter*);
static void (*boot_DynaLoader)_((pTHX_ CV*));
static perl_key* (*Perl_Gthr_key_ptr)_((pTHX));
+#if (PERL_REVISION == 5) && (PERL_VERSION >= 14)
+static perl_key* dll_PL_thr_key;
+#endif
/*
* Table of name to function pointer of perl.
@@ -454,6 +460,9 @@
{"Perl_Gthr_key_ptr", (PERL_PROC*)&Perl_Gthr_key_ptr},
#endif
{"boot_DynaLoader", (PERL_PROC*)&boot_DynaLoader},
+#if (PERL_REVISION == 5) && (PERL_VERSION >= 14)
+ {"PL_thr_key", (PERL_PROC*)&dll_PL_thr_key},
+#endif
{"", NULL},
};