Re: 1.0.16 won't compile on OS X 10.4.11

[email protected] (Richard Clamp) Tue, 18 Dec 2007 09:14:46 +0000
Newsgroups perl.perl1.porters
Message-ID <[email protected]>
On 18 Dec 2007, at 04:48, Michael G Schwern wrote:

> In anticipation of perl's 20th I tried to compile up perl1.  I ran =20
> into
> problems during make.
>
> $ make
> cc -c -pipe -fno-common -DINT32_MIN_BROKEN -DINT64_MIN_BROKEN -no-=20
> cpp-precomp
> -I/usr/local/include -I/opt/local/include -I/sw/include -O  arg.c
> In file included from arg.c:33:
> perl.h:67: error: conflicting types for =91sprintf=92
> perl.h:67: note: a parameter list with an ellipsis can=92t match an =20=

> empty
> parameter name list declaration
> arg.c: In function =91do_open=92:
> arg.c:319: warning: incompatible implicit declaration of built-in =20
> function
> =91strlen=92
> arg.c: In function =91do_exec=92:
> arg.c:826: warning: incompatible implicit declaration of built-in =20
> function =91index=92
> arg.c:827: warning: incompatible implicit declaration of built-in =20
> function =91execl=92
> arg.c: In function =91eval=92:
> arg.c:1770: warning: incompatible implicit declaration of built-in =20
> function
> =91memcpy=92
> arg.c:1802: warning: incompatible implicit declaration of built-in =20
> function
> =91strlen=92
> arg.c:1873: warning: incompatible implicit declaration of built-in =20
> function =91exit=92
> make: *** [arg.o] Error 1
>
> After munging in some apparently missing includes (string.h, =20
> unistd.h and
> stdlib.h) I'm left with:
>
> $ make
> cc -c -pipe -fno-common -DINT32_MIN_BROKEN -DINT64_MIN_BROKEN -no-=20
> cpp-precomp
> -I/usr/local/include -I/opt/local/include -I/sw/include -O  arg.c
> In file included from perl.h:32,
>                 from arg.c:33:
> /usr/include/string.h:119: error: conflicting types for =91memcpy=92
> /usr/include/string.h:120: error: parse error before numeric constant
> /usr/include/string.h:120: error: conflicting types for =91memset=92
> In file included from arg.c:33:
> perl.h:70: error: conflicting types for =91sprintf=92
> perl.h:70: note: a parameter list with an ellipsis can=92t match an =20=

> empty
> parameter name list declaration
> make: *** [arg.o] Error 1
>


Following the same steps I get the same brokenness on OSX 10.5.1, =20
which is also gcc 4.0.1 though 'gcc version 4.0.1 (Apple Inc. build =20
5465)'

The memcpy/memset errors can be fixed with this:

--- config_h.SH	(revision 6)
+++ config_h.SH	(local)
@@ -39,6 +39,8 @@
  #ifndef _config_h_
  #define _config_h_

+#$d_bcopy BCOPY /**/
+
  /* EUNICE:
   *	This symbol, if defined, indicates that the program is being =20
compiled
   *	under the EUNICE package under VMS.  The program will need to =20=

handle


Rip that out and then you get to the next problem:

cc -c -pipe -fno-common -DINT32_MIN_BROKEN -DINT64_MIN_BROKEN -no-cpp-=20=

precomp -O  util.c
util.c: In function =91safemalloc=92:
util.c:35: error: conflicting types for =91malloc=92
util.c: In function =91saferealloc=92:
util.c:59: error: conflicting types for =91realloc=92
/usr/include/stdlib.h:176: error: previous declaration of =91realloc=92 =20=

was here

Take those declarations away (because we're including stdlib.h now), =20
and then yacc cuts loose:

cc -c -pipe -fno-common -DINT32_MIN_BROKEN -DINT64_MIN_BROKEN -no-cpp-=20=

precomp -O  perl.c
perl.y: In function =91yyparse=92:
perl.y:242: warning: assignment makes pointer from integer without a =20
cast
perl.y:244: warning: assignment makes pointer from integer without a =20
cast
perl.y:245: warning: assignment makes pointer from integer without a =20
cast
perl.y:247: warning: assignment makes pointer from integer without a =20
cast
perl.y:249: warning: assignment makes pointer from integer without a =20
cast
perl.y:251: warning: assignment makes pointer from integer without a =20
cast
perl.y:253: warning: assignment makes pointer from integer without a =20
cast
perl.y:255: warning: assignment makes pointer from integer without a =20
cast
perl.y:257: warning: assignment makes pointer from integer without a =20
cast
perl.y:259: warning: assignment makes pointer from integer without a =20
cast
perl.y:261: warning: assignment makes pointer from integer without a =20
cast
perl.y:263: warning: assignment makes pointer from integer without a =20
cast
perl.y:265: warning: assignment makes pointer from integer without a =20
cast
perl.y:267: warning: assignment makes pointer from integer without a =20
cast
perl.y:269: warning: assignment makes pointer from integer without a =20
cast
perl.y:332: warning: assignment makes pointer from integer without a =20
cast
perl.y:334: warning: assignment makes pointer from integer without a =20
cast
perl.y:337: warning: assignment makes pointer from integer without a =20
cast
perl.y:340: warning: assignment makes pointer from integer without a =20
cast
perl.y:343: warning: assignment makes pointer from integer without a =20
cast
perl.y:346: warning: assignment makes pointer from integer without a =20
cast
perl.y:358: warning: assignment makes pointer from integer without a =20
cast
perl.y:360: warning: assignment makes pointer from integer without a =20
cast
perl.y:362: warning: assignment makes pointer from integer without a =20
cast
perl.y:413: warning: assignment makes pointer from integer without a =20
cast
perl.y:419: warning: assignment makes pointer from integer without a =20
cast
perl.y:525: warning: assignment makes pointer from integer without a =20
cast
perl.y:527: warning: assignment makes pointer from integer without a =20
cast
perl.y:531: warning: assignment makes pointer from integer without a =20
cast
perl.y:550: warning: assignment makes pointer from integer without a =20
cast
perl.y:556: warning: assignment makes pointer from integer without a =20
cast
perl.y:558: warning: assignment makes pointer from integer without a =20
cast
In file included from perl.y:595:
perly.c: At top level:
perly.c:26: error: conflicting types for =91l=92
perl.y:245: error: previous implicit declaration of =91l=92 was here
perly.c:1372: error: conflicting types for =91mod_match=92
perl.y:332: error: previous implicit declaration of =91mod_match=92 was =
here
perly.c:2149: error: conflicting types for =91addflags=92
perl.y:336: error: previous implicit declaration of =91addflags=92 was =
here
perly.c:2157: error: conflicting types for =91hide_ary=92
perl.y:358: error: previous implicit declaration of =91hide_ary=92 was =
here
perly.c:2166: error: conflicting types for =91make_list=92
perl.y:358: error: previous implicit declaration of =91make_list=92 was =
here
perly.c:2218: error: conflicting types for =91listish=92
perl.y:242: error: previous implicit declaration of =91listish=92 was =
here
perly.c:2241: error: conflicting types for =91cval_to_arg=92
perl.y:398: error: previous implicit declaration of =91cval_to_arg=92 =
was =20
here
perly.c:2301: error: conflicting types for =91cmd_to_arg=92
perl.y:162: error: previous implicit declaration of =91cmd_to_arg=92 was =
=20
here
make: *** [perl.o] Error 1


Does anyone see the obvious thing here?

--=20
Richard Clamp <[email protected]>