Book logo xindy

A Flexible Indexing System

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

Xindy 1.2.1 and Allegro Common-Lisp (was: Xindy and Allegro Common-Lisp)

Roger Kehr <> wrote:

[... reported bugs which are fixed ...]

: BTW: I have installed ACL for Linux last weekend and thus I was able
: to check some of the errors you already reported. But you have
: actually found more than me. Can you think of any reasons (compiler
: settings?) for this.

I haven't compiled your files, yet ... just loaded them without
compiling :-)  For compilation notes and warnings, look at the end of
this mail.

: > - "idxstyle.lsp", "markup.lsp"
: >
: >   Function (simple-condition-format-string ...) undefined.
: (defmacro simple-condition-format-string (&rest)
: 	`(simple-condition-format-control ,@rest))
: is my current solution. It seems that CLISP doesn't understand this.
: Maybe I should ask on the mailing-list, why not.

CLISP doesn't have implemented the last X3J13 changes?

: > - "idxstyle.lsp"
: >   (open ... :direction :input-immutable ...)
: >   is non-standard, only :input, :output, :io, and :probe are allowed.
: >   Fix: changed :input-immutable to :input.
: Ok. This is new to me. Wonder why I didn't find it?

Can you explain what the differences beetwen ``:input'' and
``:input-immutable'' are?

: > Additionally I have rewritten the shell script "xindy" to call Allegro
: > CL instead of CLISP.  "xindy -v" works, and the first test with
: > "attr1.xdy/.raw" gives the following result:
: > Mmmh, if I trace
: >
: > USER(3): (trace idxstyle::find-file idxstyle::append-pathnames probe-file)
: > USER(4):    (searchpath ".:/home/raichle/xindy/lib/modules")
: > (#p"/" #p"/home/raichle/xindy/lib/modules/")
:      ^^^
: This should be #"./". At least this is not as expected.

I have found this "bug" ... it was the new (searchpath ...) call in
file "testbed.xdy".  To make the test I have copied this file without
changing it appropriately :-(

: As you can see, here it works fine. I had some trouble with different
: (merge-pathnames)-conventions. I already asked the CLISP-Mailing list
: about this last year. Probably there is a different implementation.

The implementation of pathnames and logical pathnames are different.
IMHO the implementation of Allegro CL 4.3 is as conformant to the
standard and the last changes to it as possible.  Remember: the
descriptions in CLtL2 doesn't reflect the last changes!

: P.S: I'll put an inofficial relase of xindy on the ftp-server. With
: your changes incorporated.

I have got Xindy 1.2.1 and now these are the "bugs" and necessary
changes I have found so far:

- ".../binaries/.../defaults.xdy", "idxstyle.lsp", "markup.lsp"
  *load-paths*                is not external
                              (and not imported to the USER package).
  Fix: in "idxstyle.lsp"
        (export 'idxstyle:*load-paths*)
  and either change ".../binaries/.../Makefile" to access
  idxstyle:*load-paths* instead of *load-paths* or import this symbols
  to the USER package.
  (I have missed to report this bug last time.)
- "markup.lsp"
  There are still two (exit) calls, one in function `startup', another
  one in `*break-driver*'.
- "idxstyle.lsp"
  The type `string-char' in (make-array 32 :element-type 'string-char
  ...) has also be changed to `base-char' for Allegro CL.
- "*.lsp"
  If ``#+CLISP <expr> #+ALLEGRO <expr>'' is used, it's better to add a
  "default" <expr> for non-CLISP non-ALLEGRO lisps, i.e.
        #+CLISP <expr> #+ALLEGRO <expr> #-(or CLISP ALLEGRO) <expr>
  Or use something like ``#+CLISP <expr> #-CLISP <expr>''.
- "markup.lsp"
  When opening the `logfile' in function `do-startup' add the
        :if-exists :overwrite
  to the `open' function call.  The default for :if-exists is :error,
  i.e. signal an error if file to be written exists.
  Same change needed when opening the `output' file in this function.

With these changes, I was able to startup Allegro CL, load all
necessary files (without warnings), and start a first test (after
adding ":last" to the search path in my copy of "testbed.xdy") with
   (xindy:startup :idxstyle "attr1.xdy"
                  :rawindex "attr1.raw"
                  :output   "attr1.ind"
                  :logfile "attr1.xlg"   :trace-level 1)
which returns with the following error:
Loading module "testbed.xdy"...
Finished loading module "testbed.xdy".
Loading module "class/pagenums.xdy"...
Error in line 6:
;; $Id: msg00026.html,v 1.1 2004/01/08 19:29:17 jschrod Exp $
;; This module defines the location-class "page-numbers"
(define-location-class "page-numbers" ("arabic-numbers"))
Error in line 11:
;; The rest
(require "class/pagenums.xdy")
Error: No methods applicable for generic function
       (#<PROGRAM-ERROR @ #x90335a>) of classes (PROGRAM-ERROR)
  [condition type: PROGRAM-ERROR]
There seems to be a bug w.r.t. Allegro CL in
        (define-location-class ...)
which I'm unable to find :-((((

For more, see below.

%%%%%%%%%%%%%%%%%%%% Compiling the source files:

I get warnings for all top level forms (use-package, export, ...):
; While compiling (:TOP-LEVEL-FORM "base.lsp" 124):
Warning: compile-file found "USE-PACKAGE" at the top-level --  see the
         documentation for comp:*cltl1-compile-file-toplevel-compatibility-p*


USER(12): (compile-file "xindy:src;base.lsp")
;;; Compiling file xindy:src;base.lsp
; Compiling SPLIT-LIST
Error: Attempt to take the cdr of "split-list" which is not listp.
  [condition type: SIMPLE-ERROR]

[changing package from "COMMON-LISP-USER" to "BASE"]
[1] BASE(13): :zo
Evaluation stack:

   (COMP::TRANS (ASSERT # "split-list"))
   (COMP::PA-COMPILE (ASSERT # "split-list") NIL)
   (COMP::PA-PROGN (# #))
   (COMP::PA-BLOCK (# #))

... more older frames ...
[1] BASE(14): :cur

Seems to be a bug, CLtL2 has (assert <test-fun> [ ( <place>* )
<string> <arg>* ]), i.e. if more than one argument is given, the
second is a list of places and the third is a string.

Fix: added a second argument () before the former second argument

Compiling again:

;  Note: Closure (:INTERNAL SPLIT-LIST 1) will be stack allocated.
;  Note: Closure (:INTERNAL SPLIT-LIST 0) will be stack allocated.




;  Note: Closure (:INTERNAL DEFINE-LOCATION-CLASS 0) will be stack allocated.
;  Note: Closure (:INTERNAL DEFINE-CROSSREF-CLASS 0) will be stack allocated.

dto. for more Closures.


;  Note: Closure
;        (:INTERNAL
;         (:INTERNAL
;          0)
;         0)
;        will be stack allocated.

dto. for more Closures.


;  Note: Closure (:INTERNAL MARKUP-INDEX 0) will be stack allocated.

dto. for more Closures.

Ok, here is a bug:

;;; Fasl write complete
Warning: While compiling these undefined functions were referenced:

Ahhh, you are using atleast this system-dependent function which isn't
available in Allegro Common-Lisp!  (If `system::print-condition' is
used to get the printed representation of a condition, why not using a
`print-object' method for instances of the class `condition'?)

Fix: added #+ALLEGRO print #-ALLEGRO system::print-condition


After compiling all files and fixed these two remaining bugs, I tried
the test again:

USER(3): (xindy:startup :idxstyle "attr1.xdy"
                  :rawindex "attr1.raw"
                  :output   "attr1.ind"
                  :logfile "attr1.xlg"   :trace-level 1)

This is `xindy' version 1.2 (Running on "Allegro CL").

Opening logfile "attr1.xlg" (done)
Reading indexstyle...
Loading module "attr1.xdy"...
Loading module "testbed.xdy"...
Finished loading module "testbed.xdy".
Loading module "class/pagenums.xdy"...
Finished loading module "class/pagenums.xdy".

Error in line 29:

(markup-range :class "follows" :open "\folone{" :close "}f."
	      :length 1 :ignore-end)

Syntax Error in
       (MARKUP-RANGE :CLASS "follows" :OPEN "\\folone{" :CLOSE "}f." :LENGTH 1
                     :IGNORE-END).; killing "Editor Server"
; Exiting Lisp

Any hints?  Any hints how to trace/debug Xindy to find this bug?