2008-09-20 13 views
4

Je suis en train d'évaluer la réponse provided here, et je reçois l'erreur: "A file with name ASDF-INSTALL does not exist" lors de l'utilisation clisp:Comment est-ce que j'utilise (exige: PACKAGE) dans clisp sous Ubuntu Hardy?

[email protected]:~$ clisp -q 
[1]> (require :asdf-install) 

*** - LOAD: A file with name ASDF-INSTALL does not exist 
The following restarts are available: 
ABORT   :R1  ABORT 
Break 1 [2]> :r1 
[3]> (quit) 

[email protected]:~$ 

cmucl renvoie une erreur similaire:

[email protected]:~$ cmucl -q 
Warning: #<Command Line Switch "q"> is an illegal switch 
CMU Common Lisp CVS release-19a 19a-release-20040728 + minimal debian patches, running on crap-pile 
With core: /usr/lib/cmucl/lisp.core 
Dumped on: Sat, 2008-09-20 20:11:54+02:00 on localhost 
For support see http://www.cons.org/cmucl/support.html Send bug reports to the debian BTS. 
or to [email protected] 
type (help) for help, (quit) to exit, and (demo) to see the demos 

Loaded subsystems: 
    Python 1.1, target Intel x86 
    CLOS based on Gerd's PCL 2004/04/14 03:32:47 
* (require :asdf-install) 


Error in function REQUIRE: Don't know how to load ASDF-INSTALL 
    [Condition of type SIMPLE-ERROR] 

Restarts: 
    0: [ABORT] Return to Top-Level. 

Debug (type H for help) 

(REQUIRE :ASDF-INSTALL NIL) 
Source: 
; File: target:code/module.lisp 
(ERROR "Don't know how to load ~A" MODULE-NAME) 
0] (quit) 
[email protected]:~$ 

Mais sbcl fonctionne parfaitement:

[email protected]:~$ sbcl -q 
This is SBCL 1.0.11.debian, an implementation of ANSI Common Lisp. 
More information about SBCL is available at <http://www.sbcl.org/>. 

SBCL is free software, provided as is, with absolutely no warranty. 
It is mostly in the public domain; some portions are provided under 
BSD-style licenses. See the CREDITS and COPYING files in the 
distribution for more information. 
* (require :asdf-install) 

; loading system definition from 
; /usr/lib/sbcl/sb-bsd-sockets/sb-bsd-sockets.asd into #<PACKAGE "ASDF0"> 
; registering #<SYSTEM SB-BSD-SOCKETS {AB01A89}> as SB-BSD-SOCKETS 
; registering #<SYSTEM SB-BSD-SOCKETS-TESTS {AC67181}> as SB-BSD-SOCKETS-TESTS 
("SB-BSD-SOCKETS" "ASDF-INSTALL") 
* (quit) 

Des idées pour résoudre ce problème? J'ai trouvé this post sur Internet, mais en utilisant cela n'a pas fonctionné non plus.

+0

Oui, désolé. J'aurais probablement dû mentionner explicitement que c'est aussi simple avec SBCL, mais je ne connais pas d'autre moyen d'installer facilement une bibliothèque Lisp. Je vais devoir jeter un oeil à clbuild un jour. –

+0

(Personnellement, j'installe toujours tout via SBCL et l'utilise par la suite depuis toutes les implémentations de Lisp.Tous mes compilateurs Lisp utilisent le même registre système ASDF.) –

Répondre

1

utilisation clc: clc-besoin dans clisp. Reportez-vous à 'man common-lisp-controller'. J'ai eu la même erreur dans clisp et l'ai résolu en utilisant clc: clc-require. sbcl fonctionne bien avec juste besoin.

3

essayer ceci avant toute autre chose:

(require :asdf) 

vous pouvez voler quelques idées de l'environnement que nous utilisons. il est disponible à: darcsweb

voir environnement.lisp qui charge et configure asdf pour nous. (sbcl a asdf déjà chargé)

3

Les instructions que vous avez mentionné SBCL explicitement, donc on s'attend à ce qu'ils fonctionneront mieux en utilisant SBCL, je suppose. Certains autres Lisps ne viennent pas avec ASDF ou ne l'attachent pas à CL: REQUIRE. Dans le premier cas, vous devrez charger vous-même ASDF auparavant. Dans ce dernier cas, vous devrez appeler (asdf: oos 'asdf: load-op) au lieu de (require).

3

wget http://cclan.cvs.sourceforge.net/caisse /cclan/asdf/asdf.lisp

Il vaut la peine de vérifier clbuild. http://common-lisp.net/project/clbuild/

Pour faire fonctionner un serveur Web LISP. Vous avez seulement besoin de:

darcs get http://common-lisp.net/project/clbuild/clbuild 
cd clbuild 
chmod +x ./clbuild 
./clbuild check 
./clbuild build slime hunchentoot 
./clbuild preloaded 

Maintenant, un repli Lisp va démarrer. Il vous écrivez:

* (hunchentoot:start-server :port 8080) 

test que la réponse du serveur:

wget -O - http://localhost:8080/ 

<html><head><title>Hunchentoot</title></head> 
<body><h2>Hunchentoot Default Page</h2> 
    <p>This is the Hunchentoot default page....