[comp.lang.perl] perl-4.003 fails op/dbm.t on SPARC w/gcc

shein@robotics.berkeley.edu (Soren Hein) (05/15/91)

Problem:
perl-4.003 (from uunet.uu.net) fails op/dbm.t on test 0:
     1..12
     ok 1
     ok 2
     Segmentation fault


System info:
*  % cat /etc/motd
   SunOS Release 4.1 (GENERIC_SMALL) #1: Wed Mar 7 10:54:19 PST 1990
   % arch
   sun4
   % gcc -v
   gcc version 1.37.1


Doesn't work:
*  Compiling only hash.c with cc, as suggested by jbw@bigbird.bu.edu on
   April 16. Apparently, my cc does not know about volatile.


Configure choices:
*  No system defaults (such as SunOS x.xx) used.
*  Std. /usr/include files.
*  gcc compiler with -O.
*  No add. cc flags, except for
     -fpcc-struct-return -I/usr/include/sun
   suggested by Configure.
*  No add. ld flags.
*  No add. libraries, except for 
     -ldbm -lm -lposix
   suggested by Configure.
*  Shared C library /usr/lib/libc.so.1.5.
*  Not using perl's malloc() since 
     void
     free(cp)
	char *cp;
   in malloc.c conflicts with 
     extern char *   malloc(/* size_t size */);
   in /usr/include/stdlib.h.
*  Except for locations of binaries, man pages and libraries, choose
   the defaults offered by Configure.


/Soren, shein@robotics.berkeley.edu
# Thanks for the Book, in which no shot is too cheap.

lwall@jpl-devvax.jpl.nasa.gov (Larry Wall) (05/16/91)

In article <13613@pasteur.Berkeley.EDU> shein@robotics.berkeley.edu (Soren Hein) writes:
: Problem:
: perl-4.003 (from uunet.uu.net) fails op/dbm.t on test 0:
:      1..12
:      ok 1
:      ok 2
:      Segmentation fault
: 
: 
: System info:
: *  % cat /etc/motd
:    SunOS Release 4.1 (GENERIC_SMALL) #1: Wed Mar 7 10:54:19 PST 1990
:    % arch
:    sun4
:    % gcc -v
:    gcc version 1.37.1
: 
: 
: Doesn't work:
: *  Compiling only hash.c with cc, as suggested by jbw@bigbird.bu.edu on
:    April 16. Apparently, my cc does not know about volatile.

Either make this work by using -UHAS_VOLATILE, or reconfigure the whole thing
with cc.  I don't think that version of gcc can be made to compile hash.c
correctly.

Larry

jbw@bigbird.bu.edu (Joe Wells) (05/16/91)

lwall@jpl-devvax.jpl.nasa.gov (Larry Wall) writes:

   Either make this work by using -UHAS_VOLATILE,
				  ^^^^^^^^^^^^^^

I tried that, but -U only works on predefined macros, not ones defined
after starting (at least with this particular cc).  Is this supposed to
work?

Does anyone know exactly what gcc is doing differently from cc in these
circumstances?  I remember that it is passing structures differently, but
how?

(All of this is under SunOS 4.1 on Sun 4 machines.)

-- 
Joe Wells <jbw@cs.bu.edu>