# using aria2, first get aria2
$ sudo apt-get install aria2
$ sudo apt-get install aria2
# go to a local directory and just use the .metalink link
$ aria2c http://server/path/sage-x.y.z.tar.metalink
# note, that aria2c doesn't stop when it has finished.
# it will start seeding the file to others via bittorrent.
# You can terminate this by hitting Ctrl-C
####
# or download via http/ftp from the download page
Verify
# If you think your download might have been corrupted, verify it:
$ aria2c -V http://server/path/sage-x.y.z.tar.metalink
Extract
# any local directory is fine
# there are two cores in the CPU
Start Compilation
$ ./sage -bdist x.y.z-LinuxVersion;
On systems like Ubuntu, you can shrink the resulting archive much smaller using lzma compression. "trans-compress" it via:
$ zcat sage-x.y.z-...tar.gz | lzma -zv > sage-x.y.z-...tar.lzma
$ aria2c http://server/path/sage-x.y.z.tar.metalink
# note, that aria2c doesn't stop when it has finished.
# it will start seeding the file to others via bittorrent.
# You can terminate this by hitting Ctrl-C
####
# or download via http/ftp from the download page
Verify
# If you think your download might have been corrupted, verify it:
$ aria2c -V http://server/path/sage-x.y.z.tar.metalink
# any local directory is fine
$ tar xf sage-x.y.z.tar
Prerequisites
# You need some tools to compile Sage:
$ sudo apt-get install build-essential m4\
readline libreadline-dev gfortran texlive
readline libreadline-dev gfortran texlive
# read more: Installation Guide
Setup Build Environment
$ cd sage-x.y.z
# get rid of some environment variables, unless
# you know what you do (i.e. ccache, ...)
$ unset CC
$ unset CXX
# you know what you do (i.e. ccache, ...)
$ unset CC
$ unset CXX
# see README.txt if you need this
$ export SAGE_FAT_BINARY="yes"
# if you have gfortran library problems
# find your correct paths via $ locate gfortran
$ export SAGE_FAT_BINARY="yes"
# if you have gfortran library problems
# find your correct paths via $ locate gfortran
# setting these variables is necessary on Ubuntu 9.10
$ export SAGE_FORTRAN=/usr/bin/gfortran
$ export SAGE_FORTRAN_LIB=/usr/lib/libgfortran.so.3
# note: do not start over compilation if that problem happens,
$ export SAGE_FORTRAN=/usr/bin/gfortran
$ export SAGE_FORTRAN_LIB=/usr/lib/libgfortran.so.3
# note: do not start over compilation if that problem happens,
# you have to remove and clean up everything first
# there are two cores in the CPU
# use both of them in parallel!
$ export MAKE="make -j2"
$ export MAKE="make -j2"
Start Compilation
# in a resource friendly mode
$ ionice -c 3 nice make
Testing and Packaging
If compilation didn't end with an error (otherwise: search, sage-support and sage-devel or irc chat)
# Test the entire beast (2 for 2 CPU cores):
If compilation didn't end with an error (otherwise: search, sage-support and sage-devel or irc chat)
# Test the entire beast (2 for 2 CPU cores):
$ ./sage -tp 2 devel/sage-main
# or
$ ./sage -testall
# once again, please report problems
If you want to build a binary distribution, upload it to us at sagemath.org or send it to a friend with a similar machine+system:
# or
$ ./sage -testall
# once again, please report problems
If you want to build a binary distribution, upload it to us at sagemath.org or send it to a friend with a similar machine+system:
$ ./sage -bdist x.y.z-LinuxVersion
$ zcat sage-x.y.z-...tar.gz | lzma -zv > sage-x.y.z-...tar.lzma
and to extract the tar.lzma later:
$ tar --lzma -xvf sage-x.y.z...tar.lzma
by the way, it's very unclear what you meant by
ReplyDeletearia2c http://..src../sage-x.y.z.tar.metalink
a concrete example would help...
@dimpase, well, just the metalink url from the link.
ReplyDeleteconcrete example:
$ aria2c http://www.sagemath.org/mirror/src/meta/sage-4.3.2.tar.metalink
How long does it take the compilation part? In my netbook, previous versions took at least 4 hours (I do not know exactly since I had to leave it on overnight).
ReplyDeletei don't look on the clock, but i think it's a bit more than 4. running the tests also takes quite a long time ...
ReplyDeleteHave you ever considered adding more videos to your blog posts to keep the readers more entertained? I mean I just read through the entire article of yours and it was quite good but since I'm more of a visual learner,I found that to be more helpful.
ReplyDeleteGreat information, I was looking for some way of doing it, and put so clear and easy. Thanks for sharing.
ReplyDeleteHi Harald, many many thanks for sharing. Only one note: on my dell mini 10v with Dell-Ubuntu 8.04 the compilation part take 16 hours!!!!
ReplyDelete