In his Wiki (http://wiki.kn.vutbr.cz/mj/index.cgi?Build%20Parrot%20with%20MinGW), Michal Juroz lists 3 ways for building Parrot :
1) Build Parrot with MinGW, MSYS and MSYS-DTK
2) Build Parrot with MinGW and ActiveState Perl
3) Build Parrot with MinGW-Perl (Build Perl with MinGW first)
There is a fondamental difference between the first and the two others. MinGW is only the GNU toolsets (gcc, gdb, make) for MSWin32, but MSYS is an emulation box with shell and standard Unix command. MSYS-DTK contains a Perl 5.6.1 distribution that gives $ perl -e "print $^O" msys MSYS is like cygwin, but lightweight.
Someone wants work on MSYS, and someone wants work without MSYS.
With only MinGW, the way 3 is the safest and easier but longest (need build Perl).
The built Perl allows to grab correct configuration.
The way 2 is the best for the future because ActiveState Perl is the most popular distribution on MSWin32.
But today, this way is hazardous, because the configuration is complicated (a lot of option) and incomplete.
See Márton Papp thread.
Most of options grabed in ActiveState Perl are wrong, so there must be patched by config/init/hints/mswin32.pl
But after comparing lib/Parrot/Config.pm (or config_lib.pasm) produced by these 2 ways, I could propose a patch of mswin32.pl
With it, the way 2 configuration is only :
perl Configure.pl --cc=gcc --ICU_stuff
I obtain the same result with way 2 and 3 :
building OK, except dynclasses, and install is incomplete ( .exe, .dll are not copied).
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/dynclass/pybuiltin.t 5 1280 6 5 83.33% 1-2 4-6 t/dynclass/pyclass.t 6 1536 6 6 100.00% 1-6 t/dynclass/pycomplex.t 1 256 1 1 100.00% 1 t/dynclass/pyfunc.t 4 1024 4 4 100.00% 1-4 t/dynclass/pyint.t 25 6400 25 25 100.00% 1-25 t/pmc/nci.t 55 14080 56 55 98.21% 1-55 t/pmc/sys.t 1 256 1 1 100.00% 1 5 tests and 69 subtests skipped. Failed 7/135 test scripts, 94.81% okay. 97/2204 subtests failed, 95.60% okay.
For the way 1, I am disagree with the Michal's proposition of merging mswin32.pl and cygwin.pl.
The factorization of this kind of code is not a good idea at this early stage of development.
A contrario, I propose the creation of a new file msys.pl that handles the way 1 (MSYS is a platform like cygwin).
I creat a first version of this file.
With it, the configuration is only :
perl Configure.pl --ICU_stuff
I obtain : building OK, except dynclasses, and install is incomplete ( .exe, .dll are not copied).
Failed Test Status Wstat Total Fail Failed List of Failed
--------------------------------------------------------------------------------
imcc/t/imcpasm/opt1.t 1 256 49 1 2.04% 48 imcc/t/syn/file.t 1 256 12 1 8.33% 11 t/dynclass/pybuiltin.t 5 1280 6 5 83.33% 1-2, 4-6 t/dynclass/pyclass.t 6 1536 6 6 100.00% 1-6 t/dynclass/pycomplex.t 1 256 1 1 100.00% 1 t/dynclass/pyfunc.t 4 1024 4 4 100.00% 1-4 t/dynclass/pyint.t 25 6400 25 25 100.00% 1-25 t/pmc/nci.t 55 14080 56 55 98.21% 1-55 t/pmc/object-meths.t 27 1 3.70% 19 t/pmc/objects.t 59 2 3.39% 53, 57 t/pmc/sys.t 1 256 1 1 100.00% 1 5 tests and 68 subtests skipped. Failed 11/135 test scripts, 91.85% okay. 102/2204 subtests failed, 95.37% okay.
Francois Perrad.
--- mswin32.pl.oirg 2005-02-21 11:56:08.000000000 +0100 +++ mswin32.pl 2005-03-15 23:46:16.000000000 +0100 @@ -1,3 +1,6 @@ +# Copyright: 2005 The Perl Foundation. All Rights Reserved. +# $Id: mswin32.pl $ + { my %args; @[EMAIL PROTECTED]@_; @@ -139,12 +142,33 @@ ); } elsif( $is_mingw ) { - $libs='' if $libs =~ /\.lib\s/i; - Configure::Data->set( - link => 'gcc', - libs => $libs, - slash => '/', - ar => 'ar', - ); + my $make=Configure::Data->get(qw(make)); + if ($make =~ /nmake/i) { + # ActiveState Perl + Configure::Data->set( + 'a' => '.a', + 'ar' => 'ar', + 'cc' => 'gcc', + 'ccflags' => '-s -O2 -DWIN32 ', + 'cp' => 'copy', + 'ld' => 'g++', + 'ld_load_flags' => '-mdll -s ', + 'ld_share_flags' => '-mdll -s ', + 'ldflags' => '-s ', + 'libs' => '-lmsvcrt -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 ', + 'link' => 'gcc', + 'linkflags' => '-s ', + 'make' => 'mingw32-make', + 'o' => '.o', + ); + } elsif ($make =~ /dmake/i) { + # mingw Perl + Configure::Data->set( + 'cp' => 'copy', + 'make' => 'mingw32-make', + ); + } else { + warn "unknown configuration"; + } } }
# Copyright: 2005 The Perl Foundation. All Rights Reserved. # $Id: msys.pl $
{ my %args; @[EMAIL PROTECTED]@_; Configure::Data->set( ld => '$(PERL) /bin/perlld', libs => '-lmsvcrt -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 ', ncilib_link_extra => '-def:src/libnci_test.def', ); }