On Thu, Feb 7, 2013 at 12:44 PM, Christian J. Robinson
 <hept...@gmail.com> wrote:
>
> I think one of the patches since 804 has broken something, because I
> can't get a working gvim with Perl using Make_ming.mak--it fails
> during linking:
>
> gobji386/buffer.o:buffer.c:(.text+0x10aa): undefined reference to 
> `_perl_buf_free'
[...]
> collect2: ld returned 1 exit status
> Make_ming.mak:683: recipe for target `gvim.exe' failed
> make: *** [gvim.exe] Error 1

I have determined that this error was because if_perl.c was zero
length.  I removed it and tried again, which produced these errors:

perl /cygdrive/c/strawberry/perl/lib/ExtUtils/xsubpp -prototypes -typemap \
     /cygdrive/c/strawberry/perl/lib/ExtUtils/typemap if_perl.xs > if_perl.c
Can't find /cygdrive/c/strawberry/perl/lib/ExtUtils/typemap in
/home/Heptite/src/vim/src
Make_ming.mak:757: recipe for target `if_perl.c' failed

This led me to realizing that the rule for generating if_perl.c is
broken when trying to build with Cygwin's mingw installation.  The
problem is that it leaves behind a zero length if_perl.c which is then
assumed to be valid on later attempts to build, which is why I was
getting the errors I originally posted.

I had to change the if_perl.c rule in Make_ming.mak to the following
to get a clean build:

if_perl.c: if_perl.xs typemap
        $(XSUBPP) -prototypes -typemap \
             `cygpath -w $(PERLLIB)/ExtUtils/typemap` if_perl.xs > $@

As you can see, cygwin likes Unix paths, but this is calling a native
Windows Perl installation's xsubpp, which expects a native Windows
pathname to typemap, so it has to be converted.

This is not an optimal solution; I think there needs to be some kind
of logic to allow people using Cygwin's mingw plus a native Windows
Perl installation.

I also had to tweak GvimExt/Make_ming.mak to change CXX from
$(CROSS_COMPILE)g++-3  to  $(CROSS_COMPILE)g++, in case anybody else
is having troulble getting GvimExt to compile with a build environment
similar to mine.

- Christian

-- 
Christian J. Robinson <hept...@gmail.com>

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Raspunde prin e-mail lui