[comp.lang.perl] Perl 4.0 on HP 9000/300 HP/UX

henkp@cs.ruu.nl (Henk P. Penning) (03/25/91)

On HP9000/300 HP/UX 7.05, Perl 4.0 compiles smoothly and passes all tests.

However, I get segmentation faults and bus-errors with some applications.
Now and than the problems go away if I add a simple dummy asssignment
or add a commentline. I am still searching for a simple example.

Relevant compiler settings :
  optimize='+O1'
  ccflags='-Wc,-Nw500'
  libs='-lnet -lndir -lndbm -lmalloc -lm -lBSD'

				===  HenkP  ===

-- 
Henk P. Penning, Dept of Computer Science, Utrecht University.
Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands.
Telephone: +31-30-534106
e-mail   : henkp@cs.ruu.nl (uucp to hp4nl!ruuinf!henkp)

brnstnd@kramden.acf.nyu.edu (Dan Bernstein) (03/26/91)

In article <1991Mar25.155713.17020@cs.ruu.nl> henkp@cs.ruu.nl (Henk P. Penning) writes:
> On HP9000/300 HP/UX 7.05, Perl 4.0 compiles smoothly and passes all tests.
> However, I get segmentation faults and bus-errors with some applications.
> Now and than the problems go away if I add a simple dummy asssignment
> or add a commentline. I am still searching for a simple example.

I've received three reports that the HP9000/300 optimizer produces
incorrect results for my yabbawhap package. At this point I wouldn't
blame any moderately complex application for failing under that
optimizer. (Apparently the HP9000/800 optimizer doesn't have the same
problems, at least with yabbawhap.)

Complain to HP.

---Dan

okamoto@hpcc01.HP.COM (Jeff Okamoto) (03/28/91)

henkp@cs.ruu.nl (Henk P. Penning) asks:

> On HP9000/300 HP/UX 7.05...

> Relevant compiler settings :
>   optimize='+O1'
>   ccflags='-Wc,-Nw500'
>   libs='-lnet -lndir -lndbm -lmalloc -lm -lBSD'

Beware!  Using -lBSD when Configure thinks an HP-UX system is SysV
based is asking for trouble, especially in the signal handling area.
I'd recommend taking -lBSD out of the libs line.

What is alignbytes in your config.sh?  Configure runs a program that
says 2, but the answer should be 4.  (Doubles can align on 2 bytes
inside structures, but must be 4 for normal use).  See the HP-UX
Portability Guidelines for more details.

Also, from personal experience, using perl's malloc seems to prevent
some malloc/free errors.

Finally, -lnet and -lndir are empty, and thus not needed.

Hope this helps.
-- 
 \      oo	The New Number Who,
  \____|\mm	Jeff Okamoto
  //_//\ \_\	HP Corporate Computing & Services
 /K-9/  \/_/	okamoto@ranma.corp.hp.com
/___/_____\	
-----------	(415) 857-6236