I am the maintainer for the Slackware package of SageMath. They've recently instituted a policy that all packages must be built in /tmp, which makes things tricky with Sage, as the build directory might get removed at a later point, and Sage needs that. Previously I had just built in /opt/sage, set SAGE_ROOT=/opt/sage, and it worked fine (with some work on the path). I was also building as root (--enable-build-as-root), but everything worked fine. Now I cannot do this.
I've tried to play with --prefix=SAGE_LOCAL and --disable-editable (supposed to make a self-contained installation), but if I run SAGE_LOCAL/bin/sage I get
$ sage
Traceback (most recent call last):
File "/tmp/SBo/sage-10.1/src/bin/sage-ipython", line 9, in <module>
from sage.misc.banner import banner
ModuleNotFoundError: No module named 'sage'
That directory is the build directory (not SAGE_ROOT or SAGE_LOCAL), so something has gone wrong with the portable-ness. Possibly because I built as root, for sure.
So is there a solution here? The installation manual does not help a lot with this, I need to build a portable installation as root - or other ideas, like how to fix the error above, where the "portable installation" points to the build directory.
Thanks.