robert-dodier / maxima-jupyter

A Maxima kernel for Jupyter, based on CL-Jupyter (Common Lisp kernel)
Other
184 stars 31 forks source link

note for system-wide installations #127

Open efferre79 opened 2 months ago

efferre79 commented 2 months ago

I want to add a note for system-wide installations, it took me a lot of time to figure out which was the problem (also because I am a pure user and not a lisp developer). So maybe this will help someone else in the future.

When trying to do a system-wide installation it's better to disable ASDF caching mechanism by following the instructions in the manual. This is also important when building maxima. What I have done is very simple:

mkdir -p ~/.config/common-lisp/asdf-output-translations.conf.d/
echo ':disable-cache' > \
~/.config/common-lisp/asdf-output-translations.conf.d/99-disable-cache.conf

If this step is not followed, maxima somehow remembers the cache path used during the build procedure (I was not able to understand where this info is stored but my lisp knowledge, and available time for investigations, are limited). If the build process is done by another user (e.g. root or package manager users) at runtime there will be errors when jupyter-notebook tries to load maxima kernel. This happens because the saved cache path may not be available or writable by the regular user. ASDF in fact typically defines the cache by using the $XDG_CACHE_HOME/.cachepath and, if the variable is not set, it uses $HOME/.cache/common-lisp basepath.

The caching mechanism can be enabled again at runtime, it is needed to disable it only during packaging of the software.

efferre79 commented 2 months ago

uhm... I was too quick. I have solved my problem in building maxima-jupyter by using the cache disabling mechanism but at runtime maxima still remembers the cache path of the installation time! How is this possible? Where is saved that kind of information with ASDF?