Can't compile with perl 5.14 on Windows

55 views
Skip to first unread message

H Xu

unread,
Jul 28, 2011, 7:27:12 AM7/28/11
to vim...@googlegroups.com
Hi,

I'm using MSVC 9.0, using the following command to compile vim 7.3.266:

nmake -f Make_mvc.mak GUI=yes PYTHON=C:\Python26 DEBUG=no
OPTIMIZE=MAXSPEED PYTHON_VER=26 DYNAMIC_PYTHON=yes FEATURES=HUGE
PERL=C:\perl PERL_VER=514 DYNAMIC_PERL=yes

The link stage fails, with the following messages:

link /RELEASE /nologo /subsystem:windows /LTCG:STATUS
-out:gvim.exe .\ObjGLY\blowfish.obj .\ObjGLY\buffer.
obj .\ObjGLY\charset.obj .\ObjGLY\diff.obj .\ObjGLY\digraph.obj
.\ObjGLY\edit.obj .\ObjGLY\eval.obj .\ObjGLY\
ex_cmds.obj .\ObjGLY\ex_cmds2.obj .\ObjGLY\ex_docmd.obj
.\ObjGLY\ex_eval.obj .\ObjGLY\ex_getln.obj .\ObjGLY\fi
leio.obj .\ObjGLY\fold.obj .\ObjGLY\getchar.obj .\ObjGLY\hardcopy.obj
.\ObjGLY\hashtab.obj .\ObjGLY\main.obj
.\ObjGLY\mrk.obj .\ObjGLY\mbyte.obj .\ObjGLY\memfile.obj
.\ObjGLY\memline.obj .\ObjGLY\menu.obj .\ObjGLY\mess
age.obj .\ObjGLY\misc1.obj .\ObjGLY\misc2.obj .\ObjGLY\move.obj
.\ObjGLY\normal.obj .\ObjGLY\ops.obj .\ObjGLY
\option.obj .\ObjGLY\os_mswin.obj .\ObjGLY\os_win32.obj
.\ObjGLY\pathdef.obj .\ObjGLY\popupmnu.obj .\ObjGLY\qu
ickfix.obj .\ObjGLY\regexp.obj .\ObjGLY\screen.obj
.\ObjGLY\search.obj .\ObjGLY\sha256.obj .\ObjGLY\spell.obj
.\ObjGLY\syntax.obj .\ObjGLY\tag.obj .\ObjGLY\term.obj
.\ObjGLY\ui.obj .\ObjGLY\undo.obj .\ObjGLY\window.obj
.\ObjGLY\vim.res .\ObjGLY\gui.obj .\ObjGLY\gui_beval.obj
.\ObjGLY\gui_w32.obj .\ObjGLY\os_w32exe.obj .\ObjG
LY\if_perl.obj .\ObjGLY\if_perlsfio.obj .\ObjGLY\if_python.obj
.\ObjGLY/if_cscope.obj .\ObjGLY/netbeans.obj
.\ObjGLY\version.obj oldnames.lib kernel32.lib advapi32.lib shell32.lib
gdi32.lib comdlg32.lib ole32.lib uuid.lib
/machine:i386 /nodefaultlib gdi32.lib version.lib winspool.lib
comctl32.lib advapi32.lib shell32.lib /machine:i3
86 /nodefaultlib libcmt.lib user32.lib /nodefaultlib:python26.lib
WSock32.lib /PDB:gvim.pdb -debug
if_perl.obj : error LNK2001: unresolved external symbol
__imp__Perl_sv_2bool_flags
if_perl.obj : error LNK2001: unresolved external symbol
__imp__Perl_xs_apiversion_bootcheck
gvim.exe : fatal error LNK1120: 2 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio
9.0\VC\BIN\link.EXE"' : return code '0x460'
Stop.


But after I removed DYNAMIC_PERL=1 in the nmake arguments, the build
will be successful.

Does anyone has any ideas?

Hong Xu

sablime

unread,
Aug 12, 2011, 9:02:15 PM8/12/11
to vim...@googlegroups.com
On Thursday, July 28, 2011 7:27:12 AM UTC-4, H Xu wrote:

I'm using MSVC 9.0, using the following command to compile vim 7.3.266:

nmake -f Make_mvc.mak GUI=yes PYTHON=C:\Python26 DEBUG=no
OPTIMIZE=MAXSPEED PYTHON_VER=26 DYNAMIC_PYTHON=yes FEATURES=HUGE
PERL=C:\perl PERL_VER=514 DYNAMIC_PERL=yes

The link stage fails, with the following messages:

  f_perl.obj : error LNK2001: unresolved external symbol

__imp__Perl_sv_2bool_flags
if_perl.obj : error LNK2001: unresolved external symbol
__imp__Perl_xs_apiversion_bootcheck

But after I removed DYNAMIC_PERL=1 in the nmake arguments, the build
will be successful.

This is caused by changes to perlapi between 5.12 and 5.14.  The attached patch to if_perl.xs works for me on win32 and linux. BTW, on linux the original if_perl.xs will let you link, but leads to an error at runtime when using perl from vim.

Charlie Cooper

 
if_perl_xs.diff
Reply all
Reply to author
Forward
0 new messages