#504 LOAD-LOGICAL-PATHNAME-TRANSLATIONS confuses "many" and "one"

lisp error
closed-fixed
Sam Steingold
clisp (525)
5
2008-10-28
2008-10-26
Aurelio Bignoli
No

When CUSTOM:*LOAD-LOGICAL-PATHNAME-TRANSLATIONS-DATABASE* contains a directory which, in turn, contains a CMUCL-style host definition file, LOAD-LOGICAL-PATHNAME-TRANSLATIONS signals an error. According to

http://clisp.sourceforge.net/impnotes.html#load-lpt

it should instead load the CMUCL-style host definition file.

Test case:

1) create a CMUCL-style host definition file in a directory in CUSTOM:*LOAD-PATH*:

~ $ mkdir -p ~/lisp/loghosts

and a CMUCL-style file within it:

~ $ cat ~/lisp/loghosts/test-case
(
("uffi;**;*" "/usr/local/share/common-lisp/uffi-1.5.7/**/*")
("uffi;**;*.*" "/usr/local/share/common-lisp/uffi-1.5.7/**/*.*")

("**;*" "/usr/local/share/common-lisp/**/*")
("**;*.*" "/usr/local/share/common-lisp/**/*.*"))

;;;
;;; Local Variables:
;;; mode: lisp
;;; syntax: common-lisp
;;; End:

2) Start CLISP and try to load the host definitions:

~ $ clisp -K full -norc
i i i i i i i ooooo o ooooooo ooooo ooooo
I I I I I I I 8 8 8 8 8 o 8 8
I \ `+' / I 8 8 8 8 8 8
\ `-+-' / 8 8 8 ooooo 8oooo
`-__|__-' 8 8 8 8 8
| 8 o 8 8 o 8 8
------+------ ooooo 8oooooo ooo8ooo ooooo 8

Welcome to GNU CLISP 2.47+ (2008-10-24) <http://clisp.cons.org/>

Copyright (c) Bruno Haible, Michael Stoll 1992, 1993
Copyright (c) Bruno Haible, Marcus Daniels 1994-1997
Copyright (c) Bruno Haible, Pierpaolo Bernardi, Sam Steingold 1998
Copyright (c) Bruno Haible, Sam Steingold 1999-2000
Copyright (c) Sam Steingold, Bruno Haible 2001-2008

Type :h and hit Enter for context help.

[1]> custom:*load-paths*
(#P"./" "~/lisp/**/")
[2]> (setf custom:*load-logical-pathname-translations-database* '(#P"loghosts/"))
(#P"loghosts/")
[3]> (load-logical-pathname-translations "test-case")
;; Loading logical hosts from file /home/aurelio/lisp/loghosts/test-case ...
*** - STRING-UPCASE: argument
(("uffi;**;*" "/usr/local/share/common-lisp/uffi-1.5.7/**/*") ("uffi;**;*.*" "/usr/local/share/common-lisp/uffi-1.5.7/**/*.*")
("**;*" "/usr/local/share/common-lisp/**/*") ("**;*.*" "/usr/local/share/common-lisp/**/*.*"))
should be a string, a symbol or a character
The following restarts are available:
USE-VALUE :R1 Input a value to be used instead.
ABORT :R2 Abort main loop
Break 1 [4]>

Discussion

  • Sam Steingold
    Sam Steingold
    2008-10-26

    WFM. please supply the lisp backtrace (:bt).
    note that the name of the file should be the name of the host being defined.

     
  • sds wrote:

    > WFM

    it worked for me until I upgraded from 2.46 to 2.47

    > note that the name of the file should be the name of the host being
    > defined.

    in the test case ~/lisp/loghosts/test-case is created and then is evaluated (load-logical-pathname-translations "test-case").

    > please supply the lisp backtrace (:bt).

    Break 1 [5]> :bt
    <1/174> #<SYSTEM-FUNCTION SHOW-STACK> 3
    <2/167> #<COMPILED-FUNCTION SYSTEM::PRINT-BACKTRACE>
    <3/161> #<COMPILED-FUNCTION SYSTEM::DEBUG-BACKTRACE>
    <4/152> #<SYSTEM-FUNCTION SYSTEM::READ-EVAL-PRINT> 2
    <5/149> #<COMPILED-FUNCTION SYSTEM::BREAK-LOOP-2-3>
    <6/145> #<SYSTEM-FUNCTION SYSTEM::SAME-ENV-AS> 2
    <7/131> #<COMPILED-FUNCTION SYSTEM::BREAK-LOOP-2>
    <8/129> #<SYSTEM-FUNCTION SYSTEM::DRIVER>
    <9/89> #<COMPILED-FUNCTION SYSTEM::BREAK-LOOP>
    <10/86> #<SYSTEM-FUNCTION INVOKE-DEBUGGER> 1
    <11/76> #<SYSTEM-FUNCTION ERROR>
    <12/63> #<COMPILED-FUNCTION SYSTEM::CHECK-VALUE>
    <13/61> #<SYSTEM-FUNCTION STRING-UPCASE>
    <14/50> #<COMPILED-FUNCTION SYSTEM::LOAD-LPT-MANY>
    <15/40> #<COMPILED-FUNCTION LOAD-LOGICAL-PATHNAME-TRANSLATIONS>
    [38] EVAL frame for form (LOAD-LOGICAL-PATHNAME-TRANSLATIONS "test-case")
    Printed 15 frames
    Break 1 [5]>

    The function SYSTEM::LOAD-LPT-MANY loads Allegro-style pathname definition files. The right function to call should be SYSTEM::LOAD-LPT-ONE.

     
  • Sam Steingold
    Sam Steingold
    2008-10-28

    thank you for your bug report.
    the bug has been fixed in the CVS tree.
    you can either wait for the next release (recommended)
    or check out the current CVS tree (see http://clisp.cons.org\)
    and build CLISP from the sources (be advised that between
    releases the CVS tree is very unstable and may not even build
    on your platform).

     
  • Sam Steingold
    Sam Steingold
    2008-10-28

    • assigned_to: haible --> sds
    • summary: LOAD-LOGICAL-PATHNAME-TRANSLATIONS bug --> LOAD-LOGICAL-PATHNAME-TRANSLATIONS confuses "many" and "one"
    • status: open --> closed-fixed