---------------------------------------------------------------- VERY QUICK INSTRUCTIONS TO BUILD FROM SOURCE: 1. Make sure you have the dependencies. LINUX (install these using your package manager): gcc, g++, make, m4, perl, ranlib, and tar. OSX: XCode. WARNING: If "gcc -v" outputs 4.0.0, you *must* upgrade XCode (free from Apple), since that version of GCC is very broken. NOTE: On some operating systems it might be necessary to install gas/as, gld/ld, gnm/nm, but on most these are automatically installed when you install the programs listed above. 2. Extract the tarball: tar xvf sage-*.tar 3. cd into the sage directory and type make: cd sage-* make That's it! Everything is automatic and non-interactive. ---------------------------------------------------------------- SAGE: Software for Algebra and Geometry Experimentation Copyright (C) 2006, 2007 William Stein Distributed under the terms of the GNU General Public License (GPL) http://www.sagemath.org If you have questions, do not hesitate to email wstein@gmail.com or (even better!) sage-support@googlegroups.com: http://groups.google.com/group/sage-support AUTHORS: There are well over 50 people who have contributed code to SAGE. Please see one of the websites above for a list. In many cases documentation for modules and functions list the authors. OFFICIALLY SUPPORTED PLATFORMS: Building of SAGE from source is regularly tested on (minimal installs of) the following platforms: PROCESSOR OPERATING SYSTEM x86 32-bit Linux -- Debian, Ubuntu, RHEL5, Fedora Core, CentOS, Suse, Mandriva x86_64 64-bit Linux -- Debian ia64 itanium2 64-bit Linux x86 Apple Mac OS X 10.4.x ppc Apple Mac OS X 10.4.x Use SAGE on Microsoft Windows via VMware. UNSUPPORTED, BUT HIGH PRIORITY TO SUPPORT SOON: sparc Solaris 10 x86_64 Solaris 10 IMPLEMENTATION: SAGE has significant components written in the following languages: C/C++, Python, Lisp, and Fortran. Lisp and Python are built as part of SAGE, and Fortran (g95) is included (x86 Linux and OS X only), so you do not need them in order to build SAGE. MORE DETAILED INSTRUCTIONS TO BUILD FROM SOURCE: (See the installation guide for more details.) 1. Make sure you have about 700MB free disk space. 2. Linux: Install gcc, g++, m4, ranlib, and make. The build should work fine on SUSE, FC, Ubuntu, etc. If it doesn't, we want to know! OS X: Make sure you have XCode version >= 2.4, i.e., gcc -v should output build >= 5363. If you don't, go to http://developer.apple.com/ sign up, and download the free XCode package. Only OS X >= 10.4 is supported. Windows: Download and install VMware, install linux into it, etc. 3. Extract the sage source tarball, cd into a directory with no spaces in it. If you have a machine with n processors, say, type export MAKE="make -j4" To start the build type make 4. Wait about 1 to 8 hours, depending on your computer. SOME ACTUAL REAL BUILD TIMES (for SAGE-2.7.1): * 1.8Ghz Linux Opteron 64-bit 16-core SMP machine: 67 minutes * G5: 102 minutes * Core 2 Duo: 67 minutes * Core Duo: 75 minutes * 1.5 Ghz G4 (rev 1.2): 167 minutes 5. Type ./sage to try it out. 6. OPTIONAL: Start sage and run the command install_scripts("/usr/local/bin/") # change /usr/local/bin/ Type "install_scripts?" in SAGE for more details about what this command does. 7. OPTIONAL: Type "make test" to test all examples in the documentation (over 12000 lines of input!) -- this takes from 15 minutes to an hour. Don't get too disturbed if there are 2-3 failures, but always feel free to e-mail the section of test.log that contains errors to wstein@gmail.com and/or sage-support@googlegroups.com: http://groups.google.com/group/sage-support If there are numerous failures, there was a serious problem with your build. 8. OPTIONAL: Documentation: If you want to (try to) build the documentation, change into SAGE_ROOT/devel/doc and type "make html" or "make pdf". This requires having latex and latex2html installed, and there are some issues with the \url macro. Note that the latex docs come *pre-built* with SAGE, and are in SAGE_ROOT/doc/. 9. OPTIONAL: GAP -- It is highly recommended that you install the optional GAP databases by typing ./sage -optional then installing (with ./sage -i) the package whose name begins with database_gap. This will download the package from sage.math.washington.edu and install it. While you're at it you might install other databases of interest to you. 10. OPTIONAL: It is highly recommended that you have both latex and the imagemagick tools (e.g., the "convert" command) installed since some plotting functionality uses it. SUPPORTED COMPILERS: * SAGE builds with GCC >= 3.x and GCC >= 4.1.x. * SAGE will not build with gcc 2.9.x. * WARNING: Don't build with GCC 4.0.0, which is "buggy as a Florida swamp in August". * I don't know if SAGE has ever been built with a non-GCC compiler. SOLARIS: It is reportedly possible, but not recommended yet (see below). A fully supported port is planned. RUNNING SAGE: 1. Try running sage: ./sage 2. Try running an example SAGE script: ./sage example.sage RELOCATION (OS X and Windows): You *should* be able to move the sage-x.y.z directory anywhere you want. If you copy the sage script or put a symlink to it, you should modify the script to reflect this (as instructed in the top of the script). It is best if the path to SAGE does not have any spaces in it. If you find anything that doesn't work correctly after you moved the directory, please let me know (wstein@gmail.com)! Making software "movable" is *very* tricky. REDISTRIBUTION: Your local SAGE install is exactly the same as any "developer" install. You can make changes to documentation, source, etc., and very easily package up the complete results for redistribution just like we do. 1. You can make your own source tarball (sage-x.y.z.tar) of SAGE by typing "sage -sdist x.y.z", where the version is whatever you want. The result is placed in SAGE_ROOT/dist. 2. You can make a binary distribution with the packages you've installed included by typing "sage -bdist x.y.z". The result is placed in the SAGE_ROOT/dist directory. CHANGES TO INCLUDED SOFTWARE: All software included with SAGE is copyright by the respective authors and released under an open source license that is GPL compatible. See the file LICENSE.txt for more details. (Note -- jsMath is licensed under the Apache license; Apache claim their license is GPL compatible, but Stallman disagrees.) After building SAGE, see the directories SAGE_ROOT/spkg/build/package-name/ for a file SAGE.txt that details all changes made to the given package for inclusion with SAGE. The inclusion of such a file detailing changes is specifically required by some of the packages included with SAGE (e.g., for GAP). (These directories are deleted when you type "make clean".) ---- KNOWN BUILD PROBLEMS: * On OS X PowerPC, gmp miscompiles the first time. Do ./sage -f spkg/standard/gmp-the_correct_filename.spkg to build it again. Then type rm -rf devel/sage-main followed by "make" and the build should complete. SOLARIS: It has been possible to do a complete successful install of SAGE on Solaris with gcc, though possibly not in a completely automated manner. This section contains some potentially helpful remarks. * You can skip installing certain packages by typing, e.g., touch spkg/installed/clisp-2.37 This way you can use your own system-wide version of some SAGE-related software, which is in some cases easier to obtain. * Every component EXCEPT SINGULAR of version 0.9.21 of SAGE builds without user intervention on 32-bit open Solaris x86 (under VMware) using gcc. * Hints for using Sun's CC compiler (which doesn't work, e.g., the crucial mwrank component doesn't compile): Using bash type: CC=cc && export CC CXX=CC && export CXX CFLAGS="-xO2" && export CFLAGS CXXFLAGS="-xO2" && export CXXFLAGS make * (From "Dr. David Kirkby" ): I have noticed one problem if you try to build a 64-bit gmp. The order of the path seems critical. Get it wrong and it seems to pick up libraries in /usr/ucblib, which are 32-bit and so messes up. The following works. I have no idea why changing path (rather than library paths) would mess things up, but it seems to. PATH = /usr/sbin:/usr/bin:/opt/SUNWspro/bin:/usr/ccs/bin Also, the GMP library does not follow the Sun convention of putting 32-bit libraries in $LIB and 64-bit ones in $LIB/sparcv9. I think that could have quite annoying problems; however, for SAGE, where you have your own library I don't think it matters. * It seems likely that the compiler switch for a shared object on 64-bit SPARC is different from that for a 32-bit library. There is some confusion about this as the man page seems odd. I'm awaiting confirmation from someone at Sun about this. * From Kiran Kedlaya: In other news, I owe you some details of how I got SAGE running on Athena Solaris. In summary: -- GMP did not compile; there were some linking errors because of "unaligned offsets" (apparently a discrepancy between GNU ld and Sun ld). I got around this by using the libgmp that someone had already compiled for Singular on Athena Solaris. I also had to alias libgmp.so to libgmpxx.so because some of the SAGE modules compile using -lgmpxx. -- Python hit an error which I traced back to Include/pyport.h. I had to change HUGE_VAL, which is supposed to represent a positive double infinity, to (1./0.), which should have the same effect. I have no idea why this didn't work as written. -- Singular didn't compile either, but I didn't try very hard; I just used the Athena installed version (which is only 3-0-1, but I think it'll be fine). I don't remember offhand what kind of error I was getting. ======================