Opened 9 years ago
Last modified 9 years ago
#13137 closed enhancement
upgrade MPIR to 2.6.0 — at Version 26
Reported by: | jhpalmieri | Owned by: | tbd |
---|---|---|---|
Priority: | major | Milestone: | sage-5.7 |
Component: | packages: standard | Keywords: | mpir spkg |
Cc: | jpflori | Merged in: | |
Authors: | John Palmieri, Jean-Pierre Flori | Reviewers: | Jeroen Demeyer |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | #13755 | Stopgaps: |
Description (last modified by )
As the summary says. Also, mpir-2.4.0.p5.spkg fails self-tests, moreover it's old. Upgrading to 2.6.0 fixes both issue.
Here are some (preliminary?) spkgs of MPIR version since 2.4.x:
- http://sage.math.washington.edu/home/palmieri/SPKG/mpir-2.5.1.p0.spkg,
- http://sage.math.washington.edu/home/palmieri/SPKG/mpir-2.5.2.p0.spkg,
- http://boxen.math.washington.edu/home/jpflori/mpir-2.6.0.p0.spkg (based on Cygwin fix of #12115).
The different spkg were upgraded to the quoted versions, with files removed as described by SPKG.txt, and patches rebased except the yasm patch which seems no longer necessary was removed.
In addition to using one of the above spkg, apply to SAGE_ROOT trac_13137-stopgap.patch.
Change History (29)
Changed 9 years ago by
comment:1 Changed 9 years ago by
- Description modified (diff)
- Status changed from new to needs_review
comment:2 Changed 9 years ago by
This causes the libm4rie test suite to fail, as well as breaks the building of linbox (both have the same errors):
In file included from .../local/include/gmp++/gmp++.h:20:0, from ../../linbox/integer.h:22, from ../../linbox/randiter/abstract.h:30, from ../../linbox/field/abstract.h:32, from ../../linbox/field/archetype.h:42, from ../../linbox/vector/vector-traits.h:35, from ../../linbox/blackbox/factory.h:17, from ../../linbox/matrix/sparse.h:54, from ../../linbox/blackbox/sparse.h:41, from linbox-sage.C:35: .../local/include/gmpxx.h:1566:3: error: ‘__gmp_expr<__mpz_struct [1], __mpz_struct [1]>::__gmp_expr(intmax_t)’ cannot be overloaded .../local/include/gmpxx.h:1562:3: error: with ‘__gmp_expr<__mpz_struct [1], __mpz_struct [1]>::__gmp_expr(long int)’ .../local/include/gmpxx.h:1567:3: error: ‘__gmp_expr<__mpz_struct [1], __mpz_struct [1]>::__gmp_expr(uintmax_t)’ cannot be overloaded .../local/include/gmpxx.h:1563:3: error: with ‘__gmp_expr<__mpz_struct [1], __mpz_struct [1]>::__gmp_expr(long unsigned int)’ .../local/include/gmpxx.h:1635:16: error: ‘__gmp_expr<__mpz_struct [1], __mpz_struct [1]>& __gmp_expr<__mpz_struct [1], __mpz_struct [1]>::operator=(intmax_t)’ cannot be overloaded .../local/include/gmpxx.h:1629:16: error: with ‘__gmp_expr<__mpz_struct [1], __mpz_struct [1]>& __gmp_expr<__mpz_struct [1], __mpz_struct [1]>::operator=(long int)’ .../local/include/gmpxx.h:1636:16: error: ‘__gmp_expr<__mpz_struct [1], __mpz_struct [1]>& __gmp_expr<__mpz_struct [1], __mpz_struct [1]>::operator=(uintmax_t)’ cannot be overloaded .../local/include/gmpxx.h:1631:16: error: with ‘__gmp_expr<__mpz_struct [1], __mpz_struct [1]>& __gmp_expr<__mpz_struct [1], __mpz_struct [1]>::operator=(long unsigned int)’ .../local/include/gmpxx.h: In constructor ‘__gmp_expr<__mpz_struct [1], __mpz_struct [1]>::__gmp_expr(intmax_t)’: .../local/include/gmpxx.h:1566:49: error: ‘mpz_init_set_sx’ was not declared in this scope .../local/include/gmpxx.h: In constructor ‘__gmp_expr<__mpz_struct [1], __mpz_struct [1]>::__gmp_expr(uintmax_t)’: .../local/include/gmpxx.h:1567:50: error: ‘mpz_init_set_ux’ was not declared in this scope .../local/include/gmpxx.h: In member function ‘__gmp_expr<__mpz_struct [1], __mpz_struct [1]>& __gmp_expr<__mpz_struct [1], __mpz_struct [1]>::operator=(intmax_t)’: .../local/include/gmpxx.h:1635:56: error: ‘mpz_set_sx’ was not declared in this scope .../local/include/gmpxx.h: In member function ‘__gmp_expr<__mpz_struct [1], __mpz_struct [1]>& __gmp_expr<__mpz_struct [1], __mpz_struct [1]>::operator=(uintmax_t)’: .../local/include/gmpxx.h:1636:57: error: ‘mpz_set_ux’ was not declared in this scope .../local/include/gmpxx.h: In member function ‘intmax_t __gmp_expr<__mpz_struct [1], __mpz_struct [1]>::get_sx() const’: .../local/include/gmpxx.h:1677:49: error: ‘mpz_get_sx’ was not declared in this scope .../local/include/gmpxx.h: In member function ‘uintmax_t __gmp_expr<__mpz_struct [1], __mpz_struct [1]>::get_ux() const’: .../local/include/gmpxx.h:1678:50: error: ‘mpz_get_ux’ was not declared in this scope
There may be other issues, but I haven't encountered them yet.
comment:3 Changed 9 years ago by
There is an mpir-2.4.0.p6 at #12751, probably the new spkg should be based on that.
Also, I guess the patch patches/yasm__tools__re2c__code.c.patch
can be removed completely (then also remove it from SPKG.txt
)
comment:4 Changed 9 years ago by
- Cc jpflori added
comment:5 Changed 9 years ago by
- Reviewers set to Jeroen Demeyer
- Status changed from needs_review to needs_work
comment:6 Changed 9 years ago by
I've rebased the spkg. I haven't investigated the issues in the comment above. I'll take a look, but I may not know enough to be able to fix them.
comment:7 Changed 9 years ago by
On hawk (OpenSolaris): linbox fails to build, as mentioned above, and the new spkg from #12883 doesn't help. libm4rie passes its test suite, though.
On sage.math (linux, Sage's gcc): the ppl build fails to configure ("checking which instantiations are enabled... configure: error: invalid instantiation Polyhedron Error configuring the Parma Polyhedra Library."). linbox fails to build, and libm4rie fails its test suite.
On taurus (linux, gcc 4.7.0): same as with sage.math, and also pari fails its test suite.
I'm still building on OS X; I'll report the results when they're available.
I don't know enough to troubleshoot these. If someone else wants to work on this, please go ahead.
comment:8 Changed 9 years ago by
OS X is similar to sage.math: linbox and ppl fail to build, libm4rie fails its test suite.
comment:9 Changed 9 years ago by
- Description modified (diff)
I created an spkg out of the just-released version 2.5.2. It was more or less straightforward, except that it refuses to build using clang on OS X, so spkg-install required a little modification.
With this spkg, givaro no longer builds on sage.math or OS X, and I am seeing the same problems with ppl. Since givaro won't build, I'm not even getting to libm4rie or linbox.
comment:10 Changed 9 years ago by
MPIR 2.6.0 is out and will be needed for FLINT 2.3. Should we cope with this upgrade here? Or in a subsequent ticket?
By the way, it would be nice to integrate the easy Cygwin fix of #12115 while upgrading MPIR.
comment:11 Changed 9 years ago by
I have no objections to trying to upgrade to 2.6.0 instead of 2.5.2. Maybe it will fix some of the issues mentioned on this ticket. If someone else wants to put together an spkg, please go ahead.
comment:12 Changed 9 years ago by
I gave MPIR 2.6.0 a shot, and the problem with linbox remains. That's really strange, because somehow in gmpxx.h the member function get_sx is defined to invoke the C mpz_get_sx function, conditionally on the fact that stdint.h is included, and the mpz_get_sx is prototyped in mpir.h conditionally on the same fact. But somehow, the mpz_get_sx is not found. I'm asking that on mpir-devel as well because I have no clue.
Anyway, these functions are not necessary, so badly removing the definition of the member functions in gmpxx.h let you compile linbox and go on with other bits of Sage, as long as a proper solution is not found.
comment:13 Changed 9 years ago by
Maybe the problem is that mpir.h gets first included withtout stdint.h inlcuded so that when gmpxx.h gets included mpir.h is not included again and the C functions get_sx and get_ux are not defined.
comment:14 Changed 9 years ago by
Ok that's it:
In file included from linbox-sage.C:28:0: /home/jp/boulot/sage/sage-5.5.rc0/local/include/gmp.h:1228:17: note: #pragma message: gmp wo stdint In file included from /home/jp/boulot/sage/sage-5.5.rc0/local/include/gmp++/gmp++.h:33:0, from ../../linbox/integer.h:57, from ../../linbox/randiter/abstract.h:31, from ../../linbox/field/abstract.h:33, from ../../linbox/field/archetype.h:49, from ../../linbox/vector/vector-traits.h:57, from ../../linbox/blackbox/factory.h:33, from ../../linbox/matrix/sparse.h:72, from ../../linbox/blackbox/sparse.h:57, from linbox-sage.C:38: /home/jp/boulot/sage/sage-5.5.rc0/local/include/gmpxx.h:1710:17: note: #pragma message: gmpxx w stdint
comment:15 Changed 9 years ago by
New spkg at http://boxen.math.washington.edu/home/jpflori/mpir-2.6.0.p0.spkg. It also includes the changes from #12115.
comment:16 Changed 9 years ago by
On my linux install (Debian/experimental/gcc 4.7.?) the new MPIR spkg builds and passes its testsuite. I've upped a fixed LinBox? spkg at #13755 which should get merged with this one. I'll now have a look at libm4rie where the problem should be similar. I'll also try to build on sage.math. I don't have access to skynet, so won't try on more exotic archs.
comment:17 Changed 9 years ago by
- Dependencies set to #13755
- Summary changed from upgrade MPIR to 2.5.1 to upgrade MPIR to 2.6.0
With this ticket and #13755 I have no problem with libm4rie test suite, nor with PPl or pari, on the same setup as before. I'm now launching a clean build on sage.math.
And by the way, I've not put the clang changes in the spkg yet, as I cannot test if they are still needed.
comment:18 Changed 9 years ago by
On sage.math I get
../../lib/libR.so: undefined reference to `rl_sort_completion_matches'
while building the R spkg.
comment:19 Changed 9 years ago by
Apart from that the rest seems fine on sage.math (with Sage'gcc spkg). MPIR passes its test suite as PARI and libm4rie.
comment:20 Changed 9 years ago by
No problem with PPl and its testsuite as well (by the way the spkg-check from ppl lacks a nice "eerything got well, bye" message).
I'm still confused by the R issue. The problematic symbol is from readline, not sure how MPIR has influence on it.
comment:21 Changed 9 years ago by
In fact I get the same R error with a stock sage 5.5.rc0 so this is unrelated as expected.
comment:22 Changed 9 years ago by
- Description modified (diff)
- Keywords spkg added
- Status changed from needs_work to needs_info
The discussion about headers inclusion at mpir-devel can be read at: https://groups.google.com/d/topic/mpir-devel/m__z0PR_wBw/discussion
Anyway, even if MPIR puts in a solution at some point, I think LinBox? must be fixed anyway. So #13755 makes sense and I'll put it as a dependency here.
The discussion about sage.math.washington.edu failure (which is highly likely to be unrelated): https://groups.google.com/d/topic/sage-devel/Tmg6nA1eWGk/discussion
I guess what must be done now is to retry some builds on different archs/compilers combinations (to check the clang thing for example) because this spkg is highly sensitive to that, and then we could launch the patchbots (or launch them directly but I don't know how to do that, nor how to get their results), so I put this as need_info now.
We should also decide what to do with the "history" of the spkg. For now, I've based the spkg on the one from #12115, mentionned in SPKG.txt with an hg commit plus an hg tag done by myself (if #12115 gets merged before that one, I guess we'll do a "proper" rebasing), then added mentionned of 2.5.2.p0 by John in SPKG.txt but without hg commit or hg tag, and finally mention of 2.6.0.p0 in SPKG.txt with an hg commit but no hg tag, assuming it will be automagically by Jeroen scripts.
comment:23 Changed 9 years ago by
On my OS X 10.8 box, I have the same problems with clang. Trying again with the clang changes from my earlier spkg applied to jpflori's spkg: it builds and passes self-tests. Now I'm proceeding with the rest of the Sage build. I'm also trying it on the skynet machine taurus (linux, GCC 4.7.0, referred to above). I'll post results when I know more.
comment:24 Changed 9 years ago by
Thanks for the report, I'll put the clang patch back in and report upstream.
comment:25 Changed 9 years ago by
No problems on either OS X (with modifications for clang) or taurus: with SAGE_CHECK=yes
, all packages built and passed their tests. I ran make ptestlong
and all tests passed on both platforms.
I think that this is probably ready to go, once the clang changes are reinstated. I also think what you've done with the history is fine.
comment:26 Changed 9 years ago by
- Description modified (diff)
Ok, I'm putting back the clang stuff.
About the ,asm files, I think it's just a typo introduced here: https://github.com/wbhart/mpir/commit/295967cd2b11f7b964283c1e1bf8dd154e388af4 Waiting for confirmation here: https://groups.google.com/d/topic/mpir-devel/0uhskYIbRII/discussion As I have little doubt about this I'll add a patch to move the files and update the quote_patch patch.
(I cannot put the ticket directly as needs_work, so I'm leaving it in its current state and will put it as needs_review when the new spkg is posted.)
root repo