RE: perl58.dll: Perl_sv_2iv_flags (undefined reference)
Jan Dubois wrote: On Mon, 27 Aug 2007, Suresh Govindachar wrote: Is there a better way to embed perl so as to be version independent? There really is no way to do it totally version independently. One reason the vim code is so tightly coupled is that it doesn't have an explicit reference to perl58.dll. I am not clear about the preceding sentence: Does having an explicit reference mean the same as building with perl58.lib? If not, is it possible to re-write vim source code so that it does have an explicit reference to perl58.dll and thereby it becomes version independent? Thanks, --Suresh ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: perl58.dll: Perl_sv_2iv_flags (undefined reference)
On Fri, 24 Aug 2007, Suresh Govindachar wrote: Sisyphus suggested linking with C:/opt/perl/lib/CORE/perl58.lib (which does have the symbols in it) in the command that creates if_perl.o and/or in the command that builds gvim.exe (which is also the command that reports the missing references). But the build is supposed to use the library dynamically, rather than be statically linked. So perl58.dll must tell the linker that it will resolve the missing references at run time. Perhaps although ActiveState added code for the references, they are not exposing them to the linker for dynamic use via perl58.dll? Or is everything in a dll automatically visible? Perl_sv_2iv_flags is exported from perl58.dll. This symbols is being used by virtually every Perl module containing XS code because the SvIV() macro will expand into a call to it: [in sv.h] #define SvIV(sv) (SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv)) ... #define sv_2iv(sv) sv_2iv_flags(sv, SV_GMAGIC) Cheers, -Jan ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: perl58.dll: Perl_sv_2iv_flags (undefined reference)
Sisyphus wrote: I would try adding -lperl58 to either this command (the command that builds if_perl.o): gcc -c -Iproto -DWIN32 -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 -DHAVE_PATHDEF -DFEAT_HUGE -DHAVE_GETTEXT -DHAVE_LOCALE_H -DDYNAMIC_GETTEXT -DFEAT_OLE -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG -DFEAT_GUI_W32 -DFEAT_CLIPBOARD -DFEAT_MBYTE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DDYNAMIC_ICONV -pipe -w -march=i386 -Wall -IC:\opt\perl/lib/Core -DFEAT_PERL -LC:\opt\perl/lib/Core -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\perl58.dll\ -O3 -fomit-frame-pointer -freg-struct-return -s if_perl.c -o gobj/if_perl.o or to this command (the command that builds gvim.exe) : gcc -Iproto -DWIN32 -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 -DHAVE_PATHDEF -DFEAT_HUGE -DHAVE_GETTEXT -DHAVE_LOCALE_H -DDYNAMIC_GETTEXT -DFEAT_OLE -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG -DFEAT_GUI_W32 -DFEAT_CLIPBOARD -DFEAT_MBYTE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DDYNAMIC_ICONV -pipe -w -march=i386 -Wall -IC:\opt\perl/lib/Core -DFEAT_PERL -LC:\opt\perl/lib/Core -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\perl58.dll\ -O3 -fomit-frame-pointer -freg-struct-return -s -mwindows -o gvim.exe gobj/buffer.o gobj/charset.o gobj/diff.o gobj/digraph.o gobj/edit.o gobj/eval.o gobj/ex_cmds.o gobj/ex_cmds2.o gobj/ex_docmd.o gobj/ex_eval.o gobj/ex_getln.o gobj/fileio.o gobj/fold.o gobj/getchar.o gobj/hardcopy.o gobj/hashtab.o gobj/main.o gobj/mark.o gobj/memfile.o gobj/memline.o gobj/menu.o gobj/message.o gobj/misc1.o gobj/misc2.o gobj/move.o gobj/mbyte.o gobj/normal.o gobj/ops.o gobj/option.o gobj/os_win32.o gobj/os_mswin.o gobj/pathdef.o gobj/popupmnu.o gobj/quickfix.o gobj/regexp.o gobj/screen.o gobj/search.o gobj/spell.o gobj/syntax.o gobj/tag.o gobj/term.o gobj/ui.o gobj/undo.o gobj/version.o gobj/vimrc.o gobj/window.o gobj/if_perl.o gobj/if_cscope.o gobj/netbeans.o gobj/gui.o gobj/gui_w32.o gobj/gui_beval.o gobj/os_w32exe.o gobj/if_ole.o -lkernel32 -luser32 -lgdi32 -ladvapi32 -lcomdlg32 -lcomctl32 -lversion -lwsock32 -loleaut32 -lstdc++ -lole32 -luuid Or try addding it to *both* of those commands. Your C:/opt/perl/lib/CORE/libperl58.lib should be capable of defining those references - it's surely just a matter of linking to that file. Not sure if '-lperl58' will find libperl58.lib. If it doesn't, then create a copy of C:/opt/perl/lib/CORE/libperl58.lib named C:/opt/perl/lib/CORE/libperl58.a . Added -lperl58 to both. The first command reported: gcc: -lperl58: linker input file unused because linking not done The second command resulted in the same undefined reference error. Just to be sure, I added -lblah to the second command, and got the new error message: c:\opt\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: cannot find -lblah --Suresh ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: perl58.dll: Perl_sv_2iv_flags (undefined reference)
Solved with help from Brian Dessent on the MinGW mailing list. Add -lperl58 at the very end (location matters) of the last command. --Suresh ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: perl58.dll: Perl_sv_2iv_flags (undefined reference)
When mingw is used to build gvim with dynamic support for perl: 1) For older versions of ActivePerl, there is no need to add -lperl58 The linker somehow knows that perl58 related symbols that it cannot resolve will be resolved at runtime via perl58.dll 2) For the latest ActivePerl, when build is done without adding -lperl58 The linker somehow knows -- for almost all -- the perl58 related symbols that it cannot resolve, they will be resolved at runtime via perl58.dll For some reason, the linker demands that two particular symbols Perl_sv_2iv_flags and Perl_newXS_flags be resolved at link time via an explicit addition of -lperl58 So ActiveState is exporting Perl_sv_2iv_flags and Perl_newXS_flags in a way that is different from the way they export other symbols. --Suresh ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: perl58.dll: Perl_sv_2iv_flags (undefined reference)
On Mon, 27 Aug 2007, Suresh Govindachar wrote: So ActiveState is exporting Perl_sv_2iv_flags and Perl_newXS_flags in a way that is different from the way they export other symbols. Nope, this is all incorrect. I've now downloaded the vim sources to see what is really going on: The src/if_perl.xs file contains code to redefine all Perl functions it assumes it uses to wrapper names, and then looks up the real functions at runtime. That means that this file is specific to the Perl version used to compile it and will need to be updated for Perl 5.8.9. See for example: # if (PERL_REVISION == 5) (PERL_VERSION = 8) # define Perl_sv_2pv_flags dll_Perl_sv_2pv_flags # define Perl_sv_2pv_nolen dll_Perl_sv_2pv_nolen # else # define Perl_sv_2pv dll_Perl_sv_2pv # endif ... #if (PERL_REVISION == 5) (PERL_VERSION = 8) static char* (*Perl_sv_2pv_flags)(pTHX_ SV*, STRLEN*, I32); static char* (*Perl_sv_2pv_nolen)(pTHX_ SV*); #else static char* (*Perl_sv_2pv)(pTHX_ SV*, STRLEN*); #endif ... #if (PERL_REVISION == 5) (PERL_VERSION = 8) {Perl_sv_2pv_flags, (PERL_PROC*)Perl_sv_2pv_flags}, {Perl_sv_2pv_nolen, (PERL_PROC*)Perl_sv_2pv_nolen}, #else {Perl_sv_2pv, (PERL_PROC*)Perl_sv_2pv}, #endif Similar code will be needed for sv_2iv_flags() and any other new symbol. It is a bit awkward to do this for ActivePerl 822, as it identifies itself as 5.8.8 because 5.8.9 has not been released yet, so we don't know which additional features will still be added. But internally AP822 is probably closer to what will be 5.8.9 than to 5.8.8. Anyways, the problem is that if_perl.xs is coupled pretty tightly to the Perl internals and needs updating whenever the internals change. Cheers, -Jan ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: perl58.dll: Perl_sv_2iv_flags (undefined reference)
Jan Dubois wrote: On Mon, 27 Aug 2007, Suresh Govindachar wrote: So ActiveState is exporting Perl_sv_2iv_flags and Perl_newXS_flags in a way that is different from the way they export other symbols. Nope, this is all incorrect. I've now downloaded the vim sources to see what is really going on: The src/if_perl.xs file contains code to redefine all Perl functions it assumes it uses to wrapper names, and then looks up the real functions at runtime. That means that this file is specific to the Perl version used to compile it and will need to be updated for Perl 5.8.9. See for example: # if (PERL_REVISION == 5) (PERL_VERSION = 8) # define Perl_sv_2pv_flags dll_Perl_sv_2pv_flags # define Perl_sv_2pv_nolen dll_Perl_sv_2pv_nolen # else # define Perl_sv_2pv dll_Perl_sv_2pv # endif ... #if (PERL_REVISION == 5) (PERL_VERSION = 8) static char* (*Perl_sv_2pv_flags)(pTHX_ SV*, STRLEN*, I32); static char* (*Perl_sv_2pv_nolen)(pTHX_ SV*); #else static char* (*Perl_sv_2pv)(pTHX_ SV*, STRLEN*); #endif ... Similar code will be needed for sv_2iv_flags() and any other new symbol. It is a bit awkward to do this for ActivePerl 822, as it identifies itself as 5.8.8 because 5.8.9 has not been released yet, so we don't know which additional features will still be added. But internally AP822 is probably closer to what will be 5.8.9 than to 5.8.8. Anyways, the problem is that if_perl.xs is coupled pretty tightly to the Perl internals and needs updating whenever the internals change. Thanks for looking into this. I don't think the person who did the original work to embed perl in Vim is still activly interested in Vim. I can't live without vim and perl. Is there a better way to embed perl so as to be version independent? --Suresh ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: perl58.dll: Perl_sv_2iv_flags (undefined reference)
On Mon, 27 Aug 2007, Suresh Govindachar wrote: Thanks for looking into this. I don't think the person who did the original work to embed perl in Vim is still activly interested in Vim. I can't live without vim and perl. Is there a better way to embed perl so as to be version independent? There really is no way to do it totally version independently. One reason the vim code is so tightly coupled is that it doesn't have an explicit reference to perl58.dll. Instead it calls LoadLibrary() at runtime, and then GetProcAddress() to locate all the imported symbols. This allows the same binary to be used when there is no perl58.dll to be loaded. By linking against perl58.lib your version will fail to load on a machine that doesn't have Perl because you have now introduced a load time dependency on perl58.dll. At the binary level, all Perl 5.8.x releases are backward compatible in the sense that you can load a module compiled with an earlier Perl version into a later Perl release. That means you can build vim against Perl 5.8.0 and then use the vim binary with perl58.dll from 5.8.9 or any other 5.8.x version. All new versions continue to export the old symbols to support this level of compatibility. Binary compatibility does not exist in the other direction: A module compiled with Perl 5.8.8 may break under Perl 5.8.7. The vim binary you built by linking explicitly against perl58.lib from AP822 will not work with any earlier version of ActivePerl or perl58.dll because they don't export the new symbols. This is also the reason we have to build all modules in the ActivePerl PPM repositories against 5.8.0 [*]. That way they can be used by any version of ActivePerl 8xx. Cheers, -Jan [*] This is not strictly true anymore with AP819 and later using PPM4, but we haven't yet managed to roll out the versioned repository stuff at the server side. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: perl58.dll: Perl_sv_2iv_flags (undefined reference)
- Original Message - From: Suresh Govindachar [EMAIL PROTECTED] To: perl-win32-users@listserv.ActiveState.com Cc: 'Sisyphus' [EMAIL PROTECTED]; 'Jan Dubois' [EMAIL PROTECTED] Sent: Saturday, August 25, 2007 2:20 PM Subject: RE: perl58.dll: Perl_sv_2iv_flags (undefined reference) Sisyphus suggested linking with C:/opt/perl/lib/CORE/perl58.lib (which does have the symbols in it) in the command that creates if_perl.o and/or in the command that builds gvim.exe (which is also the command that reports the missing references). But the build is supposed to use the library dynamically, rather than be statically linked. But you will still have a dynamic build - perl58.lib is an import library rather than a static library. For dynamic builds using MSVC++ it is compulsory that you link to the import library. MSVC++ doesn't accommodate linking directly to the dll. For dynamic builds using MinGW (gcc), you generally have a choice - either link directly to the dll or link to the import library. In this instance, the dll (perl58.dll) has been built using MSVC++ and I therefore wonder whether MinGW can link directly to it. I would at least be trying to link to the import library (perl58.lib) in the hope that it would solve the problem. (No guarantees :-) Cheers, Rob ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: perl58.dll: Perl_sv_2iv_flags (undefined reference)
On Fri, 24 Aug 2007, Suresh Govindachar wrote: Building VIM with dynamic Perl support gives error messages such as the following: gobj/if_perl.o:if_perl.c:(.text+0x1c1f): undefined reference to `Perl_sv_2iv_flags' This looks like you compiled if_perl.c against the Perl/lib/CORE header files from ActivePerl 822 (or a relatively recent snapshot of the core Perl source), but then link against a perl58.lib of an older Perl version. Perl_sv_2iv_flags() is a new symbol that will be introduced in Perl 5.8.9, and ActivePerl 822 already contains all the current changes that will end up in 5.8.9. Cheers, -Jan ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: perl58.dll: Perl_sv_2iv_flags (undefined reference)
Jan Dubois wrote: On Fri, 24 Aug 2007, Suresh Govindachar wrote: Building VIM with dynamic Perl support gives error messages such as the following: gobj/if_perl.o:if_perl.c:(.text+0x1c1f): undefined reference to `Perl_sv_2iv_flags' This looks like you compiled if_perl.c against the Perl/lib/CORE header files from ActivePerl 822 (or a relatively recent snapshot of the core Perl source), but then link against a perl58.lib of an older Perl version. Perl_sv_2iv_flags() is a new symbol that will be introduced in Perl 5.8.9, and ActivePerl 822 already contains all the current changes that will end up in 5.8.9. Brand new hard-drive. Log of installing ActivePerl is attached below. I searched entire hard drive for perl*dll and found only the following and they are all inside c:\opt\perl\bin: perl58.dll PerlEx30.dll PerlEz.dll perlis.dll PerlMsg.dll PerlSE.dll grep Perl_sv_2iv_flags c:\opt\perl\bin\perl*dll Binary file c:\opt\perl\bin\perl58.dll matches Binary file c:\opt\perl\bin\PerlEx30.dll matches Binary file c:\opt\perl\bin\PerlEz.dll matches Any clues? Thanks, --Suresh C:\temp\ActivePerl-5.8.8.822-MSWin32-x86-280952dir Volume in drive C has no label. Volume Serial Number is B879-566C Directory of C:\temp\ActivePerl-5.8.8.822-MSWin32-x86-280952 08/23/2007 05:47 PMDIR . 08/23/2007 05:47 PMDIR .. 07/31/2007 08:24 PM 908 ACTIVEPERL.txt 07/31/2007 08:24 PM30,769 CHANGES-56.txt 07/31/2007 08:24 PM44,215 CHANGES.txt 07/31/2007 08:26 PM19,288 Installer.bat 02/22/2006 04:15 PM 2,914 LICENSE.txt 08/23/2007 05:47 PMDIR perl 07/31/2007 08:24 PM12,975 RELEASE.txt 08/23/2007 05:47 PMDIR support 6 File(s)111,069 bytes 4 Dir(s) 70,533,754,880 bytes free C:\temp\ActivePerl-5.8.8.822-MSWin32-x86-280952Installer.bat Welcome to ActivePerl. ActivePerl is ActiveState's quality-assured binary build of Perl. In order to install ActivePerl you need to agree to the ActivePerl Community License v2.1. Did you read the LICENSE.txt file? [no] yes Do you agree to the ActivePerl Community License v2.1? [no] yes This installer can install ActivePerl in any location of your choice. You do not need Administrator privileges. However, please make sure that you have write access to this location. Enter top level directory for install? [C:\Perl] c:\opt\perl The typical ActivePerl software installation requires 80 megabytes. Please make sure enough free space is available before continuing. ActivePerl 822 will be installed into 'c:\opt\perl' Create shortcuts to the HTML documentation? [yes] yes Add the Perl\site\bin and Perl\bin directories to the PATH? [yes] Create Perl file extension association? [yes] Create IIS script mapping for Perl? [yes] Create IIS script mapping for Perl ISAPI? [yes] Proceed? [yes] Ok. Installing ActivePerl... Copying files... 3045 File(s) copied Finished copying files... Relocating...done (70 files relocated) Configuring c:\opt\perl\lib\Config.pm for use in c:\opt\perl... Configuring Perl ... Configuring PPM for use in c:\opt\perl... Syncing perl PPM database with .packlists...done If you are behind a firewall, you may need to set the HTTP_PROXY environment variable so that PPM will operate properly: set HTTP_PROXY=http://address:port or set HTTP_PROXY=http://username:[EMAIL PROTECTED]:port For example set HTTP_PROXY=http://192.0.0.1:8080 Note that the http://; part of the URL is required! Building HTML documentation, please wait... Thank you for installing ActivePerl! Press return to exit. C:\temp\ActivePerl-5.8.8.822-MSWin32-x86-280952 ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: perl58.dll: Perl_sv_2iv_flags (undefined reference)
On Fri, 24 Aug 2007, Suresh Govindachar wrote: Jan Dubois wrote: On Fri, 24 Aug 2007, Suresh Govindachar wrote: Building VIM with dynamic Perl support gives error messages such as the following: gobj/if_perl.o:if_perl.c:(.text+0x1c1f): undefined reference to `Perl_sv_2iv_flags' This looks like you compiled if_perl.c against the Perl/lib/CORE header files from ActivePerl 822 (or a relatively recent snapshot of the core Perl source), but then link against a perl58.lib of an older Perl version. Perl_sv_2iv_flags() is a new symbol that will be introduced in Perl 5.8.9, and ActivePerl 822 already contains all the current changes that will end up in 5.8.9. Brand new hard-drive. Log of installing ActivePerl is attached below. I searched entire hard drive for perl*dll and found only the following and they are all inside c:\opt\perl\bin: Yes, they will all be the new version. But you did not provide the command that generated the error above. It will be linking against something that is built with an older version of Perl. I have no idea how building VIM with Perl embedding works. I would suspect that something in the VIM codebase is not properly exporting all the new symbols. Cheers, -Jan ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: perl58.dll: Perl_sv_2iv_flags (undefined reference)
-DFEAT_MBYTE_IME -DDYNAMIC_IME -DDYNAMIC_ICONV -pipe -w -march=i386 -Wall -IC:\opt\perl/lib/Core -DFEAT_PERL -LC:\opt\perl/lib/Core -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\perl58.dll\ -O3 -fomit-frame-pointer -freg-struct-return -s gui_w32.c -o gobj/gui_w32.o gcc -c -Iproto -DWIN32 -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 -DHAVE_PATHDEF -DFEAT_HUGE -DHAVE_GETTEXT -DHAVE_LOCALE_H -DDYNAMIC_GETTEXT -DFEAT_OLE -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG -DFEAT_GUI_W32 -DFEAT_CLIPBOARD -DFEAT_MBYTE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DDYNAMIC_ICONV -pipe -w -march=i386 -Wall -IC:\opt\perl/lib/Core -DFEAT_PERL -LC:\opt\perl/lib/Core -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\perl58.dll\ -O3 -fomit-frame-pointer -freg-struct-return -s gui_beval.c -o gobj/gui_beval.o gcc -c -Iproto -DWIN32 -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 -DHAVE_PATHDEF -DFEAT_HUGE -DHAVE_GETTEXT -DHAVE_LOCALE_H -DDYNAMIC_GETTEXT -DFEAT_OLE -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG -DFEAT_GUI_W32 -DFEAT_CLIPBOARD -DFEAT_MBYTE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DDYNAMIC_ICONV -pipe -w -march=i386 -Wall -IC:\opt\perl/lib/Core -DFEAT_PERL -LC:\opt\perl/lib/Core -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\perl58.dll\ -O3 -fomit-frame-pointer -freg-struct-return -s os_w32exe.c -o gobj/os_w32exe.o gcc -Iproto -DWIN32 -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 -DHAVE_PATHDEF -DFEAT_HUGE -DHAVE_GETTEXT -DHAVE_LOCALE_H -DDYNAMIC_GETTEXT -DFEAT_OLE -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG -DFEAT_GUI_W32 -DFEAT_CLIPBOARD -DFEAT_MBYTE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DDYNAMIC_ICONV -pipe -w -march=i386 -Wall -IC:\opt\perl/lib/Core -DFEAT_PERL -LC:\opt\perl/lib/Core -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\perl58.dll\ -O3 -fomit-frame-pointer -freg-struct-return -s -c -o gobj/if_ole.o if_ole.cpp gcc -Iproto -DWIN32 -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 -DHAVE_PATHDEF -DFEAT_HUGE -DHAVE_GETTEXT -DHAVE_LOCALE_H -DDYNAMIC_GETTEXT -DFEAT_OLE -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG -DFEAT_GUI_W32 -DFEAT_CLIPBOARD -DFEAT_MBYTE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DDYNAMIC_ICONV -pipe -w -march=i386 -Wall -IC:\opt\perl/lib/Core -DFEAT_PERL -LC:\opt\perl/lib/Core -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\perl58.dll\ -O3 -fomit-frame-pointer -freg-struct-return -s -mwindows -o gvim.exe gobj/buffer.o gobj/charset.o gobj/diff.o gobj/digraph.o gobj/edit.o gobj/eval.o gobj/ex_cmds.o gobj/ex_cmds2.o gobj/ex_docmd.o gobj/ex_eval.o gobj/ex_getln.o gobj/fileio.o gobj/fold.o gobj/getchar.o gobj/hardcopy.o gobj/hashtab.o gobj/main.o gobj/mark.o gobj/memfile.o gobj/memline.o gobj/menu.o gobj/message.o gobj/misc1.o gobj/misc2.o gobj/move.o gobj/mbyte.o gobj/normal.o gobj/ops.o gobj/option.o gobj/os_win32.o gobj/os_mswin.o gobj/pathdef.o gobj/popupmnu.o gobj/quickfix.o gobj/regexp.o gobj/screen.o gobj/search.o gobj/spell.o gobj/syntax.o gobj/tag.o gobj/term.o gobj/ui.o gobj/undo.o gobj/version.o gobj/vimrc.o gobj/window.o gobj/if_perl.o gobj/if_cscope.o gobj/netbeans.o gobj/gui.o gobj/gui_w32.o gobj/gui_beval.o gobj/os_w32exe.o gobj/if_ole.o -lkernel32 -luser32 -lgdi32 -ladvapi32 -lcomdlg32 -lcomctl32 -lversion -lwsock32 -loleaut32 -lstdc++ -lole32 -luuid gobj/if_perl.o:if_perl.c:(.text+0x1c1f): undefined reference to `Perl_sv_2iv_flags' gobj/if_perl.o:if_perl.c:(.text+0x1f3b): undefined reference to `Perl_sv_2iv_flags' gobj/if_perl.o:if_perl.c:(.text+0x21e6): undefined reference to `Perl_sv_2iv_flags' gobj/if_perl.o:if_perl.c:(.text+0x2382): undefined reference to `Perl_sv_2iv_flags' gobj/if_perl.o:if_perl.c:(.text+0x25d0): undefined reference to `Perl_sv_2iv_flags' gobj/if_perl.o:if_perl.c:(.text+0x2610): more undefined references to `Perl_sv_2iv_flags' follow gobj/if_perl.o:if_perl.c:(.text+0x408e): undefined reference to `Perl_newXS_flags' gobj/if_perl.o:if_perl.c:(.text+0x40b6): undefined reference to `Perl_newXS_flags' gobj/if_perl.o:if_perl.c:(.text+0x40de): undefined reference to `Perl_newXS_flags' gobj/if_perl.o:if_perl.c:(.text+0x4106): undefined reference to `Perl_newXS_flags' gobj/if_perl.o:if_perl.c:(.text+0x412e): undefined reference to `Perl_newXS_flags' gobj/if_perl.o:if_perl.c:(.text+0x4156): more undefined references to `Perl_newXS_flags' follow collect2: ld returned 1 exit status mingw32-make.exe: *** [gvim.exe] Error 1 C:\home\suresh\develop\vim\vim7\src ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs -Original Message- From: Jan Dubois [mailto:[EMAIL PROTECTED] Sent: Friday, August 24, 2007 4:49 PM To: [EMAIL PROTECTED]; perl-win32-users@listserv.ActiveState.com Subject: RE: perl58.dll: Perl_sv_2iv_flags (undefined reference) On Fri, 24 Aug 2007, Suresh Govindachar wrote: Jan Dubois wrote: On Fri, 24 Aug 2007, Suresh Govindachar wrote: Building VIM with dynamic Perl support gives error messages such as the following: gobj/if_perl.o:if_perl.c:(.text+0x1c1f
Re: perl58.dll: Perl_sv_2iv_flags (undefined reference)
- Original Message - From: Suresh Govindachar [EMAIL PROTECTED] . . I would try adding -lperl58 to either this command (the command that builds if_perl.o): gcc -c -Iproto -DWIN32 -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 -DHAVE_PATHDEF -DFEAT_HUGE -DHAVE_GETTEXT -DHAVE_LOCALE_H -DDYNAMIC_GETTEXT -DFEAT_OLE -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG -DFEAT_GUI_W32 -DFEAT_CLIPBOARD -DFEAT_MBYTE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DDYNAMIC_ICONV -pipe -w -march=i386 -Wall -IC:\opt\perl/lib/Core -DFEAT_PERL -LC:\opt\perl/lib/Core -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\perl58.dll\ -O3 -fomit-frame-pointer -freg-struct-return -s if_perl.c -o gobj/if_perl.o or to this command (the command that builds gvim.exe) : gcc -Iproto -DWIN32 -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 -DHAVE_PATHDEF -DFEAT_HUGE -DHAVE_GETTEXT -DHAVE_LOCALE_H -DDYNAMIC_GETTEXT -DFEAT_OLE -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG -DFEAT_GUI_W32 -DFEAT_CLIPBOARD -DFEAT_MBYTE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DDYNAMIC_ICONV -pipe -w -march=i386 -Wall -IC:\opt\perl/lib/Core -DFEAT_PERL -LC:\opt\perl/lib/Core -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\perl58.dll\ -O3 -fomit-frame-pointer -freg-struct-return -s -mwindows -o gvim.exe gobj/buffer.o gobj/charset.o gobj/diff.o gobj/digraph.o gobj/edit.o gobj/eval.o gobj/ex_cmds.o gobj/ex_cmds2.o gobj/ex_docmd.o gobj/ex_eval.o gobj/ex_getln.o gobj/fileio.o gobj/fold.o gobj/getchar.o gobj/hardcopy.o gobj/hashtab.o gobj/main.o gobj/mark.o gobj/memfile.o gobj/memline.o gobj/menu.o gobj/message.o gobj/misc1.o gobj/misc2.o gobj/move.o gobj/mbyte.o gobj/normal.o gobj/ops.o gobj/option.o gobj/os_win32.o gobj/os_mswin.o gobj/pathdef.o gobj/popupmnu.o gobj/quickfix.o gobj/regexp.o gobj/screen.o gobj/search.o gobj/spell.o gobj/syntax.o gobj/tag.o gobj/term.o gobj/ui.o gobj/undo.o gobj/version.o gobj/vimrc.o gobj/window.o gobj/if_perl.o gobj/if_cscope.o gobj/netbeans.o gobj/gui.o gobj/gui_w32.o gobj/gui_beval.o gobj/os_w32exe.o gobj/if_ole.o -lkernel32 -luser32 -lgdi32 -ladvapi32 -lcomdlg32 -lcomctl32 -lversion -lwsock32 -loleaut32 -lstdc++ -lole32 -luuid Or try addding it to *both* of those commands. Your C:/opt/perl/lib/CORE/libperl58.lib should be capable of defining those references - it's surely just a matter of linking to that file. Not sure if '-lperl58' will find libperl58.lib. If it doesn't, then create a copy of C:/opt/perl/lib/CORE/libperl58.lib named C:/opt/perl/lib/CORE/libperl58.a . Cheers, Rob ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: perl58.dll: Perl_sv_2iv_flags (undefined reference)
- Original Message - From: Sisyphus [EMAIL PROTECTED] . . Your C:/opt/perl/lib/CORE/libperl58.lib should be capable of defining those references - it's surely just a matter of linking to that file. Not sure if '-lperl58' will find libperl58.lib. If it doesn't, then create a copy of C:/opt/perl/lib/CORE/libperl58.lib named C:/opt/perl/lib/CORE/libperl58.a . s/libperl58\.lib/perl58\.lib/g Cheers, Rob ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: perl58.dll: Perl_sv_2iv_flags (undefined reference)
Sisyphus suggested linking with C:/opt/perl/lib/CORE/perl58.lib (which does have the symbols in it) in the command that creates if_perl.o and/or in the command that builds gvim.exe (which is also the command that reports the missing references). But the build is supposed to use the library dynamically, rather than be statically linked. So perl58.dll must tell the linker that it will resolve the missing references at run time. Perhaps although ActiveState added code for the references, they are not exposing them to the linker for dynamic use via perl58.dll? Or is everything in a dll automatically visible? Thanks, --Suresh ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs