Compiling Perl under b20.1

Charles Wilson cwilson@ee.gatech.edu
Sat Mar 6 10:27:00 GMT 1999


Sebastien Barre wrote:

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

Yeah, that's true. The "build-instructions" were more in the nature of "here's how
I built the binary kit" than a general guide. BTW, did you apply the patch to a
pristine copy of the source, or had you already applied the changes from Teun
Burgers (below)?

> >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 <newspost@morlock.net>
> 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
> ...

Oops. I'll go grab that usenet posting and stick it in the build instruction kit.

> *) I also forgot to mention this article :
>
>      To: cygwin@sourceware.cygnus.com
>      Subject: configure and cpp problem (Was: bug: missing include files in
> B20.1)
>      From: Teun Burgers <burgers@ecn.nl>
>      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.

Hmmm....here's the relevant part of Teun Burgers' post:

> The configure script (relevant part in fhdr.old) creates
> a script findhdr that looks for the header file. findhr first
> simply tests for existance (test -f) of the .h file in
> H-i586-cygwin32/i586-cygwin32/include and if not found there
> it uses the C preprocessor gcc -E -.
>
Except the script says "$usrinc/\$wanted" which fails for a different reason on my
system: $usrinc is a pathlist, not a single path. However, this doesn't seem to
cause a problem, because the second step works....

>
> Because stdarg.h is not found in the first step it must be found
> in the second step. This second step goes wrong for two reasons:
>
> 1) the shell scripts tests whether the expanded include file
>    name by gcc -E matches */stdarg.h. This test fails because
>    gcc returns a DOS filename with \ e.g.
>    d:\\cygnus\\cygwin-b20  etc, so it does not match.
>
The egcs-1.1.1 returns
"F:/cygnus/cygwin-b20/usr/bin/../lib/gcc-lib/i586-cygwin32/egcs-2.91.60/include/stdarg.h"
so the match succeeds. However, the correction to the search regex will work in
both cases.

>
>    There are two solutions:
>    - change the matching condition in findhdr from
>      */stdarg.h  to  *[/\\]stdarg.h
>    - make gcc -E - return a unixy file name
>
> 2) Even with this test fixed it still goes wrong.
>    This seems to be a bug in the configure script.
>    The configure scripts sets variable name in a while
>    loop that is the end of a pipe. Because the while is
>    in a pipe, it runs in a subshell and variable settings
>    are local to that subshell.
>
????. I understand the theory, but my build seemed to work okay. However, I don't
see how including Mr. Burgers' fixes will hurt anything, so I'll go ahead an add
them to the "patch", unless anyone can think of a good reason not to.

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

I extracted into a binary mounted partition. My *guess* is that you might have
used WinZip or somesuch to extract the source. If WinZip converted all newlines to
\013\010, AND the partition was mounted binary, then that would cause problems.

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

Yup, they are different. Here's my output, *without* your changes to the testing
scripts.

>make test
Failed 4 test scripts out of 186, 92.47% okay.
>cd t
>perl harness

Failed Test  Status Wstat Total Fail  Failed  List of failed
-------------------------------------------------------------------------------
lib/findbin.t                 1    1 100.00%  1
op/magic.t                   35    1   2.86%  23
op/stat.t                    58    2   3.45%  4, 35
op/taint.t                  149    3   2.01%  1, 3, 31
10 tests skipped, plus 20 subtests skipped.
Failed 4/186 test scripts, 97.85% okay. 7/6191 subtests failed, 99.89% okay.

(skipped tests: lib/thread, lib/posix, lib/odbm, lib/ndbm, lib/ipc_sysv, lib/gdbm,
lib/db-recno, lib/db-hash, lib/db-btree, op/groups)

Now, all three of your patches address problems I didn't see; the main difference
between us being binary vs. text mounts. If that is the case, should these tests
be skipped for all cygwin (binary and text mount) or should the tests be fixed so
that they work for both binary and text mounts? I'm not sure if the second option
means hacking the test scripts, or hacking perl itself.

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

--Chuck


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com



More information about the Cygwin mailing list