# HG changeset patch
# User Jeroen Demeyer <jdemeyer@cage.ugent.be>
# Date 1336396819 7200
# Node ID 3942b98c0149827244b2918a8f7e43178ae92652
# Parent 35a582fe01399b321d2c9b0d47f44e4877f5faad
Update the "Install from Source Code" docs for sage5.0
diff git a/doc/en/installation/source.rst b/doc/en/installation/source.rst
a

b


41  41  commandline development tools must be installed on your computer. 
42  42  (Under OS X they all come with `Xcode <http://developer.apple.com/xcode/>`_). 
43  43  
44   :: 
 44   A **C compiler**: GCC version 4.0.1 or newer should work. Older 
 45  versions may or may not work. On Solaris or OpenSolaris systems, 
 46  the Sun compiler should also work. 
 47   **make**: GNU make, version 3.80 or later 
 48   **m4** 
 49   **perl**: version 5.8.0 or later 
 50   **tar**: GNU tar version 1.17 or later, or BSD tar 
 51   **ranlib** 
 52   On recent Debian or Ubuntu systems: the **dpkgdev** package for 
 53  `multiarch <http://wiki.debian.org/Multiarch>`_ support 
45  54  
46   gcc (Version 4.0.1 or later) 
47   make (For Solaris or OpenSolaris, GNU make, version 3.80 or later) 
48   perl (Version 5.8.0 or later) 
49   ranlib 
50   tar (For Solaris or OpenSolaris, GNU tar, version 1.17 or later) 
51   sshkeygen (Needed to run the notebook in secure mode) 
52   latex (Highly recommended, though not strictly required) 
53   ImageMagick  recommended 
54   ffmpeg  recommended 
55   dvipng  recommended 
 55  Recommended but not strictly required: 
 56  
 57   **latex**: highly recommended 
 58   **dvipng** 
 59   **ImageMagick** 
 60   **ffmpeg** 
 61   **sshkeygen**: needed to run the notebook in secure mode 
56  62  
57  63  Sage also needs a C++ compiler and a Fortran compiler. 
58  64  However, it contains a `GNU Compiler Collection (GCC) <http://gcc.gnu.org/>`_ 
… 
… 

74  80  It is highly recommended that you have `Latex <http://en.wikipedia.org/wiki/LaTeX>`_ 
75  81  installed, but it is not required. If you don't have ``sshkeygen`` on your 
76  82  local system, then you cannot run the notebook in secure mode, which the uses 
77   encrypted `HTTPS <http://en.wikipedia.org/wiki/HTTP_Secure>`_ protocol. To run the notebook in secure mode, type the command 
 83  encrypted `HTTPS <http://en.wikipedia.org/wiki/HTTP_Secure>`_ protocol. 
 84  To run the notebook in secure mode, type the command 
78  85  ``notebook(secure=True)`` instead of ``notebook()``. Unless ``notebook(secure=True)`` 
79   is used, the notebook uses the less secure `HTTP <http://en.wikipedia.org/wiki/HTTP>`_ protocol 
 86  is used, the notebook uses the less secure `HTTP <http://en.wikipedia.org/wiki/HTTP>`_ protocol. 
80  87  
81  88  If you don't have either ImageMagick or ffmpeg, you won't be able to 
82  89  view animations. ffmpeg can produce animations in more different 
… 
… 

134  141  For Solaris, it is recommended you create a directory ``$HOME/binsforsage`` and 
135  142  put the GNU versions of ``tar`` and ``make`` in that directory. Then ensure that 
136  143  ``$HOME/binsforsage`` is first in your PATH. That's because Sage also needs 
137   ``/usr/ccs/bin`` in your PATH to execute programs like ``ar`` and ``ranlib`, 
 144  ``/usr/ccs/bin`` in your PATH to execute programs like ``ar`` and ``ranlib``, 
138  145  but ``/usr/ccs/bin`` has the Sun/Oracle versions of ``make`` and ``tar`` 
139  146  which are unsuitable for building Sage. For more information on 
140  147  building Sage on Solaris, see http://wiki.sagemath.org/solaris 
… 
… 

173  180  
174  181  does not raise an ``ImportError`` then it worked. 
175  182  
176    Sage developers tend to use fairly recent versions of gcc, but 
177   Sage should compile with almost any gcc of at least version 4.0.1 
 183   Sage developers tend to use fairly recent versions of GCC, but Sage 
 184  should compile with any reasonable C compiler. This is because Sage 
 185  will build GCC first (if needed) and then use that newly built GCC to 
 186  compile Sage. 
 187  
 188  If you don't want this and want to try building Sage with a 
 189  different compiler, you need to set the environment variable 
 190  ``SAGE_INSTALL_GCC=no``. 
178  191  
179  192  If you are interested in working on support for commerical compilers 
180  193  from `HP <http://docs.hp.com/en/59669844/ch01s03.html>`_, 
… 
… 

186  199  sagedevel Google group at 
187  200  http://groups.google.com/group/sagedevel 
188  201  
189   If you want to try building Sage with a compiler which is not GCC, 
190   you need to set the environment variable ``SAGE_INSTALL_GCC=no``. 
191   
192  202  After extracting the Sage tarball, the subdirectory ``spkg`` contains 
193  203  the source distributions for everything on which Sage depends. We 
194  204  emphasize that all of this software is included with Sage, so you 
… 
… 

502  512  For example, put something similar to the following line in your 
503  513  ``.bashrc`` file:: 
504  514  
505   alias 'sage'='/home/username/sage4.8/sage' 
 515  alias sage=/home/username/sage5.0/sage 
506  516  
507  517  Having done so, quit your terminal emulator and restart it again. 
508  518  Now typing ``sage`` within your terminal emulator should start 
509  519  Sage. 
510  520  
511   #. Optional, but highly recommended: Test the install by typing ``./sage testall``. This 
512   runs most examples in the source code and makes sure that they run 
 521  #. Optional, but highly recommended: Test the install by typing ``./sage testall``. 
 522  This runs most examples in the source code and makes sure that they run 
513  523  exactly as claimed. To test all examples, use 
514   ``./sage testall optional long``; this will run examples that take 
 524  ``./sage testall optional long``; this will run examples that take 
515  525  a long time, and those that depend on optional packages and 
516  526  software, e.g., Mathematica or Magma. Some (optional) examples will 
517  527  likely fail because they assume that a database is installed. 
… 
… 

521  531  very old hardware building and testing Sage can take several days! 
522  532  
523  533  #. Optional: Install optional Sage packages and databases. Type 
524   ``sage optional`` to see a list or visit 
 534  ``sage optional`` to see a list or visit 
525  535  http://www.sagemath.org/packages/optional/, and 
526  536  ``sage i <package name>`` to automatically download and install a 
527  537  given package. 
… 
… 

643  653  get very large and harder to search (and listing the contained 
644  654  files is usually less valuable), we decided to turn this off 
645  655  by default. This variable affects builds of Sage with ``make`` 
646   (and ``sage upgrade``) as well as the manual installation of 
 656  (and ``sage upgrade``) as well as the manual installation of 
647  657  individual spkgs with e.g. ``sage i``. 
648  658  
649  659   :envvar:`SAGE_SPKG_INSTALL_DOCS`  Set this to "yes" to install 
… 
… 

715  725  
716  726  export SAGE_FAT_BINARY="yes" 
717  727  make 
718   ./sage bdist x.y.zfat 
 728  ./sage bdist x.y.zfat 
719  729  
720  730  Variables to set if you're trying to build Sage with an unusual setup, 
721  731  e.g., an unsupported machine or an unusual compiler: 
… 
… 

739  749  :envvar:`SAGE_PORT` to something nonempty (and expect to run into 
740  750  problems). 
741  751  
742   :envvar:`SAGE_USE_OLD_GCC`  the Sage build process requires 
743   gcc with a version number of at least 4.0.1. 
744   If the most recent version of gcc on your system is the older 3.4.x series and you 
745   want to try building anyway, then set :envvar:`SAGE_USE_OLD_GCC` to 
 752   :envvar:`SAGE_USE_OLD_GCC`  the Sage build process requires gcc with 
 753  a version number of at least 4.0.1. If the most recent version of gcc 
 754  on your system is the older 3.4.x series and you want to build with 
 755  ``SAGE_INSTALL_GCC=no``, then set :envvar:`SAGE_USE_OLD_GCC` to 
746  756  something nonempty. Expect the build to fail in this case. 
747  757  
748  758  Environment variables dealing with specific Sage packages: 
… 
… 

973  983  
974  984  #. Make sure that all files in the Sage tree are readable by all:: 
975  985  
976   chmod a+rX R /usr/local/sage4.8 
 986  chmod a+rX R /usr/local/sage5.0 
977  987  
978  988  #. Optionally, you can test Sage by running:: 
979  989  
… 
… 

1003  1013  Special Notes 
1004  1014   
1005  1015  
1006   
1007    (Found by Dorian Raymer) Sage will not build if you have only 
1008   bison++. You should uninstall bison++ and install `bison <http://www.gnu.org/software/bison/>`_. 
1009   
1010  1016   (Found by Peter Jipsen) If you get an error like 
1011  1017  
1012  1018  :: 
… 
… 

1024  1030  :ref:`installation in a multiuser environment 
1025  1031  <sagetex_installation_multiuser>`. 
1026  1032  
1027   **This page was last updated in March 2012 (Sage 5.0)** 
 1033  **This page was last updated in May 2012 (Sage 5.0)** 