[comp.lang.perl] Latest perl for DECstations on Ultrix 4.0?

rcpt@rw7.urc.tue.nl (Piet Tutelaers) (10/11/90)

I have perl 2.0 patchlevel 18 running on our DECstations with Ultrix 3.1
because we like so much the man-scripts from Tom Christiansen. Because
Ultrix 3.1 did not have `ndbm' I hacked a version of perl with the GNU
`gndbm' which was needed to handle a MANPATH consisting of multiple
directories.

Now we have Ultrix 4.0 with ndbm, so I tried to get the latest version of
perl (3.0 patchlevel 31) but could not install that because of compilation
errors. Also version 3.0 patchlevel 28 gives me troubles. I can compile,
after solving the serious bug in array.h -- see the diff hereafter, and
avoiding the malloc routines from perl. But several tests go wrong. See the
list at the end.

The perl3.0 version (patchlevel 28) can also not be used in combination
with my version of the `man' and `makewhatis' scripts because things seems
to be changed in perl. I could solve the syntax errors in man with 
man.diff (see at the end) but get now runtime errors (see also the end).

Who has solved all this? I know that there was a discussion about problems
with DECstations a while ago, but I can not read these anymore on our site.
The articles are expired.

Hoping on some good news,

Piet Tutelaers
rcpt@urc.tue.nl

------------------array.h.diff-----------------------
*** array.h.orig	Wed Oct 10 16:20:24 1990
--- array.h	Wed Oct 10 16:20:48 1990
***************
*** 19,24 ****
--- 19,25 ----
      STR **ary_alloc;
      STR *ary_magic;
      int ary_max;
+     int ary_index; /* added because the variable was missing */
      int ary_fill;
      char ary_flags;
  };
----------------tests going wrong-------------------
io.pipe.........syntax error in file ./io.pipe at line 24, next 2 tokens "pipe("
Execution aborted due to compilation errors.
FAILED on test 0
op.dbm..........FAILED on test 0
op.push.........syntax error in file ./op.push at line 35, next 2 tokens "= splice"
Execution aborted due to compilation errors.
FAILED on test 0
op.sort.........FAILED on test 5
op.stat.........FAILED on test 4
op.write........FAILED on test 3
Failed 6 tests.
*** Error code 45 (ignored)

------------------man.diff-------------------------
*** /usr/local/bin/man	Sat Apr 21 20:04:49 1990
--- man	Wed Oct 10 21:12:20 1990
***************
*** 1,4 ****
! #!/usr/local/bin/parel (our workaround for `ndbm')
  # 
  # man - perl rewrite of man, whatis, apropos
  #
--- 1,4 ----
! #!/local/src/Perl/src/perl (version 3.0 patchlevel 28)
  # 
  # man - perl rewrite of man, whatis, apropos
  #
***************
*** 470,477 ****
      local($key,$root) = @_;
      local(%recursed);
  
!     return $dbmopened{$root}
! 	? &quick_fetch($key,$dbm{$root})
  	: &slow_fetch($key,$root);
  }
  
--- 473,479 ----
      local($key,$root) = @_;
      local(%recursed);
  
!     return $dbmopened{$root} ? &quick_fetch($key,$dbm{$root})
  	: &slow_fetch($key,$root);
  }
  
***************
*** 556,562 ****
  
      ($tar_regx = $target) =~ s/([^\w])/\\$1/g;
  
!     if (!$hard_way && !$called_before++) {
  	# generate dbm names
  	for $root (@MANPATH) {
  	    $dbm{$root} = $vars++; # magic incr
--- 558,565 ----
  
      ($tar_regx = $target) =~ s/([^\w])/\\$1/g;
  
!     if (!$hard_way && !$called_before) {
! 	$called_before++;
  	# generate dbm names
  	for $root (@MANPATH) {
  	    $dbm{$root} = $vars++; # magic incr

-----------Run time errors man----------------------

setenv MANPATH ~/man
makewhatis ~/man
makewhatis: /rc6u1/rcpt/man: found 43 entries in 38 files
-rw-r--r--  1 rcpt         2333 Oct 11 10:41 /rc6u1/rcpt/man/whatis
-rw-r--r--  2 rcpt        27039 Oct 11 10:41 /rc6u1/rcpt/man/whatis.dir
-rw-r--r--  2 rcpt        27039 Oct 11 10:41 /rc6u1/rcpt/man/whatis.pag

./man less
null section in ln16823457po
No manual entry for less.

ls -l ~/man/man1/less.*

-rw-r--r--  1 rcpt        12991 May 29 11:17 /rc6u1/rcpt/man/man1/less.1

evans@decvax.dec.com (Marc Evans) (10/12/90)

When building with Ultrix, you will need to make a few *tweeks* to get perl
to work properly.

1) When compiling, be sure to only use -g (can't use -O) unless the version
   of your compiler is 2.10 or greater (which it probably isn't).

2) Edit the config.sh script so that d_volatile is 'undef', as the compiler
   does not use the keyword properly (yet).

3) You may need to tweek d_voidsig (I don't remember if it guesses this
   properly.

If after trying this it still isn't working, let me know exactly what the
issue(s) are and I will point you in the proper direction.

- Marc

-- 
===========================================================================
Marc Evans - WB1GRH - evans@decvax.DEC.COM  | Synergytics     (603)635-8876
      Unix and X Software Contractor        | 21 Hinds Ln, Pelham, NH 03076
===========================================================================