From: Haris Bogdanovi� on 29 Mar 2010 13:44 Hi. I'm beginning to work with emacs and slime in windows I would like to install cl-gtk2 package. I have to do it with with asdf but I don't know where to start. I read some tutorials on this but it seems a bit complicated for me as I just started in lisp/slime/emacs. Please help. What exactly I have to do to install cl-gtk2 package ? Thanks Haris
From: Jorge Gajon on 29 Mar 2010 22:58 On 2010-03-29, fbogdanovic(a)xnet.hr wrote: > Hi. > > I'm beginning to work with emacs and slime in windows > I would like to install cl-gtk2 package. I have to do it with with asdf > but I don't know where to start. > I read some tutorials on this but it seems a bit complicated for me > as I just started in lisp/slime/emacs. > > Please help. What exactly I have to do to install cl-gtk2 package ? > Hi Haris, What implementation of Common Lisp are you using? What problems are you having with the ASDF tutorials you have read? ASDF will not directly help you with "Installing" a component (also called "systems" by ASDF). Instead it is used to "Compile" and "Load" systems and their dependencies in the right order. You need to install those systems first, either manually or with a tool like ASDF-Install (which is separate from ASDF). Since you want to use CL-GTK2, you are probably using SBCL, and I think it already comes with ASDF and ASDF-Install bundled (at least it does in Linux binary). Try this in the REPL, if you don't see an error then you already have ASDF installed: (require :asdf) As I said above, ASDF will not install anything for you, it will only Load, Compile, or Test a system that it can already find. To find a system it will search in the locations specified by the variable `asdf:*central-registry*`. By default (SBCL on Linux) you get this: CL-USER[1]> asdf:*central-registry* ((MERGE-PATHNAMES ".sbcl/systems/" (USER-HOMEDIR-PATHNAME)) (LET ((ASDF::HOME (POSIX-GETENV "SBCL_HOME"))) (WHEN (AND ASDF::HOME (NOT (STRING= ASDF::HOME ""))) (MERGE-PATHNAMES "site-systems/" (TRUENAME ASDF::HOME)))) *DEFAULT-PATHNAME-DEFAULTS*) The `(MERGE-PATHNAMES ".sbcl/systems/" (USER-HOMEDIR-PATHNAME))` form evaluates in my system to "/home/gajon/.sbcl/systems/", that's one place where ASDF will try to find systems to load. If you don't have any place in `asdf:*central-registry*`, you'll need to add one with code like this: (pushnew (merge-pathnames "Lisp/asdf-systems/" (user-homedir-pathname)) asdf:*central-registry* :test #'equal) You'll have to translate that to use Windows' pathnames. You would also like to add that to your initialization file. In my computer it's located at `$HOME/.sblcrc`, you will also need to figure out the correct place for Windows. Of course, be careful to load ASDF -- `(require :asdf)` -- before pushing the path to the central registry. What ASDF will look for is a link with an `.asd` extension, for example if you want to load a system called "hello-lisp" it will try to find a link called `hello-lisp.asd` in one of the locations indicated in `asdf:*central-registry*`. Then, by following that link, it will find the location of the sources of the system that it is trying to load. By "link" I refer to the ones that you can create on a typical UNIX file system with the `ln` command. Windows doesn't support this kind of links (well it kinda does but it's not directly accessible by the user), but it seems that normal Windows shortcuts will work too. Read this: http://www.cliki.net/asdf#clispWindows Ok, now that you know where ASDF will try to find the system definitions, you could try to install a system manually. A sample package ideal for learning is the `hello-lisp` system. Get this file: http://constantly.at/lisp/hello-lisp-0.2.tar.gz And unpack it somewhere in your hard drive, then create a link (or a shortcut) to the `hello-lisp.asd` file from the folder that works as the central registry for ASDF. Then in the REPL you should be able to do this: CL-USER[1]> (asdf:oos 'asdf:load-op 'hello-lisp) CL-USER[2]> (hello-lisp:hello) Hello, Lisp! NIL When you tell ASDF to _"load-op hello-lisp"_ it will look for a link `hello-lisp.asd` on the places indicated in `asdf:*central-registry*`, and follow that link to the real location of the system, and load the sources found there into your running image. If you can't get the above example to work, then read carefully the ASDF "Getting Started" Manual, and Google for tutorials. http://common-lisp.net/project/asdf/getting-started.html BUT WHAT ABOUT ASDF-INSTALL? The above example of the `hello-lisp` doesn't present any problems, you just download the tarball, extract it somewhere and create a link to it. It is trivial because `hello-lisp` doesn't have any dependencies. However, in practice most systems have a few dependencies on other systems. In that case you would need to know what those dependencies are, download the tarballs of each one of them, extract the contents of each one of them, and create the links for each one. Then repeat that for the dependencies of each of the dependencies. It quickly becomes a lot of work. This is where ASDF-Install becomes really helpful. ASDF-Install will do the work of downloading and installing the system that you want, along with its dependencies and the dependencies of those dependencies. There's a good tutorial on how to use ASDF-Install here: http://common-lisp.net/project/asdf-install/tutorial/index.html I don't know how easy it is to get ASDF-Install working on Windows, read the tutorial carefully. You will probably need to do some Googling around. The tutorial contains a note that says that you need to install cygwin on Windows to be able to use ASDF-Install. I have a *hunch* that this is not really necessary (and this is just a hunch, I've never tried this on Windows). I guess you'll need to disable GPG checking, you can figure that out from the tutorial above. Hope this gives your some guidance. - Jorge
From: Norbert_Paul on 30 Mar 2010 07:04 Jorge Gajon wrote: > On 2010-03-29, fbogdanovic(a)xnet.hr wrote: .... > system with the `ln` command. Windows doesn't support this kind of links > (well it kinda does but it's not directly accessible by the user), but > it seems that normal Windows shortcuts will work too. Read this: > http://www.cliki.net/asdf#clispWindows > Well, they are at least meant to work. Lines 744 ff of my asdf.lisp say: #+(and (or win32 windows) (not :clisp)) (shortcut (make-pathname :defaults defaults :version :newest :name name :type "asd.lnk" :case :local))) and Lines 750 ff. say: #+(and (or win32 windows) (not :clisp)) (when (probe-file shortcut) (let ((target (parse-windows-shortcut shortcut)))
From: Alex Mizrahi on 30 Mar 2010 12:29 JG> You'll have to translate that to use Windows' pathnames. I think on Windows the best way is to push each individual library into asdf:*central-registry*. E.g. (push #p"c:\\lisp\\cl-something\\" asdf*central-registry*). This can be done in the init file to avoid doing it each time.
From: Haris Bogdanovic on 30 Mar 2010 16:00 Thanks for your detailed answer. I was using clisp but since you said that sbcl has asdf and asdf install I changed to sbcl. I didn't manage to install any package (I tried few from asdf-install page): After (asdf-install:install :wxcl) I got Server responded 302 for GET http://freefr.dl.sourceforge.net/project/wxcl/wxcl/wxcl-1.3.0/wxcl-all-platform-1-3-0.tar.gz.asc [Condition of type ASDF-INSTALL::DOWNLOAD-ERROR] Then I tried wxcl package supplying the http address but download error again Then I tried local install (asdf-install:install "c:\wxcl.tar.gz") and got Socket error in "connect": 2 (No such file or directory) but file is there. Don't know what to do ?
|
Next
|
Last
Pages: 1 2 3 4 5 Prev: ANN: ABCL 0.19.1 released Next: A new approach to learning from Knowledge Horizon |