[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CLISP on Solaris and ULTRA-Sparc



Martin Ginkel writes:
> 
> If I try to load CLISP (bin-Version 17-04-96) for Solaris2.4 on our ULTRA
> with Sol2.5 I get the following Error:
> 
> /usr/local/clisp/bin/lisp.run: initialisation file was not created by this version of LISP

Oh, I see. The format of the lispinit.mem file depends on the hardware
page size (a C macro called PAGESIZE under Solaris). We should avoid this.
The following patch to the C source should do the trick (untested).

*** src/spvw.d.bak	Sun Jul 21 20:14:52 1996
--- src/spvw.d	Mon Nov 18 15:01:50 1996
***************
*** 9663,9668 ****
--- 9663,9673 ----
            # UNIX_SUNOS5 hat doch tatsächlich mmap(), aber kein getpagesize() !
            #if defined(HAVE_GETPAGESIZE)
            getpagesize()
+           #elif defined(UNIX_SUNOS5) && defined(SPARC)
+           # Normal SPARCs have PAGESIZE=4096, UltraSPARCs have PAGESIZE=8192.
+           # For compatibility of the .mem files between the architectures,
+           # choose the same value for both here.
+           8192
            #elif defined(UNIX_SUNOS5)
            PAGESIZE # siehe <sys/param.h>
            #else
***************
*** 9797,9802 ****
--- 9802,9809 ----
            vm_page_size
            #elif defined(HAVE_SHM)
            SHMLBA
+           #elif defined(UNIX_SUNOS5) && defined(SPARC)
+           8192 # for compatibility of the .mem files
            #elif defined(UNIX_SUNOS5)
            PAGESIZE # siehe <sys/param.h>
            #else


> Is there a Way to fix it ???

Without rebuilding the sources, you can generate a lispinit.mem file
for UltraSparc this way:
  - byte-compile all the .lsp files contained in the distribution,
    (init.lsp etc.), unless they are already byte-compiled,
  - rename lispinit.mem to lispinit-normalsparc.mem
  - On the UltraSparc, execute
    ./lisp.run -m 750KW -x "(load \"init.fas\") (sys::%saveinitmem) (exit)"
  - rename lispinit.mem to lispinit-ultrasparc.mem
Then adapt your /usr/local/bin/clisp shell script to dispatch on `uname -m`.


Bruno Haible                                     email: <haible@ilog.fr>
Software Engineer                                phone: +33-1-49083585