@@ -645,9 +645,6 @@ how it is built:
645
645
Environment variables
646
646
---------------------
647
647
648
- Environment variables controlling the build process
649
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
650
-
651
648
Sage uses several environment variables to control its build process.
652
649
Most users won't need to set any of these: the build process just works on many
653
650
platforms.
@@ -656,20 +653,9 @@ speed up the process.)
656
653
Building Sage involves building about 100 packages, each of which has its own
657
654
compilation instructions.
658
655
659
- The Sage source tarball already includes the sources for all standard
660
- packages, that is, it allows you to build Sage without internet
661
- connection. The git repository, however, does not contain the source
662
- code for third-party packages. Instead, it will be downloaded as
663
- needed (Note: you can run ``make download `` to force downloading
664
- packages before building). Package downloads use the Sage mirror
665
- network, the nearest mirror will be determined automatically for
666
- you. This is influenced by the following environment variable:
667
-
668
- .. envvar :: SAGE_SERVER
669
656
670
- Try the specified mirror first, before falling back to the official
671
- Sage mirror list. Note that Sage will search the directory
672
- ``SAGE_SERVER/spkg/upstream `` for upstream tarballs.
657
+ Standard environment controlling the build process
658
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
673
659
674
660
Here are some of the more commonly used variables affecting the build process:
675
661
@@ -696,6 +682,86 @@ Here are some of the more commonly used variables affecting the build process:
696
682
Some users on single-core macOS machines have reported problems when
697
683
building Sage with ``MAKE='make -jNUM' `` with ``NUM `` greater than one.
698
684
685
+ .. envvar :: V
686
+
687
+ If set to ``0 ``, silence the build. Instead of showing a detailed
688
+ compilation log, only one line of output is shown at the beginning
689
+ and at the end of the installation of each Sage package. To see
690
+ even less output, use::
691
+
692
+ $ make -s V=0
693
+
694
+ (Note that the above uses the syntax of setting a Makefile variable.)
695
+
696
+ .. envvar :: CC
697
+
698
+ While some programs allow you to use this to specify your C
699
+ compiler, **not every Sage package recognizes this **.
700
+ If GCC is installed within Sage, :envvar: `CC ` is ignored and Sage's ``gcc ``
701
+ is used instead.
702
+
703
+ .. envvar :: CPP
704
+
705
+ Similarly, this will set the C preprocessor for some Sage
706
+ packages, and similarly, using it is likely quite risky.
707
+ If GCC is installed within Sage, :envvar: `CPP ` is ignored and Sage's ``cpp ``
708
+ is used instead.
709
+
710
+ .. envvar :: CXX
711
+
712
+ Similarly, this will set the C++ compiler for some Sage
713
+ packages, and similarly, using it is likely quite risky.
714
+ If GCC is installed within Sage, :envvar: `CXX ` is ignored and Sage's ``g++ ``
715
+ is used instead.
716
+
717
+ .. envvar :: FC
718
+
719
+ Similarly, this will set the Fortran compiler.
720
+ This is supported by all Sage packages which have Fortran code.
721
+ However, for historical reasons, the value is hardcoded during the initial
722
+ ``make `` and subsequent changes to ``$FC `` might be ignored (in which case,
723
+ the original value will be used instead).
724
+ If GCC is installed within Sage, :envvar: `FC ` is ignored and Sage's
725
+ ``gfortran `` is used instead.
726
+
727
+ .. envvar :: CFLAGS
728
+ .. envvar :: CXXFLAGS
729
+ .. envvar :: FCFLAGS
730
+
731
+ The flags for
732
+ the C compiler, the C++ compiler and the Fortran compiler, respectively.
733
+ The same comments apply to these: setting them may cause problems, because
734
+ they are not universally respected among the Sage packages. Note
735
+ also that ``export CFLAGS="" `` does not have the same effect as
736
+ ``unset CFLAGS ``. The latter is preferable.
737
+
738
+ .. envvar :: CPPFLAGS
739
+ .. envvar :: LDFLAGS
740
+ .. envvar :: CXXFLAG64
741
+ .. envvar :: LDFLAG64
742
+ .. envvar :: LD
743
+
744
+ Similar comments apply to these compiler and linker flags.
745
+
746
+
747
+ Sage-specific environment variables controlling the build process
748
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
749
+
750
+ .. envvar :: SAGE_SERVER
751
+
752
+ The Sage source tarball already includes the sources for all standard
753
+ packages, that is, it allows you to build Sage without internet
754
+ connection. The git repository, however, does not contain the source
755
+ code for third-party packages. Instead, it will be downloaded as
756
+ needed (note: you can run ``make download `` to force downloading
757
+ packages before building). Package downloads use the Sage mirror
758
+ network, the nearest mirror will be determined automatically for
759
+ you. This is influenced by the following environment variable:
760
+
761
+ Try the specified mirror first, before falling back to the official
762
+ Sage mirror list. Note that Sage will search the directory
763
+ ``SAGE_SERVER/spkg/upstream `` for upstream tarballs.
764
+
699
765
.. envvar :: SAGE_NUM_THREADS
700
766
701
767
If set to a number, then when rebuilding with ``sage -b `` or
@@ -714,17 +780,6 @@ Here are some of the more commonly used variables affecting the build process:
714
780
When ``sage -t -p `` runs under the control of the GNU ``make ``
715
781
jobserver, then Sage will request as most this number of job slots.
716
782
717
- .. envvar :: V
718
-
719
- If set to ``0 ``, silence the build. Instead of showing a detailed
720
- compilation log, only one line of output is shown at the beginning
721
- and at the end of the installation of each Sage package. To see
722
- even less output, use::
723
-
724
- $ make -s V=0
725
-
726
- (Note that the above uses the syntax of setting a Makefile variable.)
727
-
728
783
.. envvar :: SAGE_CHECK
729
784
730
785
If set to ``yes ``, then during the build process,
@@ -886,8 +941,9 @@ Here are some of the more commonly used variables affecting the build process:
886
941
supports :envvar: `SAGE_SUDO `, into a root-owned installation
887
942
hierarchy (:envvar: `SAGE_LOCAL `).
888
943
889
- Environment variables for documentation build
890
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
944
+
945
+ Environment variables controlling the documentation build
946
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
891
947
892
948
.. envvar :: SAGE_DOCBUILD_OPTS
893
949
@@ -992,58 +1048,6 @@ Environment variables dealing with specific Sage packages
992
1048
The value of this variable is passed as an
993
1049
argument to the ``$MAKE `` command when compiling PARI.
994
1050
995
- Standard environment controlling the build process
996
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
997
-
998
- .. envvar :: CC
999
-
1000
- While some programs allow you to use this to specify your C
1001
- compiler, **not every Sage package recognizes this **.
1002
- If GCC is installed within Sage, :envvar: `CC ` is ignored and Sage's ``gcc ``
1003
- is used instead.
1004
-
1005
- .. envvar :: CPP
1006
-
1007
- Similarly, this will set the C preprocessor for some Sage
1008
- packages, and similarly, using it is likely quite risky.
1009
- If GCC is installed within Sage, :envvar: `CPP ` is ignored and Sage's ``cpp ``
1010
- is used instead.
1011
-
1012
- .. envvar :: CXX
1013
-
1014
- Similarly, this will set the C++ compiler for some Sage
1015
- packages, and similarly, using it is likely quite risky.
1016
- If GCC is installed within Sage, :envvar: `CXX ` is ignored and Sage's ``g++ ``
1017
- is used instead.
1018
-
1019
- .. envvar :: FC
1020
-
1021
- Similarly, this will set the Fortran compiler.
1022
- This is supported by all Sage packages which have Fortran code.
1023
- However, for historical reasons, the value is hardcoded during the initial
1024
- ``make `` and subsequent changes to ``$FC `` might be ignored (in which case,
1025
- the original value will be used instead).
1026
- If GCC is installed within Sage, :envvar: `FC ` is ignored and Sage's
1027
- ``gfortran `` is used instead.
1028
-
1029
- .. envvar :: CFLAGS
1030
- .. envvar :: CXXFLAGS
1031
- .. envvar :: FCFLAGS
1032
-
1033
- The flags for
1034
- the C compiler, the C++ compiler and the Fortran compiler, respectively.
1035
- The same comments apply to these: setting them may cause problems, because
1036
- they are not universally respected among the Sage packages. Note
1037
- also that ``export CFLAGS="" `` does not have the same effect as
1038
- ``unset CFLAGS ``. The latter is preferable.
1039
-
1040
- .. envvar :: CPPFLAGS
1041
- .. envvar :: LDFLAGS
1042
- .. envvar :: CXXFLAG64
1043
- .. envvar :: LDFLAG64
1044
- .. envvar :: LD
1045
-
1046
- Similar comments apply to these compiler and linker flags.
1047
1051
1048
1052
Environment variables dealing with doctesting
1049
1053
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -1071,6 +1075,7 @@ Environment variables dealing with doctesting
1071
1075
for more information on the effects of these flags (and therefore
1072
1076
these variables).
1073
1077
1078
+
1074
1079
Environment variables set within Sage environments
1075
1080
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1076
1081
0 commit comments