Installing Allegro Common Lisp 3.1 (stage 2)

NeXT Computer, Inc. -> NEXTSTEP / OPENSTEP Software

Title: Installing Allegro Common Lisp 3.1 (stage 2)
Post by: nigwil on August 24, 2011, 05:58:39 AM
With balrog's help we have made some progress on getting Allegro Common Lisp installed.

I don't have 2.88MB media to copy the 2 floppy images to actual diskettes for the install so after a bit of fiddling we discovered that the ACL.pkg could be setup by unpacking the two disk images, concatenating the ACL.tar.Z.1 and ACL.tar.Z.2 files together to make ACL.tar.Z and using the normal NeXT installer to do the first step of installation, so far so good. This is stage 1 of the install completed.

The next step (stage 2) is to do the command 'sh config' but it throws this error, does anyone recognize the problem?


nextcube> cd /usr/cl
nextcube> ls -l
total 22
-rw-r--r--  1 1454        1581 Apr 30  1991 README
drwxrwxr-x  2 1454        1024 Apr 30  1991 bm/
drwxrwxr-x  3 1454        1024 Aug 24 20:31 build/
-rw-r--r--  1 1454       11566 Apr 30  1991 dumplispPatch
drwxrwxr-x  3 1454        1024 Apr 30  1991 emacs/
drwxrwxr-x  3 1454        1024 Apr 30  1991 examples/
drwxrwxr-x  5 1454        1024 Apr 30  1991 lib/
drwxrwxr-x  2 1454        1024 Apr 30  1991 ops5/
drwxrwxr-x  2 1454        2048 Apr 30  1991 pcl/
nextcube> cd build
nextcube> sh config

               ########################################
               ##### Allegro CL 3.1 Configuration #####
               ########################################

At any question:
   ?          prints help text
   RETURN     uses the default value given in []
   EOF        uses default values for all remaining parameters
   INTERRUPT  exits "config"


[Initializing default parameters from ./.defaults]


================================================

Allegro CL image pathname [/usr/bin/cl]:
Stopped (tty input)
nextcube> %1
sh config


================================================

Allegro CL library pathname [/usr/cl/lib]:

================================================

Case mode [sensitive-lower]:

================================================

Size of the preallocated heap [30m]:

================================================

Size of the initial newspace [1m]:

================================================

Size of the initial oldspace [20m]:

================================================

Value for the "speed" optimize quality [range 0-3, default: 1]:

================================================

Value for the "safety" optimize quality [range 0-3, default: 1]:

================================================

Are you a U. S. Government customer or installing for them? [no]

================================================

Do you observe daylight savings time? [yes]

===========================================================================

Allegro CL 3.1 parameters, based on input you have given:

Install Allegro Composer:       no
Install Allegro Common Windows: no
Allegro CL image pathname:      /usr/bin/cl
Allegro CL library pathname:    /usr/cl/lib
Case mode:                      sensitive-lower
Preallocate heap size:          30m
Size of initial newspace:       1m
Size of initial oldspace:       20m
The "speed" default value:      1
The "safety" default value:     1
U. S. Government customer:      no
Daylight savings time observed: yes

----------------------

Are these correct (yes or no)? yes

[Writing current parameters to ./.defaults]

cc -c static2.c
/bin/ld -x -seg1addr 2000 -headerpad 2000 -seglinkedit -lcrt0.o  -u libsys_s -u libNeXT_s -u libdsp_s crt0.o ucl.o  static.o static2.o -lNeXT_s -ldsp_s -lsys_s -o ucl
/bin/ld: can't locate file for: -ldsp_s
*** Exit 1
Stop.
nextcube> ls -l
Title: Installing Allegro Common Lisp 3.1 (stage 2)
Post by: gtnicol on August 24, 2011, 06:41:42 AM
Seems like it can't find the library for libdsp_s?
Title: Installing Allegro Common Lisp 3.1 (stage 2)
Post by: nigwil on August 24, 2011, 07:18:59 AM
It just occurred to me to look in comp.sys.next.programmer and I found this:

http://groups.google.com/group/comp.sys.next.programmer/msg/341e1142b5429419?dmode=source

I'm not an emacs user, can anyone interpret Step 3 please? I looked in the file ucl.o with emacs, and I can do a search replace of _rld with _jld - there are several instances of this symbol with a prefix like "_rld_load" and "_rld_lookup" etc...

I assume all need to be replaced?

QuoteFrom: bvrot...@ADS.COM (Bill Vrotney)
Subject: Re: Fixing Allegro CL 3.1.20 to work under NS 3.0
In-Reply-To: bvrotney@ADS.COM's message of Fri, 9 Oct 1992 04:27:38 GM
Message-ID: <1992Oct9.225632.7114@ads.com>
Sender: use...@ads.com (USENET News)
Organization: Advanced Decision Systems, Mtn. View, CA (415) 960-7300
References: <1992Oct9.042738.22990@ads.com>
Date: Fri, 9 Oct 1992 22:56:32 GMT
Lines: 66


I am reposting and reformulating these instructions for fixing Allegro CL
3.1.20 to work under NeXTstep 3.0. Since my original posting some people
have tried and succeeded to get a running ACL under 3.0 but only after
including some fixes for the dsp library references that I include below
(thanks people and thanks to the originators of the emacs hack that wish to
remain anonymous). I also clarify the "dump lisp" patch.

 The following is a procedure for fixing Allegro CL 3.1.20 so that it works
 under NeXTstep 3.0. You should find all of the files mentioned here on your
 ACL distribution. We refer to the top level directory of this distribution
 as  ACL/ and the build directory ACL/build.

  Warning!!! (from Franz) This procedure results in creating a new ucl.o
  binary file. You may distribute this method but not the resulting ucl.o
  file.

  1. First look at the byte size of the file ACL/build/ucl.o, if the size
     is 612364 bytes then skip to step 2. Otherwise look at the file
     ACL/dumplispPatch. This is a shell archive that will patch ucl.o with
     the "dump lisp" patch. More precisely

                  cd ACL
                  cp dumplispPatch build
                  cd build
                  /bin/sh dumplispPatch
                  /bin/sh install_patch.sh

      Now ucl.o should be 612364 bytes long. (the original ucl.o will be
      saved in a file called ucl_orig.o).

  2. Next edit the file ACL/build/config (you might want to save the orginal
     config file). In that file you will see two statements:

                  LIBRARIES = -lNeXT_s -ldsp_s -lsys_s
                  USYMS = -u libsys_s -u libNeXT_s -u libdsp_s

     In the LIBRARIES statement, change -ldsp_s to -ldsp
     In the USYMS statement, delete the -u libdsp_s


  3. Next you edit the new binary file ACL/build/ucl.o in emacs and
     save the results. Go to ACL/build directory, run emacs and

          find-file ucl.o
          replace-string _rld _jld
          replace-string __bcopy _bcopy^@
          save-buffer

     The ^@ above is the null character (000 byte) and can be
     entered in emacs using

          C-q C-<space>

     and will look in an emacs buffer as a single character ^@
     and NOT two characters.


  4. Finally reinstall ACL as usual. You do this by going to the
     ACL/build directory and

          /bin/sh config

--
Bill Vrotney
BAH/Advanced Decision Systems


Title: Installing Allegro Common Lisp 3.1 (stage 2)
Post by: iDork on August 24, 2011, 08:32:34 AM
How did you manage to extract the Z files from the images?
Title: Installing Allegro Common Lisp 3.1 (stage 2)
Post by: nigwil on August 24, 2011, 06:51:25 PM
Quote from: "iDork"How did you manage to extract the Z files from the images?
balrog reminded me of Linux's ability to handle NeXTStep:


sudo mount -t ufs -o loop,ro,ufstype=nextstep ./disk_1_of_13.img /tmp/nxtmount


This requires the diskette images have not been made using DiskCopy II which has a different format.
Title: Installing Allegro Common Lisp 3.1 (stage 2)
Post by: cubist on August 25, 2011, 01:11:36 AM
Quote from: "nigwil"
I'm not an emacs user, can anyone interpret Step 3 please? I looked in the file ucl.o with emacs, and I can do a search replace of _rld with _jld - there are several instances of this symbol with a prefix like "_rld_load" and "_rld_lookup" etc...

I assume all need to be replaced?
Those are the native emacs commands.  Just type ESC then 'x' (meta-x) to get a command prompt.  Enter the command name, hit return and emacs will prompt for args as needed.

The replace commands will replace all occurrences.
Title: Installing Allegro Common Lisp 3.1 (stage 2)
Post by: nigwil on August 25, 2011, 02:24:14 AM
Quote from: "cubist"
Those are the native emacs commands.  Just type ESC then 'x' (meta-x) to get a command prompt.  Enter the command name, hit return and emacs will prompt for args as needed.

The replace commands will replace all occurrences.
Thank you, that helped a lot, I can almost drive emacs at the level of edlin now :-)

Quote
[Writing current parameters to ./.defaults]

cc -c static2.c
/bin/ld -x -seg1addr 2000 -headerpad 2000 -seglinkedit -lcrt0.o  -u libsys_s -u libNeXT_s  crt0.o ucl.o  static.o static2.o -lNeXT_s -lsys_s -o ucl
/bin/ld: Undefined symbols:
_alloca
*** Exit 1
Stop.
/usr/cl/build #
I completed the changes, and followed another posters' suggestion of just dropping the DSP library altogether, but now I get the error above. Is there a chance that my NeXTStep 3.3 setup is lacking development tools (the full set of libraries perhaps)?
Title: Installing Allegro Common Lisp 3.1 (stage 2)
Post by: nigwil on August 25, 2011, 02:43:57 AM
Quote from: "nigwil"
I completed the changes, and followed another posters' suggestion of just dropping the DSP library altogether, but now I get the error above. Is there a chance that my NeXTStep 3.3 setup is lacking development tools (the full set of libraries perhaps)?
just to be sure I re-instated the libdsp.a and downloaded the needed library from here:
ftp://ccrma-ftp.stanford.edu/pub/Lisp/libdsp.a
same result as before - I can compile simple C programs so I have a working compiler.
Title: Installing Allegro Common Lisp 3.1 (stage 2)
Post by: nigwil on August 25, 2011, 02:48:54 AM
Quote from: "nigwil"
just to be sure I re-instated the libdsp.a and downloaded the needed library from here:
ftp://ccrma-ftp.stanford.edu/pub/Lisp/libdsp.a
same result as before
Ok, there is a fix for that too it seems, now I need to find the non-shared versions of the libraries:
http://groups.google.com/group/comp.sys.next.programmer/msg/2dfd16ed8759484d?dmode=source
QuoteNewsgroups: comp.sys.next.programmer
Path: gmd.de!newsserver.jvnc.net!howland.reston.ans.net!math.ohio-state.edu!caen!batcomputer!cornell!freimer
From: frei...@cs.cornell.edu (Robert Freimer)
Subject: Using Allegro Common Lisp 3.1.20 under NeXTSTEP 3.1
Message-ID: <1993Jul20.140859.25540@cs.cornell.edu>
Organization: Cornell Univ. CS Dept, Ithaca NY 14853
Date: Tue, 20 Jul 1993 14:08:59 GMT
Lines: 87

When I upgraded my cube to 3.1, I discovered that ACL no longer
worked.  I tried rebuilding and received an error that _alloca was
undefined.  This is caused by the switch from GNU C 1.93 to 2.2.2.
alloca() is no longer in the system library and now is an internal
function to the C compiler.  The fix is to rebuild with the non-shared
versions of the 3.0 libraries.

The following procedure for fixing a virgin Allegro Common Lisp is
modified from a comp.sys.next.programmer article by Bill Vrotney.  You
should find all of the files mentioned here on your ACL distribution.
I refer to the top level directory of this distribution as ACL/ and
the build directory ACL/build.  For upgrading from a system that
worked with 3.0, follow steps 3, 4, and 6.

Warning!!! (from Franz Inc.) This procedure results in creating a new
ucl.o binary file. You may distribute this method but not the
resulting ucl.o file.

1. Install the MusicKit_3.1.pkg available by anonymous ftp from
ccrma-ftp.stanford.edu.  The Music and DSP libraries are no longer
supported by NeXT.  This package includes the 3.1 version of libdsp.
The other option is to drop -ldsp from the LIBRARIES statement in step
4 below.

2. First look at the byte size of the file ACL/build/ucl.o, if the
size is 612364 bytes then skip to step 3.  Otherwise look at the file
ACL/dumplispPatch. This is a shell archive that will patch ucl.o with
the "dump lisp" patch.  More precisely

cd ACL
cp dumplispPatch build
cd build
/bin/sh dumplispPatch
/bin/sh install_patch.sh

Now ucl.o should be 612364 bytes long. Tthe original ucl.o will be
saved in a file called ucl_orig.o.

3. Create symbolic links from the 3.0 non-shared libraries on CDROM.
This saves space on your hard disk, since the libraries should not be
needed, except when rebuilding ACL.  Another option is to copy the
libraries.

ln -s /NeXTSTEP_3.0/lib/libsys_p.a /lib/libsys3.0_p.a
ln -s /NeXTSTEP_3.0/usr/lib/libNeXT_p.a /usr/lib/libNeXT3.0_p.a

4. Edit the file ACL/build/config.  You might want to save the orginal
<config file.  Replace the following lines

LIBRARIES = -lNeXT_s -ldsp_s -lsys_s
USYMS = -u libsys_s -u libNeXT_s -u libdsp_s

with:

LIBRARIES = -lNeXT3.0_p -ldsp -lsys3.0_p
USYMS =

5. Edit the new binary file ACL/build/ucl.o in emacs and save the
results. Go to ACL/build directory, run emacs and

find-file ucl.o
replace-string _rld _jld
replace-string __bcopy _bcopy^@
save-buffer

The ^@ above is the null character (000 byte) and can be entered in
emacs using

C-q C-<space>

and will look in an emacs buffer as a single character ^@ and NOT two
characters.

6. Finally reinstall ACL as usual. You do this by going to the
ACL/build directory and

/bin/sh config

7. The online version of the manual (cl-manual.tar.Z) is available by
anonymous ftp from sonata.cc.purdue.edu, under /pub/next/docs.  Also
grab fi-gnu-clman.tar.Z, which contain the emacs lisp code to index
the manual.


--

-Robert
Title: Installing Allegro Common Lisp 3.1 (stage 2)
Post by: nigwil on August 25, 2011, 03:55:09 AM
Ok, here is another fixed which appears to have worked:

change the LIBRARIES line in /usr/cl/build to this:

QuoteLIBRARIES = -lNeXT_s -ldsp -lsys_s -lsys_p
Title: Installing Allegro Common Lisp 3.1 (stage 2) - Solved
Post by: nigwil on August 25, 2011, 04:17:37 AM
Yay! it works (well at least for a simple example):

nextcube> /usr/bin/cl
Allegro CL 3.1.20 [NeXT] (3/7/91)
Copyright (C) 1985-1990, Franz Inc., Berkeley, CA, USA
<cl> (defun fact (n)
      (cond ((= n 1) 1)
             (t (* n (fact (1- n))))))

fact
<cl> (fact 10)

3628800
<cl> :exit
; Exiting Lisp
nextcube>
Title: Installing Allegro Common Lisp 3.1 (stage 2)
Post by: aragon on April 13, 2012, 01:10:21 PM
Hey, this looks cool!

BTW I assume that you did this on M68K hardware. Any chance to get this to run on an Intel Nextstep?
Title: Installing Allegro Common Lisp 3.1 (stage 2)
Post by: nigwil on April 13, 2012, 05:17:12 PM
Yes correct, M68K hardware. I am not sure whether the Allegro binary we have is fat off-hand.

Go to top  Forum index