Subject: Re: Compiling Perl under b20.1
From: Sebastien Barre <[email-masked]>
To: Charles Wilson <[email-masked]>
Cc: Allan Peda <[email-masked]>, Cygwin Mailing List <[email-masked]>
Date: Sat, 06 Mar 1999 11:49:17 +0100

At 16:13 05/03/99 -0500, Charles Wilson wrote:

>I've taken Sebastien Barre's suggestions and Steven Morlock's instructions and
>successfully compiled perl5.005_02 under Cygwin B20.1 and WinNT4sp4. I took
>all their suggestions and created a patch file and collected the instructions
>together in the attached package (6kB).

Very good, thanks !. I tested it, and it works. After applying the patch,
one might have to change his paths in hints/cygwin32.sh, otherwise it's
perfect.

>Please comment on both the collected build instructions and the binary
>distribution.

*) Steven Morlock  published TWO articles (a correction to the first one),
but you did not include the second one (which is related to binary mode). 

Re: HOWTO: Builiding Perl under Win95/98 using Cygwin32  
Author: Steven Morlock <[email-masked]>
Date: 1998/12/22
Forum: comp.lang.perl.misc 

It's not that important because you included the modification in your patch :

+ #if defined(__CYGWIN32__)
+   /* USEMYBINMODE
...

*) I also forgot to mention this article :

     To: [email-masked] 
     Subject: configure and cpp problem (Was: bug: missing include files in
B20.1) 
     From: Teun Burgers <[email-masked]> 
     Date: Mon, 22 Feb 1999 16:52:09 +0100 

But I seems to me the one DO NOT need it (but I kept it, just in case). You
might have a look anyway.

*) Furthermore, I'd just add that I had some problems while building perl
if source files were extracted in a binary mounted partition. BUT I also
read some testimony regarding the contrary (i.e. you need to mount it as
binary) ! Therefore, It's just a hint, but if you experience some problems
(sadly, I forgot to save the error messages), try different mount mode.

*) make test

Here is the result after applying your modifications :

> make test
Failed 7 test scripts out of 186, 91.40% okay.

>cd t
>perl harness

Failed Test  Status Wstat Total Fail  Failed  List of failed
-------------------------------------------------------------------------------
io/fs.t                      26    4  15.38%  5, 7, 9-10
lib/anydbm.t      2   512    12    9  75.00%  2, 5-12
lib/findbin.t                 1    1 100.00%  1
lib/sdbm.t        2   512    18   15  83.33%  2, 5-18
op/magic.t                   35    1   2.86%  23
op/stat.t                    58    6  10.34%  2, 9, 19-20, 26, 35
op/taint.t                  149    3   2.01%  1, 3, 31
9 tests skipped, plus 20 subtests skipped.
Failed 7/186 test scripts, 96.24% okay. 39/6193 subtests failed, 99.37% okay.

(anydbm and sdbm might be different if you mounted your partition as binary).

Some of them just fail because they should NOT be executed in a win32
implementation. They should be skipped. Sadly, the test behind this does
NOT handle cygwin32 environment, just plain MS32 by comparing OS name to
MSWin32 ($^O eq 'MSWin32'). Let's add a test for cygwin ($^O =~ /cygwin/).
Here is a couple of tests I think that might be patched (I could not do
anything for magic.t, as well as stat.t, which is a known problem) :

diff -urN perl5.005_02/t/io/fs.t.orig perl5.005_02/t/io/fs.t
--- perl5.005_02/t/io/fs.t.orig	Sat Mar 06 12:18:26 1999
+++ perl5.005_02/t/io/fs.t	Sat Mar 06 12:18:31 1999
@@ -12,7 +12,7 @@
 $Is_Dosish = ($^O eq 'dos' or $^O eq 'os2');
 
 # avoid win32 (for now)
-do { print "1..0\n"; exit(0); } if $^O eq 'MSWin32';
+do { print "1..0\n"; exit(0); } if $^O eq 'MSWin32' || $^O =~ /cygwin/;
 
 print "1..26\n";
 
diff -urN perl5.005_02/t/lib/anydbm.t.orig perl5.005_02/t/lib/anydbm.t
--- perl5.005_02/t/lib/anydbm.t.orig	Sat Mar 06 12:22:30 1999
+++ perl5.005_02/t/lib/anydbm.t	Sat Mar 06 12:23:04 1999
@@ -22,7 +22,7 @@
 if (! -e $Dfile) {
 	($Dfile) = <Op_dbmx*>;
 }
-if ($^O eq 'amigaos' || $^O eq 'os2' || $^O eq 'MSWin32' || $^O eq 'dos') {
+if ($^O eq 'amigaos' || $^O eq 'os2' || $^O eq 'MSWin32' || $^O eq 'dos'
|| $^O =~ /cygwin/) {
     print "ok 2 # Skipped: different file permission semantics\n";
 }
 else {
diff -urN perl5.005_02/t/lib/sdbm.t.orig perl5.005_02/t/lib/sdbm.t
--- perl5.005_02/t/lib/sdbm.t.orig	Sat Mar 06 12:27:04 1999
+++ perl5.005_02/t/lib/sdbm.t	Sat Mar 06 12:27:10 1999
@@ -27,7 +27,7 @@
 if (! -e $Dfile) {
 	($Dfile) = <Op_dbmx.*>;
 }
-if ($^O eq 'amigaos' || $^O eq 'os2' || $^O eq 'MSWin32' || $^O eq 'dos') {
+if ($^O eq 'amigaos' || $^O eq 'os2' || $^O eq 'MSWin32' || $^O eq 'dos'
|| $^O =~ /cygwin/) {
     print "ok 2 # Skipped: different file permission semantics\n";
 }
 else {

(these patch might be just added to your perl.patch and used with patch -p1).

> make test
Failed 6 test scripts out of 186, 91.40% okay.

> cd t
> perl harness

Failed Test  Status Wstat Total Fail  Failed  List of failed
-------------------------------------------------------------------------------
lib/anydbm.t      2   512    12    8  66.67%  5-12
lib/findbin.t                 1    1 100.00%  1
lib/sdbm.t        2   512    18   14  77.78%  5-18
op/magic.t                   35    1   2.86%  23
op/stat.t                    58    6  10.34%  2, 9, 19-20, 26, 35
op/taint.t                  149    3   2.01%  1, 3, 31
10 tests skipped, plus 22 subtests skipped.
Failed 6/186 test scripts, 96.77% okay. 33/6167 subtests failed, 99.46% okay.

Which is slightly better :)

Hope it helps

______________________________________________________________
Sebastien Barre                  http://www.hds.utc.fr/~barre/

--
Want to unsubscribe from this list?
Send a message to [email-masked]