On Tue, Apr 17, 2012 at 04:57:43PM +0200, Mariusz Stakowski wrote:
> Hello list,
>
> I finally tried to compile perl on z/OS. I have taken perl
> 5.14.2 source. I have encountered errors during configuration stage. There
> might be my faults - I have read INSTALL and README but I am not sure if I
> have given right parameters. It is possible that my system needs some
> configuration too. I would appreciate some help in making it working. I
> have no groff yet but this is not a big problem I think.
Thanks for trying this, and reporting back.
I'm going to inline at least part of your file conf.errors, indented 4
spaces, as it's *very* strange, with comments on the left margin.
This is it, *in order*:
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.
FSUM3065 The COMPILE step ended with return code 12.
FSUM3017 Could not compile .83886901.c. Correct the errors and try again.
Finding dependencies for perly.o.
ERROR CCN3202 perly.c:86 #endif can only appear at the end of a #if,
#elif, #ifdef or #ifndef block.
FSUM3065 The COMPILE step ended with return code 12.
FSUM3017 Could not compile .67109688.c. Correct the errors and try again.
Finding dependencies for pp.o.
Finding dependencies for pp_hot.o.
Finding dependencies for pp_ctl.o.
Finding dependencies for pp_sys.o.
This suggests two problems:
1) more than one make process running in parallel
You shouldn't be seeing all these "Finding dependencies for ..." lines
interspersed with compiling output. The "Finding dependencies" should
complete before any compiling starts
2) each make process ignoring any sort of dependency rules
In that, there's a dependency from perl.o on git_version.h, so why is
the make utility ignoring it, and attempting to compile perl.c
generating git_version.h?
In fact, is there a Makefile at all? Or is a make utility getting ahead
of itself and attempting to use default .c to .o rules to compile every
.c file it can see?
ERROR CCN3010 ./time64.c:479 Macro PeRl_CaTiFy invoked with a null
argument for parameter a.
ERROR CCN3010 ./time64.c:479 Macro PeRl_CaTiFy invoked with a null
argument for parameter a.
FSUM3065 The COMPILE step ended with return code 12.
FSUM3017 Could not compile .83886910.c. Correct the errors and try again.
Finding dependencies for regcomp.o.
ERROR CCN3213 regcomp.c:275 Macro name TRIE_TYPE_IS_SAFE cannot be
redefined.
FSUM3065 The COMPILE step ended with return code 12.
FSUM3017 Could not compile .67109692.c. Correct the errors and try again.
Finding dependencies for regexec.o.
ERROR CCN3287 regexec.c:36 The parameter list on the definition of macro
_CCC_TRY_NONLOCALE is not complete.
ERROR CCN3287 regexec.c:37 The parameter list on the definition of macro
CCC_TRY is not complete.
ERROR CCN3287 regexec.c:38 The parameter list on the definition of macro
CCC_TRY_U is not complete.
ERROR CCN3287 regexec.c:70 The parameter list on the definition of macro
REXEC_TRIE_READ_CHAR is not complete.
FSUM3065 The COMPILE step ended with return code 12.
FSUM3017 Could not compile .83886915.c. Correct the errors and try again.
Finding dependencies for utf8.o.
Finding dependencies for sv.o.
Finding dependencies for taint.o.
Finding dependencies for toke.o.
Finding dependencies for util.o.
Finding dependencies for deb.o.
Finding dependencies for run.o.
Finding dependencies for universal.o.
Finding dependencies for pad.o.
Finding dependencies for globals.o.
WARNING CCN3296 ./perl.h:4315 #include file "uudmap.h" not found.
WARNING CCN3296 ./perl.h:4318 #include file "bitcount.h" not found.
Again, these two files should have been generated before they are included.
Makefile dependencies to ensure this are being ignored.
FSUM3065 The COMPILE step ended with return code 4.
Finding dependencies for keywords.o.
Finding dependencies for perlio.o.
Finding dependencies for perlapi.o.
Finding dependencies for numeric.o.
Finding dependencies for mathoms.o.
Finding dependencies for locale.o.
Finding dependencies for pp_pack.o.
ERROR CCN3294 pp_pack.c:115 Syntax error in expression on #if directive.
Line 115 of pp_pack.c in perl 5.14.2 is this:
#define SIZE32 4
That's not even an #if directive. Which file is the compiler actually
seeing? If it is seeing the right pp_pack.c, why is its diagnostic output
confused?
FSUM3065 The COMPILE step ended with return code 12.
FSUM3017 Could not compile .67109729.c. Correct the errors and try again.
Finding dependencies for pp_sort.o.
Finding dependencies for miniperlmain.o.
Finding dependencies for opmini.o.
Finding dependencies for perlmini.o.
WARNING CCN3296 ./patchlevel.h:132 #include file "git_version.h" not
found.
ERROR CCN3198 perlmini.c:512 #if, #else, #elif, #ifdef, #ifndef block
must be ended with #endif.
FSUM3065 The COMPILE step ended with return code 12.
FSUM3017 Could not compile .67109737.c. Correct the errors and try again.
echo Makefile.SH cflags.SH config_h.SH makedepend.SH myconfig.SH
pod/Makefile.SH | tr ' ' '\n' >.shlist
Updating makefile...
cd x2p; make depend
sh ../makedepend MAKE=make
echo hash.c str.c util.c walk.c | tr ' ' '\n' >.clist
Finding dependencies for hash.o.
Finding dependencies for str.o.
Finding dependencies for util.o.
Finding dependencies for walk.o.
echo Makefile.SH cflags.SH | tr ' ' '\n' >.shlist
Updating makefile...
Now you must run 'make'
What's *supposed* to happen is
1: user runs ./Configure, which ends up generating config.sh
2: ./Configure uses values in config.sh to run all the files *.SH,
which are shell scripts that extract various other files. In particular,
Makefile.SH extracts Makefile, and makedepend.SH extracts makedepend
3: ./Configure (by default) runs makedepend. However, there's also a
dependency rule in Makefile to make this happen.
makedepend processes Makefile and generates makefile.
(it's makedepend which is outputting all those "Finding dependencies" lines)
makefile is simply Makefile with a lot of dependency rules concatenated
on the end.
4: *At this point* user runs make
make picks 'makefile' as the file to read ('Makefile' is second choice)
and runs with it. For a clean build, it doesn't actually matter if it got
'Makefile' instead, because dependency rules only matter if rebuilding
after editing source files.
What seems to be happening is
a) make running at the same time as makedepend
b) make not even bothering act on the dependency rules in the Makefile
which makes me wonder - is make even reading 'Makefile'?
So
1: Which make program are you using? GNU make, or the system supplied make?
2: What's the default filename that the make program tries to read?
3: What happens if you re-run make at this point?
Does it now pick up on the correct Makefile?
4: If not, what happens if you run
make -f Makefile
? Does that work?
Nicholas Clark