axiom-developer
[Top][All Lists]
Advanced

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

[Axiom-developer] patches to daase.lisp.pamphlet and Axiom for Windows o


From: Page, Bill
Subject: [Axiom-developer] patches to daase.lisp.pamphlet and Axiom for Windows on GCL-2.6.8pre
Date: Thu, 21 Sep 2006 20:49:08 -0400

On Wednesday, September 20, 2006 6:59 AM I wrote:

> ...
> Some good news. With the patches supplied by Camm in:
> 
>
http://lists.nongnu.org/archive/html/axiom-developer/2006-08/msg00344.ht
ml
> 
> and removing the out-of-date patches which have since been
> incorporated into gcl, the darcs axiom--windows--1 source code
> seems to be compiling using the new gcl-2.6.8pre. I now expect
> it to complete successfully (I will confirm in a couple of hours).
> 
> This means that at least we will be able to work with the same
> version of gcl in both Linux and Windows once Camm officially
> releases 2.6.8. The Windows version of Axiom was last successfully
> compiled only with a patched version of gcl-2.6.5.
> 

Well it wasn't quite that easy, but I did finally get a successful
Windows build of Axiom using gcl-2.6.8pre (as patched for the
previously mentioned lstat problem) but it turned out I needed
a few more patches.

The most serious and difficult problem occurred in Axiom's database
code. There is some incorrect usage of the lisp 'probe-file'
function that no longer corresponds the way 'probe-file' works
in gcl (since gcl-2.6.7). This is actually a bug in the current
Axiom linux source distribution as well! This might explain the
problems that we had recently with trying to compile Martin's
Rubey's new 'guess' package since it means that generating the
new databases might fail.


Patch procedure
---------------

The following is an annotated output from

  $ darcs --diff -u

------

Binary files old-axiom--windows--1-1/zips/gcl-2.6.5.tgz and
new-axiom--windows--1-1/zips/gcl-2.6.5.tgz differ

Because I was too lazy to take the time to properly modify the
Makefile.pamphlet for the new gcl-2.6.8pre build, the first
thing I did was prepare a tarball for gcl2.6.8pre using the
name gcl-2.6.5w

  $ tar xzvf gcl-2.6.8pre.tgz
  $ mv gcl-2.6.8pre gcl-2.6.5w
  $ tar czvf gcl-2.6.5w.tgz gcl-2.6.5w

so that I could just start with the existing Windows sources.

--------

The following patch removes those patches to gcl that no
longer apply

diff -rN -u old-axiom--windows--1-1/lsp/Makefile.pamphlet
new-axiom--windows--1-1/lsp/Makefile.pamphlet
--- old-axiom--windows--1-1/lsp/Makefile.pamphlet       Wed Sep 20
21:32:37 2006
+++ new-axiom--windows--1-1/lsp/Makefile.pamphlet       Wed Sep 20
21:32:54 2006
@@ -766,15 +766,9 @@
        @mv gcl-2.6.5 ${GCLVERSION}
 <<gcl-2.6.5w.socket.patch>>
 <<gcl-2.6.5w.libspad.patch>>
-<<gcl-2.6.5w.toploop.patch>>
-<<gcl-2.6.5w.h.gmp_wrappers.h.patch>>
-<<gcl-2.6.5w.gcl_cmpmain.lsp.patch>>
 <<gcl-2.6.5w.tail-recursive.patch>>
 <<gcl-2.6.5w.collectfn.fix>>
 <<gcl-2.6.5w.h.mingw.defs.patch>>
-<<gcl-2.6.5w.o.alloc.c.patch>>
-<<gcl-2.6.5w.o.mingfile.c.patch>>
-<<gcl-2.6.5w.o.unixfsys.c.patch>>
 <<gclConfigureMake>>
        @echo 112 finished system build on `date` | tee >gcldir

------

This is one of Camm's patches.
 
diff -rN -u old-axiom--windows--1-1/src/interp/cfuns.lisp.pamphlet
new-axiom--windows--1-1/src/interp/cfuns.lisp.pamphlet
--- old-axiom--windows--1-1/src/interp/cfuns.lisp.pamphlet      Wed Sep
20 21:32:48 2006
+++ new-axiom--windows--1-1/src/interp/cfuns.lisp.pamphlet      Wed Sep
20 21:33:06 2006
@@ -114,10 +114,10 @@
 
 #+(AND KCL (NOT ELF))
 (Clines
-"unsigned int MYCOMBINE(i,j)"
-"unsigned int i,j;"
+"int MYCOMBINE(i,j)"
+"int i,j;"
 "{"
-"return ( (((j & 16777215) << 6)+i) % 1073741789);"
+"return ( (((((unsigned int)j) & 16777215) << 6)+((unsigned int)i)) %
1073741789);"
 "}"
 )
 #+(AND KCL (NOT ELF))

------

This patch corrects some incorrect usage of 'probe-file' in the
Axiom database code. !! Very important !!

diff -rN -u old-axiom--windows--1-1/src/interp/daase.lisp.pamphlet
new-axiom--windows--1-1/src/interp/daase.lisp.pamphlet
--- old-axiom--windows--1-1/src/interp/daase.lisp.pamphlet      Wed Sep
20 21:32:48 2006
+++ new-axiom--windows--1-1/src/interp/daase.lisp.pamphlet      Wed Sep
20 21:33:06 2006
@@ -840,7 +840,7 @@
  (let (thisdir nrlibs asos asys libs object only dir key 
       (|$forceDatabaseUpdate| t) noexpose)
   (declare (special |$forceDatabaseUpdate|))
-  (setq thisdir (namestring (probe-file ".")))
+  (setq thisdir (namestring (truename ".")))
   (setq noexpose nil)
   (multiple-value-setq (only dir noexpose) (processOptions options))
      ;don't force exposure during database build
@@ -1106,12 +1106,12 @@
   (setq *compressvector* nil)
   (withSpecialConstructors)
   (localdatabase nil
-     (list (list '|dir| (namestring (probe-file "./")) ))
+     (list (list '|dir| (namestring (truename "./")) ))
      'make-database)
   (dolist (dir dirlist)
          (localdatabase nil 
                         (list (list '|dir| 
-                                    (namestring (probe-file 
+                                    (namestring (truename 
                                                  (format nil "./~a" 
                                                          dir)))))
                         'make-database))

-------

Here are 2 more of Camm's patches.

diff -rN -u old-axiom--windows--1-1/src/interp/hash.lisp.pamphlet
new-axiom--windows--1-1/src/interp/hash.lisp.pamphlet
--- old-axiom--windows--1-1/src/interp/hash.lisp.pamphlet       Wed Sep
20 21:32:48 2006
+++ new-axiom--windows--1-1/src/interp/hash.lisp.pamphlet       Wed Sep
20 21:33:07 2006
@@ -81,7 +81,7 @@
 (define-function 'HASHTABLE-CLASS #'system::hash-table-test)
 
 #+AKCL
-(clines "static int mem_value(x ,i)object x;int i; { return ((short
*)x)[i];}")
+(clines "int mem_value(x ,i)object x;int i; { return ((short
*)x)[i];}")
 #+AKCL
 (defentry memory-value-short(object int) (int "mem_value"))

diff -rN -u old-axiom--windows--1-1/src/interp/sockio.lisp.pamphlet
new-axiom--windows--1-1/src/interp/sockio.lisp.pamphlet
--- old-axiom--windows--1-1/src/interp/sockio.lisp.pamphlet     Wed Sep
20 21:32:49 2006
+++ new-axiom--windows--1-1/src/interp/sockio.lisp.pamphlet     Wed Sep
20 21:33:08 2006
@@ -78,7 +78,7 @@
   (defentry sock_send_int (int int) (int "sock_send_int"))
   (defentry sock_get_string_buf (int string int) (int
"sock_get_string_buf"))
   (defentry sock_send_string_len (int string int) (int
"sock_send_string_len"))
-  (defentry sock_get_float (int) (float "sock_get_float"))
+  (defentry sock_get_float (int) (double "sock_get_float"))
   (defentry sock_send_float (int float) (int "sock_send_float"))
   (defentry sock_send_wakeup (int int) (int "sock_send_wakeup"))
   (defentry server_switch () (int "server_switch"))

-------

This patch corrects an error in the 'document' script which
fails when the path to 'latex' contains a directory name with
a space.

diff -rN -u old-axiom--windows--1-1/src/scripts/document
new-axiom--windows--1-1/src/scripts/document
--- old-axiom--windows--1-1/src/scripts/document        Wed Sep 20
21:32:49 2006
+++ new-axiom--windows--1-1/src/scripts/document        Wed Sep 20
21:33:08 2006
@@ -1,5 +1,5 @@
 #!/bin/sh
-latex=`which latex`
+latex=latex
 if [ "$latex" = "" ] ; then
   echo document ERROR You must install latex first
   exit 0

-------

The following chunk of the unixport.makefile.patch no longer
applies to gcl-2.6.8pre

diff -rN -u
old-axiom--windows--1-1/zips/gcl-2.6.5w.unixport.makefile.patch
new-axiom--windows--1-1/zips/gcl-2.6.5w.unixport.makefile.patch
--- old-axiom--windows--1-1/zips/gcl-2.6.5w.unixport.makefile.patch
Wed Sep 20 21:32:52 2006
+++ new-axiom--windows--1-1/zips/gcl-2.6.5w.unixport.makefile.patch
Wed Sep 20 21:33:10 2006
@@ -10,12 +10,3 @@
  
  ifeq ($(ARRS),)
  ARRS:=ar rs
-@@ -28,7 +29,7 @@
-       rm -rf gmp
-       mkdir gmp
-       a="$^" ; \
--      for i in $^ ; do \
-+      for i in $$a ; do \
-               cp $$i gmp/$$(echo $$i | sed -e 's,\.\./,,1' -e
's,/,_,g') ; \
-       done
-       touch $@

--------

There, that's all there is too it. :-) Now you can build Axiom
on Windows with the newest prerelease version of GCL.

Regards,
Bill Page.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]