-
-
Notifications
You must be signed in to change notification settings - Fork 512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include GMP 5.1.3 as an optional package #12661
Comments
comment:1
Google told me that some people suggested to "include cstdio to obtain std::FILE". So, I tried to add
to gmp.h. However, after I attempted to build it, that line was gone!! Can someone explain how I can avoid that my editing the file is reverted? Perhaps I need to do my change in the "patches" directory? |
comment:2
Yeah, I made some progress!! I found that I needed to edit Then, building the package went beyond the point where it failed previously. However, it turns out that the gmp package requires yacc. I am insalling it now. TODO (for the moment):
|
comment:3
Hooray, the modified package builds on my openSuse laptop. However, spkg-check fails, ending with
|
comment:4
While I was at it, I tried to upgrade to gmp 5.0.4. Unfortunately, it complains that it can not find bdivmod.c in the path -- the old spkg contains that file in src/mpn/generic, but the original gmp 5.0.4 sources do no contain bdivmod.c in src/mpn/generic. Too bad. |
comment:5
The advantage of gmp 5.0.4 would be that the sources already include cstdio. So, no need for patching it. The problem is that 5.0.4 has removed and renamed a couple of things. For example, all files starting with the name The gmp 5.0.4 package seems to build. Keeping my fingers crossed for the test... |
comment:6
Replying to @simon-king-jena:
No, it doesn't. I get an infinite loop during configuration, it seems. |
This comment has been minimized.
This comment has been minimized.
Author: Simon King |
Changed keywords from none to gmp |
comment:8
See modified ticket description: It was easy to make gmp 5.0.4 build and pass all tests. Simply one has to drop all patches of the old gmp spkg. |
comment:9
A related ticket: #12661 (optional
|
comment:10
Replying to @simon-king-jena:
Leif claims that Anyway. Since the current spkg is broken (at least on openSuse), I still think we should upgrade. But people need to test on different platforms. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:13
FWIW, I did build Sage against GMP (5.0.1 or 5.0.2) a couple of times in 2010 (when we made the "first big PARI upgrade") and never ran into any problems, except for the Lcalc spkg, which was the only one explicitly using Although I looked at the (btw. completely outdated) optional GMP spkg (on other occasions as well), I didn't use any of it, in particular didn't apply any additional patches to the more recent GMP versions. We'll probably only run into trouble with using GMP instead of MPIR the day we upgrade FLINT, as newer (2.x, but IIRC only the most recent) versions of FLINT use some MPIR internals GMP doesn't provide, or at least isn't compatible with. But for the moment it should be ok to use GMP instead, although (for CLooG) this shouldn't be necessary. (In contrast, as Dima recently mentioned on sage-devel and mpir-devel, GAP uses some GMP internals MPIR currently doesn't provide. The [older?] version of GAP we use apparently works with MPIR... :-) ) |
comment:14
Replying to @nexttime:
Yes, that's what this ticket is about.
I'm not using any patches either. The question is whether other platforms (Solaris? OS X?) need patches.
When I first tried to build the optional gcc from #12369 with graphite (hence, together with the optional cloog-ppl package from #12666), I thought that cloog-ppl needs GMP (not MPIR). This is why I opened this ticket in the first place. I found a massive slow-down when I built sage with the optimizations provided by graphite. Big surprise. But some people suggested that the culprit might in fact be GMP. So, I am started over. I can not tell yet whether Sage is faster with MPIR than with GMP. However, GMP is definitely not required by cloog-ppl, which lessens the priority of this ticket considerably, from my perspective... |
comment:15
Building the new gmp spkg here on Mac OS X (with gcc 4.6.3) with SAGE_CHECK=yes succeeds and passess all tests! |
comment:16
GMP 5.0.5 is out since a while... |
comment:17
Replying to @nexttime:
This ticket is open since a while... |
comment:18
Replying to @simon-king-jena:
I was wanting to review it since a while... |
comment:20
gmp 5.1.x is out and transition to git is needed if we want to keep gmp in sage. |
comment:21
Yup, also note that FLINT >= 2.4 can now be built on top of GMP. |
comment:30
Similar probledm and solution here: |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:32
Replying to @jpflori:
Sorry we could have warned you about that since sage-on-gentoo is stuck on gmp we knew about this and how to fix it. |
comment:33
Replying to @kiwifb:
No problem, I found the solution more than easily on the web. Any other suggestion from sage-on-gentoo? |
comment:34
We are really stuck with gmp unless we make great effort. It is complicated because most of the package of the tree will depend on gmp and few will use mpir directly, at some point I tried to port a lot of ebuild to mpir directly but it was a bit unsustainable. The easiest way is to use the gmp compatibility layer from mpir. Then we have to convince the toolchain people that we should have the possibility of switching between gmp and mpir to build gcc. Then we need to replace all dependencies to gmp in the tree by some virtual package which can be either gmp or mpir passing as gmp. That's a ton of work, require convincing people and so on. if all package in sage could be configured with either real gmp or real mpir out of the box we may be able to do some easy switching between the two but it is not the case. |
comment:35
FTR here are the only failing doctests:
and
|
comment:36
I got the first one in sage/rings/integer.pyx and knew it was from gmp vs mpir. I also have sage/tests/book_stein_modform.py but I didn't know it was originating from gmp vs mpir. I don't have the second failure in integer.pyx it may be because I am currently only at gmp 5.1.2. |
comment:37
The ones in integer.pyx are really harmless anyway. Not sure about the one in the Manin generators computation, so I could be easily convinced it is innocuous as well. |
comment:38
Actually I got the second one in integer.pyx. It wasn't present when I last made a record of doctests failures in sage-on-gentoo for sage 6.0, but it is in 6.2.beta2. |
comment:39
Any reason why this is still stuck at "need work"? I can give this a positive review, fixing the doctests to work with gmp is probably more work than it is worth. Especially the top one in integer.pyx. Opinions? |
comment:40
I agree that I can live with the failing doctests. As far as setting this to "needs_review" is concerned, I did not change the status because I wanted to include some patches to let SAge actually use GMP rather than MPIR and even potentially being able to switch from one to the other. |
comment:41
The only thing I can see right now that prevent sage to build with gmp out of the box is the inclusion of mpir.h instead of gmp.h in memory.c in clib. |
comment:42
Flint install script should be modified as well. |
comment:43
And you should also prevent Sage from building mpir I guess. |
comment:44
Ambitious I see. Of course I have total control in sage-on-gentoo but I would appreciate just having to switch --with-gmp or something. |
comment:45
Sure. I would be ok to postpone the proper way to use gmp instead of mpir for sage the distrib in a follow up ticket. |
comment:46
Ok so everything is in fact already here. |
Changed author from Simon King to Simon King, Jean-Pierre Flori |
comment:47
Follow up at #15957. |
Reviewer: François Bissey |
comment:48
I don't know that the renaming of sage_mpir_* to sage_gmp_* is necessary. In fact I am not even sure it needs to be named gmp or mpir at all. Aside from that it is all ok and conform to what we do in sage-on-gentoo. |
Changed branch from u/jpflori/ticket/12661 to |
Let's package GMP 5.1.3.
Upstream tarball at:
CC: @nexttime @rwst
Component: packages: optional
Keywords: gmp
Author: Simon King, Jean-Pierre Flori
Branch/Commit:
a14aaf2
Reviewer: François Bissey
Issue created by migration from https://trac.sagemath.org/ticket/12661
The text was updated successfully, but these errors were encountered: