2013/02/21 Thu 5:33:45 UTC+9 Heptite wrote:
> 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.
There are some solutions for this problem:
1. Use Make_cyg.mak instead of Make_ming.mak and use Unix-style paths:
$ make -f Make_cyg.mak PERL=/cygdrive/c/strawberry/perl
2. Use Make_ming.mak and use Windows-like paths:
$ make -f Make_ming.mak PERL=c:/strawberry/perl
> 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.
I think 'CXX=$(CROSS_COMPILE)g++' is the default.
BTW, Make_cyg.mak and Make_ming.mak do the almost same thing.
(Make_cyg.mak has a option 'USEDLL' which Make_ming.mak doesn't have,
but USEDLL=yes doesn't seem to work anymore.)
I'm wondering that Make_cyg.mak can be merged into Make_ming.mak.
It's hard to maintain the two almost same files.
Regards,
Ken Takata
2013/02/21 Thu 7:50:35 UTC+9 Heptite wrote:
> I used to build using Make_cyg.mak but stopped in recent months
> because it no longer worked for me when including one of the scripting
> interpreters. I include Perl, Python and Ruby, but I can't remember
> which broke. About the same time Make_ming.mak _started_ working for
> me when it didn't before.
Maybe it is Ruby. Make_cyg.mak was changed in 7.3.815.
Now, RUBY_API_VER must be specified as same as Make_ming.mak
when you use Ruby. The default compiler was also changed from
'gcc' to 'i686-pc-mingw32-gcc'.
You might write your command line so that other people can reproduce
it easily.
Regards,
Ken Takata
2013/02/22 Fri 6:21:09 UTC+9 Heptite wrote:
> make -f Make_cyg.mak -j2 PERL=/cygdrive/c/strawberry/perl \
> RUBY=/cygdrive/c/Ruby193 RUBY_PLATFORM=i386-mingw32 POSTSCRIPT=yes \
> DYNAMIC_PERL=yes PYTHON=/cygdrive/c/Python27 OLE=yes XPM=xpm \
> FEATURES=BIG
I couldn't compile with this command.
Versions of interpreters should be specified like the following:
$ make -f Make_cyg.mak -j2 PERL=/cygdrive/c/strawberry/perl \
RUBY=/cygdrive/c/Ruby193 POSTSCRIPT=yes DYNAMIC_PERL=yes \
PYTHON=/cygdrive/c/Python27 OLE=yes XPM=xpm FEATURES=BIG \
RUBY_VER=19 RUBY_VER_LONG=1.9.1 PYTHON_VER=27 PERL_VER=516
But I still got the following error:
/usr/lib/gcc/i686-pc-mingw32/4.5.2/../../../../i686-pc-mingw32/bin/ld: cannot find -lXpm
collect2: ld returned 1 exit status
Make_cyg.mak:575: recipe for target `gvim.exe' failed
make: *** [gvim.exe] Error 1
After I removed 'XPM=xpm' from the command line, I could build gvim.exe.
(I didn't notice that Make_cyg.mak could not build with the bundled XPM library.)
> gobj/eval.o:eval.c:(.text+0x38d4): undefined reference to `_pow'
Oh, this error comes again!?
I have no idea with this error.
Regards,
Ken Takata