[comp.sys.apollo] Strange error compiling Perl 4.03 on Apollo

heffron@dsg4.dse.beckman.com (Matt Heffron) (04/24/91)

I've gotten a really strange error trying to compile cmd.c from the Perl 4.03
distribution, using the cc 6.8 on a dn3500 running SR10.3, systype=BSD4.3 :

/bin/cc -c `sh cflags.SH cmd.o` cmd.c
	  CFLAGS =  -A cpu,mathchip

 (0044) {

******** Line 44 of "cmd.c": [Warning #233]  "DEVICE(READ)" is inappropriate in this
         context.
******** Line 44 of "cmd.c": [Warning #233]  "DEVICE(WRITE)" is inappropriate in this
         context.
******** Line 44 of "cmd.c": [Warning #233]  "DEVICE(READ)" is inappropriate in this
         context.
******** Line 44 of "cmd.c": [Warning #233]  "DEVICE(WRITE)" is inappropriate in this
         context.
******** Line 44 of "cmd.c": [Warning #233]  "DEVICE(READ)" is inappropriate in this
         context.
******** Line 44 of "cmd.c": [Warning #233]  "DEVICE(WRITE)" is inappropriate in this
         context.

The context around line 44 is:

int
cmd_exec(cmdparm,gimme,sp)
CMD *VOLATILE cmdparm;
VOLATILE int gimme;
VOLATILE int sp;
{
    register CMD *cmd = cmdparm;
    SPAT *VOLATILE oldspat;
    VOLATILE int firstsave = savestack->ary_fill;
    VOLATILE int oldsave;
    VOLATILE int aryoptsave;


The macro "VOLATILE" expands as "volatile" (w/o the quotes).

Any clues?

If this is a legitimate warning, then THE WARNING MESSAGE TEXT COULD (SHOULD!!)
BE A WHOLE LOT MORE SPECIFIC!!!!!!!!!!!

-Matt

PS. the Configure script computes the "void" support level to be 3 when it
should be 7.  This is because it invokes the compile of the test program with
the -S option which Apollo doesn't support.  Likewise, it determines that malloc
returns type "char *" instead of "void *" because the test program #includes
<malloc.h> which doesn't exist on Apollo.

--
Matt Heffron                      heffron@falstaff.css.beckman.com
Beckman Instruments, Inc.         voice: (714) 961-3128
2500 N. Harbor Blvd. MS X-11, Fullerton, CA 92634-3100
Cute saying/disclaimer in development.

dwork@brahms.amd.com (Jeff Dwork) (04/25/91)

In article <heffron.672442769@falstaff.css.beckman.com> heffron@falstaff.css.beckman.com writes:
>I've gotten a really strange error trying to compile cmd.c from the Perl 4.03
>distribution, using the cc 6.8 on a dn3500 running SR10.3, systype=BSD4.3 :
>

I can't get this far.  I'm using cc 6.7 and __STDC__ is defined, but
stdlib.h is missing.  Do I need to use -A nansi?  Is this different with cc
6.8?

>
>-Matt
>
>PS. the Configure script computes the "void" support level to be 3 when it
>should be 7.  This is because it invokes the compile of the test program with
>the -S option which Apollo doesn't support.  Likewise, it determines that malloc
>returns type "char *" instead of "void *" because the test program #includes
><malloc.h> which doesn't exist on Apollo.
>
>--
>Matt Heffron                      heffron@falstaff.css.beckman.com
>Beckman Instruments, Inc.         voice: (714) 961-3128
>2500 N. Harbor Blvd. MS X-11, Fullerton, CA 92634-3100
>Cute saying/disclaimer in development.

Is 7 the correct void support for cc 6.7 also?

Thanks,
-Jeff

--
Jeff Dwork			|  408-749-2356 	|  dwork@AMD.COM
Advanced Micro Devices, M/S 45	|---------------------------------------
PO Box 3453			|  The above opionions are mine,
Sunnyvale, Ca 94088		|  not AMD's.

dwork@brahms.amd.com (Jeff Dwork) (04/25/91)

In article <heffron.672442769@falstaff.css.beckman.com> heffron@falstaff.css.beckman.com writes:
>I've gotten a really strange error trying to compile cmd.c from the Perl 4.03
>distribution, using the cc 6.8 on a dn3500 running SR10.3, systype=BSD4.3 :
>
>/bin/cc -c `sh cflags.SH cmd.o` cmd.c
>	  CFLAGS =  -A cpu,mathchip
>
> (0044) {
>
>******** Line 44 of "cmd.c": [Warning #233]  "DEVICE(READ)" is inappropriate in this
>         context.
>******** Line 44 of "cmd.c": [Warning #233]  "DEVICE(WRITE)" is inappropriate in this
>         context.
>******** Line 44 of "cmd.c": [Warning #233]  "DEVICE(READ)" is inappropriate in this
>         context.
>******** Line 44 of "cmd.c": [Warning #233]  "DEVICE(WRITE)" is inappropriate in this
>         context.
>******** Line 44 of "cmd.c": [Warning #233]  "DEVICE(READ)" is inappropriate in this
>         context.
>******** Line 44 of "cmd.c": [Warning #233]  "DEVICE(WRITE)" is inappropriate in this
>         context.
>
>The context around line 44 is:
>
>int
>cmd_exec(cmdparm,gimme,sp)
>CMD *VOLATILE cmdparm;
>VOLATILE int gimme;
>VOLATILE int sp;
>{
>    register CMD *cmd = cmdparm;
>    SPAT *VOLATILE oldspat;
>    VOLATILE int firstsave = savestack->ary_fill;
>    VOLATILE int oldsave;
>    VOLATILE int aryoptsave;
>
>
>The macro "VOLATILE" expands as "volatile" (w/o the quotes).
>
>Any clues?
>
>If this is a legitimate warning, then THE WARNING MESSAGE TEXT COULD (SHOULD!!)
>BE A WHOLE LOT MORE SPECIFIC!!!!!!!!!!!
>
>-Matt
>
>PS. the Configure script computes the "void" support level to be 3 when it
>should be 7.  This is because it invokes the compile of the test program with
>the -S option which Apollo doesn't support.  Likewise, it determines that malloc
>returns type "char *" instead of "void *" because the test program #includes
><malloc.h> which doesn't exist on Apollo.
>
>--
>Matt Heffron                      heffron@falstaff.css.beckman.com
>Beckman Instruments, Inc.         voice: (714) 961-3128
>2500 N. Harbor Blvd. MS X-11, Fullerton, CA 92634-3100
>Cute saying/disclaimer in development.


I compiled perl with version 6.7 of cc, SR 10.3, systype bsd4.3 on HP400t.
CFLAGS='-A nansi cpu,mathchip -O'.  I told config that void support was 7.
(I hope that's right).  Everything works ok except for some warnings about
illegal pointer combinations (I don't remember this from 3.044).

Everything passes except for io/fs test 5 and op/dbm test 2, both of which
have to do with 'mode' returned by 'stat'.  Don't have time to look at this
now.

--Jeff
--
Jeff Dwork			|  408-749-2356 	|  dwork@AMD.COM
Advanced Micro Devices, M/S 45	|---------------------------------------
PO Box 3453			|  The above opionions are mine,
Sunnyvale, Ca 94088		|  not AMD's.

kgallagh@digi.lonestar.org (Kevin Gallagher) (04/26/91)

In article <1991Apr24.192839.18418@amd.com> dwork@brahms.amd.com (Jeff Dwork) writes:
>I'm using cc 6.7 and __STDC__ is defined, but stdlib.h is missing.  Do I need
>to use -A nansi?  Is this different with cc 6.8?

Yes, or you can specify -U__STDC__ in Configure when prompted for additional
flags, assuming you are using /bin/cc, not /com/cc.  cc 6.7 has support for
SOME Ansi C features, but lacks the standard include files, and other
important Ansi C stuff.  It was wrong for Apollo to define __STDC__ by default
in cc 6.7.

I built Perl 4.0.3 using cc 6.7 under SR10.2.  After undefining __STDC__, it
built without a problem.

Now, if you have SR10.3, using cc 6.7, Perl 4.0.3 should build OK but the
executable will NOT run on SR10.2 nodes.  The executable built on an SR10.2
node will run OK on SR10.3 nodes, however.  So, if you have a mix, build on
SR10.2.  

One warning, however.  On SR10.2, Configure finds that standard input can be
fed to cpp in a way that does not work any longer under SR10.3.  So, you will
have to edit config.sh to tell Perl to feed standard input to cpp by using
/usr/lib/cpp instead, if you wish to have Perl pass the cpp test on both
SR10.2 and SR10.3 nodes.
-- 
----------------------------------------------------------------------------
Kevin Gallagher        kgallagh@digi.lonestar.org OR ...!uunet!digi!kgallagh
DSC Communications Corporation   Addr: MS 152, 1000 Coit Rd, Plano, TX 75075
----------------------------------------------------------------------------

root@ttsi.lonestar.org (System) (04/26/91)

>I compiled perl with version 6.7 of cc, SR 10.3, systype bsd4.3 on HP400t.
>CFLAGS='-A nansi cpu,mathchip -O'.  I told config that void support was 7.
>(I hope that's right).  Everything works ok except for some warnings about
>illegal pointer combinations (I don't remember this from 3.044).
>
>Everything passes except for io/fs test 5 and op/dbm test 2, both of which
>have to do with 'mode' returned by 'stat'.  Don't have time to look at this
>now.
>Jeff Dwork			|  408-749-2356 	|  dwork@AMD.COM

I too compiled perl 4.0.3 with version 6.7 of cc, SR 10.3, systype bsd4.3
on HP400T, except that I added -U__STDC__ to CFLAGS.  I recall a note awhile
back by Kevin Gallagher that goes into why do this.  The result for me
was that all tests passed.

-- 
Mark S. Evans                 Tandem Telecommunications Systems Inc.
Phone: 214-516-6201           850 E. Central Parkway
Fax:   214-516-6801           Plano, TX 75074
Mail:  mse@ttsi.lonestar.org