# HG changeset patch
# User Kelvin Li <ltwisabc@gmail.com>
# Date 1306660284 25200
# Node ID e7b6bea17a7904faeb6cf2bd1e1be5da30b21ffc
# Parent 274f9fa23918f4a298e537bc65ed5152be829580
Trac #11387: general cleanup of and typo fixes for README.txt
diff -r 274f9fa23918 -r e7b6bea17a79 README.txt
|
a
|
b
|
|
| 1 | | Hello, |
| | 1 | Sage: Open Source Mathematical Software |
| 2 | 2 | |
| 3 | | This README.txt describes build instructions for Sage. If you downloaded |
| 4 | | a binary, you do not need to do anything; just execute |
| | 3 | "Creating a Viable Open Source Alternative to |
| | 4 | Magma, Maple, Mathematica, and MATLAB" |
| | 5 | |
| | 6 | Copyright (C) 2005-2011 William Stein and the Sage Development Team |
| | 7 | |
| | 8 | http://www.sagemath.org |
| | 9 | |
| | 10 | Over 200 people have contributed code to Sage. Please see the |
| | 11 | following web page for a list: |
| | 12 | |
| | 13 | http://www.sagemath.org/development-map.html |
| | 14 | |
| | 15 | In many cases, documentation for modules and functions list the |
| | 16 | authors. |
| | 17 | |
| | 18 | |
| | 19 | GETTING STARTED |
| | 20 | --------------- |
| | 21 | This README.txt contains build instructions for Sage. If you downloaded |
| | 22 | a binary, you do not need to do anything; just execute: |
| 5 | 23 | |
| 6 | 24 | ./sage |
| 7 | 25 | |
| 8 | | from the command line. If you downloaded the sources, please read |
| 9 | | below on how to build Sage and work around common issues. |
| | 26 | from the command line. If you downloaded the sources, please read below |
| | 27 | on how to build Sage and work around common issues. |
| 10 | 28 | |
| | 29 | If you have questions or encounter problems, please do not hesitate |
| | 30 | to email the sage-support mailing list: |
| 11 | 31 | |
| 12 | | --------------------------------------------------------------------------- |
| | 32 | http://groups.google.com/group/sage-support |
| 13 | 33 | |
| 14 | | Sage: Open Source Mathematical Software |
| 15 | 34 | |
| 16 | | "Creating a Viable Open Source Alternative to |
| 17 | | Magma, Maple, Mathematica, and Matlab" |
| | 35 | SUPPORTED PLATFORMS |
| | 36 | ------------------- |
| 18 | 37 | |
| 19 | | Copyright (C) 2005-2011 |
| 20 | | William Stein and the Sage Development Team |
| | 38 | Sage fully supports several Linux distributions, recent versions of |
| | 39 | Mac OS X, as well as a number of Solaris and OpenSolaris releases. |
| 21 | 40 | |
| 22 | | Distributed under the terms of the GNU General Public License (GPL) |
| | 41 | There should be no serious bugs in an officially released version of |
| | 42 | Sage on any of the fully supported platforms, but any major issues with |
| | 43 | a particular release will be documented on an errata page: |
| 23 | 44 | |
| 24 | | http://www.sagemath.org |
| | 45 | http://wiki.sagemath.org/errata |
| 25 | 46 | |
| 26 | | If you have questions, do not hesitate to email the sage-support list |
| | 47 | Ports are in progress to some other, less common platforms. The list of |
| | 48 | supported platforms and their current statuses are given at the |
| | 49 | following web page: |
| 27 | 50 | |
| 28 | | http://groups.google.com/group/sage-support |
| | 51 | http://wiki.sagemath.org/SupportedPlatforms |
| 29 | 52 | |
| 30 | | AUTHORS: Over 200 people have contributed code to Sage. Please see |
| 31 | | one of the websites above for a list. In many cases, documentation |
| 32 | | for modules and functions list the authors. |
| 33 | | |
| 34 | | |
| 35 | | OFFICIALLY SUPPORTED PLATFORMS |
| 36 | | ------------------------------ |
| 37 | | |
| 38 | | Sage is fully supported on several Linux distributions, some version of OS X, |
| 39 | | as well as a number of Solaris and OpenSolaris releases. |
| 40 | | |
| 41 | | Ports are in progress to some other less common platforms. The list of |
| 42 | | supported platforms, and their current status is given at the following |
| 43 | | web page: |
| 44 | | |
| 45 | | http://wiki.sagemath.org/SupportedPlatforms |
| 46 | | |
| 47 | | There should be no serious bugs on an officially released version of Sage on |
| 48 | | any of the fully supported platforms, but any major issues with a particular |
| 49 | | release will be documented on an errata page. |
| 50 | | |
| 51 | | http://wiki.sagemath.org/errata |
| 52 | | |
| 53 | | If you are interested in helping port Sage to a new platform, please let us |
| 54 | | know at |
| | 53 | If you are interested in helping port Sage to a new platform, please let |
| | 54 | us know at the sage-devel mailing list: |
| 55 | 55 | |
| 56 | 56 | http://groups.google.com/group/sage-devel |
| 57 | 57 | |
| … |
… |
|
| 60 | 60 | --------------------------------------- |
| 61 | 61 | |
| 62 | 62 | The following steps briefly outline the process of building Sage from |
| 63 | | source. See below for more detailed instructions. |
| | 63 | source. More detailed instructions are contained later in this README |
| | 64 | and in the Installation Guide: |
| | 65 | |
| | 66 | http://www.sagemath.org/doc/installation |
| 64 | 67 | |
| 65 | 68 | 1. Make sure you have the dependencies and 2.5 GB of free disk space. |
| 66 | 69 | |
| 67 | | Linux (install these using your package manager): |
| | 70 | Linux: GCC, g++, gfortran, make, m4, perl, ranlib, and tar. |
| | 71 | (install these using your package manager) |
| 68 | 72 | |
| 69 | | GCC, g++, make, m4, perl, ranlib, and tar. |
| | 73 | OS X: XCode. |
| 70 | 74 | |
| 71 | | OS X: XCode. WARNING: If "gcc -v" outputs 4.0.0, you *must* |
| 72 | | upgrade XCode (free from Apple), since that version of GCC is |
| 73 | | very broken. |
| | 75 | WARNING: If "gcc -v" outputs 4.0.0, you *must* upgrade XCode |
| | 76 | (free from Apple). That version of GCC is very broken. |
| 74 | 77 | |
| 75 | | Microsoft Windows: Not supported yet. |
| 76 | | |
| 77 | | NOTE: On some operating systems, it might be necessary to install |
| 78 | | gas/as, gld/ld, gnm/nm. On most platforms, these are automatically |
| 79 | | installed when you install the programs listed above. Only OS X |
| 80 | | >= 10.4.x and certain Linux distributions are 100% supported. See |
| 81 | | below for a complete list. |
| | 78 | Other platforms: See detailed instructions below. |
| 82 | 79 | |
| 83 | 80 | 2. Extract the tarball: |
| 84 | 81 | |
| … |
… |
|
| 86 | 83 | |
| 87 | 84 | 3. cd into the Sage directory and type make: |
| 88 | 85 | |
| 89 | | cd sage-* |
| | 86 | cd sage-*/ |
| 90 | 87 | make |
| 91 | 88 | |
| 92 | | That's it! Everything is automatic and non-interactive. |
| | 89 | That's it! Everything is automatic and non-interactive. The build |
| | 90 | should work fine on all fully supported platforms. If it does not, we |
| | 91 | want to know! |
| | 92 | |
| | 93 | |
| | 94 | FORTRAN |
| | 95 | ------- |
| | 96 | |
| | 97 | To build Sage on any platform except OS X, you must use a system-wide |
| | 98 | gfortran compiler. Sometimes you need to explicitly tell the Sage build |
| | 99 | process about the Fortran compiler and library locations. Do this by |
| | 100 | typing: |
| | 101 | |
| | 102 | export SAGE_FORTRAN=/exact/path/to/gfortran |
| | 103 | export SAGE_FORTRAN_LIB=/path/to/fortran/libs/libgfortran.so |
| | 104 | |
| | 105 | Note that the SAGE_FORTRAN environment variable is supposed to impact |
| | 106 | *only* the Fortran Sage package, otherwise known as the Fortran spkg. |
| | 107 | Apart from that, this variable is *not* designed to do anything at all |
| | 108 | to other spkg's that use Fortran. For example, the Lapack spkg uses |
| | 109 | Fortran, but the compilation process of Lapack should ignore the |
| | 110 | SAGE_FORTRAN environment variable. The SAGE_FORTRAN environment variable |
| | 111 | does not mean "build any spkg that uses Fortran using this Fortran". It |
| | 112 | means "when installing the Fortran spkg, setup the sage_fortran script |
| | 113 | to run the Fortran specified by the SAGE_FORTRAN variable". |
| 93 | 114 | |
| 94 | 115 | |
| 95 | 116 | SELINUX |
| … |
… |
|
| 105 | 126 | http://www.ittvis.com/services/techtip.asp?ttid=3092 |
| 106 | 127 | |
| 107 | 128 | |
| 108 | | |
| 109 | | FORTRAN |
| 110 | | ------- |
| 111 | | |
| 112 | | To build Sage on any platform except OS X, you must use a system-wide |
| 113 | | gfortran compiler. Sometimes you need to explicitly tell the Sage |
| 114 | | build process about the Fortran compiler and library location. Do this |
| 115 | | by typing |
| 116 | | |
| 117 | | export SAGE_FORTRAN=/exact/path/to/gfortran |
| 118 | | export SAGE_FORTRAN_LIB=/path/to/fortran/libs/libgfortran.so |
| 119 | | |
| 120 | | Note that the SAGE_FORTRAN environment variable is supposed to impact |
| 121 | | *only* the Fortran Sage package, otherwise known as the Fortran |
| 122 | | spkg. Apart from that, this variable is *not* designed to do anything |
| 123 | | at all to other spkg's that use Fortran. For example, the Lapack spkg |
| 124 | | uses Fortran, but the compilation process of Lapack should ignore the |
| 125 | | SAGE_FORTRAN environment variable. The SAGE_FORTRAN environment |
| 126 | | variable does not mean "build any spkg that uses Fortran using this |
| 127 | | Fortran". It means "when installing the Fortran spkg, setup the |
| 128 | | sage_fortran script to run the Fortran specified by the SAGE_FORTRAN |
| 129 | | variable". |
| 130 | | |
| 131 | | |
| 132 | 129 | IMPLEMENTATION |
| 133 | 130 | -------------- |
| 134 | 131 | |
| 135 | 132 | Sage has significant components written in the following languages: |
| 136 | | C/C++, Python, Cython, Lisp, and Fortran. Lisp (ECL) and Python are |
| 137 | | built as part of Sage and a GNU Fortran (gfortran) binary is included |
| 138 | | (OS X only), so you do not need them in order to build Sage. |
| | 133 | C/C++, Python, Cython, Lisp, and Fortran. Lisp (ECL), Python, and Cython |
| | 134 | are built as part of Sage and a GNU Fortran (gfortran) binary is |
| | 135 | included (OS X only), so you do not need them in order to build Sage. |
| 139 | 136 | |
| 140 | 137 | |
| 141 | 138 | MORE DETAILED INSTRUCTIONS TO BUILD FROM SOURCE |
| … |
… |
|
| 143 | 140 | |
| 144 | 141 | 1. Make sure you have about 2.5 GB of free disk space. |
| 145 | 142 | |
| 146 | | 2. Linux: Install GCC, g++, m4, ranlib, and make. The build should |
| 147 | | work fine on all fullly supported platforms. If it doesn't, we want |
| 148 | | to know! |
| | 143 | 2. Install build dependencies. |
| | 144 | |
| | 145 | Linux: See quick instructions above. |
| 149 | 146 | |
| 150 | 147 | OS X: Make sure you have XCode version >= 2.4, i.e. "gcc -v" should |
| 151 | | output build >= 5363. If you don't, go to |
| | 148 | output build >= 5363. If you don't, go to: |
| 152 | 149 | |
| 153 | | http://developer.apple.com/ |
| | 150 | http://developer.apple.com/ |
| 154 | 151 | |
| 155 | | sign up, and download the free XCode package. Only |
| 156 | | OS X >= 10.4 is supported. |
| | 152 | sign up, and download the free XCode package. Only OS X >= 10.4 is |
| | 153 | supported. |
| 157 | 154 | |
| 158 | | Windows: Download and install VirtualBox, install Linux into it, etc. |
| 159 | | |
| 160 | | Solaris and OpenSolaris: Building Sage on these platforms is more tricky |
| 161 | | than on Linux or OS X. See http://wiki.sagemath.org/solaris for |
| 162 | | details on how to build Sage on these platforms. |
| | 155 | Solaris and OpenSolaris: Building Sage on these platforms is more |
| | 156 | tricky than on Linux or OS X. For details on how to build Sage on |
| | 157 | these platforms, see: |
| | 158 | |
| | 159 | http://wiki.sagemath.org/solaris |
| | 160 | |
| | 161 | Windows: Not supported. A solution is to download and install |
| | 162 | VirtualBox, install Linux into it, etc. |
| | 163 | |
| | 164 | NOTE: On some operating systems, it might be necessary to install |
| | 165 | gas/as, gld/ld, gnm/nm. On most platforms, these are automatically |
| | 166 | installed when you install the programs listed above. |
| 163 | 167 | |
| 164 | 168 | 3. Extract the Sage source tarball and cd into a directory with no |
| 165 | | spaces in it. If you have a machine with 4 processors, say, type |
| 166 | | the following to configure the build script to perform a parallel |
| | 169 | spaces in it. If you have a machine with 4 processors, say, type the |
| | 170 | following to configure the build script to perform a parallel |
| 167 | 171 | compilation of Sage using 4 jobs: |
| 168 | 172 | |
| 169 | 173 | export MAKE="make -j4" |
| 170 | 174 | |
| 171 | | To start the build, type |
| | 175 | To start the build, type: |
| 172 | 176 | |
| 173 | 177 | make |
| 174 | 178 | |
| 175 | 179 | If you want to run the test suite for each individual spkg as it is |
| 176 | | installed, type |
| | 180 | installed, type: |
| 177 | 181 | |
| 178 | 182 | export SAGE_CHECK="yes" |
| 179 | 183 | |
| … |
… |
|
| 181 | 185 | will raise an error if any failures occur. |
| 182 | 186 | |
| 183 | 187 | 4. Wait about 1 hour to 14 days, depending on your computer (it took |
| 184 | | about 2 weeks to build Sage on the Google G1 Android cell phone). |
| | 188 | about 2 weeks to build Sage on the T-Mobile G1 Android cell phone). |
| 185 | 189 | |
| 186 | | 5. Type ./sage to try it out. |
| | 190 | 5. Type "./sage" to try it out. |
| 187 | 191 | |
| 188 | 192 | 6. OPTIONAL: Start Sage and run the command |
| 189 | 193 | |
| … |
… |
|
| 192 | 196 | Type "install_scripts?" in Sage for more details about what this |
| 193 | 197 | command does. |
| 194 | 198 | |
| 195 | | 7. OPTIONAL: Type "make test" to test all examples in the |
| 196 | | documentation (over 93,000 lines of input!) -- this takes from 30 |
| 197 | | minutes to several hours. Don't get too disturbed if there are 2 to |
| 198 | | 3 failures, but always feel free to email the section of test.log |
| 199 | | that contains errors to this mailing list: |
| | 199 | 7. OPTIONAL: Type "make test" to test all examples in the documentation |
| | 200 | (over 93,000 lines of input!) -- this takes from 30 minutes to |
| | 201 | several hours. Don't get too disturbed if there are 2 to 3 failures, |
| | 202 | but always feel free to email the section of test.log that contains |
| | 203 | errors to the sage-support mailing list. If there are numerous |
| | 204 | failures, there was a serious problem with your build. |
| 200 | 205 | |
| 201 | | http://groups.google.com/group/sage-support |
| | 206 | 8. OPTIONAL: If you want to (try to) build the documentation, run: |
| 202 | 207 | |
| 203 | | If there are numerous failures, there was a serious problem with |
| 204 | | your build. |
| | 208 | sage -docbuild --help |
| 205 | 209 | |
| 206 | | 8. OPTIONAL: Documentation -- If you want to (try to) build the |
| 207 | | documentation, run "sage -docbuild help" for instructions. The HTML |
| 208 | | version of the documentation is built during the compilation |
| 209 | | process of Sage and resides in the directory |
| | 210 | for instructions. The HTML version of the documentation is built |
| | 211 | during the compilation process of Sage and resides in the directory: |
| 210 | 212 | |
| 211 | | SAGE_ROOT/devel/sage/doc/output/html |
| | 213 | $SAGE_ROOT/devel/sage/doc/output/html/ |
| 212 | 214 | |
| 213 | 215 | LaTeX is required to build the PDF version of the documentation. |
| 214 | 216 | |
| 215 | | 9. OPTIONAL: GAP -- It is highly recommended that you install the |
| 216 | | optional GAP database by typing |
| | 217 | 9. OPTIONAL: It is highly recommended that you install the optional GAP |
| | 218 | database by typing: |
| 217 | 219 | |
| 218 | 220 | ./sage -optional |
| 219 | 221 | |
| 220 | | then installing (with ./sage -i) the package whose name begins with |
| | 222 | then installing (with "./sage -i") the package whose name begins with |
| 221 | 223 | database_gap. This will download the package from |
| 222 | 224 | sage.math.washington.edu and install it. While you're at it, you |
| 223 | 225 | might install other databases of interest to you. |
| 224 | 226 | |
| 225 | 227 | 10. OPTIONAL: It is recommended that you have both LaTeX and the |
| 226 | | ImageMagick tools (e.g. the "convert" command) installed since |
| 227 | | some plotting functionality benefits from it. |
| | 228 | ImageMagick tools (e.g. the "convert" command) installed since some |
| | 229 | plotting functionality benefits from it. |
| 228 | 230 | |
| 229 | 231 | |
| 230 | 232 | SUPPORTED COMPILERS |
| 231 | 233 | ------------------- |
| 232 | 234 | |
| 233 | | * Sage needs a version of GCC that is at least version 4.0.1 |
| 234 | | that is configured with support for at least the C, C++ |
| 235 | | and Fortran languages, although as noted above, a Fortran |
| 236 | | compiler is not needed on OS X. |
| 237 | | * The versions of the C compiler (gcc), C++ compiler (g++) |
| 238 | | and Fortran compiler (gfortran), must all be identical. |
| | 235 | * Sage needs a version of GCC that is at least version 4.0.1 that is |
| | 236 | configured with support for at least the C, C++, and Fortran |
| | 237 | languages, although a Fortran compiler is not needed on OS X, as |
| | 238 | noted above. |
| | 239 | |
| | 240 | * The versions of the C compiler (gcc), C++ compiler (g++), and Fortran |
| | 241 | compiler (gfortran) must all be identical. |
| | 242 | |
| 239 | 243 | * Sage has never been built without using the GCC compiler. |
| 240 | 244 | |
| 241 | 245 | |
| 242 | 246 | RELOCATION |
| 243 | 247 | ---------- |
| 244 | 248 | |
| 245 | | You *should* be able to move the sage-x.y.z directory anywhere you |
| | 249 | You *should* be able to move the sage-x.y.z/ directory anywhere you |
| 246 | 250 | want. If you copy the sage script or make a symbolic link to it, you |
| 247 | 251 | should modify the script to reflect this (as instructed at the top of |
| 248 | 252 | the script). It is best if the path to Sage does not have any spaces in |
| 249 | 253 | it. |
| 250 | 254 | |
| 251 | | For a system-wide installation, as root you can move the sage-x.y.z |
| 252 | | directory to a system-wide directory. Afterwards, you need to start |
| 253 | | up Sage as root at least once prior to using the system-wide Sage |
| 254 | | as a normal user. See the Installation Guide for further |
| 255 | | information on performing a system-wide installation. |
| | 255 | For a system-wide installation, as root you can move the sage-x.y.z/ |
| | 256 | directory to a system-wide directory. Afterwards, you need to start up |
| | 257 | Sage as root at least once prior to using the system-wide Sage as a |
| | 258 | normal user. See the Installation Guide for further information on |
| | 259 | performing a system-wide installation: |
| | 260 | |
| | 261 | http://www.sagemath.org/doc/installation/source.html#installation-in-a-multiuser-environment |
| 256 | 262 | |
| 257 | 263 | If you find anything that doesn't work correctly after you moved the |
| 258 | | directory, please email http://groups.google.com/group/sage-support |
| | 264 | directory, please email the sage-support mailing list. |
| 259 | 265 | |
| 260 | 266 | |
| 261 | 267 | REDISTRIBUTION |
| … |
… |
|
| 263 | 269 | |
| 264 | 270 | Your local Sage install is almost exactly the same as any "developer" |
| 265 | 271 | install. You can make changes to documentation, source, etc., and very |
| 266 | | easily package up the complete results for redistribution just like we do. |
| | 272 | easily package the complete results up for redistribution just like we |
| | 273 | do. |
| 267 | 274 | |
| 268 | | 1. You can make your own source tarball (sage-x.y.z.tar) of Sage by |
| 269 | | typing "sage -sdist x.y.z", where the version is whatever you want. |
| 270 | | The result is placed in SAGE_ROOT/dist. |
| | 275 | 1. To make your own source tarball (sage-x.y.z.tar) of Sage, type: |
| 271 | 276 | |
| 272 | | 2. You can make a binary distribution with the packages you have |
| 273 | | installed by typing "sage -bdist x.y.z". The result is placed in |
| 274 | | the SAGE_ROOT/dist directory. |
| | 277 | sage -sdist x.y.z |
| 275 | 278 | |
| 276 | | 3. Fat Binaries: To make a binary that will run on the widest range of |
| 277 | | target machines, set the SAGE_FAT_BINARY environment variable to |
| 278 | | "yes" before building Sage: |
| | 279 | where the version is whatever you want. |
| | 280 | |
| | 281 | 2. To make a binary distribution with your currently installed packages, |
| | 282 | type: |
| | 283 | |
| | 284 | sage -bdist x.y.z |
| | 285 | |
| | 286 | 3. To make a binary that will run on the widest range of target |
| | 287 | machines, set the SAGE_FAT_BINARY environment variable to "yes" |
| | 288 | before building Sage: |
| 279 | 289 | |
| 280 | 290 | export SAGE_FAT_BINARY="yes" |
| 281 | 291 | make |
| 282 | 292 | ./sage -bdist x.y.z-fat |
| 283 | 293 | |
| | 294 | In all cases, the result is placed in the directory "$SAGE_ROOT/dist/". |
| | 295 | |
| 284 | 296 | |
| 285 | 297 | CHANGES TO INCLUDED SOFTWARE |
| 286 | 298 | ---------------------------- |
| 287 | 299 | |
| 288 | | All software included with Sage is copyright by the respective authors |
| | 300 | All software included with Sage is copyrighted by the respective authors |
| 289 | 301 | and released under an open source license that is "GPL version 3 or |
| 290 | | later"q compatible. See the file COPYING.txt for more details. |
| | 302 | later" compatible. See the file COPYING.txt for more details. |
| 291 | 303 | |
| 292 | | Each spkg in SAGE_ROOT/spkg/standard/ is a bzip'd tarball. You can |
| 293 | | extract it with |
| | 304 | Each spkg in $SAGE_ROOT/spkg/standard/ is a bzip'd tarball. You can |
| | 305 | extract it with: |
| 294 | 306 | |
| 295 | 307 | tar -jxvf name-*.spkg |
| 296 | 308 | |
| 297 | | Inside the spkg, there is a file SPKG.txt that details all changes |
| 298 | | made to the given package for inclusion with Sage. The inclusion of |
| 299 | | such a file detailing changes is specifically required by some of the |
| 300 | | packages included with Sage (e.g. for GAP). |
| | 309 | Inside the spkg, there is a file SPKG.txt that details all changes made |
| | 310 | to the given package for inclusion with Sage. The inclusion of such a |
| | 311 | file detailing changes is specifically required by some of the packages |
| | 312 | included with Sage (e.g. for GAP). |