robert-dodier / maxima-jupyter

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

MacPorts: Maxima-Jupyter fails after upgrade of SBCL and Maxima (has workaround) #83

Open yaseppochi opened 4 years ago

yaseppochi commented 4 years ago

Bottom line up front: if Maxima-Jupyter fails mysteriously after "port upgrade sbcl" (and perhaps "port upgrade maxima", try "export SBCL_HOME=/opt/local/lib/sbcl/", then reinstall Maxima-Jupyter.

If that fails, read on. Be aware I have no idea what I'm doing.

After upgrading MacPorts, including SBCL to "@2.0.3_0+fancy" and Maxima to "@5.43.2_2+xmaxima", Maxima-Jupyter (git SHA1 256a3aa1a7a6e129f5791303fc66c5cd9a822858) failed. As did reinstalling. I tried upgrading Maxima-Jupyter (git SHA1 b944978f213f05dc7eb29928c885b04b9236c2c2 == master as of today), similar problems (I guess; Maxima's error messages are less than minimal). The problem continued with the next upgrades to SBCL ("@2.0.4_0+fancy") and Maxima ("maxima @5.43.2_3+xmaxima"), with both the originally working Maxima-Jupyter and current git master. I managed to get a running Maxima-Jupyter with the following totally cargo-culted changes:

(1) Prepend these lines to ~/.sbclrc: (load #P"/opt/local/lib/sbcl/contrib/uiop.fasl") (load #P"/opt/local/lib/sbcl/contrib/asdf.fasl") (push #P"/opt/local/lib/sbcl/contrib/" asdf:*central-registry*) (2) Remove ~/quicklisp/asdf.lisp and the corresponding FASLs from below ~/quicklisp/cache/asdf-fasls (as suggested in #67). (3) Reinstall Maxima-Jupyter with "SBCL_HOME=/opt/local/lib/sbcl/ maxima" (note trailing / and this is NOT .../contrib), and then load("load-maxima-jupyter.lisp"). (4) Run "SBCL_HOME=/opt/local/lib/sbcl/ jupyter-3.8 notebook".

I'm guessing that just setting SBCL_HOME as above would have worked, but (1-4) is what I actually have.

I am really tired so I'm not going to try the obvious experiments of removing the lines in (1), restoring Quicklisp's ASDF in (2) and doing (3) and (4) again right now (and probably not at all ;-).

Thanks to jkiiski and Ehvince who answered https://stackoverflow.com/questions/39133421/how-to-properly-save-common-lisp-image-using-sbcl, which gave me the idea of trying SBCL_HOME (which I definitely did not need with earlier versions of SBCL).