Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

note for system-wide installations #127

Open
efferre79 opened this issue May 10, 2024 · 2 comments
Open

note for system-wide installations #127

efferre79 opened this issue May 10, 2024 · 2 comments

Comments

@efferre79
Copy link
Contributor

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/.cache path 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
Copy link
Contributor Author

efferre79 commented May 10, 2024

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?

@bnikolic
Copy link
Contributor

I came across similar problem. One issue seemed to be that SBCL (which is what I use) comes with some packages, including asdf, and if things are moved around these packages are then not found. I found setting SBCL_HOME environment variable (to /usr/lib/sbcl in my case) solves the problem.

See https://github.com/robert-dodier/maxima-jupyter/blob/master/Dockerfile.debian for example of custom build on Debian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants