Subject: Compiling Perl 4.x
To: None <port-mac68k@NetBSD.ORG>
From: Mark Andres <mark@giganet.net>
List: port-mac68k
Date: 01/04/1997 22:52:41
I am having some problems compiling Perl version 4.036.  Has anyone
sucessfully compiled it for NetBSD/mac68k?  I downloaded a binary set for
Perl version 5.x, but it has some problems.  When I try and go through some
of the examples in the camel book (_Programming perl_) which is written for
version 4.x, some of the same scripts do not run.  In particular, arrays do
not seem to work properly.

So I downloaded the set for perl 4.036.  I ran Configure and did make
depend.  When I do a make, I get a lot of error involving `ALIGNBYTES'
being redefined.  Here is the tail of the error output:

----
[blah blah]
`sh  cflags cmd.o` cmd.c
          CCCMD =  gcc -c
In file included from /usr/include/sys/param.h:91,
                 from perl.h:141,
                 from cmd.c:35:
/usr/include/machine/param.h:100: warning: `ALIGNBYTES' redefined
config.h:38: warning: this is the location of the previous definition
`sh  cflags cons.o` cons.c
          CCCMD =  gcc -c
In file included from /usr/include/sys/param.h:91,
                 from perl.h:141,
                 from cons.c:36:
/usr/include/machine/param.h:100: warning: `ALIGNBYTES' redefined
config.h:38: warning: this is the location of the previous definition
`sh  cflags consarg.o` consarg.c
          CCCMD =  gcc -c
In file included from /usr/include/sys/param.h:91,
                 from perl.h:141,
                 from consarg.c:35:
/usr/include/machine/param.h:100: warning: `ALIGNBYTES' redefined
config.h:38: warning: this is the location of the previous definition
`sh  cflags doarg.o` doarg.c
          CCCMD =  gcc -c
In file included from /usr/include/sys/param.h:91,
                 from perl.h:141,
                 from doarg.c:61:
/usr/include/machine/param.h:100: warning: `ALIGNBYTES' redefined
config.h:38: warning: this is the location of the previous definition
`sh  cflags doio.o` doio.c
          CCCMD =  gcc -c
In file included from /usr/include/sys/param.h:91,
                 from perl.h:141,
                 from doio.c:52:
/usr/include/machine/param.h:100: warning: `ALIGNBYTES' redefined
config.h:38: warning: this is the location of the previous definition
In file included from doio.c:55:
/usr/include/sys/socket.h:97: warning: `AF_LOCAL' redefined
arg.h:685: warning: this is the location of the previous definition
doio.c:2640: unterminated `#if' conditional
*** Error code 1

Stop.
----

The instructions for perl say that if you have problems, you should compile
using the -DCRIPPLED_CC flag which I did.  However, I did not get very far,
as this is the error output.

----
ratbert# make
`sh  cflags perly.o` perly.c
          CCCMD =  gcc -c -DCRIPPLED_CC
In file included from /usr/include/sys/param.h:91,
                 from perl.h:141,
                 from perly.y:41:
/usr/include/machine/param.h:100: warning: `ALIGNBYTES' redefined
config.h:38: warning: this is the location of the previous definition
In file included from perly.y:41:
perl.h:966: stray '\' in program
perl.h:966: warning: data definition has no type or storage class
perl.h:967: stray '\' in program
perl.h:967: warning: data definition has no type or storage class
*** Error code 1

Stop.
----

If anyone has successfully compiled this version of perl, I would
appreciate any pointers on how to get this thing to work.  A copy of your
config.sh would be really great.

Mark