defsystem: (pathname-host (component-host ...)) => error

Vincent Arkesteijn <[email protected]> Sun, 6 Feb 2005 22:05:16 +0100
Newsgroups gmane.lisp.clocc.general
Message-ID <[email protected]>
--tKW2IUtsqtDRztdT
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi,

When building matlisp (which comes with a recent "DEFSYSTEM 3.4
Interim 3"), I get the following error:

--- transcript starts here ---------------------------------------------
;  - Loading defsystem "lazy-loader" 
debugger invoked on a TYPE-ERROR in thread 17320:
  The value #<SB-IMPL::UNIX-HOST {4002BD71}>
  is not of type
    (OR (VECTOR CHARACTER) (VECTOR NIL) BASE-STRING PATHNAME
FILE-STREAM).

You can type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [CONTINUE] Continue anyway (skipping to toplevel read/eval/print
loop).
  1: [QUIT    ] Quit SBCL (calling #'QUIT, killing the process).
(PATHNAME-HOST 1 #<SB-IMPL::UNIX-HOST {4002BD71}>)[:EXTERNAL]
0] backtrace

0: (PATHNAME-HOST 1 #<SB-IMPL::UNIX-HOST {4002BD71}>)[:EXTERNAL]
1: ("hairy arg processor for MAKE::COMPONENT-FULL-PATHNAME-I"
    #<FILE: lazy-loader>
    :BINARY
    NIL)
2: ("hairy arg processor for MAKE::COMPONENT-FULL-PATHNAME"
    #<FILE: lazy-loader>
    :BINARY
    NIL)
3: (MAKE::LOAD-FILE-OPERATION #<FILE: lazy-loader> :ALL)
--- transcript ends here -----------------------------------------------

This appears to be coming from the following code snippet from
component-full-pathname-i:

(when (component-host component)
  ;; MCL2.0b1 and ACLPC cause an error on
  ;; (pathname-host nil)
  (pathname-host (component-host component)
                 #+scl :case #+scl :common
                 ))

This code expects component-host to return a pathname, but apparently
component-host returns a pathname host. And indeed, as of version
1.88 of defsystem.lisp, create-component-pathnames does the following:

  (setf (component-host component)
        (or (component-host component)
            (when parent (component-host parent))
            (pathname-host *default-pathname-defaults*)))

I've hacked around this by allowing both a pathname and a pathname host
from component-host (see attachment), but a better solution would
probably be to always store the same type of object in component-host.

Vincent.

--tKW2IUtsqtDRztdT
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="defsystem.diff"

Index: defsystem.lisp
===================================================================
RCS file: /cvsroot/matlisp/matlisp/defsystem.lisp,v
retrieving revision 1.11
diff -u -F^(def -r1.11 defsystem.lisp
--- defsystem.lisp	27 Jan 2005 19:44:24 -0000	1.11
+++ defsystem.lisp	6 Feb 2005 20:22:08 -0000
@@ -2796,12 +2796,13 @@ (defun component-full-pathname-i (compon
 	   (namestring (translate-logical-pathname pathname)))
 	  (t
 	   (namestring
-	    (make-pathname :host (when (component-host component)
+	    (make-pathname :host (if (pathnamep (component-host component))
 				   ;; MCL2.0b1 and ACLPC cause an error on
 				   ;; (pathname-host nil)
 				   (pathname-host (component-host component)
 						  #+scl :case #+scl :common
-						  ))
+						  )
+				   (component-host component))
 			   :directory (pathname-directory pathname
 						  #+scl :case #+scl :common
 						  )

--tKW2IUtsqtDRztdT--


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl