Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Different ways for MinGW

8 views
Skip to first unread message

François PERRAD

unread,
Mar 16, 2005, 6:16:16 AM3/16/05
to perl6-i...@perl.org

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.patch
msys.pl

Leopold Toetsch

unread,
Mar 18, 2005, 3:47:32 AM3/18/05
to François PERRAD, perl6-i...@perl.org
François PERRAD <francoi...@gadz.org> wrote:

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

Aha. That explains the various troubles, people were talking about
different MinGW builds.

Thanks, applied.
leo

PS: please read docs/submissions.pod "How To Submit A Patch" - thanks
(I almost missed this patch)

Nick Glencross

unread,
Mar 20, 2005, 12:28:28 PM3/20/05
to perl6-i...@perl.org
Leopold Toetsch wrote:
> François PERRAD <francoi...@gadz.org> wrote:
>
>
>>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)
>
>
> Aha. That explains the various troubles, people were talking about
> different MinGW builds.

Additionally, to further complicate matters, it's also possible to
create MingGW builds using cygwin (by adding --host=i386-pc-mingw32
--build=i386-pc-mingw32 -mno-cygwin mms-bitfields). I'm pretty sure that
this could be used as an alternative to 1) and 3), but don't have any
experience with 2).

Nick

Michal Jurosz

unread,
Mar 21, 2005, 7:19:07 AM3/21/05
to perl6-i...@perl.org
conf/init/hints/msys.pl
Configure::Data->set(
ld => '$(PERL) /bin/perlld',

dynclasses/build.pl
our $LD = qq[$(PERL) /bin/perlld];

test.pl
our $LD = qq[$(PERL) /bin/perlld]; print "'$LD'\n";
our $LD = qw[$(PERL) /bin/perlld]; print "'$LD'\n";
test.pl output:
'0PERL) /bin/perlld'
'$(PERL) /bin/perlld'

MSYS build: CVS + dynclasses/build.pl hacks:
our $LD = qq[/bin/perl /bin/perlld];
our $LIBPARROT = qq[../src/pmc.o ../src/extend.o ../src/string.o
../src/inter_run.o ../src/string_primitives.o
/c/usr/lib/icu/lib/icudata.lib /c/usr/lib/icu/lib/icuuc.lib
../blib/lib/libparrot.a /mingw/lib/libwsock32.a];

Failed Test Status Wstat Total Fail Failed List of Failed
--------------------------------------------------------------------------------

t/dynclass/foo.t 1 256 1 1 100.00% 1


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/native_pbc/integer.t 1 256 1 1 100.00% 1
t/native_pbc/number.t 1 256 1 1 100.00% 1
t/op/spawnw.t 2 512 3 2 66.67% 2-3
t/pmc/objects.t 60 2 3.33% 53, 57


t/pmc/sys.t 1 256 1 1 100.00% 1

5 tests and 66 subtests skipped.
Failed 11/139 test scripts, 92.09% okay. 49/2225 subtests failed, 97.80%
okay.


mingw32-make + ActivePerl build: CVS + dynclasses/build.pl hack:
our $LIBPARROT = qq[..\\src\\pmc.o etc.

Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------

t/dynclass/foo.t 1 256 1 1 100.00% 1


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/op/spawnw.t 2 512 3 2 66.67% 2-3
t/pmc/nci.t 51 13056 56 51 91.07% 1-10 12-52


t/pmc/sys.t 1 256 1 1 100.00% 1

5 tests and 66 subtests skipped.
Failed 9/139 test scripts, 93.53% okay. 96/2225 subtests failed, 95.69%
okay.

MSYS build: CVS + dynclasses/build.pl( our $LIBPARROT = ) +
conf/init/hints/msys.pl changes:
ld => 'g++',
ld_load_flags => '-mdll -s ',
ld_share_flags => '-mdll -s ',
ldflags => '-s ',

Failed Test Status Wstat Total Fail Failed List of Failed
--------------------------------------------------------------------------------

t/dynclass/foo.t 1 256 1 1 100.00% 1


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/native_pbc/integer.t 1 256 1 1 100.00% 1
t/native_pbc/number.t 1 256 1 1 100.00% 1
t/op/spawnw.t 2 512 3 2 66.67% 2-3
t/pmc/nci.t 51 13056 56 51 91.07% 1-10, 12-52
t/pmc/objects.t 60 2 3.33% 53, 57


t/pmc/sys.t 1 256 1 1 100.00% 1

5 tests and 66 subtests skipped.
Failed 12/139 test scripts, 91.37% okay. 100/2225 subtests failed,
95.51% okay.

S pozdravem Michal Jurosz

0 new messages