Bug 243176 - x11-wm/stumpwm: warnings from asdf
Summary: x11-wm/stumpwm: warnings from asdf
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Joseph Mingrone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-08 07:35 UTC by jszhao
Modified: 2022-12-09 07:51 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (jrm)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jszhao 2020-01-08 07:35:11 UTC
This is not a bug, I think. It's only warnings appeared when invoking stumpwm. It said:

WARNING:
   You are using ASDF version 3.3.1 (probably from (require "asdf") or loaded
   by quicklisp) and have an older version of ASDF (and older than 2.27 at
   that) registered at #P"/usr/local/lib/common-lisp/asdf/asdf.asd". Having an
   ASDF installed and registered is the normal way of configuring ASDF to
   upgrade itself, and having an old version registered is a configuration
   error. ASDF will ignore this configured system rather than downgrade itself.
   In the future, you may want to either: (a) upgrade this configured ASDF to a
   newer version, (b) install a newer ASDF and register it in front of the
   former in your configuration, or (c) uninstall or unregister this and any
   other old version of ASDF from your configuration. Note that the older ASDF
   might be registered implicitly through configuration inherited from your
   system installation, in which case you might have to specify
   :ignore-inherited-configuration in your in your
   ~/.config/common-lisp/source-registry.conf or other source-registry
   configuration file, environment variable or lisp parameter. Indeed, a likely
   offender is an obsolete version of the cl-asdf debian or ubuntu package,
   that you might want to upgrade (if a recent enough version is available) or
   else remove altogether (since most implementations ship with a recent asdf);
   if you lack the system administration rights to upgrade or remove this
   package, then you might indeed want to either install and register a more
   recent version, or use :ignore-inherited-configuration to avoid registering
   the old one. Please consult ASDF documentation and/or experts.


WARNING: System definition file #P"/usr/local/lib/common-lisp/cl-ppcre/cl-ppcre.
asd" contains definition for system "cl-ppcre-test". Please only define "cl-ppcr
e" and secondary systems with a name starting with "cl-ppcre/" (e.g. "cl-ppcre/t
est") in that file.

I even don't know if it's related with stumpwm. I run maxima and sbcl, no warnings appear.

Is it possible to eliminate them? Thanks!
Comment 1 Joseph Mingrone freebsd_committer freebsd_triage 2020-01-28 15:54:56 UTC
Hi.  Sorry for the delay.  I'll try to figure out what's going on soon(ish).
Comment 2 Tyler 2021-10-25 19:33:20 UTC
For what it's worth:

I was hitting a similar issue, and it turned out that the cause was using a locally installed quicklisp, which was newer than that of the package install.

 In the post-install notes for sbcl, there is this comment:
 For Common Lisp ports requiring the asdf system definition library from
 devel/cl-asdf, /usr/local/etc/asdf-init.lisp has been set to load in
 /usr/local/etc/sbclrc.  If you plan to use Quicklisp, you must remove
 this line from /usr/local/etc/sbclrc.

Removing the line as mentioned resolved the issue for me.
Comment 3 jszhao 2021-11-01 01:31:33 UTC
I don't install quicklisp. The only common lisp related ports are installed with stumpwm. 

If I commented (load "/usr/local/etc/asdf-init.lisp") from /usr/local/etc/sbclrc, stumpwm could not be start normally.
Comment 4 Tyler 2021-11-01 12:43:02 UTC
No worries - I've been trying out stumpwm and am new to lisp in general, so I understandably overlooked some things. Looks like I am using the quick-lisp installed version of the package at this point, actually. So I apologize for the extra noise here. 

Looking further into this, it looks like the problem might be because SBCL includes an older version of ASDF than is provided with the system?

I don't yet know enough to guess beyond that.
Comment 5 jszhao 2022-11-26 06:47:46 UTC
(In reply to Joseph Mingrone from comment #1)

I investigate this question a bit more. The stumpwm package requires asdf, and sbcl has its own asdf. When sbcl load stumpwm, if it found there is an asdf.asd in the /usr/local/lib/common-lisp/system-registry/, then print the warning message.

If we remove asdf.asd from /usr/local/lib/common-lisp/system-registry/, i.e. asdf:*central-registry*, the warning message disappears. 

However, asdf.asd is installed by cl-asdf, and cl-asdf is required by stumpwm and many other cl packages... so I don't know how to deal with it.
Comment 6 jszhao 2022-11-28 01:53:54 UTC
More investigation, the question stems from cl-asdf. It installed asdf.asd into /usr/local/lib/common-lisp/system-registry. In fact, asdf.asd should not exist, because any implement loads asdf through loading asdf.lisp directly other than through asdf.asd...
Comment 7 Joseph Mingrone freebsd_committer freebsd_triage 2022-12-04 03:36:30 UTC
Thanks for the information.  I spent a few hours investigating and here is what I found.  SBCL comes with a bundled ASDF and also depends on devel/cl-asdf.  The error message, as you discovered, is related to the port ASDF.  SBCL thinks the port ASDF is very old and disables it because the port isn't installing the file version.lisp-expr.  I have an update to devel/cl-asdf in progress that installs that file.  With that change SBCL doesn't disable the port ASDF.  However, there is still a problem with asdf-init.lisp from the port.  The generated FASL files are being written to the file system when CL ports are built.  When I figure out that problem, I'll submit an update to devel/cl-asdf and the error message will go away.
Comment 8 jszhao 2022-12-04 07:03:37 UTC
(In reply to Joseph Mingrone from comment #7)

Thanks a lot for digging into the problem. As for the FASL file, I think they should be generated into the users' home directory, when a user tries to load them.

so does cl-clx-sbcl only install the fasl files generated by sbcl?
Comment 9 Joseph Mingrone freebsd_committer freebsd_triage 2022-12-05 19:24:16 UTC
(In reply to jszhao from comment #8)

The fasl files are created as separate ports like

https://www.freshports.org/x11/cl-clx-sbcl

If want to understand more, you can look in code and comments in

https://cgit.freebsd.org/ports/tree/devel/cl-asdf/files/asdf-init.lisp
Comment 10 jszhao 2022-12-08 15:13:38 UTC
(In reply to Joseph Mingrone from comment #9)

I know the cl-clx-sbcl install fasl into /usr/local/lib/common-lisp/clx/sbclfasl/, however, I'd like not to create such implement-specific ports to only install binary output. 

In fact, if sbcl could not find the sbclfasl it will compile it from source and save it in user's home directory, e.g., ~/.cache/....it may be the convenient path if we try to use different cl implement. and for the port maintainer, who may only need to patch the source lisp code for each cl implement rather than create a separate port.
Comment 11 Joseph Mingrone freebsd_committer freebsd_triage 2022-12-08 17:09:52 UTC
I create a review at https://reviews.freebsd.org/D37634
Comment 12 jszhao 2022-12-09 07:51:40 UTC
(In reply to Joseph Mingrone from comment #11)

I have read the review, but I do not understand it much. I am only an ordinary user, and not familiar with the package/ports system of FreeBSD. 

There are some packages with names ending with -sbcl, however, there are no such things for, e.g., ccl, and other implements. If I'd like to run some CL libraries with ccl, I also have to load those libraries from the lisp source. So why do we have such *-sbcl packages?

I try to comment out the line in /usr/local/etc/sbclrc, and add the following two lines into ~/.sbclrc

(require :asdf)
(pushnew "/usr/local/lib/common-lisp/system-registry/" asdf:*central-registry*)

And then I also could run stumpwm. For the first time, sbcl compiled all related libraries to fasl files and stored them in ~/.cache/.... Of course, the warning message reported here also appears, because asdf.asd is also presented there.

As a result, I'd suggest removing *-sbcl packages, and configuring asdf in a general way.