-
-
Notifications
You must be signed in to change notification settings - Fork 517
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
Upgrade MPIR to a more recent upstream release #11616
Comments
This comment has been minimized.
This comment has been minimized.
Note that some changes between 2.1.1 and 2.1.4 may be missing (documented elsewhere, i.e. at least on |
This comment has been minimized.
This comment has been minimized.
comment:2
Attachment: MPIR_upstream_changes_between_2.1.1_and_2.4.0.txt Setting this to "needs review" since the MPIR 2.1.3.p4 from #8664 got positive review again, though so far only by a single reviewer. The current packages are mainly meant for testing the new upstream releases, hopefully on a variety of platforms supported by Sage; some improvements or changes to Sage's part will most probably follow. It would just be nice to relatively early know whether any of them (more important, MPIR 2.4.0) causes any problems on one of our platforms. (MPIR 2.5.0 is scheduled for September 1st, which isn't that far...) |
comment:3
Replying to @nexttime:
News from mpir-devel: "The release date for MPIR-2.5 was penciled in for 1st Sept, however we have decided to put it back a month to 1st Oct to allow us to get some more code in this release rather than wait for the MPIR-2.6 release on 1st Dec." |
comment:4
I've successfully built and tested sage using the 2.4.0.p0 spkg on skynet/eno. I'm currently building/testing on some other machines as well (although, I don't have access to a ppc mac, so I can't help in that regard). |
comment:5
Hmm, well I'm getting some random test failures on sage.math and skynet/iras with 2.4.0.p0. I'll try again with 2.3.1.p0 and report back. |
Changed keywords from GMP, SandyBridge, Westmere to sd32, GMP, SandyBridge, Westmere |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:8
Added a reference to #11844 (potential race condition due to yasm when building MPIR in parallel). |
This comment has been minimized.
This comment has been minimized.
comment:9
Added a note on the need to set Also added a reference to #9858; FLINT 1.5.0's test suite won't build with any of the MPIR 2.x spkgs because it uses deprecated functions, and updated the installation instructions. |
Work Issues: Rebase the spkg(s) on the MPIR 2.1.3.p5 spkg from #11896. |
This comment has been minimized.
This comment has been minimized.
comment:13
MPIR 2.5.1 has been released on March 11th. We could also give that a try, although 2.4.0 has IMHO been tested a lot and didn't raise any problems within Sage, AFAIK, at least apparently not reproducible ones. |
This comment has been minimized.
This comment has been minimized.
comment:14
It's not unlikely that I'll soon provide an MPIR 2.4.0.p2 spkg, also fixing a potential race condition in the Please build, test, and review! |
Author: Leif Leonhardy |
comment:62
Looks good to me. If you commit the outstanding changes then I'll give it a positive review. |
comment:63
Replying to @jdemeyer:
This doesn't make sense at all. Why do you refuse to use the documented, supposed (and hence safest) way (or location) to get the flags from? (And it's in no way more complicated than what you currently do. You could of course also run the preprocessor on The structure and/or contents of the generated Makefiles is likely to change with other versions of autotools, probably without intent of the MPIR developers. In any case, you should have just changed the You should also add The other changes are reasonable, so I'm ok with the spkg modulo the useless changes w.r.t. extracting Don't know whether we should [* The "autotools way" would by the way be to check whether m4 bails out on |
comment:64
Replying to @nexttime:
Is it really documented as such? I don't find any mention of |
This comment has been minimized.
This comment has been minimized.
comment:66
Replying to @nexttime:
Done. |
comment:67
Replying to @nexttime:
I see, we don't Still, I'd print the pathname of |
comment:68
This builds successfully (and passes self-tests) for me on various platforms. I don't think I'm competent to review all of the patches; what can we do to make some progress on this ticket? (One very minor comment: in the last version, I would have used "hg rename" to change |
comment:69
I think this ticket shows that there is a need for a better management of C(XX)FLAGS in Sage. Ideally via some shell script that is part of Sage, so that not every spkg has to reinvent the wheel. The whole approach of parsing the install of another spkg to recreate its CFLAGS is just wrong, and arguing how to make this bandaid less likely to break in the future is not particularly helpful. But now is not the time to create some CFLAGS framework. The spkg here seems to work pretty well, is better what we currently ship, is easy enough to read to see what it does, and is unlikely to be improved upon with some minor patches. So lets ship it! |
Changed reviewer from Jeroen Demeyer, Leif Leonhardy to Jeroen Demeyer, Leif Leonhardy, Volker Braun |
comment:71
For the record: There seems to be some progress on the GCC 4.7 on ia64 issue, but assuming that
I think we can leave the GCC 4.7.x (rather than 4.7.0) work-around as is here. (Same for the MPFR, GMP-ECM and some other, not yet merged / positively reviewed tickets.) |
comment:72
Leif, do you agree with giving this ticket positive_review? |
comment:73
Replying to @jdemeyer:
Well, printing the path to Volker said he was waiting for the changes to be committed, and I haven't looked at the latest spkg (w.r.t. usual spkg sanity checks) myself, otherwise I would have set it to positive review already. So I just don't know whether you were planning to make some further changes, and/or commit them. |
comment:74
Replying to @nexttime:
Also the description still states the p3 was preliminary. |
comment:75
Replying to @nexttime:
FWIW, the current(?) p3 spkg (md5sum (I guess it's unnecessary to mention that I of course don't agree on parts of the changelog entry in |
Diff between the 2.4.0.p2 and 2.4.0.p3 spkgs. For reference / review only. |
comment:76
Attachment: mpir-2.4.0.p2-p3.diff.gz Added path to |
This comment has been minimized.
This comment has been minimized.
Merged: sage-5.0.rc0 |
comment:78
Replying to @vbraun:
See #12890 for a partial reply. W.r.t. "parsing the install of another spkg": No spkg does this. Some use preprocessor variables defined in other [s]pkgs' C headers, some use Python files of another, or use Python's The specific problem with MPIR (similar to those with MPFR etc.) simply is that it by default doesn't allow to add or override some What Jeroen calls "good |
This is a follow-up to #8664 (and a couple of other tickets).
The following new spkg is based on the latest MPIR 2.1.3 spkg, the p9 from #12131:
New spkg: http://boxen.math.washington.edu/home/jdemeyer/spkg/mpir-2.4.0.p3.spkg
mpir-2.4.0.p3 (Jeroen Demeyer, April 26th, 2012)
Trac #11616, reviewer fixes:
out with an error. I am not aware of any system where MPIR fails
to configure with CFLAGS unset but succeeds with CFLAGS set.
This implies the following simplifications:
/usr/local/include/gmp.h
simpler and more reliable.
quote_asm.patch
to add proper quoting to the m4 in .asm files.patch
to patch gmp-h.in instead of copying the file.-mpower* and -mno-power* flags, as MPIR adds -mpower on 32-bit
PowerPC systems.
mpir-2.4.0.p2 (Leif Leonhardy, April 4th, 2012)
#11616 (upgrading MPIR), further fixes:
-march=native
, minimalistically check whether thesystem's assembler also understands the instructions the compiler emits
with that option. (Work-around for e.g. GCC 4.6.3 on MacOS X 10.x and
Intel Core i7-family CPUs with AVX.)
PYTHON
, since Sage (>=5.0.beta10) no longerpollutes the environment with its package version variables, which previous-
ly confused yasm's
configure
.__GMP_CC
and__GMP_CFLAGS
fromgmp.h
, since MPIRmeanwhile defines these to preprocessor variables (rather than literals).
Also don't use
\+
insed
patterns, as this is less portable.almost completely disabling optimization on that platform if GCC 4.7.x
is detected. This doesn't hurt much if we later rebuild MPIR with a (non-
broken) GCC from the new GCC spkg. Cf. MPIR doesn't compile with GCC-4.7.0 on ia64 #12765.
GCC spkg, i.e. if
SAGE_BUILD_TOOLCHAIN=yes
. (GMP/MPIR is a prerequisitefor it, and MPIR will later get rebuilt with both enabled, with the newly
built GCC.) Cf. When building GCC, build MPIR without the C++ interface #12782.
Cf. Race condition in building MPIR/yasm #11844.
patch
loop" to apply any patches (*.patch
) located inpatches/
.Currently only the re2c patch matches that; the prepatched header to support
Sun's C compiler is still copied over (and only on SunOS, although it doesn't
do any harm on other platforms).
stderr
,quote parameter to
--libdir
, add some comments and messages, also saveuser's setting of
LDFLAGS
andABI
.mpir-2.4.0.p1 (Leif Leonhardy, March 21st, 2012)
The 2.4.0.p0 spkg isn't in this history, as it was based
on the 2.1.3.p4 spkg, i.e., is "on another branch",
and never got merged into Sage.
make install
again, sincethe potential race condition was fixed in MPIR 2.1.4.
.hgtags
, which contained duplicate entries, andwas missing others.
This fixes also:
Race condition in building MPIR/yasm #11844: a potential race condition due to yasm when building MPIR in parallel. We've never run into this [before] though. The MPIR 2.4.0.p2 spkg now includes a patch to upstream fixing that.
When building GCC, build MPIR without the C++ interface #12782: when building MPIR to bootstrap GCC (i.e. when
SAGE_BUILD_TOOLCHAIN=yes
), do not build the C++ interface (and not the static library). This would allow to build Sage on systems which have a C compiler but not a C++ compiler, and also saves time.The list of changes between MPIR 2.1.3 (more precisely, 2.1.1) and MPIR 2.4.0 is fairly long, so I haven't put them into the description, but attached them in a plain text file.
To install / test the spkg, it is sufficient to just
Download the new spkg and copy it into
$SAGE_ROOT/spkg/standard/
.Install the MPIR spkg:
(or omit
build
to also rebuild the documentation in the samemake
run).To run just MPIR's test suite, you can reinstall the spkg with
SAGE_CHECK=yes
:Or, if you haven't yet installed the spkg (but copied it into
$SAGE_ROOT/spkg/standard/
as mentioned above), do:Afterwards you can run
make doc
to (re)build the documentation, and / ormake ptestlong
to run Sage's full test suite in parallel.CC: @RalphieBoy @wbhart @jpflori
Component: packages: standard
Keywords: sd32, GMP, SandyBridge, Westmere, yasm re2c race condition, Linux ia64 Itanium GCC 4.7.0 bug
Author: Leif Leonhardy, Jeroen Demeyer
Reviewer: Jeroen Demeyer, Leif Leonhardy, Volker Braun
Merged: sage-5.0.rc0
Issue created by migration from https://trac.sagemath.org/ticket/11616
The text was updated successfully, but these errors were encountered: