#11616: Upgrade MPIR to a more recent upstream release
----------------------------------------------------------------------------------------------------------------+
       Reporter:  leif                                                          
                                |         Owner:  leif          
           Type:  enhancement                                                   
                                |        Status:  needs_review  
       Priority:  blocker                                                       
                                |     Milestone:  sage-5.0      
      Component:  packages                                                      
                                |    Resolution:                
       Keywords:  sd32, GMP, SandyBridge, Westmere, yasm re2c race condition, 
Linux ia64 Itanium GCC 4.7.0 bug  |   Work issues:                
Report Upstream:  N/A                                                           
                                |     Reviewers:  Jeroen Demeyer
        Authors:  Leif Leonhardy, Jeroen Demeyer                                
                                |     Merged in:                
   Dependencies:                                                                
                                |      Stopgaps:                
----------------------------------------------------------------------------------------------------------------+
Description changed by jdemeyer:

Old description:

> This is a follow-up to #8664 (and a couple of other tickets).
>
> [[BR]]
>
> The following '''new spkgs''' are 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.p2.spkg]
>
> (Preliminary; changes not yet committed.)
>

> '''New spkg:'''
> [http://boxen.math.washington.edu/home/leif/Sage/spkgs/mpir-2.4.0.p1.spkg]
>
> '''md5sum:''' `0d88b7dfe358bb429a5a9aa3a3b4b00b  mpir-2.4.0.p1.spkg`
>

> === mpir-2.4.0.p2 (Leif Leonhardy, Jeroen Demeyer, April 9th, 2012) ===
>  #11616 (upgrading MPIR), further fixes:
>  * When the first configure run (with CFLAGS unset) of MPIR fails, bail
>    out with an error.  I am not aware of any system where MPIR fails
>    to configure with CFLAGS unset but succeeds with CFLAGS set.
>    -- Jeroen Demeyer
>    This implies the following simplifications:
>    - We no longer read CC and CFLAGS from /usr/include/gmp.h or
>      /usr/local/include/gmp.h
>    - We no longer try to add -march=native, we simply use MPIR's flags.
>  * Extract $CC and $CFLAGS from Makefile instead of mpir.h, which is
>    simpler and more reliable.
>  * Work around GCC 4.7.0 bug (compilation error) on Linux ia64 (Itanium)
> by
>    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. #12765.
>  * Do not build the C++ interface and static libraries when bootstrapping
> the
>    GCC spkg, i.e. if `SAGE_BUILD_TOOLCHAIN=yes`.  (GMP/MPIR is a
> prerequisite
>    for it, and MPIR will later get rebuilt with both enabled, with the
> newly
>    built GCC.)  Cf. #12782.
>  * Fix a potential race condition in yasm's build by patching the re2c
> source.
>    Cf. #11844.
>  * Added `quote_asm.patch` to add proper quoting to the m4 in .asm files.
>  * Add "`patch` loop" to apply any patches (`*.patch`) located in
> `patches/`.
>    Use this to patch gmp-h.in instead of copying the file.
>  * Minor clean-up; e.g. redirect error messages and warnings to `stderr`,
>    quote parameter to `--libdir`, add some comments and messages, also
> save
>    user's setting of `LDFLAGS` and `ABI`.
>
> === mpir-2.4.0.p1 (Leif Leonhardy, March 21st, 2012) ===
>  * Upstream upgrade to MPIR 2.4.0 (#11616).
>    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.
>  * Remove forcing a sequential `make install` again, since
>    the potential race condition was fixed in MPIR 2.1.4.
>  * Fix `.hgtags`, which contained duplicate entries, and
>    was missing others.
>
> ----
>
> This fixes also:
>
>  1. #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.
>
>  2. #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.
>
> ----
>
> The following '''old spkgs''' are based on the '''obsolete''' MPIR
> 2.1.3.'''p4''' spkg from #8664:
>
>  * http://spkg-upload.googlecode.com/files/mpir-2.3.1.p0.spkg [[BR]]
>    md5sum: `ff0104e302611e49604a1c4ead97cbf4  mpir-2.3.1.p0.spkg`
>
>  * http://spkg-upload.googlecode.com/files/mpir-2.4.0.p0.spkg (based on
> the 2.1.3.p4 spkg) [[BR]]
>    md5sum: `98e04aa43ceef04d83574f0ee8e152fc  mpir-2.4.0.p0.spkg`
>
> You may want to give both of them a try, although the former is just
> intended as a "fallback" spkg in case problems introduced in the latter
> should arise.
>
> '''Note:''' On '''64-bit''' processors running '''32-bit''' operating
> systems, one currently has to set `ABI=32`, otherwise the build will
> fail.  (This does '''not apply''' to the newer MPIR 2.4.0 p1 and p2
> spkgs.)
>
> === mpir-2.4.0.p0 (Leif Leonhardy, July 21st, 2011) ===
>  * Upstream upgrade to MPIR 2.4.0 (#11616).
>
> === mpir-2.3.1.p0 (Leif Leonhardy, July 20th, 2011) ===
>  * Upstream upgrade to MPIR 2.3.1 (#11616).
>  * Clean up .hgtags.
>
> === mpir-2.1.3.p4 (Leif Leonhardy, July 19th, 2011) ===
>  * #8664: Upgrade Sage's MPIR spkg to version 2.1.3 [[BR]]
>  ...
>
> ----
>
> [[BR]]
>
> 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
> [attachment:MPIR_upstream_changes_between_2.1.1_and_2.4.0.txt attached
> them] in a plain text file.
>
> [[BR]]
>
> For instructions on how to install / test the spkgs see also #8664.  It
> is sufficient to just
>
>  * copy the spkg into `$SAGE_ROOT/spkg/standard/`, then
>
>  * run
> {{{
> #!sh
> $ env SAGE_UPGRADING=yes make build
> }}}
>    (or omit `build` to also rebuild the documentation in the same `make`
> run).
>
> To run just MPIR's test suite, you can reinstall the spkg with
> `SAGE_CHECK=yes`:
> {{{
> #!sh
> $ env SAGE_CHECK=yes ./sage -f spkg/standard/mpir-<version>.spkg
> }}}
> Or, if you haven't yet installed the spkg (but copied it into
> `$SAGE_ROOT/spkg/standard/` as mentioned above), do:
> {{{
> #!sh
> $ env SAGE_CHECK=yes ./sage -i spkg/standard/mpir-<version>.spkg
> $ env SAGE_UPGRADING=yes make build # rebuilds all dependent packages
> }}}
> Afterwards you can run `make doc` to (re)build the documentation, and /
> or `make ptestlong` to run Sage's full test suite in parallel.

New description:

 This is a follow-up to #8664 (and a couple of other tickets).

 [[BR]]

 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.p2.spkg]

 (Preliminary; changes not yet committed.)


 === mpir-2.4.0.p2 (Leif Leonhardy, Jeroen Demeyer, April 9th, 2012) ===
  #11616 (upgrading MPIR), further fixes:
  * When the first configure run (with CFLAGS unset) of MPIR fails, bail
    out with an error.  I am not aware of any system where MPIR fails
    to configure with CFLAGS unset but succeeds with CFLAGS set.
    -- Jeroen Demeyer
    This implies the following simplifications:
    - We no longer read CC and CFLAGS from /usr/include/gmp.h or
      /usr/local/include/gmp.h
    - We no longer try to add -march=native, we simply use MPIR's flags.
  * Extract $CC and $CFLAGS from Makefile instead of mpir.h, which is
    simpler and more reliable.
  * Work around GCC 4.7.0 bug (compilation error) on Linux ia64 (Itanium)
 by
    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. #12765.
  * Do not build the C++ interface and static libraries when bootstrapping
 the
    GCC spkg, i.e. if `SAGE_BUILD_TOOLCHAIN=yes`.  (GMP/MPIR is a
 prerequisite
    for it, and MPIR will later get rebuilt with both enabled, with the
 newly
    built GCC.)  Cf. #12782.
  * Fix a potential race condition in yasm's build by patching the re2c
 source.
    Cf. #11844.
  * Added `quote_asm.patch` to add proper quoting to the m4 in .asm files.
  * Add "`patch` loop" to apply any patches (`*.patch`) located in
 `patches/`.
    Use this to patch gmp-h.in instead of copying the file.
  * Minor clean-up; e.g. redirect error messages and warnings to `stderr`,
    quote parameter to `--libdir`, add some comments and messages, also
 save
    user's setting of `LDFLAGS` and `ABI`.

 === mpir-2.4.0.p1 (Leif Leonhardy, March 21st, 2012) ===
  * Upstream upgrade to MPIR 2.4.0 (#11616).
    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.
  * Remove forcing a sequential `make install` again, since
    the potential race condition was fixed in MPIR 2.1.4.
  * Fix `.hgtags`, which contained duplicate entries, and
    was missing others.

 ----

 This fixes also:

  1. #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.

  2. #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.

 ----

 Some '''old spkgs''':

  *
 [http://boxen.math.washington.edu/home/leif/Sage/spkgs/mpir-2.4.0.p1.spkg]
 (based on 2.1.3.p9) [[BR]]
    md5sum: `0d88b7dfe358bb429a5a9aa3a3b4b00b  mpir-2.4.0.p1.spkg`

  * http://spkg-upload.googlecode.com/files/mpir-2.3.1.p0.spkg (based on
 2.1.3.p4) [[BR]]
    md5sum: `ff0104e302611e49604a1c4ead97cbf4  mpir-2.3.1.p0.spkg`

  * http://spkg-upload.googlecode.com/files/mpir-2.4.0.p0.spkg (based on
 2.1.3.p4) [[BR]]
    md5sum: `98e04aa43ceef04d83574f0ee8e152fc  mpir-2.4.0.p0.spkg`

 You may want to give both of them a try, although the former is just
 intended as a "fallback" spkg in case problems introduced in the latter
 should arise.

 === mpir-2.4.0.p0 (Leif Leonhardy, July 21st, 2011) ===
  * Upstream upgrade to MPIR 2.4.0 (#11616).

 === mpir-2.3.1.p0 (Leif Leonhardy, July 20th, 2011) ===
  * Upstream upgrade to MPIR 2.3.1 (#11616).
  * Clean up .hgtags.

 === mpir-2.1.3.p4 (Leif Leonhardy, July 19th, 2011) ===
  * #8664: Upgrade Sage's MPIR spkg to version 2.1.3 [[BR]]
  ...

 ----

 [[BR]]

 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
 [attachment:MPIR_upstream_changes_between_2.1.1_and_2.4.0.txt attached
 them] in a plain text file.

 [[BR]]

 For instructions on how to install / test the spkgs see also #8664.  It is
 sufficient to just

  * copy the spkg into `$SAGE_ROOT/spkg/standard/`, then

  * run
 {{{
 #!sh
 $ env SAGE_UPGRADING=yes make build
 }}}
    (or omit `build` to also rebuild the documentation in the same `make`
 run).

 To run just MPIR's test suite, you can reinstall the spkg with
 `SAGE_CHECK=yes`:
 {{{
 #!sh
 $ env SAGE_CHECK=yes ./sage -f spkg/standard/mpir-<version>.spkg
 }}}
 Or, if you haven't yet installed the spkg (but copied it into
 `$SAGE_ROOT/spkg/standard/` as mentioned above), do:
 {{{
 #!sh
 $ env SAGE_CHECK=yes ./sage -i spkg/standard/mpir-<version>.spkg
 $ env SAGE_UPGRADING=yes make build # rebuilds all dependent packages
 }}}
 Afterwards you can run `make doc` to (re)build the documentation, and / or
 `make ptestlong` to run Sage's full test suite in parallel.

--

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11616#comment:47>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to