On Mon, May 07, 2012 at 02:28:54PM +0200, Mariusz Stakowski wrote:
Sorry about the long delay in replying. There's been several things on the go,
and I've had a few very disrupted weeks, firstly by being ill myself, and
then by having to act as "emergency babysitting service" because by then I
was the parent who *wasn't* ill.
> I will try to describe using z/OS make first.
> I started with:
>
> sh Configure
>
> I have noticed nothing special there. Here is final part of that run:
> ...
> Stripping down cppstdin path name
>
> End of configuration questions.
>
> I see a config.arch file, loading it.
>
> Stripping down executable paths...
>
> Creating config.sh...
> Hmm...You had some extra variables I don't know about...I'll try to keep
> 'em...
> Propagating recommended variable $gconvert_preference...
Yes, this all looks normal, just like on a Unix system.
> Previously I answered "y" on question concerning checking dependencies.
> And I have got
> interleaved messages.
>
> This time I run that command in background:
>
> make depend > makedepend.out &
>
> here is content of makedepend.out file:
which looks like a Unix system
> And on the screen I have got the following errors:
>
>
> PROK32:/u/prok32/local/perl_5_14_2/perl-5.14.2: >WARNING CCN3296
> ./patchlevel.h:132 #include file "git_version.h" not found.
> ERROR CCN3198 perl.c:512 #if, #else, #elif, #ifdef, #ifndef block must
> be ended with #endif.
oh, this possibly starts to make some sense. Whatever the makedepend command
is doing, it seems to be attempting to pass the C code through a C
pre-processor, and the C pre-processor is complaining that certain include
files don't exist. The files that aren't supposed to be there yet, because
they are generated by running the Makefile itself.
Maybe it's actually safe to ignore them for now, although I have no good
idea why these sorts of errors don't crop up on any other platform.
> I have run make after gmake depend with the following results:
>
> PROK32:/u/prok32/local/perl_5_14_2/perl-5.14.2: >make
> `sh cflags "optimize=''" miniperlmain.o` miniperlmain.c
> CCCMD = c89 -DPERL_CORE -c -2 -Wc,XPLINK -DMAXSIG=39 -DOEMVS
> -D_OE_SOCKETS -D_XOPEN_SOURCE_EXTENDED -D_ALL_SOURCE -DYYDYNAMIC -W
> 0,float(ieee)
> ERROR CCN3343 ./perl.h:4494 Redeclaration of PL_fold_latin1 differs from
> previous declaration on line 537 of "./utfebcdic.h".
> CCN0793(I) Compilation failed for file ./miniperlmain.c. Object file not
> created.
> FSUM3065 The COMPILE step ended with return code 12.
> FSUM3017 Could not compile miniperlmain.c. Correct the errors and try
> again.
> FSUM8226 make: Error code 3
That error starts to make some sense. The declaration of PL_fold_latin1
in perl.h is:
EXTCONST unsigned char PL_fold_latin1[];
On non-EBCDIC, perl.h defines it, starting:
EXTCONST unsigned char PL_fold_latin1[] = {
but it leaves the EBCDIC definition to utfebcdic.h, which has it as:
/* Since the EBCDIC code pages are isomorphic to Latin1, that table is merely a
* duplicate */
EXTCONST unsigned char * PL_fold_latin1 = PL_fold;
which isn't the same.
What happens if you apply this patch and try running the make again? It's
made from blead, so the line numbers are a bit out for 5.14.2, but it should
apply.
diff --git a/perl.h b/perl.h
index 798e7b7..31c407d 100644
--- a/perl.h
+++ b/perl.h
@@ -4476,8 +4476,10 @@ EXTCONST unsigned char PL_mod_latin1_uc[] = {
248-32, 249-32, 250-32, 251-32, 252-32, 253-32, 254-32, 255
};
#else /* ! DOINIT */
+#ifndef EBCDIC
EXTCONST unsigned char PL_fold[];
EXTCONST unsigned char PL_fold_latin1[];
+#endif
EXTCONST unsigned char PL_mod_latin1_uc[];
EXTCONST unsigned char PL_latin1_lc[];
#endif
diff --git a/utfebcdic.h b/utfebcdic.h
index ec7a376..977e6e3 100644
--- a/utfebcdic.h
+++ b/utfebcdic.h
@@ -522,6 +522,10 @@ EXTCONST unsigned char PL_fold[] = { /* fast EBCDIC case
folding table, 'A' =>
};
#endif /* 037 */
+/* Since the EBCDIC code pages are isomorphic to Latin1, that table is merely a
+ * duplicate */
+EXTCONST unsigned char * PL_fold_latin1 = PL_fold;
+
#else
EXTCONST unsigned char PL_utf8skip[];
EXTCONST unsigned char PL_e2utf[];
@@ -529,12 +533,9 @@ EXTCONST unsigned char PL_utf2e[];
EXTCONST unsigned char PL_e2a[];
EXTCONST unsigned char PL_a2e[];
EXTCONST unsigned char PL_fold[];
+EXTCONST unsigned char * PL_fold_latin1;
#endif
-/* Since the EBCDIC code pages are isomorphic to Latin1, that table is merely a
- * duplicate */
-EXTCONST unsigned char * PL_fold_latin1 = PL_fold;
-
END_EXTERN_C
/* EBCDIC-happy ways of converting native code to UTF-8 */
Nicholas Clark