gcl-devel
[Top][All Lists]
Advanced

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

[Gcl-devel] GCL 2.6.8pre


From: Camm Maguire
Subject: [Gcl-devel] GCL 2.6.8pre
Date: Thu, 29 Sep 2005 23:10:04 -0400
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.3 (Unebigory ōmae) APEL/10.3 Emacs/21.2 (i386-debian-linux-gnu) MULE/5.0 (SAKAKI)

Greetings!  In the process of releasing new Debian packages of maxima,
acl2 and axiom against gcl 2.6.7 and gcc 4.0, it has come to my
attention that there are a few errata which are prompting me to work
toward a 2.6.8 cleanup release in the near future.

Here are the primary fixes:

1) fedora has changed their address randomization again.  2.6.8pre and
   later should build on fc4 and earlier out of the box.  Thanks to
   Juho Snellman <address@hidden> for the critical info.

2) The compiler::link build mechanism used by machines without native
   object relocation yet implemented had sufferred a bit of bit rot,
   and is now made considerably more robust.  It had earlier rather
   primitively assumed that the source and object files were in the
   same directory and were not moved before invoking compiler::link.
   Now the init function name is read from the binary object file
   itself rather than deduced from the pathname.  This restores maxima
   acl2 and axiom on mips mipsel alpha ia64 and hppa.

   This list will shrink at least to just ia64 and hppa with 2.7.0.
   As this list can shrink and grow in the future as well, it would
   make sense to avoid having to change all 4 programs in each such
   instance.  Therefore I recommend that we conditionalize the build
   based on the #+-native-reloc feature which GCl sets as appropriate.

   maxima already has an --enable-gcl-alt-link configure option.  I
   recommend merging this with the traditional option and
   conditionalizing the two code sets with #-native-reloc and
   #+native-reloc respectively.

   acl2 already has the dlopen file Matt and I have worked on
   together.  The latest Debian package does something like this:

saved_acl2: debian/patches_applied $(DLOPEN_T)
        gcl -batch -eval "(bye #-native-reloc 1)" || \
                (gcl -batch -eval '(load "debian/dlopen.lisp")' &&  $(MAKE) 
do_saved)
        gcl -batch -eval "(bye #+native-reloc 1)" || $(MAKE) LISP=gcl
        mv address@hidden $@
 
   Perhaps the equivalent can be placed in acl2's own makefiles?

   axiom had a set up patches which were used by Debian only on the
   required platforms, and BSD everywhere for a while. (The
   compiler::link alternate build mechanism works and can be tested on
   all GCL platforms, but is only required where native object
   relocation is absent.)  Here is the patch I'm using in the latest
   debian upload:

=============================================================================
--- ./lsp/Makefile.pamphlet.~1.5.~      2005-09-05 18:50:31.000000000 +0000
+++ ./lsp/Makefile.pamphlet     2005-09-20 21:20:10.000000000 +0000
@@ -1012,14 +1012,7 @@
        @echo 1 building ${LSP} ${GCLVERSION}
 
 gcldir: 
-       @echo 2 building ${GCLVERSION}
-       @tar -zxf ${ZIPS}/${GCLVERSION}.tgz
-<<gcl-2.6.7.socket.patch>>
-<<gcl-2.6.7.libspad.patch>>
-<<gcl-2.6.7.toploop.patch>>
-<<gcl-2.6.7.tail-recursive.patch>>
-<<gcl-2.6.7.collectfn.fix>>
-<<gclConfigureMake>>
+       echo '(compiler::link nil "${OUT}/lisp" (format nil "(progn (let 
((*load-path* (cons ~S *load-path*))(si::*load-types* ~S)) (compiler::emit-fn 
t))(when (fboundp (quote si::sgc-on)) (si::sgc-on t))#-native-reloc(setq 
compiler::*default-system-p* t))" si::*system-directory* (quote (list 
#+native-reloc".o" ".lsp"))) "${OBJ}/${SYS}/lib/cfuns-c.o 
${OBJ}/${SYS}/lib/sockio-c.o ${OBJ}/${SYS}/lib/libspad.a")' | gcl
        @echo 13 finished system build on `date` | tee >gcldir
 
 ccldir: ${LSP}/ccl/Makefile
--- ./src/algebra/Lattice.pamphlet.orig 2005-01-04 23:45:59.000000000 +0000
+++ ./src/algebra/Lattice.pamphlet      2005-02-14 18:45:10.000000000 +0000
@@ -39620,13 +39620,14 @@
        @ cp -p ${SRC}/doc/gloss.text ${LIB}
        @ cp -p ${SRC}/doc/topics.data ${MID}
        @ echo rebuilding daase files
-       @ (cd ${MID} ; \
-          echo ')set out le 200' >/tmp/tmp.input ; \
-          echo ')fin' >>/tmp/tmp.input ; \
-          echo '(make-databases "" (QUOTE ("unix")))' >>/tmp/tmp.input ; \
-          echo '(bye)' >>/tmp/tmp.input ; \
-          cat /tmp/tmp.input | ${INTERPSYS} ; \
-          rm -f /tmp/tmp.input )
+       @ (cd ${MID} ; \
+          echo ')set out le 200' >/tmp/tmp.input ; \
+          echo ')fin' >>/tmp/tmp.input ; \
+          echo "#+native-reloc(make-databases \"\" (QUOTE 
(\"unix\")))#-native-reloc(system \"cp ${SRC}/../debian/*.daase ${MID}\")" 
>>/tmp/tmp.input ; \
+          echo '(bye)' >>/tmp/tmp.input ; \
+          cat /tmp/tmp.input | ${INTERPSYS} ; \
+          rm -f /tmp/tmp.input )
+#      @ (cp ${SRC}/../debian/*.daase ${MID})
        @ echo If all went well, go-ahead Mike and do a db-install as well !
 
 db-install:
@@ -39758,7 +39759,8 @@
        @ echo rebuilding databases...
        @ cp ${SRC}/doc/gloss.text ${MID}
        @ cp ${SRC}/doc/topics.data ${MID}
-       @ (cd ${MID} ; echo ')lisp (make-databases "" nil)' | ${INTERPSYS} )
+       @ (cd ${MID} ; echo ")lisp (progn #+native-reloc(make-databases \"\" 
nil)#-native-reloc(system \"cp ${SRC}/../debian/*.daase ${MID}\"))" | 
${INTERPSYS} )
+#      @ (cp ${SRC}/../debian/*.daase ${MID})
 
 check:
        @ echo Checking that INTERP.EXPOSED and NRLIBs are consistent
--- ./src/etc/Makefile.pamphlet.orig    2005-01-30 12:03:12.000000000 +0000
+++ ./src/etc/Makefile.pamphlet 2005-02-14 18:47:16.000000000 +0000
@@ -33,9 +33,10 @@
        @ cp ${SRC}/doc/gloss.text ${INT}/algebra
        @ cp ${SRC}/doc/topics.data ${INT}/algebra
        @ cp ${SRC}/doc/topics.data ${INT}/algebra
-       @ (cd ${INT}/algebra ; \
-           echo ')lisp (make-databases "" nil)' | ${INTERPSYS} )
-       @ cp ${INT}/algebra/*.daase ${MNT}/${SYS}/algebra
+       @ (cd ${INT}/algebra ; \
+           echo ")lisp (progn #+native-reloc(progn (make-databases \"\" 
nil)(system \"cp ${INT}/algebra/*.daase 
${MNT}/${SYS}/algebra\"))#-native-reloc(system \"cp ${SRC}/../debian/*.daase 
${MNT}/${SYS}/algebra\"))" | ${INTERPSYS} )
+#      @ cp ${INT}/algebra/*.daase ${MNT}/${SYS}/algebra
+#      @ (cp ${SRC}/../debian/*.daase ${MNT}/${SYS}/algebra)
 
 @
 \section{summary}
--- ./src/boot/Makefile.pamphlet.orig   2005-06-05 03:23:35.000000000 +0000
+++ ./src/boot/Makefile.pamphlet        2005-09-20 21:36:15.000000000 +0000
@@ -1173,7 +1173,8 @@
 
 Until this is fixed we need to continue to use the old scheme.
 <<environment>>= 
-CMD0=  (progn (mapcar (function (lambda (x) (load  x))) (quote (${OBJS1}))) 
(system::save-system "${SAVESYS}"))
+#CMD0= (progn (mapcar (function (lambda (x) (load  x))) (quote (${OBJS1}))) 
(system::save-system "${SAVESYS}"))
+CMD0=  (if (member :native-reloc *features*) (progn (mapcar (function (lambda 
(x) (load  x))) (quote (${OBJS1}))) (system::save-system "${SAVESYS}")) 
(compiler::link (quote (${OBJS1})) "${SAVESYS}" (format nil "(let ((*load-path* 
(cons ~S *load-path*))(si::*load-types* ~S)) (compiler::emit-fn t)) (when 
(fboundp (quote si::sgc-on)) (si::sgc-on t)) (setq compiler::*default-system-p* 
t)" si::*system-directory* (quote  (list ".lsp")))))
  
 @
 \subsection{boothdr.lisp \cite{1}}
--- ./src/interp/Makefile.pamphlet.orig 2005-09-20 21:48:56.000000000 +0000
+++ ./src/interp/Makefile.pamphlet      2005-09-20 21:49:14.000000000 +0000
@@ -576,7 +576,28 @@
 \begin{verbatim}
 <<save depsys image>>=
        @ (cd ${MNT}/${SYS}/bin ; \
-          echo '(progn (load "${OUT}/makedep.lisp") (spad-save "${DEPSYS}"))' 
| ${LISPSYS})
+          echo '#+native-reloc(progn (load "${OUT}/makedep.lisp") (spad-save 
"${DEPSYS}"))#-native-reloc(progn \
+                       (setq si::*collect-binary-modules* t) \
+                       (load "${OUT}/makedep.lisp") \
+                       (compiler::link \
+                               (remove-duplicates si::*binary-modules* :test 
(quote equal)) \
+                               "$(DEPSYS)" \
+                               (format nil "\
+                                       (setq si::*collect-binary-modules* t) \
+                                       (let ((si::*load-path* (cons ~S 
si::*load-path*))\
+                                            (si::*load-types* ~S))\
+                                               (compiler::emit-fn t))\
+                                       (load \"$(OUT)/makedep.lisp\")\
+                                       (gbc t)\
+                                       (when si::*binary-modules* \
+                                               (error si::*binary-modules*))\
+                                       (setq si::collect-binary-modules* nil 
si::*binary-modules* nil)\
+                                       (gbc t)\
+                                       (when (fboundp (quote si::sgc-on)) 
(si::sgc-on t))\
+                                       (setq compiler::*default-system-p* t)\
+                               " si::*system-directory* (quote (list ".lsp")))\
+                               "" \
+                               nil))' | ${LISPSYS})
 @
 \end{verbatim}
 
@@ -880,8 +901,36 @@
        @ echo '#+:akcl (setq compiler::*suppress-compiler-notes* t)' >> 
${OUT}/makeint.lisp
        @ echo '#+:akcl (si::gbc-time 0)' >> ${OUT}/makeint.lisp
        @ echo '#+:akcl (setq si::*system-directory* "${SPAD}/bin/")' >> 
${OUT}/makeint.lisp
+#      @ (cd ${OBJ}/${SYS}/bin ; \
+#        echo '(progn (gbc t) (load "${OUT}/makeint.lisp") (gbc t) 
(user::spad-save "${SAVESYS}"))' | ${LISPSYS} )
        @ (cd ${OBJ}/${SYS}/bin ; \
-         echo '(progn (gbc t) (load "${OUT}/makeint.lisp") (gbc t) 
(user::spad-save "${SAVESYS}"))' | ${LISPSYS} )
+         echo '#+native-reloc(progn (gbc t) (setq x 
si::*system-directory*)(load "${OUT}/makeint.lisp") (setq 
si::*system-directory* x) (unintern (quote x))(gbc t)(user::spad-save 
"${SAVESYS}"))#-native-reloc(progn \
+                       (setq si::*collect-binary-modules* t)\
+                       (setq x si::*system-directory*)\
+                       (load "${OUT}/makeint.lisp")\
+                       (setq si::*system-directory* x)\
+                       (unintern (quote x))\
+                       (compiler::link \
+                               (remove-duplicates si::*binary-modules* :test 
(quote equal))\
+                               "$(SAVESYS)" \
+                               (format nil "\
+                                       (let ((si::*load-path* (cons ~S 
si::*load-path*))\
+                                             (si::*load-types* ~S))\
+                                               (compiler::emit-fn t))\
+                                        (setq si::*collect-binary-modules* t)\
+                                        (setq x si::*system-directory*)\
+                                        (load \"$(OUT)/makeint.lisp\")\
+                                        (setq si::*system-directory* x)\
+                                        (unintern (quote x))\
+                                        (when si::*binary-modules* \
+                                               (error si::*binary-modules*))\
+                                       (setq si::collect-binary-modules* nil 
si::*binary-modules* nil)\
+                                       (gbc t)\
+                                       (when (fboundp (quote si::sgc-on)) 
(si::sgc-on t))\
+                                       (setq compiler::*default-system-p* t)\
+                               " si::*system-directory* (quote (list ".lsp")))\
+                       "$(OBJ)/$(SYS)/lib/sockio-c.o 
$(OBJ)/$(SYS)/lib/cfuns-c.o $(OBJ)/$(SYS)/lib/libspad.a" \
+                       nil))' | $(LISPSYS))
        @ echo 6 ${SAVESYS} created
        @ cp ${SAVESYS} ${AXIOMSYS}
        @ echo 6a ${AXIOMSYS} created
=============================================================================

       This can obviously be cleaned up , but it appears to be working
       again on all Debian machines.  Notably, it appears that in the
       last 6 months the interpsys binary is used to compile some
       objects which are later loaded and dumped into the final
       image.  Therefore  I had to set *default-system-p* to t in
       interpsys, and then at the very end, do

        echo ")lisp (progn (setq compiler::*default-system-p* 
nil)(si::save-system \"foo\"))" | AXIOM=$(CURDIR)/mnt/linux 
$(CURDIR)/mnt/linux/bin/AXIOMsys && mv foo mnt/linux/bin/AXIOMsys
 
        Perhaps we could try once again to merge this or equivalent
        into the source proper.

3)    one GC/regexp race bug is fixed

4)    binutils is upgraded to 2.16, and built locally in Debian by
      default.

5)    Certain improvements to optimization when using compile as
      opposed to compile-file have been made.  compile, unlike
      compile-file, must refer to any literal object mentioned in the
      source by address, i.e. must not copy it.  This was achieved by
      wrapping quoted literals by `(load-time-value (si::nani
      ,(si::address object))), and was confusing the optimizer when
      special symbols like 'eql were mentioned.  we now do not wrap
      external symbols of the lisp package as per spec.


One can try out the 2.6.8 pre-release by:

export CVS_RSH=ssh
export CVSROOT=:ext:subversions.gnu.org:/cvsroot/gcl
cvs -z9 -q co -d gcl-2.6.8pre -r Version_2_6_8pre gcl

This is essentially the same code as was uploaded into Debian with
package name 2.6.7-7 in case one is interested in following it there.

Anyway, I don't plan on working on this too much, as I'd like to
finalize 2.7.0 while it is still possible.

Take care,

-- 
Camm Maguire                                            address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah




reply via email to

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