asdf-tools cannot be built with cmucl

Bug #1682625 reported by pipping on 2017-04-13
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ASDF
Undecided
Unassigned

Bug Description

Here's what I tried:

  CMUCL=lisp lisp -load ./tools/asdf-tools

And here's what I get:

Execution of a form compiled with errors:
 (DEFINE-API MAKE-READTABLE
             (&OPTIONAL (NAME NIL NAME-SUPPLIED-P) &KEY MERGE)
             (&OPTIONAL NAMED-READTABLE-DESIGNATOR &KEY (:MERGE LIST) =>
              READTABLE)
             "Creates and returns a new readtable under the specified
  NAME.

  MERGE takes a list of NAMED-READTABLE-DESIGNATORS and specifies the
  readtables the new readtable is created from. (See the :MERGE clause
  of DEFREADTABLE for details.)

  If MERGE is NIL, an empty readtable is used instead.

  If NAME is not given, an anonymous empty readtable is returned.

  Notes:

  An empty readtable is a readtable where each character's syntax is
  the same as in the _standard readtable_ except that each macro
  character has been made a constituent. Basically: whitespace stays
  whitespace, everything else is constituent."
             (COND
               ((NOT NAME-SUPPLIED-P)
                (COPY-READTABLE *EMPTY-READTABLE*))
               ((RESERVED-READTABLE-NAME-P NAME)
                (ERROR "~A is the designator for a predefined readtable. ~
                Not acceptable as a user-specified readtable name."
                       NAME))
               ((LET ((RT (FIND-READTABLE NAME)))
                  (AND RT
                       (PROG1 NIL
                         (CERROR "Overwrite existing entry."
                                 'READTABLE-DOES-ALREADY-EXIST
                                 :READTABLE-NAME NAME)
                         (UNREGISTER-READTABLE RT)))))
               (T
                (LET ((RESULT
                       (APPLY #'MERGE-READTABLES-INTO
                              (COPY-READTABLE
                               (IF MERGE
                                   (ENSURE-READTABLE (FIRST MERGE))
                                   *EMPTY-READTABLE*))
                              (REST MERGE))))
                  (REGISTER-READTABLE NAME RESULT)))))
   [Condition of type KERNEL:SIMPLE-PROGRAM-ERROR]

Restarts:
  0: [CONTINUE ] Return NIL from load of #P"/Users/pipping/asdf/build/fasls/cmu-21b__21b_unicode_-macosx-x86/root/Users/pipping/asdf/ext/named-readtables/src/named-readtables.sse2f".
  1: [TRY-RECOMPILING ] Recompile named-readtables and try loading it again
  2: [RETRY ] Retry loading FASL for
   #<NAMED-READTABLES-SOURCE-FILE "named-readtables" "named-readtables">.
  3: [ACCEPT ] Continue, treating loading FASL for
   #<NAMED-READTABLES-SOURCE-FILE "named-readtables" "named-readtables">
                                     as having been successful.
  4: Retry ASDF operation.
  5: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the
                                     configuration.
  6: Return NIL from load of "./tools/asdf-tools".
  7: [ABORT ] Skip remaining initializations.

Debug (type H for help)

Robert P. Goldman (rpgoldman) wrote :

On CMUCL 21b I can't load this on Linux, either, but with a different failure. If I try

asdf$ cmucl -noinit -nositeinit -load ./tools/asdf-tools

...then CMUCL loads its OWN ASDF and blows up:

; Loading #P"/home/rpg/common-lisp/asdf/tools/asdf-tools".
;; Loading #P"/home/rpg/common-lisp/asdf/tools/load-asdf.lisp".
;;; Loading #P"/usr/local/stow/cmucl/lib/cmucl/lib/contrib/asdf/asdf.sse2f".

Error while trying to load definition for system asdf from pathname /home/rpg/common-lisp/asdf/asdf.asd: don't recognize component type PACKAGE-INFERRED-SYSTEM
   [Condition of type LOAD-SYSTEM-DEFINITION-ERROR]

Restarts:
  0: [CONTINUE ] Return NIL from load of #P"/home/rpg/common-lisp/asdf/asdf.asd".
  1: [RETRY ] Retry #<DEFINE-OP> on #<UNDEFINED-SYSTEM "asdf">.
  2: [ACCEPT ] Continue, treating #<DEFINE-OP> on #<UNDEFINED-SYSTEM "asdf"> as having been successful.
  3: Retry ASDF operation.
  4: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the configuration.
  5: Retry completing compilation for #<PACKAGE-INFERRED-SYSTEM "asdf">.
  6: Continue, treating completing compilation for #<PACKAGE-INFERRED-SYSTEM "asdf"> as having been successful.
  7: Retry ASDF operation.
  8: Retry ASDF operation after resetting the configuration.
  9: Return NIL from load of #P"/home/rpg/common-lisp/asdf/tools/load-asdf.lisp".
 10: Return NIL from load of "./tools/asdf-tools".
 11: [ABORT ] Skip remaining initializations.

Debug (type H for help)

("DEFMETHOD PERFORM (DEFINE-OP SYSTEM)" #<FORMATTED-SYSTEM-DEFINITION-ERROR {58DBB855}>)
Source:
; File: /home/rpg/common-lisp/asdf/build/asdf.lisp
(ERROR (QUOTE LOAD-SYSTEM-DEFINITION-ERROR) :NAME (COERCE-NAME S) :PATHNAME ...)
0]

Since its own ASDF is 3.3.0, I don't know why this should be failing.

Faré (fahree) wrote :

I get the same named-readtables error as Elias, which seems to be a CMUCL bug, and/or a named-readtables bug. Indeed, the error happens in a #-sbcl block inside define-api, on a topic where cmucl is similar to sbcl. I have only given a cursory look, but this doesn't seem to be an ASDF failure.

As for the bug experienced by Robert while trying to reproduce the above, I cannot reproduce and I don't have a mental model for what is happening. Has some old ASDF (3.0.x or earlier) been loaded on top of a later ASDF? Has an incomplete ASDF (with its compilation interrupted in the middle by an error or C-c) been loaded?

pipping (pipping) on 2017-09-03
Changed in asdf:
status: New → Confirmed
pipping (pipping) wrote :

This issue doesn't seem to be going anywhere. I grabbed a master-checkout of asdf, ran `make; make ext` on it and tried to get

 $LISPDIR/bin/lisp -noinit -nositeinit -load asdf/build/asdf.lisp -load asdf/tools/asdf-tools

produce anything other than the error we know from above with values of LISPDIR such as

RHOME/lisp-installations/cmucl-20c-x86-linux
RHOME/lisp-installations/cmucl-20f-x86-linux
RHOME/lisp-installations/cmucl-21a-x86-linux
RHOME/lisp-installations/cmucl-21b-x86-linux
RHOME/lisp-installations/cmucl-2017-04-x86-linux
RHOME/lisp-installations/cmucl-2017-04-42-g7f3040a7e-x86-linux

I had no success.

Faré (fahree) wrote :

I suspect that the way forward is to fix named-readtables for cmucl (or cmucl for named-readtables, depending on whose bug it is).

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers