Ticket #11081: 11081_all.patch

File 11081_all.patch, 31.6 KB (added by jdemeyer, 10 years ago)

All patches folded

  • doc/en/installation/source.rst

    # HG changeset patch
    # User David Kirkby <david.kirkby@onetel.net>
    # Date 1301407867 -3600
    # Node ID 80bf640f125af3ff49a1162812301ecc8d3875db
    # Parent  226646a869aa913cb21bae9092d211f5c9a08142
    #11081 Update the "Install from Source Code" section of the Sage Installation Guide
    
    diff -r 226646a869aa -r 80bf640f125a doc/en/installation/source.rst
    a b  
     1.. comment:
     2   ****************************
     3   If you alter this document, please change the last line ("This page
     4   was last updated in ...")
     5   ****************************
    16
    27Install from Source Code
    38========================
    49
    510More familiarity with computers may be required to build Sage from
    6 source. If you do have all the pre-requisite tools, the process should
    7 be completely painless. It would take your computer a while to
    8 compiled Sage from source, though you don't have to watch. Compiling
    9 Sage from source has the major advantage that you have the latest
     11the `source code <http://en.wikipedia.org/wiki/Source_code>`_. If you do have all the
     12pre-requisite tools, the process should
     13be completely painless. It will take your computer a while to
     14compile Sage from the source code, although you don't have to watch. Compiling
     15Sage from the source code has the major advantage that you have the latest
    1016version of Sage with which you can change absolutely any part
    11 or the programs on which Sage depends. You can also recompile Sage.
     17or the programs on which Sage depends. You can also recompile Sage.
     18Also, some parts of Sage will be optimised for your particular computer,
     19so will run faster than a binary that you have downloaded.
    1220
    13 As of this writing, Sage is known to work on Linux (32-bit x86, 64-bit
    14 x86-64, IA64, or 32-bit PPC) and OS X (10.4, 10.5, 10.6, PPC or
    15 x86, 32-bit only). (See http://wiki.sagemath.org/SupportedPlatforms
    16 for the latest information.)
     21Sage is supported on a number of
     22`Linux <http://en.wikipedia.org/wiki/Linux>`_
     23, Mac `OS X <http://www.apple.com/macosx/>`_ , Sun/Oracle `Solaris <http://www.oracle.com/solaris>`_ and
     24`OpenSolaris <http://en.wikipedia.org/wiki/OpenSolaris>`_
     25releases, but Sage is not supported on all versions of Linux, OS X,
     26Solaris or OpenSolaris. Depending on the `operating system <http://en.wikipedia.org/wiki/Operating_system>`_, Sage works
     27with `x86 <http://en.wikipedia.org/wiki/X86>`_, `x64 <http://en.wikipedia.org/wiki/X86-64>`_, `PowerPC <http://en.wikipedia.org/wiki/PowerPC>`_ or `SPARC <http://en.wikipedia.org/wiki/SPARC>`_ processors. There is no native version of Sage which
     28installs on `Microsoft Windows <http://en.wikipedia.org/wiki/Microsoft_Windows>`_, although Sage can be used on Windows
     29with the aid of a  `virtual machine <http://en.wikipedia.org/wiki/Virtual_machine>`_ .
     30Go to http://www.sagemath.org/download-windows.html
     31to download a version of Sage for Windows. See http://wiki.sagemath.org/SupportedPlatforms
     32for the list of platforms on which Sage is supported and the level of support
     33for these systems. You will also find details about `ports <http://en.wikipedia.org/wiki/Computer_port_%28software%29>`_
     34to other operating systems or processors which may be taking place.
    1735
    18     **Solaris? FreeBSD? OS X 10.5 in 64 bit mode?**: Complete compilation
    19     of Sage is currently not supported on Solaris or \*BSD. It is
    20     possible to compile most of Sage on Solaris machines and to fill in
    21     the extra parts using standard packages; please email sage-devel if
    22     you desperately need to run Sage on Solaris. We do plan to fully
    23     support Solaris - it's a very important platform. Work is ongoing.
    24 
    25     **Sage on FreeBSD**: The binaries can be run with the help of Linux
    26     emulation. We are working on a fully native port and the number of
    27     issues that need to be fixed are relatively small compared to the
    28     other ports.
    29 
    30     We hope to support OS X 10.5 in 64-bit mode in our next
    31     release. You can find some instructions to build Sage on OS X 10.5
    32     in 64-bit mode at
    33     http://mvngu.wordpress.com/2009/09/02/compile-sage-4-1-in-64-bit-mode-on-os-x-10-5-8/
    34 
    35 
    36 Assumptions: You have a computer with about 2 GB of free
    37 disk space running Linux (32-bit or 64-bit), Mac OS X 10.4, 10.5, or
    38 10.6 with XCode. In particular, under Linux the following standard
    39 command-line development tools must be installed on your computer
    40 (under OS X they all come with XCode):
     36Assumptions: You have a computer with about 2.5 GB of free
     37disk space running one of the supported version of an
     38operating system listed at
     39http://wiki.sagemath.org/SupportedPlatforms
     40The following standard
     41command-line development tools must be installed on your computer.
     42(Under OS X they all come with `Xcode <http://developer.apple.com/xcode/>`_, with the exception of the
     43`Fortran <http://en.wikipedia.org/wiki/Fortran>`_ compiler ``gfortran``.
     44However, Sage includes an `executable <http://en.wikipedia.org/wiki/Executable>`_
     45Fortran compiler for OS X, so there is no need to install
     46a Fortran compiler on OS X):
    4147
    4248::
    4349
    44        gcc
    45        g++
    46        gfortran
    47        make
    48        m4
    49        perl
     50       gcc        (Version 4.0.1 or later)
     51       g++        (Version 4.0.1 or later)
     52       gfortran   (Version 4.0.1 or later)
     53       make       (GNU make, version 3.80 or later)
     54       m4         
     55       perl       (Version 5.8.0 or later)
    5056       ranlib
    51        tar
    52        readline and its development headers
    53        ssh-keygen -- needed to run the notebook in secure mode.
    54        latex -- highly recommended, though not strictly required
     57       tar        (GNU tar, version 1.17 or later)
     58       ssh-keygen (Needed to run the notebook in secure mode)
     59       latex      (Highly recommended, though not strictly required)
    5560
    56 To check if you have ``m4`` installed, for example, type ``which m4``
    57 at a command line. If it gives an error (or returns nothing), then
    58 it is not installed. It is highly recommended that you have LaTeX
    59 installed, but not required. If you don't have ``ssh-keygen`` on your
    60 local system, then you cannot run the notebook in secure mode. To
    61 run it in insecure mode, run the command ``notebook(secure=False)``
    62 instead of ``notebook()``.
     61The programs ``gcc``, ``g++`` and ``gfortran`` are all part of the `GNU Compiler Collection (GCC) <http://gcc.gnu.org/>`_.
     62You are generally advised to use a recent version of GCC, though
     63some obscure bugs have stopped specific versions of GCC
     64compiling Sage on particular platforms.
    6365
    64 In OS X, make sure you have XCode version at least 2.4, i.e., ``gcc -v``
    65 should output build at least 5363. If you don't, go to
    66 http://developer.apple.com/ sign up, and download the free Xcode
    67 package. Only OS X :math:`$\geq 10.4$` is supported. This will give
    68 you all of the above commands.
     66To check if you have ``m4`` installed, for example, type
    6967
    70 On a Debian-based system (e.g., Ubuntu), ranlib is in the binutils
    71 package. On a newly installed Ubuntu system (this was tested on
    72 Ubuntu 9.04), you can install the above commands as follows:
     68::
     69
     70       command -v m4
     71
     72
     73on the command line. If it gives an error (or returns nothing), then
     74either ``m4`` is not installed, or it is installed but not in your
     75`PATH <http://en.wikipedia.org/wiki/PATH_%28variable%29>`_
     76(On Solaris 10, ``m4`` resides in ``/usr/ccs/bin``).
     77It is highly recommended that you have `Latex <http://en.wikipedia.org/wiki/LaTeX>`_
     78installed, but it is not required. If you don't have ``ssh-keygen`` on your
     79local system, then you cannot run the notebook in secure mode, which the uses
     80encrypted `HTTPS <http://en.wikipedia.org/wiki/HTTP_Secure>`_ protocol. To run the notebook in secure mode, type the command
     81``notebook(secure=True)`` instead of ``notebook()``. Unless ``notebook(secure=True)``
     82is used, the notebook uses the less secure `HTTP <http://en.wikipedia.org/wiki/HTTP>`_ protocol
     83
     84In OS X, make sure you have a recent version of `Xcode <http://developer.apple.com/xcode/>`_.
     85See http://wiki.sagemath.org/SupportedPlatforms to find out what
     86version(s) of Xcode are supported. You can get the latest Xcode
     87from http://developer.apple.com/xcode/, but may have to pay a small
     88fee in order to download this.
     89
     90On Linux systems (e.g., Ubuntu, Redhat etc), ``ranlib`` is in the
     91`Binutils <http://www.gnu.org/software/binutils/>`_ package.
     92Assuming you have sufficient privileges,
     93you can install the ``binutils`` and other necessary components. If you
     94do not have the privileges to do this, ask your system
     95administrator to do this, or build the components from source
     96code. The method of installing additional software varies from
     97distribution to distribution
     98but on a `Debian <http://www.debian.org/>`_ based system (e.g. `Ubuntu <http://www.ubuntu.com/>`_ or `Mint <http://www.linuxmint.com/>`_), you would use:
    7399
    74100::
    75101
    76102     sudo apt-get install build-essential m4 gfortran
    77103
    78 It is recommended that you install the readline package and its
    79 corresponding development headers. These packages make it easier to
    80 work with the Sage command line interface by providing text editing
    81 features at the command line level. On a Debian or Ubuntu system, use
    82 the following commands to install the readline library and its
    83 development headers:
     104(this was tested on Ubuntu 9.04).
    84105
    85 ::
    86 
    87     sudo apt-get install readline-common libreadline-dev
     106On other Linux systems you might use `rpm <http://en.wikipedia.org/wiki/RPM_Package_Manager>`_,
     107`yum <http://en.wikipedia.org/wiki/Yellowdog_Updater,_Modified>`_ or other package manager. On
     108Solaris you would use ``pkgadd`` and on OpenSolaris use ``ipf``. Check
     109the documentation for your particular operating system.
    88110
    89111The LaTeX package and a PDF previewer are optional but they can be
    90112installed using
     
    93115
    94116    sudo apt-get install texlive xpdf evince xdvi
    95117
    96 (You must have the GNU version of ``make`` installed.
    97 For example, Sage won't build on a FreeBSD install that doesn't
    98 have the optional GNU version of ``make`` installed as well
    99 (and named ``make``).)
     118On other systems it might be necessary to install TeX Live from source code,
     119which is quite easy, though a rather time-consuming process. 
    100120
    101 Although some of Sage is written in Python, you do not need Python
     121(You must have the GNU version of ``make`` installed and it must be the first
     122``make`` in your PATH. On Solaris 10, a version of GNU ``make`` may be found
     123at ``/usr/sfw/bin/gmake`` but you will need to copy it somewhere else
     124and rename it to ``make``. The same is true for GNU ``tar`` - there is a version
     125called ``gtar`` in ``/usr/sfw/bin`` but it will need to be copied somewhere
     126else and renamed to ``tar``).
     127
     128For Solaris, it is recommended you create a directory ``$HOME/bins-for-sage`` and
     129put the GNU versions of ``tar`` and ``make`` in that directory. Then ensure that
     130``$HOME/bins-for-sage`` is first in your PATH. That's because Sage also needs
     131``/usr/ccs/bin`` in your PATH to execute programs like ``ar`` and ``ranlib`,
     132but ``/usr/ccs/bin`` has the Sun/Oracle versions of ``make`` and ``tar``
     133which are unsuitable for building Sage. For more information on
     134building Sage on Solaris, see http://wiki.sagemath.org/solaris
     135
     136Although some of Sage is written in `Python <http://www.python.org/>`_, you do not need Python
    102137pre-installed on your computer, since the Sage installation
    103 includes everything you need. When the installation program is run,
     138includes virtually everything you need. When the Sage installation program is run,
    104139it will check that you have each of the above-listed prerequisites,
    105 and inform you of any that are missing.
     140and inform you of any that are missing, or have unsuitable verisons.
    106141
    107 -  If you want to use Tcl/Tk libraries in Sage,
    108    do the following preferably before compilation.
     142-  If you want to use `Tcl/Tk <http://www.tcl.tk/>`_ libraries in Sage,
     143   do the following before compiling Sage.
    109144   Sage's Python will automatically recognize your system's
    110145   install of Tcl/Tk if it exists. You need to install the
    111146   Tcl/Tk development libraries though, not just the Tck/Tk base.
    112147
    113    On Ubuntu, this is the command::
     148   On `Ubuntu <http://www.ubuntu.com/>`_, this is the command::
    114149
    115150       sudo apt-get install tk8.5-dev    # or the latest version available
    116151
    117    Now you can install Sage and Sage's Python will automatically
    118    recognize your system's install of Tcl/Tk. If you forgot
     152   Now you can install Sage, If you forgot
    119153   and installed Sage first anyway, all is not lost.
    120154   Just issue the command::
    121155
    122        sage -f python-2.5.2.p8    # or the latest version available
     156       sage -f  python-2.6.4.p9    # or the latest version available
    123157
    124158   after installing the Tcl/Tk development libraries as above.
    125159   If
     
    133167
    134168   does not raise an ``ImportError`` then it worked.
    135169
    136 -  Sage is currently being developed using GCC version 4.3.x, and
    137    is likely to compile fine with other GCC versions in the 4.x
    138    series. It does not work with older GCC releases. If you are
    139    interested in working on support for Intel or Sun's CC compiler,
     170-  Sage developers tend to use fairly recent versions of gcc, but
     171   Sage should compile with almost any gcc of at least version 4.0.1
     172
     173   If you are interested in working on support for commerical compilers
     174   from `HP <http://docs.hp.com/en/5966-9844/ch01s03.html>`_,
     175   `IBM <http://www-01.ibm.com/software/awdtools/xlcpp/>`_,
     176   `Intel <http://software.intel.com/en-us/articles/intel-compilers/>`_,
     177   `Sun/Oracle <http://www.oracle.com/technetwork/server-storage/solarisstudio/overview/index.html>`_ etc,
     178   or the open-source `Clang <http://clang.llvm.org/>`_,
    140179   please email the sage-devel mailing list, otherwise known as the
    141180   sage-devel Google group at
    142181   http://groups.google.com/group/sage-devel
    143182
    144 -  One reason ``perl`` is required is that both the NTL and PARI
    145    configuration scripts are written in Perl.
    146 
    147 
    148 
    149183After extracting the Sage tarball, the subdirectory ``spkg`` contains
    150184the source distributions for everything on which Sage depends. We
    151185emphasize that all of this software is included with Sage, so you
    152186do not have to worry about trying to download and install any one
    153187of these packages (such as GAP, for example) yourself.
    154188
    155 On tests using various Linux computer systems, the known problems
    156 are:
    157 
    158 
    159 -  Does not build with gcc 4.3.0 yet, but work is ongoing to fix
    160    that.
    161 
    162 -  Moving the build after compiling breaks the PARI Galois fields
    163    database, which appears to be hardcoded into the PARI binary.
    164    (Somebody help fix this!)
    165 
    166 
    167189Fortran
    168190-------
    169191 
    170 On Linux and Solaris systems, a working Fortran compiler is required
     192On Linux, Solaris and OpenSolaris systems, a working Fortran compiler is required
    171193for building Sage from source. If you are using Fortran on a platform
    172 for which Sage does not include g95 binaries, you must use a
    173 system-wide gFortran. For example, Solaris 10 does not ship with any
    174 Fortran binaries. You need to explicitly tell the Sage build process
     194for which Sage does not include g95 binaries, you must use
     195``gfortran``, which may be installed system wide (e.g in /usr or
     196/usr/local) or your own private copy.  You need to explicitly
     197tell the Sage build process
    175198about the Fortran compiler and library location. Do this by typing ::
    176199
    177200    export SAGE_FORTRAN=/exact/path/to/gfortran
     
    193216compiler for Mac OS X. This Fortran compiler is used, unless you
    194217specify another Fortran compiler via the variable :envvar:`SAGE_FORTRAN`.
    195218
    196 On platforms such as AIX, HP-UX, and Solaris, where both 32- and
     219On operating systems such as `AIX <http://en.wikipedia.org/wiki/IBM_AIX>`_,
     220`HP-UX <http://en.wikipedia.org/wiki/HP-UX>`_, Solaris and OpenSolaris, where both 32-bit and
    19722164-bit builds are supported, the library path variable
    198222:envvar:`SAGE_FORTRAN_LIB` must point to the 32-bit library if you are
    199223building Sage in 32-bit. Also, :envvar:`SAGE_FORTRAN_LIB` must point to a
    20022464-bit library if you are building Sage in 64-bit. For example, on
    201 Solaris both of the variables :envvar:`SAGE_FORTRAN` and
    202 :envvar:`SAGE_FORTRAN_LIB` could be set as follows::
     225Solaris & OpenSolaris, the variables :envvar:`SAGE_FORTRAN`, 
     226:envvar:`SAGE_FORTRAN_LIB` and :envvar:`SAGE64` could be set as follows::
    203227
    204     # SPARC and x86
     228    # SPARC, x86 and x64.
    205229    SAGE_FORTRAN=/path/to/gcc/install/directory/bin/gfortran
    206230
    207231    # 32-bit SPARC
    208232    SAGE_FORTRAN_LIB=/path/to/gcc/install/directory/lib/libgfortran.so
    209233
    210     # 64-bit SPARC
     234    # 64-bit SPARC 
    211235    SAGE_FORTRAN_LIB=/path/to/gcc/install/directory/lib/sparcv9/libgfortran.so
     236    SAGE64=yes
    212237
    213238    # 32-bit x86
    214239    SAGE_FORTRAN_LIB=/path/to/gcc/install/directory/lib/libgfortran.so
    215240
    216     # 64-bit x64
     241    # 64-bit x64 
    217242    SAGE_FORTRAN_LIB=/path/to/gcc/install/directory/lib/amd64/libgfortran.so
     243    SAGE64=yes
    218244
     245(It should be noted that Sage is not supported on AIX or HP-UX, although some
     246efforts have been made to `port Sage to AIX <http://wiki.sagemath.org/AIX>`_ and
     247to `port Sage to HP-UX <http://wiki.sagemath.org/HP-UX>`_.)
    219248
    220249Steps to Install from Source
    221250----------------------------
     
    258287#. Optional (but highly recommended): Read the ``README.txt`` file
    259288   there.
    260289
     290#. On OSX 10.4, OS 10.5, Solaris 10 and OpenSolaris, if you wish to
     291   build a 64-bit version of Sage, then assuming your computer and
     292   operating system are 64-bit, type
     293
     294   ::
     295
     296           SAGE64=yes
     297           export SAGE64
     298   
     299   It should be noted that at the time of writing (April 2011), 64-bit
     300   builds of Sage on both Solaris 10 and OpenSolaris are not very stable,
     301   so you are advised not to set ``SAGE64`` to ``yes``. This will then
     302   create stable 32-bit versions of Sage.
     303   See http://wiki.sagemath.org/SupportedPlatforms  and
     304   http://wiki.sagemath.org/solaris for the latest information, as
     305   work is ongoing to resolve the 64-bit Solaris & OpenSolaris problems.
     306
    261307#. Type
    262308
    263309   ::
     
    268314   to be logged in as root, since no files are changed outside of the
    269315   ``sage-x.y.z`` directory (with one exception -- the ``.ipythonrc``
    270316   directory is created in your ``HOME`` directory if it doesn't exist).
    271    This command does the usual steps for each of the packages, but puts
    272    all the results in the local build tree. This can take close to an hour
    273    on some machines. Depending on the architecture of your system (e.g.,
    274    Celeron, Pentium Mobile, Pentium 4, etc.), it can take over three hours
    275    to build Sage from source. If the build is successful, you will not see
     317   In fact, **it is inadvisable to build Sage as root**, as the root account
     318   should only be used when absolutely necessary, as mis-typed commands
     319   can have serious consequences if you are logged in as root.  There has been a bug
     320   `reported <http://trac.sagemath.org/sage_trac/ticket/9551/>`_ in Sage
     321   which would have overwritten a system file had the user been logged in
     322   as root.
     323
     324   Typing ``make`` does the usual steps for each of the packages, but puts
     325   all the results in the local build tree. Depending on the architecture of your system (e.g.,
     326   Celeron, Pentium Mobile, Pentium 4, SPARC, etc.), it can take over three hours
     327   to build Sage from source. On slower older hardware it can take over
     328   a day to build Sage. If the build is successful, you will not see
    276329   the word ERROR in the last 3-4 lines of output.
    277330
    278        The directory where you built Sage is NOT hardcoded. You should
    279        be able to safely move or rename that directory. (It's a bug if
    280        this is not the case --- unfortunately there is one
    281        bug which hasn't yet been fixed along these lines, namely the PARI
    282        install hard-codes the location of the "galois data" files. Fixes
    283        welcome!)
     331   If the build of Sage fails, then type the following from the directory
     332   where you typed ``make``.
    284333
     334   ::
    285335
    286    After you build Sage, you may optionally copy or move the entire
    287    build tree to ``/usr/local``. You might also copy the ``sage-*/sage``
    288    script to ``/usr/local/bin/`` and edit ``ROOT="....."`` at the top of
    289    that file.
     336            grep "An error occurred" spkg/logs/*
     337 
     338   then paste the contents of the log file(s) with errors to the Sage
     339   support newsgroup http://groups.google.com/group/sage-support
     340   If the log files are very large (and many are), then don't paste
     341   the whole file, but make sure to include any error messages.
     342
     343   The directory where you built Sage is NOT hardcoded. You should
     344   be able to safely move or rename that directory. (It's a bug if
     345   this is not the case)
    290346
    291347#. To start Sage, change into the Sage home directory and type:
    292348
     
    295351             ./sage
    296352
    297353   You should see the Sage prompt, which will look something like this
    298    (starting the first time can take a few seconds):
     354   (starting the first time should take well under a minute, but can
     355   take several minutes if the file system is slow or busy. Since Sage
     356   opens a lot of files, it is preferable to install Sage on a fast file
     357   system if this is possible.):
    299358
    300359   ::
    301360
    302361       $ sage
    303362       ----------------------------------------------------------------------
    304        | SAGE Version 3.1, Release Date: 2008-08-16                         |
     363       | Sage Version 4.6, Release Date: 2010-10-30                         |
    305364       | Type notebook() for the GUI, and license() for information.        |
    306365       ----------------------------------------------------------------------
    307366       sage:
     
    309368   Just starting successfully tests that many of the components built
    310369   correctly. If the above is not displayed (e.g., if you get a
    311370   massive traceback), please report the problem, e.g., to
    312    http://groups.google.com/group/sage-support . Please include in
    313    your email the file ``install.log``. It would also be helpful to
    314    include the type of operating system you have and the version
    315    number (and date) of the copy of Sage you are using. (There are no
     371   http://groups.google.com/group/sage-support .
     372   It would also be helpful to
     373   include the type of operating system (Linux, OS X, Solaris or OpenSolaris),
     374   the version and date of that operating system and the version
     375   number of the copy of Sage you are using. (There are no
    316376   formal requirements for bug reports - just send them; we appreciate
    317377   everything.)
    318378
     
    359419   ::
    360420
    361421       sage: gap_console()
    362        GAP4, Version: 4.4.6 of 02-Sep-2005, x86_64-unknown-linux-gnu-gcc
     422       GAP4, Version: 4.4.12 of 17-Dec-2008, i386-pc-solaris2.11-gcc
    363423       gap> 2+2;
    364424       4
    365425       [ctrl-d]
     
    378438
    379439       sage: singular_console()
    380440                            SINGULAR                             /  Development
    381         A Computer Algebra System for Polynomial Computations   /   version 3-0-1
     441        A Computer Algebra System for Polynomial Computations   /   version 3-1-1
    382442                                                              0<
    383             by: G.-M. Greuel, G. Pfister, H. Schoenemann        \   October 2005
     443            by: G.-M. Greuel, G. Pfister, H. Schoenemann        \   Feb 2010
    384444       FB Mathematik der Universitaet, D-67653 Kaiserslautern    \
    385        // ** executing /usr/local/sage/sage-0.8.2/bin/LIB/.singularrc
    386445       [ctrl-d]
    387446       > Auf Wiedersehen.
    388447       sage:
    389448
    390449#. Optional: Check the interfaces to any other software that
    391450   you have available. Note that each interface calls its
    392    corresponding program by a particular name: Mathematica is invoked
    393    by calling ``math``, Maple by calling ``maple``, et cetera. The
     451   corresponding program by a particular name:
     452   `Mathematica <http://www.wolfram.com/mathematica/>`_ is invoked
     453   by calling ``math``, `Maple <http://www.maplesoft.com/>`_ by calling ``maple``, etc. The
    394454   easiest way to change this name or perform other customizations is
    395455   to create a redirection script in ``$SAGE_ROOT/local/bin``. Sage
    396456   inserts this directory at the front of your PATH, so your script
     
    451511     Now typing ``sage`` within your terminal emulator should start
    452512     Sage.
    453513
    454 #. Optional: Test the install by typing ``./sage -testall``. This
     514#. Optional, but highly recommended: Test the install by typing ``./sage -testall``. This
    455515   runs most examples in the source code and makes sure that they run
    456516   exactly as claimed. To test all examples, use
    457517   ``./sage -testall -optional -long``; this will run examples that take
     
    460520   likely fail because they assume that a database is installed.
    461521   Alternatively, from within ``$SAGE_ROOT``, you can type
    462522   ``make test`` to run all the standard test code.  This can take
    463    from 30 minutes to an hour or longer.
    464 
    465 #. Optional: The directory ``spkg/build`` contains intermediate code
    466    that is used to build sage. Type ``make clean`` to delete it and a
    467    few other directories (e.g., ``spkg/archive`` and ``devel/old``). This
    468    is safe and will save you about 500 MB of disk space. You may wish to
    469    type this periodically.
     523   from 25 minutes to several hours, depending on your hardware. On
     524   very old hardware building and testing Sage can take several days!
    470525
    471526#. Optional: Install optional Sage packages and databases. Type
    472527   ``sage -optional`` to see a list or visit
     
    503558
    504559- :envvar:`SAGE_PARALLEL_SPKG_BUILD` - set this to "yes" to build
    505560  multiple packages in parallel.  This only has an effect if
    506   :envvar:`MAKE` is also set to run several jobs in parallel.  As of
    507   this writing (June 2010), this is still in the experimental stages,
    508   but turning this on can greatly speed up the build process.
     561  :envvar:`MAKE` is also set to run several jobs in parallel.
    509562
    510 - :envvar:`SAGE64` - Set this to "yes" to build a 64-bit binary.  This
    511   is required if you want a 64-bit binary but the default for your
    512   platform is to build 32-bit binaries.  It adds the compiler flag
     563- :envvar:`SAGE64` - Set this to "yes" to build a 64-bit binary on platforms
     564  which default to 32-bit, even though they can build 64-bit binaries. 
     565  It adds the compiler flag
    513566  -m64 when compiling programs.  The SAGE64 variable is mainly of use
    514567  is on OS X (pre 10.6), Solaris and OpenSolaris, though it will add
    515568  the -m64 on any operating system. If you are running version 10.6 of
     
    560613e.g., an unsupported machine or an unusual compiler:
    561614
    562615- :envvar:`SAGE_PORT` - if you try to build Sage on a platform which
    563   is recognized as being unsupported (e.g., x86 Solaris, AIX, or
     616  is recognized as being unsupported (e.g. AIX, or
    564617  HP-UX), or with a compiler which is unsupported (anything except
    565618  gcc), you will see a message saying something like ::
    566619
     
    578631  :envvar:`SAGE_PORT` to something non-empty (and expect to run into
    579632  problems).
    580633
    581 - :envvar:`SAGE_USE_OLD_GCC` - the Sage build process requires version
    582   4.0.1 of gcc.  If the most recent version of gcc is 3.4.x and you
     634 :envvar:`SAGE_USE_OLD_GCC` - the Sage build process requires
     635  gcc with a version number of at least 4.0.1.
     636  If the most recent version of gcc on your system is the older 3.4.x series and you
    583637  want to try building anyway, then set :envvar:`SAGE_USE_OLD_GCC` to
    584   something nonempty. Expect the build to fail in this case: Sage is
    585   only guaranteed to build using gcc 4.0.1 or later, so if you insist
    586   on working with gcc 3.4.x, you will have to modify some source code
    587   to get things to work.
    588 
     638  something non-empty. Expect the build to fail in this case.
    589639
    590640Environment variables dealing with specific Sage packages:
    591641
     
    598648  :file:`libf77blas.so`, and it should have a subdirectory
    599649  :file:`include/atlas/` containing header files.
    600650
    601 - :envvar:`SAGE_MATPLOTLIB_GUI` - set this to anything nonempty except
     651- :envvar:`SAGE_MATPLOTLIB_GUI` - set this to anything non-empty except
    602652  "no", and Sage will attempt to build the graphical backend when it
    603653  builds the matplotlib package.
    604654
     
    680730  your machine, set this variable to the appropriate command.
    681731
    682732- :envvar:`SAGE_ORIG_LD_LIBRARY_PATH_SET` - set this to something
    683   nonempty to force Sage to set the :envvar:`LD_LIBRARY_PATH` before
     733  non-empty to force Sage to set the :envvar:`LD_LIBRARY_PATH` before
    684734  executing system commands.
    685735
    686736- :envvar:`SAGE_ORIG_DYLD_LIBRARY_PATH_SET` - similar, but only used
     
    709759  seconds (30 minutes).
    710760
    711761- :envvar:`SAGE_PICKLE_JAR` - if you want to update the the standard
    712   pickle jar, set this to something nonempty and run the doctest
     762  pickle jar, set this to something non-empty and run the doctest
    713763  suite.  See the documentation for the functions :func:`picklejar`
    714764  and :func:`unpickle_all` in
    715765  :file:`SAGE_ROOT/devel/sage/sage/structure/sage_object.pyx`, online
     
    746796System-wide install
    747797~~~~~~~~~~~~~~~~~~~
    748798
    749 This is a compilation of posts to the Sage support list (in
    750 particular those of Luis Finotti).
     799#. After you build Sage, you may optionally copy or move the entire
     800   build tree to ``/usr/local``.
    751801
    752 
    753 #. Unpack the current Sage tarball (we shall assume it is
    754    ``sage-2.5.2.tar``) at, e.g., ``/usr/local/`` and compile it as root.
    755    Assuming you are in a root shell and the tarball is in your current
    756    directory, type:
    757 
    758    ::
    759 
    760        cp sage-2.5.2.tar /usr/local
    761        cd /usr/local
    762        tar xvf sage-2.5.2.tar
    763        cd sage-2.5.2/
    764        make
    765 
    766     (Comment: It's better to build in place.  It's a bug if anything goes
    767     wrong when relocating the entire tarball -- unfortunately there
    768     is one bug I haven't fixed along these lines, namely the
    769     PARI install hard-codes the location of the "galois data" files.
    770     (Fixes welcome!))
    771 
    772 #. Make sure to modify the line with the ``.....``"'s at the top of the
    773    ``sage`` script. In other words, edit ``SAGE_ROOT="....."`` to say
    774    ``SAGE_ROOT="/usr/local/sage-2.5.2"``.
    775 
    776 #. There are some initial files that have to be created during the
    777    first run of Sage. Try starting up Sage once as root (or, to be
     802#. There are some initial files that have to be created the first time
     803   Sage is run. Try starting up Sage once as root (or, to be
    778804   more thorough, try ``make test`` as root to run all the standard test
    779805   code). You can stop the tests by pressing ``ctrl-z`` followed by
    780806   typing ``kill %1`` (assuming you had no other jobs in the
     
    784810
    785811   ::
    786812
    787        cp /usr/local/sage-2.5.2/sage /usr/local/bin/
     813       cp /usr/local/sage-4.6.2/sage /usr/local/bin/
    788814
    789    You make a copy instead of a symlink, since upgrading with
    790    ``sage -upgrade`` overwrites ``/usr/local/sage-2.5.2/sage``, hence
    791    deleting the ``ROOT=...`` part of that file.
    792 
    793    Make sure that all files in ``/usr/local/sage-2.5.2`` are readable by
     815   Make sure that all files in ``/usr/local/sage-4.6.2`` are readable by
    794816   all:
    795817
    796818   ::
    797819
    798        chmod a+rX -R /usr/local/sage-2.5.2
     820       chmod a+rX -R /usr/local/sage-4.6.2
    799821
    800822
    801823Special Notes
     
    803825
    804826
    805827-  (Found by Dorian Raymer) Sage will not build if you have only
    806    bison++. You should uninstall bison++ and install bison.
     828   bison++. You should uninstall bison++ and install `bison <http://www.gnu.org/software/bison/>`_.
    807829
    808830-  (Found by Peter Jipsen) If you get an error like
    809831
     
    813835            cannot restore segment prot after reloc:
    814836       Permission denied
    815837
    816    then your SELinux configuration is preventing Sage from launching. To
     838   then your `SELinux <http://fedoraproject.org/wiki/SELinux>`_ configuration is preventing Sage from launching. To
    817839   rectify this issue, you can either change the default security
    818840   context for Sage (??) or disable SELinux altogether by setting the
    819841   line ``SELINUX=disabled`` in your ``/etc/sysconfig/selinux`` file.
     
    821843- To make SageTeX available to your users, see the instructions for
    822844  :ref:`installation in a multiuser environment
    823845  <sagetex_installation_multiuser>`.
     846
     847  **This page was last updated in April 2011**