4

My SBCL is with ASDF3. When I tried to compile the defsystem expression, there was an error like this:

(defsystem "cl-douban"
   :name "cl-douban"
   :components ((:file "package")))

Invalid relative pathname #P"package.lisp" for component

("cl-douban" "package")

Any one knows why? Here is the pic:

enter image description here

Rainer Joswig
  • 136,269
  • 10
  • 221
  • 346
unionx
  • 437
  • 3
  • 15
  • I was getting the same error about "Invalid relative pathname", and I was able to fix it by supplying `:pathname` in the system definition. I wrote up what I was able to find out in this answer: https://stackoverflow.com/a/74932862/871096 – Robert Dodier Dec 27 '22 at 18:47

2 Answers2

3

I would load the cl-douban.asd file.

Xach adds: 'To get the full effect, you need to make ASDF aware of cl-douban (usually by putting it in the source registry path somewhere) and then use (asdf:load-system "cl-douban")'

Rainer Joswig
  • 136,269
  • 10
  • 221
  • 346
  • I compile the (defsystem ...) with SLIME, is this wrong? – unionx Mar 22 '15 at 20:09
  • @unionx: looks like the whole context is missing then. Try to load it. – Rainer Joswig Mar 22 '15 at 20:11
  • 5
    Loading the file is also not sufficient to set up the same environment that ASDF sets up. To get the full effect, you need to make ASDF aware of cl-douban (usually by putting it in the source registry path somewhere) and then use (asdf:load-system "cl-douban"). Compiling the form in SLIME will never work. – Xach Mar 22 '15 at 20:27
  • @Xach I think this is about ASDF's version, not about load the file or not. I tried compiling the code with ASDF2, it worked fine. So maybe it's the something with the ':file' argument. I will check out ASDF source code. – unionx Mar 23 '15 at 17:08
  • @unionx It is exactly about how the file is loaded. What worked in ASDF2 for you was only by coincidence, not by design. – Xach Mar 24 '15 at 17:42
  • Now, as someone with the exact same problem, my question now is "Where in the bleak Helheim is this registry!?" and off to google I go again. Hm... https://common-lisp.net/project/asdf/asdf/Configuring-ASDF-to-find-your-systems.html#Configuring-ASDF-to-find-your-systems Seems to imply that if I put a softlinkg to my project under ~/common-lisp I would be fine. Boy am I glad I'm not using Windows. And testing it, it works. But really the error message should be improved to tell you that it can't find the system and give a link to how to set up that sort of stuff. – Haakon Løtveit Dec 26 '15 at 12:55
1

The error message is admittedly not great. Adding a handler at the proper place for a better error message might or might not be a patch the current maintainer would accept, depending on how much complexity it costs for how much benefit.

Faré
  • 952
  • 5
  • 4