Re: [sage-devel] GCC package (#12369) needs review
On Sun, 15 Apr 2012 at 09:49PM +0200, Jeroen Demeyer wrote: > That's actually not true. Currently, GCC is built on all systems where > the system compiler is not GCC or is GCC version < 4.4.0. The > environment variable SAGE_INSTALL_GCC can be used to override this. ...also, we use our own gcc instead of gcc 4.7 on Itanium, and in some instances use our own gcc instead of gcc 4.6.[01]. See ticket #12825 for more details. Dan -- --- Dan Drake - http://mathsci.kaist.ac.kr/~drake --- signature.asc Description: Digital signature
Re: [sage-devel] GCC package (#12369) needs review
On 2012-04-13 21:17, Ondřej Čertík wrote: > Ah, maybe the link went to a wrong email. I meant the email by Georg S. Weber > which says: > > the approach to "include our own GCC 4.5.1" is doomed to fail. Well, what can I say? It turns out that any potential issues with all the points raised in that thread were not so serious. There certainly were a lot of issues, but all of them could be worked around. This is also because the GCC project is doing a great job in making a portable compiler. The main point from that thread that I disagree with is of course > and the Sage project has even less competence > sorting out the problems that *will* arise with compiling gcc, than > for packages like mpir, or pari. -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
Re: [sage-devel] GCC package (#12369) needs review
Let me add a few clarifications to this email: On 2012-04-15 21:36, Georg S. Weber wrote: > "he who codes, rules" as the saying goes. I was wrong (and I'm glad > about it!). Just some comments w.r.t. the reasoning in that old message > of mine. Firstly, if I'm not mistaken, OS X is the only system where > Sage now builds its own (GCC both C and Fortran) compiler, not anywhere > else, especially not on Linux. That's actually not true. Currently, GCC is built on all systems where the system compiler is not GCC or is GCC version < 4.4.0. The environment variable SAGE_INSTALL_GCC can be used to override this. > Secondly, there was nevertheless still quite some work to do, with more > than one (tickets and) participants, to switch on OS X from "Apple" GCC > (v4.0.1 resp. v4.2.1) to "FSF" GCC (v4.6.2) to build Sage. We ship GCC-4.6.3 (there were some earlier GCC-4.6.2 spkgs). > Thirdly, Jeroen's new spkg uses some clever tricks for bootstrapping GCC > --- on the one hand, that spkg relies on the MPFR and MPIR (as a > replacement for GMP) libraries to having been built first by the host > compiler, but on the other hand, it includes itself the sources of the > (to be built and needed) MPC library. This is not true. MPC now is a standard spkg just like MPIR and MPFR. Some earlier versions of my GCC spkg did include MPC. > After GCC is built, both the MPFR > and MPIR libraries are rebuilt, now with the newly built and functional > GCC MPC is also rebuilt. > --- which in turn is *not* built a second time after that --- which > a purist might want to do, due to the altered way MPFR and MPIR are now > built, but in practice, it does not seem to really matter. Indeed. It doesn't matter because GCC dynamically links against MPIR/MPFR/MPC. After rebuilding those libraries, gcc will use those new libraries. > Behind the scenes, OS X / > XCode seems to provide pretty stable (or at least up-to-the-task) > versions of all the other required requisites for bootstrapping GCC > (binutils, libtool, a linker/loader, ..., make, bison, flex, ...) bison and flex are NOT required to build GCC (or any other part of Sage). -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
Re: [sage-devel] GCC package (#12369) needs review
> Ah, maybe the link went to a wrong email. I meant the email by Georg S. > Weber > which says: > > " > the approach to "include our own GCC 4.5.1" is doomed to fail. > " > > and explains why, to which William replied "I think you really know > what you're talking about.". > > And since you did it and it seems to work, it seems that it is not > doomed to fail. So > that's why I was curious if you have any opinions on this discrepancy. > Well, "he who codes, rules" as the saying goes. I was wrong (and I'm glad about it!). Just some comments w.r.t. the reasoning in that old message of mine. Firstly, if I'm not mistaken, OS X is the only system where Sage now builds its own (GCC both C and Fortran) compiler, not anywhere else, especially not on Linux. On OS X, I was talking not of GCC 4.5.1 or any such newer "FSF" GCC, but really meant the "Apple" GCC versions --- the assumption that on OS X, these would be strictly necessary, was the main error in my reasoning. Secondly, there was nevertheless still quite some work to do, with more than one (tickets and) participants, to switch on OS X from "Apple" GCC (v4.0.1 resp. v4.2.1) to "FSF" GCC (v4.6.2) to build Sage. Thirdly, Jeroen's new spkg uses some clever tricks for bootstrapping GCC --- on the one hand, that spkg relies on the MPFR and MPIR (as a replacement for GMP) libraries to having been built first by the host compiler, but on the other hand, it includes itself the sources of the (to be built and needed) MPC library. After GCC is built, both the MPFR and MPIR libraries are rebuilt, now with the newly built and functional GCC --- which in turn is *not* built a second time after that --- which a purist might want to do, due to the altered way MPFR and MPIR are now built, but in practice, it does not seem to really matter. I don't think that was obvious from the outset. Even in hindsight, I deem this sequence of bootstrapping GCC pretty clever! Behind the scenes, OS X / XCode seems to provide pretty stable (or at least up-to-the-task) versions of all the other required requisites for bootstrapping GCC (binutils, libtool, a linker/loader, ..., make, bison, flex, ...) --- not all of these necessarily exist on out-of-the-box Linux installations. But there, again clever enough, Sage relies on the *user* having installed GCC before (which of course any Linux distro knows how to do correctly, with all prerequisites). -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
Re: [sage-devel] GCC package (#12369) needs review
On Tue, Apr 10, 2012 at 3:26 AM, Jeroen Demeyer wrote: > On 2012-04-10 11:46, Ondřej Čertík wrote: >> What is your opinion on this thread: >> >> https://groups.google.com/d/msg/sage-devel/9CBKLU6LYkU/HNhJBKJ45VMJ > What do you mean specifically? It's a long thread, many things are > discussed... Ah, maybe the link went to a wrong email. I meant the email by Georg S. Weber which says: " the approach to "include our own GCC 4.5.1" is doomed to fail. " and explains why, to which William replied "I think you really know what you're talking about.". And since you did it and it seems to work, it seems that it is not doomed to fail. So that's why I was curious if you have any opinions on this discrepancy. > >> In your experience is there >> any problem with simply building gcc from scratch (when needed)? > That's exactly what's done in the latest beta: sage-5.0.beta13. There > are a few issues here and there, but nothing too serious it seems. Cool. Ondrej -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
Re: [sage-devel] GCC package (#12369) needs review
On 2012-04-10 11:46, Ondřej Čertík wrote: > What is your opinion on this thread: > > https://groups.google.com/d/msg/sage-devel/9CBKLU6LYkU/HNhJBKJ45VMJ What do you mean specifically? It's a long thread, many things are discussed... > In your experience is there > any problem with simply building gcc from scratch (when needed)? That's exactly what's done in the latest beta: sage-5.0.beta13. There are a few issues here and there, but nothing too serious it seems. -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
Re: [sage-devel] GCC package (#12369) needs review
Hi Jeroen, On Sun, Mar 11, 2012 at 2:56 PM, Jeroen Demeyer wrote: > I have made a spkg for GCC (GNU compiler collection) version 4.6.3 with > compilers for C, C++ and Fortran. We don't always build GCC, by default > only on systems where this is needed or which have an old GCC version. > > The main motivation for this ticket was to make Sage work on OS X 10.7. > But I think that having a GCC spkg is good for porting in general. It > should also slightly increase Sage run-time performance for people with > older compilers. The review of this package should not focus on OS X 10.7. > > To make reviewing this ticket more easy, I have made some testing > releases, see the ticket #12369 for details. As far as I know, on every > system on which sage-5.0.beta7 vanilla works, the testing release with > GCC also works. Thanks, this is awesome. I was trying to create a gfortran package about two years ago, so that I obtain a gfortran binary on a Mac, but only managed to get it to compile on Linux, not Mac. So I decided to ship a binary, but this is much better. I see that you figured out lots of things in the spkg-install. What is your opinion on this thread: https://groups.google.com/d/msg/sage-devel/9CBKLU6LYkU/HNhJBKJ45VMJ which has discouraged me to pursue this path further. I am glad that you pushed this through. In your experience is there any problem with simply building gcc from scratch (when needed)? Ondrej -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
Re: [sage-devel] GCC package (#12369) needs review
On Sat, Apr 7, 2012 at 6:08 AM, Jeroen Demeyer wrote: > The GCC ticket is now ready for its (hopefully) final review. There is > only one additional patch to be reviewed: > > http://trac.sagemath.org/sage_trac/attachment/ticket/12369/12369_gcc_root_part2.patch > > It has been tested on the buildbot with success and upgrading has also > been tested. So please review > http://trac.sagemath.org/sage_trac/ticket/12369 Done. > > Thanks, > Jeroen. > > -- > To post to this group, send an email to sage-devel@googlegroups.com > To unsubscribe from this group, send an email to > sage-devel+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/sage-devel > URL: http://www.sagemath.org -- William Stein Professor of Mathematics University of Washington http://wstein.org -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
Re: [sage-devel] GCC package (#12369) needs review
The GCC ticket is now ready for its (hopefully) final review. There is only one additional patch to be reviewed: http://trac.sagemath.org/sage_trac/attachment/ticket/12369/12369_gcc_root_part2.patch It has been tested on the buildbot with success and upgrading has also been tested. So please review http://trac.sagemath.org/sage_trac/ticket/12369 Thanks, Jeroen. -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
Re: [sage-devel] GCC package (#12369) needs review
On Sunday, March 11, 2012, Jeroen Demeyer wrote: > I have made a spkg for GCC (GNU compiler collection) version 4.6.3 with > compilers for C, C++ and Fortran. Thank you!!! This is very awesome!! I will review it if i get to it before somebody else. > We don't always build GCC, by default > only on systems where this is needed or which have an old GCC version. > > The main motivation for this ticket was to make Sage work on OS X 10.7. > But I think that having a GCC spkg is good for porting in general. It > should also slightly increase Sage run-time performance for people with > older compilers. The review of this package should not focus on OS X 10.7. > > To make reviewing this ticket more easy, I have made some testing > releases, see the ticket #12369 for details. As far as I know, on every > system on which sage-5.0.beta7 vanilla works, the testing release with > GCC also works. > > > So please review: > http://trac.sagemath.org/sage_trac/ticket/12369 > > Thanks, > Jeroen. > > -- > To post to this group, send an email to sage-devel@googlegroups.com > To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com > For more options, visit this group at http://groups.google.com/group/sage-devel > URL: http://www.sagemath.org > -- William Stein Professor of Mathematics University of Washington http://wstein.org -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
[sage-devel] GCC package (#12369) needs review
I have made a spkg for GCC (GNU compiler collection) version 4.6.3 with compilers for C, C++ and Fortran. We don't always build GCC, by default only on systems where this is needed or which have an old GCC version. The main motivation for this ticket was to make Sage work on OS X 10.7. But I think that having a GCC spkg is good for porting in general. It should also slightly increase Sage run-time performance for people with older compilers. The review of this package should not focus on OS X 10.7. To make reviewing this ticket more easy, I have made some testing releases, see the ticket #12369 for details. As far as I know, on every system on which sage-5.0.beta7 vanilla works, the testing release with GCC also works. So please review: http://trac.sagemath.org/sage_trac/ticket/12369 Thanks, Jeroen. -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org