1

Update 2

I think @faré is right, it's an output translation problem.

So I declared the evironment variable ASDF_OUTPUT_TRANSLATIONS and set it to E:/. Now (asdf:require-system "my-system") yields a different error: Uneven number of components in source to destination mapping: "E:/" which led me to this SO-topic.

Unfortunately, his solution doesn't work for me. So I tried the other answer and set ASDF_OUTPUT_TRANSLATIONS to (:output-translations (t "E:/")). Now I get yet another error:

Invalid source registry (:OUTPUT-TRANSLATIONS (T "E:/")).
One and only one of
    :INHERIT-CONFIGURATION or
    :IGNORE-INHERITED-CONFIGURATION
is required.
(will be skipped)

Original Posting

I have a simple system definition but can't get ASDF to load it.
(asdf-version 3.1.5, sbcl 1.3.12 (upgraded to 1.3.18 AMD64), slime 2.19, Windows 10)

What I have tried so far

Following the ASDF manual: "4.1 Configuring ASDF to find your systems"

There it says:

For Windows users, and starting with ASDF 3.1.5, start from your %LOCALAPPDATA%, which is usually ~/AppData/Local/ (but you can ask in a CMD.EXE terminal echo %LOCALAPPDATA% to make sure) and underneath create a subpath config/common-lisp/source-registry.conf.d/

That's exactly what I did:

  1. Echoing %LOCALAPPDATA% which evaluates to C:\Users\my-username\AppData\Local
  2. Underneath I created the subfolders config\common-lisp\source-registry.conf.d\ (In total: C:\Users\my-username\AppData\Local\config\common-lisp\source-registry.conf.d\

The manual continues:

there create a file with any name of your choice but with the type conf, for instance 50-luser-lisp.conf; in this file, add the following line to tell ASDF to recursively scan all the subdirectories under /home/luser/lisp/ for .asd files: (:tree "/home/luser/lisp/") That’s enough. You may replace /home/luser/lisp/ by wherever you want to install your source code.

In the source-registry.conf.d folder I created the file my.conf and put in it (:tree "C:/Users/my-username/my-systems/"). This folder contains a my-system.asd.

And here comes the weird part:

If I now type (asdf:require-system "my-system") in the REPL I get the following error:
Can't create directory C:\Users\my-username\AppData\Local\common-lisp\sbcl-1.3.12-win-x86\C\Users\my-username\my-systems\C:\

So the problem is not that ASDF doesn't find the file, it does -- but (whatever the reason) it tries to create a really weird subfolder hierarchy which ultimately fails because at the end it tries to create the folder C: but Windows doesn't allow foldernames containing a colon.

Another approach: (push path asdf:*central-registry*)

If I try

> (push #P"C:/Users/my-username/my-systems/" asdf:*central-registry*)
(#P"C:/Users/my-username/my-systems/"
 #P"C:/Users/my-username/AppData/Roaming/quicklisp/quicklisp/")

> (asdf:require-system "my-system")

I get the exact same error.

I don't know what to do.

Update

Because of the nature of the weird path ASDF was trying to create I thought maybe I could bypass the problem by specifying a relative path instead of an absolute one. So I tried
  (:tree "\\Users\\my-username\\my-systems")
in my conf file. Still the same error.

Frank
  • 433
  • 3
  • 10
  • It seems that ASDF tries to create the location for FASL files. This location starts in AppData folder and to distinguish between different lisps and sources it recreates the full path to source. Now, in my installation it manages to remove colon from "C:". To sidestep the problem (if it is acceptable): QUICKLISP should help. – mobiuseng Jun 28 '17 at 12:51
  • What do you mean bei 'Quicklisp should help'? Can I make quicklisp load my asd file? (I have quicklisp installed) – Frank Jun 28 '17 at 13:23
  • Yes, put the directory with your system into `local-projects`, run `(ql:register-local-systems)` and then `(ql:quickload :your-system)`. – mobiuseng Jun 28 '17 at 22:19
  • Ok, this is weird. It says `Loading "my-system"` and then again the same error. – Frank Jun 29 '17 at 00:50
  • Can you load other systems via QUICKLISP? it's something really weird with ASDF... – mobiuseng Jun 29 '17 at 08:26
  • Also, check the value of ` asdf:*user-cache*` - that is where ASDF is putting FASLs. If it contains a weird path, re-assign it. If it fixes the issue, you may want to add the assignment to this variable into your `.sbclrc` file. – mobiuseng Jun 29 '17 at 12:05
  • Can we see the contents of `my-system.asd` ? Are you trying to use absolute pathnames within a system definition??? – Faré Jul 04 '17 at 21:48

1 Answers1

2

Ahem. It looks like an output-translations problem.

I don't have a Windows machine right now, but this all used to work last time I tried.

Can you setup some ad hoc output-translations for now that will make it work?

Faré
  • 952
  • 5
  • 4
  • 1
    Also, can you confirm that the problem still happens with the latest ASDF 3.2.1 and the latest SBCL 1.3.18 ? – Faré Jun 27 '17 at 00:12
  • 1
    Finally, the asdf-devel mailing-list is a better place to seek help about ASDF. – Faré Jun 27 '17 at 00:13
  • I uninstalled sbcl 1.3.12 and installed 1.3.18. I set up emacs from scratch. Still the same error but I still have ASDF 3.1.5. What is the best way to upgrade ASDF? (I really appreciate your help.) – Frank Jun 27 '17 at 13:16
  • Ok, updated ASDF to 3.2.1. Still the same error. Nonetheless, thanks for trying to help. – Frank Jun 29 '17 at 01:47
  • I don't understand how c: ends up in the filename position. – Faré Jun 30 '17 at 02:29
  • Can you `(require "asdf") (trace asdf::apply-output-translations asdf::output-files)` – Faré Jun 30 '17 at 02:32
  • Also, what is the .asd for the failing system? Do you fail on all systems or only a specific one? One you wrote or a free software system? – Faré Jun 30 '17 at 02:34
  • Did you see my **Update 2** in the OP? I am past the `c:` in the file name problem. It's now about `INHERIT-CONFIGURATION`. If I do `(trace asdf::apply-output-translations asdf::output-files) ` I get the same error as described in Update 2 of my OP: `Invalid source registry (:OUTPUT-TRANSLATIONS (T "E:/")). One and only one of :INHERIT-CONFIGURATION or :IGNORE-INHERITED-CONFIGURATION is required. (will be skipped)` – Frank Jul 02 '17 at 16:27