Where to Set the environment variable SAGE_KEEP_BUILT_SPKGS to 'yes' to prevent make from removing what has built so far?
I am building sage-8.4 on a RPI3B running Raspbian Stretch and it gets stuck in the documentation compiling section https://pastebin.com/gysZzgW3 and if I terminate and redo the process with make -j4
as before then it says
The build directory may contain configuration files and other potentially
helpful information. WARNING: if you now run 'make' again, the build
directory will, by default, be deleted. Set the environment variable
SAGE_KEEP_BUILT_SPKGS to 'yes' to prevent this.
Makefile:31: recipe for target 'all-start' failed
make[1]: *** [all-start] Error 1
make[1]: Leaving directory '/home/pi/sage-8.4'
Makefile:13: recipe for target 'all' failed
make: *** [all] Error 2
So I have been able to avoid the above message by doing
$ ln -sf /usr/lib/arm-linux-gnueabihf/libstdc++.so.6.22 /home/pi/sage-8.4/local/lib/libstdc++.so.6
but then again if I redo the make process, the docs built so far removed and the process starts from beginning of documentation building.
So how do I do this? Will just putting export SAGE_KEEP_BUILT_SPKGS=yes
in sage-8.4/src/bin/save-env-config
suffice and if it does then how to achieve it? so far I failed to make it work.
Are you building based on Python2 or Python3? For a Python3-based build, at this stage, the documentation is known not to build.
When running any shell command you can pass environment variables to it like:
If you want do it once for the same shell session do
If you want to keep some variables between shell sessions the way to do that is (depending on your shell) to set them in your local rc file for your shell (most shells will read
.profile
so you can putexport <WHATEVER>
there). This is just the general way to set environment variables.Don't go modifying files in Sage's sources unless you know exactly what you're doing because they might get overwritten or otherwise not persist somehow.
It would be nice if
SAGE_
variables like this were saved when running sage's./configure
, however.@slelievre the bare ./configure should default to python2 if not specified otherwise and that's my case, i. e. python2
@Iguananaut I tried something like that but i could not exactly understand what the dochtml.log https://pastebin.com/KxscKcMB meant in its messages even after following the suggestion.