how to setup asdf in fricas lisp image?

26 views
Skip to first unread message

riccard...@gmail.com

unread,
Jun 22, 2021, 8:15:03 AM6/22/21
to fricas...@googlegroups.com
Hi!

jfricas does not work for me because starting the jupyter notebook and selecting the FriCAS kernel, the jupyter kernel uses )lisp to load the jfricas file `webspad.lisp`, whose line 16 reads:

(require :asdf)

and in the shell which called jupyter I get the message:

While evaluating the form starting at line 16, column 0
of
>> System error:
Don't know how to REQUIRE ASDF.
See also:
The SBCL Manual, Variable SB-EXT:*MODULE-PROVIDER-FUNCTIONS*
The SBCL Manual, Function REQUIRE


>> System error:
Package WEBSPAD does not exist.


Unsurprisingly, there is no communication among jfricas kernel and fricas so no fricas command works, no fun.

My FriCAS is compiled from git and my lisp is sbcl installed from debian package. I have also installed from debian: cl-asdf and cl-hunchentoot as per the jfricas docs (actually I'm not sure that cl-asdf is really needed for sbcl).

I did no customization at all of sbcl or asdf. My shell variable SBCL_HOME turns out to be empty.

Running `(require :asdf)` in sbcl shell does not give an error, while fricas `)lisp (require :asdf)` does (see snippet below).

All in all, friCAS lisp image lacks some path information to locate asdf while sbcl knows where asdf is. I actually do not know if the asdf sbcl uses is the one from cl-asdf or from the sbcl bundle.

So,

- I'm confused: why the behavior of fricas )lisp command differs from plain sbcl?

- FIX?: Is a jfricas user (or, more generally, a asdf user via )lisp) supposed to setup some environment variable or this problem must be fixed at fricas or jfricas level?


Thanks for any hint

Riccardo


--- (require :asdf) in fricas and in sbcl ---

(1) -> )lisp (require :asdf)

>> System error:
Don't know how to REQUIRE ASDF.
See also:
The SBCL Manual, Variable SB-EXT:*MODULE-PROVIDER-FUNCTIONS*
The SBCL Manual, Function REQUIRE

(1) -> )quit


$ sbcl --eval '(require :asdf)' --eval '(asdf:load-system :asdf)'
This is SBCL 2.1.1.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.
* (asdf:asdf-version)
"3.3.4"
* (quit)

riccard...@gmail.com

unread,
Jun 22, 2021, 11:47:14 AM6/22/21
to fricas...@googlegroups.com
Elaborating a suggestion of Kurt [1] I tried

SBCL_HOME=/usr/lib/sbcl/ jupyter notebook

and it works on my debian system :)

If SBCL_HOME is unset sbcl sets it from a compile-time default location which is usually /usr/local/lib/sbcl/ but in debian seems to be /usr/lib/sbcl/. The friCAS lisp image apparently looses the information.

Riccardo


[1]
https://sourceforge.net/p/sbcl/mailman/sbcl-bugs/thread/52c42c3e1003251423j4ee...@mail.gmail.com/

Waldek Hebisch

unread,
Jun 22, 2021, 12:27:04 PM6/22/21
to fricas...@googlegroups.com
On Tue, Jun 22, 2021 at 05:47:11PM +0200, riccard...@gmail.com wrote:
> Elaborating a suggestion of Kurt [1] I tried
>
> SBCL_HOME=/usr/lib/sbcl/ jupyter notebook
>
> and it works on my debian system :)
>
> If SBCL_HOME is unset sbcl sets it from a compile-time default location which is usually /usr/local/lib/sbcl/ but in debian seems to be /usr/lib/sbcl/. The friCAS lisp image apparently looses the information.

<snip>
>
> [1]
> https://sourceforge.net/p/sbcl/mailman/sbcl-bugs/thread/52c42c3e1003251423j4ee...@mail.gmail.com/

Just little correction: SBCL_HOME is where sbcl is installed, which
by default is what you wrote, but can be almost anywhere. FriCAS
binaries work fine on machine with no installed sbcl. ASDF adds
its own requirements and troubles...

--
Waldek Hebisch
Reply all
Reply to author
Forward
0 new messages