1 | initial version |
First, we need to thank you for taking the time to share this experience and asking this question. I think we need more of these comments from external people. I think very few takes the time of sharing such experience which represents the struggling of many others which just don't bother to share their experience. So I am very thankful and very respectful for the person asking the question and I think we all deserve to be.
I know much less about normal installation of packages in Linux than the person asking the question here. But I have been using/developing for sage since 16 years, so let me share my explanation of the "why".
For years, compiling sage was relatively "easy". The idea was that people would just need to run make
in the folder, wait and that's it. I think this was far from following the LInux approach (configure & make & make install), but for a mathematician just doing enough terminal, it was easier than trying to install all the dependencies separately. Also, all dependency packages were built including gcc and gfortran even if those packages were on the computer already. Having double copies of so many packages was time-consuming during compilation and sub-optimal. Therefore, at some point (5 to 8 years ago), it was suggested to use the packages from the system if they were available and their version were not too old. I think this was a good idea. This is now performed by the make configure / configure part which needs to be done beforehand. This script checks the packages installed on the system and tells whether it will use the package on the system or not. I used to always check at least whether it was using the gcc, gfortran and Python version from the system. So at least I knew I would gain a lot of time during compilation.
If gcc, gfortran, Python, etc. are not on the system, then it gives suggestions of packages to install. It turns out that these suggestions are broken in the sense that they suggest to install packages which were already installed, or to install packages that do not exist (I also needed to remove some packages by hand from the list which is painful, but not as painful as writing a for loop in bash since I don't know bash as well as the user asking the question).
I was involved at some point in trying to improve these suggestions and I was not alone. See for instance https://github.com/sagemath/sage/issues/30624. But 4 years later, the issue with these suggestions is still present. Why? At least, I can say that people caring did not succeed in improving this.
My answer to the question. After the change of sage installation to use this "configure" thing beforehand, my method became to install the packages suggested until a fixed-point is reached (the suggestion of packages is equal to the previous list after trying to install them). The suggestions in the fixed-point list need to be ignored. What is important is that I make sure with my eyes that it is using gfortran and gcc from the system. And then I run make in parallel (MAKE="make -j8" make
) which is the nice part of sage and I think works great most of the time.
2 | No.2 Revision |
First, we need to thank you for taking the time to share this experience and asking this question. I think we need more of these comments from external people. I think very few takes the time of sharing such experience which represents the struggling of many others which just don't bother to share their experience. So I am very thankful and very respectful for the person asking the question and I think we all deserve to be.
I know much less about normal installation of packages in Linux than the person asking the question here. But I have been using/developing for sage since 16 years, so let me share my explanation of the "why".
For years, compiling sage was relatively "easy". The idea was that people would just need to run make
in the folder, wait and that's it. I think this was far from following the LInux approach (configure & make & make install), but for a mathematician just doing enough terminal, it was easier than trying to install all the dependencies separately. Also, all dependency packages were built including gcc and gfortran even if those packages were on the computer already. Having double copies of so many packages was time-consuming during compilation and sub-optimal. Therefore, at some point (5 to 8 years ago), it was suggested to use the packages from the system if they were available and their version were not too old. I think this was a good idea. This is now performed by the make configure / configure part which needs to be done beforehand. This script checks the packages installed on the system and tells whether it will use the package on the system or not. I used to always check at least whether it was using the gcc, gfortran and Python version from the system. So at least I knew I would gain a lot of time during compilation.
If gcc, gfortran, Python, etc. are not on the system, then it gives suggestions of packages to install. It turns out that these suggestions are broken in the sense that they suggest to install packages which were already installed, or to install packages that do not exist (I also needed to remove some packages by hand from the list which is painful, but not as painful as writing a for loop in bash since I don't know bash as well as the user asking the question).
I was involved at some point in trying to improve these suggestions and I was not alone. See for instance https://github.com/sagemath/sage/issues/30624. But 4 years later, the issue with these suggestions is still present. Why? At least, I can say that people caring did not succeed in improving this.
My answer to the question. After the change of sage installation to use this "configure" thing beforehand, my method became to install the packages suggested until a fixed-point is reached (the suggestion of packages is equal to the previous list after trying to install them). The suggestions in the fixed-point list need to be ignored. What is important is that I make sure with my eyes that it is using gfortran and gcc from the system. And then I run make in parallel (MAKE="make -j8" make
) which is the nice part of sage and I think works great most of the time.
Taking a step back, note that suggestions of packages to install can be completely ignored. You can just run make and wait longer. In that sense, building sage is "easy".