From 3b37206a0c0baf8004ac85c7f4a14c24917cb70f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 24 Jul 2019 15:57:25 +0000 Subject: [PATCH 01/70] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- Macaulay2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index 0f7227c..83c46f6 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -36,7 +36,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 Version: 1.12.0.1 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2 or GPLv3 URL: http://macaulay2.com/ @@ -479,6 +479,9 @@ end %changelog +* Wed Jul 24 2019 Fedora Release Engineering - 1.12.0.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Sun Feb 17 2019 Igor Gnatenko - 1.12.0.1-5 - Rebuild for readline 8.0 From 3f9c68d7f4e1a5347b76aba2d67c3e6d055cf508 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Thu, 26 Sep 2019 09:53:07 -0600 Subject: [PATCH 02/70] Macaulay2-1.14.0.1. Also: - Drop upstreamed -format and -exception patches. - Also bundle libmpc since it is linked with mpfr. - Drop fix for F26 symlink-file snafu. - Build with python 3 instead of python 2. --- Macaulay2-1.11-no_gftables.patch | 10 +-- Macaulay2.rpmlintrc | 23 +++++++ Macaulay2.spec | 105 +++++++++++++++---------------- sources | 12 ++-- 4 files changed, 85 insertions(+), 65 deletions(-) create mode 100644 Macaulay2.rpmlintrc diff --git a/Macaulay2-1.11-no_gftables.patch b/Macaulay2-1.11-no_gftables.patch index 1b71546..b16dd88 100644 --- a/Macaulay2-1.11-no_gftables.patch +++ b/Macaulay2-1.11-no_gftables.patch @@ -1,11 +1,11 @@ ---- M2/configure.ac.orig 2018-04-22 14:55:07.462673573 -0600 -+++ M2/configure.ac 2018-04-22 14:56:08.521492276 -0600 -@@ -840,7 +840,7 @@ AC_SUBST(BUILTLIBS,) +--- M2/configure.ac.orig 2019-09-14 15:08:16.044196840 -0600 ++++ M2/configure.ac 2019-09-14 15:08:50.832185220 -0600 +@@ -885,7 +885,7 @@ AC_SUBST(BUILTLIBS,) # mpack depends on gmp (which mpir provides) mpfr mpc qd # flint depends on gmp or mpir and mpfr # pari uses gmp, so if we build gmp, we should build pari --AC_SUBST(PROGLIST, "4ti2 gfan normaliz nauty cddplus lrslib gftables topcom cohomcalg") -+AC_SUBST(PROGLIST, "4ti2 gfan normaliz nauty cddplus lrslib topcom cohomcalg") +-AC_SUBST(PROGLIST, "4ti2 gfan normaliz csdp nauty cddplus lrslib gftables topcom cohomcalg") ++AC_SUBST(PROGLIST, "4ti2 gfan normaliz csdp nauty cddplus lrslib topcom cohomcalg") AC_SUBST(LIBLIST, " atomic_ops gc gdbm mpir mpfr pari readline ntl flint factory lapack frobby glpk cddlib fplll givaro linbox boost mpc qd mpack gtest ") AC_SUBST(SUBLIST, " memtailor mathic mathicgb fflas_ffpack ") diff --git a/Macaulay2.rpmlintrc b/Macaulay2.rpmlintrc new file mode 100644 index 0000000..8bdcf0b --- /dev/null +++ b/Macaulay2.rpmlintrc @@ -0,0 +1,23 @@ +# THIS FILE SERVES FOR WHITELISTING RPMLINT ERRORS AND WARNINGS IN TASKOTRON +# https://fedoraproject.org/wiki/Taskotron/Tasks/dist.rpmlint#Whitelisting_errors + +# Dangling symlinks; we ensure, through Requires, that they do not dangle +addFilter(r'dangling-symlink') + +# This file is included on purpose due to containing license information +addFilter(r'devel-file-in-non-devel-package .*flint\.h') + +# Test files also included on purpose +addFilter(r'devel-file-in-non-devel-package .*test/engine/factor') + +# Hidden files generated by and for the Macaulay2 documentation system +addFilter(r'hidden-file-or-dir .*\.(Certification|Headline)') + +# No man page for the target of the shell script +addFilter(r'no-manual-page-for-binary M2-binary') + +# Words not in the dictionary +addFilter(r'spelling-error .* (Grayson|Stillman)') + +# Binary file not understood by rpmlint +addFilter(r'wrong-file-end-of-line-encoding .*_cohom__Calg_lp__Normal__Toric__Variety_rp\.out') diff --git a/Macaulay2.spec b/Macaulay2.spec index 83c46f6..460bf5a 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -6,13 +6,14 @@ # - flint linked with the GC-enabled mpfr # - factory (from Singular) configured with --disable-omalloc --enable-streamio # and linked with the flint that is linked with the GC-enabled mpfr +# - mpc linked with the GC-enabled mpfr # Since the main Fedora packages are not built in this way, we are forced to # bundle these packages to avoid random GC-related crashes. # # In addition, we have to use the static versions of the libfplll and givaro # libraries. Both have global objects whose constructors run before GC is # initialized. If we allow the shared libraries to be unloaded, which happens -# as a normal part of Macaulay2's functioning, the GC tries to free objects it +# as a normal part of Macaulay2's functioning, then GC tries to free objects it # did not allocate, which leads to a segfault. # Address randomization interferes with Macaulay2's memory management scheme, @@ -35,8 +36,8 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 -Version: 1.12.0.1 -Release: 6%{?dist} +Version: 1.14.0.1 +Release: 1%{?dist} License: GPLv2 or GPLv3 URL: http://macaulay2.com/ @@ -54,10 +55,8 @@ Source20: etags.sh ## BUNDLED code # Normaliz must sometimes be bundled due to version differences -%if ! 0%{?system_normaliz} -Source100: http://www.math.uiuc.edu/Macaulay2/Downloads/OtherSourceCode/normaliz-3.3.0.tar.gz -Provides: bundled(normaliz) = 3.3.0 -%endif +Source100: http://www.math.uiuc.edu/Macaulay2/Downloads/OtherSourceCode/normaliz-3.6.3.tar.gz +Provides: bundled(normaliz) = 3.6.3 # MPFR is bundled because it must be built with different threading options %global mpfrver 3.1.6 @@ -74,6 +73,11 @@ Provides: bundled(flint) = %{flintver} Source103: http://www.math.illinois.edu/Macaulay2/Downloads/OtherSourceCode/factory-%{factoryver}.tar.gz Provides: bundled(factory) = %{factoryver} +# MPC is bundled because it must be linked with the specially-built MPFR +%global mpcver 1.1.0 +Source104: https://ftp.gnu.org/gnu/mpc/mpc-%{mpcver}.tar.gz +Provides: bundled(libmpc) = %{mpcver} + ## PATCHES FOR BUNDLED code # Fix multiple flint build and runtime issues; see patches in the flint package Source200: flint-2.5.2.patch @@ -83,9 +87,7 @@ Source201: factory-4.1.1.patch Source202: mpfr-3.1.6.patch ## FAKE library tarballs that convince Macaulay2 to use the system versions -%if 0%{?system_normaliz} -Source300: normaliz-3.3.0.tar.gz -%endif +Source300: frobby_v0.9.0.tar.gz Source301: gtest-1.8.0.tar.gz Source302: lapack-3.6.0.tgz Source303: 4ti2-1.6.7.tar.gz @@ -95,6 +97,8 @@ Source306: givaro-4.0.2.tar.gz Source307: lrslib-062.tar.gz Source308: TOPCOM-0.17.8.tar.gz Source309: cohomCalg-031b.zip +Source310: glpk-4.59.tar.gz +Source311: Csdp-6.2.0.tgz # let Fedora optflags override the defaults Patch0: %{name}-1.11-optflags.patch @@ -116,14 +120,10 @@ Patch7: %{name}-1.11-gtest.patch Patch8: %{name}-1.11-pthreads.patch # adapt to fflas-ffpack 2.3.x Patch9: %{name}-1.11-fflas-ffpack.patch -# fix a format specifier -Patch10: %{name}-1.12-format.patch -# catch polymorphic exception types by reference instead of value -Patch11: %{name}-1.12-exception.patch # adapt to libfplll 5.2.1 -Patch12: %{name}-1.11-fplll.patch +Patch10: %{name}-1.11-fplll.patch # do not override the debug level -Patch13: %{name}-1.12-configure.patch +Patch11: %{name}-1.12-configure.patch BuildRequires: 4ti2 BuildRequires: autoconf @@ -135,6 +135,7 @@ BuildRequires: chrpath BuildRequires: cmake %endif BuildRequires: cohomCalg +BuildRequires: csdp-tools BuildRequires: desktop-file-utils %if 0%{?fedora} BuildRequires: doxygen-latex @@ -171,11 +172,12 @@ BuildRequires: libfrobby-devel BuildRequires: libmpc-devel BuildRequires: libnauty-devel %if 0%{?system_normaliz} -BuildRequires: libnormaliz-devel >= 3.1.1 +BuildRequires: libnormaliz-devel >= 3.6.3 %endif BuildRequires: linbox-devel BuildRequires: lrslib-devel BuildRequires: lrslib-utils +BuildRequires: mariadb-devel BuildRequires: memtailor-devel BuildRequires: mathic-devel BuildRequires: mathicgb-devel @@ -184,11 +186,11 @@ BuildRequires: normaliz BuildRequires: ntl-devel BuildRequires: openblas-devel BuildRequires: pari-devel -BuildRequires: pkgconfig(bdw-gc) >= 6.2 +BuildRequires: pkgconfig(bdw-gc) >= 7.6.2 BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(ncurses) BuildRequires: polymake -BuildRequires: python2 +BuildRequires: python3 BuildRequires: qd-devel BuildRequires: readline-devel BuildRequires: tbb-devel @@ -198,6 +200,7 @@ BuildRequires: xemacs Requires: 4ti2 Requires: cohomCalg +Requires: csdp-tools Requires: emacs-filesystem Requires: factory-gftables Requires: gfan @@ -251,12 +254,14 @@ BuildArch: noarch install -p -m755 %{SOURCE20} ./etags ## bundled code -%if ! 0%{?system_normaliz} install -p -m644 %{SOURCE100} BUILD/tarfiles/ -sed -i '/PROGRAMS =/aPATCHFILE = @abs_srcdir@/patch-$(VERSION)' \ - libraries/normaliz/Makefile.in +%if ! 0%{?system_normaliz} +sed -e '/PROGRAMS =/aPATCHFILE = @abs_srcdir@/patch-$(VERSION)' \ + -e '/PRECONFIGURE/d' \ + -i libraries/normaliz/Makefile.in %endif -install -p -m644 %{SOURCE101} %{SOURCE102} %{SOURCE103} BUILD/tarfiles/ +install -p -m644 %{SOURCE101} %{SOURCE102} %{SOURCE103} %{SOURCE104} \ + BUILD/tarfiles/ sed -i 's/\(VERSION = \).*/\1%{mpfrver}/' libraries/mpfr/Makefile.in ## patches for bundled code @@ -268,21 +273,16 @@ cp -p %{SOURCE201} libraries/factory/patch-%{factoryver} cp -p %{SOURCE202} libraries/mpfr/patch-%{mpfrver} ## fake library tarballs -%if 0%{?system_normaliz} -install -p -m644 %{SOURCE300} BUILD/tarfiles/ -sed -i '/PRECONFIGURE/d' libraries/normaliz/Makefile.in -%endif -install -p -m644 %{SOURCE301} %{SOURCE302} %{SOURCE303} %{SOURCE304} \ - %{SOURCE305} %{SOURCE306} %{SOURCE307} %{SOURCE308} %{SOURCE309} \ - BUILD/tarfiles/ -sed -i '/PRECONFIGURE/d' libraries/4ti2/Makefile.in +install -p -m644 %{SOURCE300} %{SOURCE301} %{SOURCE302} %{SOURCE303} \ + %{SOURCE304} %{SOURCE305} %{SOURCE306} %{SOURCE307} %{SOURCE308} \ + %{SOURCE309} %{SOURCE310} %{SOURCE311} BUILD/tarfiles/ +sed -i '/PRECONFIGURE/d' libraries/{4ti2,normaliz,topcom}/Makefile.in sed -i 's/VERSION = 4\.0\.4/VERSION = 5.2.0/;/PATCHFILE/d' libraries/fplll/Makefile.in -sed -i '/PATCHFILE/d' libraries/gfan/Makefile.in +sed -i '/PATCHFILE/d' libraries/{csdp,frobby,gfan,normaliz,topcom}/Makefile.in +sed -i '/INSTALLCMD/,/stdinc/d' libraries/frobby/Makefile.in sed -i '/TARDIR/d;/PRECONFIGURE/d' libraries/gtest/Makefile.in sed -i 's,install \(lib.*\.a\),ln -s %{_libdir}/\1,' libraries/lapack/Makefile.in sed -i '/TARFILE/iPATCHFILE = @abs_srcdir@/patch-$(VERSION)' libraries/mpfr/Makefile.in -sed -i '/PRECONFIGURE/d' libraries/topcom/Makefile.in -truncate --size=0 libraries/topcom/patch-0.17.8 %patch0 -p1 -b .optflags %patch1 -p1 -b .xdg_open @@ -300,10 +300,8 @@ ln -s %{_datadir}/factory \ %patch7 -p1 -b .gtest %patch8 -p1 -b .pthreads %patch9 -p1 -b .fflas-ffpack -%patch10 -p1 -b .format -%patch11 -p1 -b .exception -%patch12 -p1 -b .fplll -%patch13 -p1 -b .configure +%patch10 -p1 -b .fplll +%patch11 -p1 -b .configure # repeatable builds: inject a node name sed -i 's,`uname -n`,build.fedoraproject.org,' configure.ac @@ -399,7 +397,7 @@ make install -C BUILD/%{_target_platform} DESTDIR=%{buildroot} IgnoreExampleErro # link, don't copy, the binaries mbindir=%{buildroot}%{_libexecdir}/Macaulay2/bin -for fil in checkregularity chiro2circuits chiro2cocircuits cohomcalg lrs \ +for fil in checkregularity chiro2circuits chiro2cocircuits cohomcalg csdp lrs \ normaliz points2allfinetriangs points2alltriangs points2chiro \ points2finetriang points2finetriangs points2flips points2nallfinetriangs \ points2nalltriangs points2nfinetriangs points2nflips points2ntriangs \ @@ -430,9 +428,14 @@ cd %{buildroot}%{_xemacs_sitelispdir} %{_xemacs_bytecompile} *.el popd +# Missing executable bit +chmod a+x %{buildroot}%{_datadir}/Macaulay2/NumericalAlgebraicGeometry/hom4ps2_in_out + ## unpackaged files # info dir rm -fv %{buildroot}%{_infodir}/dir +# source control file +rm -f %{buildroot}%{_datadir}/Macaulay2/Macaulay2Doc/test/.gitignore %check @@ -442,23 +445,6 @@ LDFLAGS="$RPM_LD_FLAGS" \ time make -k check -C BUILD/%{_target_platform} Verbose=true ||: -# This script deals with accidental replacement of the factory symlink with -# a directory. Once F26 has reached EOL, this can be removed. -%pretrans -p -path = "%{_datadir}/Macaulay2/Core/factory" -st = posix.stat(path) -if st and st.type == "directory" then - status = os.rename(path, path .. ".rpmmoved") - if not status then - suffix = 0 - while not status do - suffix = suffix + 1 - status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix) - end - os.rename(path, path .. ".rpmmoved") - end -end - %files %{_bindir}/M2 %{_bindir}/M2-binary @@ -479,6 +465,13 @@ end %changelog +* Thu Sep 26 2019 Jerry James - 1.14.0.1-1 +- Macaulay2-1.14.0.1 +- Drop upstreamed -format and -exception patches +- Also bundle libmpc since it is linked with mpfr +- Drop fix for F26 symlink-file snafu +- Build with python 3 instead of python 2 + * Wed Jul 24 2019 Fedora Release Engineering - 1.12.0.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild diff --git a/sources b/sources index 6101e98..29c10d5 100644 --- a/sources +++ b/sources @@ -1,15 +1,19 @@ SHA512 (Macaulay2-icons.tar.xz) = 069aa0ad70a0253583b00091c094da9b79d2a2f0f2d38aa97f543081f5df5fd3b5a9e1463febd6947c3151cf01844133174c7372f57e158c2d3faba6baed5d1d -SHA512 (version-1.12.0.1.tar.gz) = 7cf03d749b6f2ef054f6cdfb298b28addc98fbed199b61f48b69bc18fba6155016f6be988372650d1d3e737e77c161f6952593c6589d29b8df4e01990c5a2f8a -SHA512 (4ti2-1.6.7.tar.gz) = da6630e39b62672cfc11531832cf8e43bb6c824d67fd211fd93daa3fc02b014c745497b4be11b2dc147c8dd57a0041c9ee370e0414dd08b3f4cb360c46741b0a +SHA512 (version-1.14.0.1.tar.gz) = aa537123348d71374bdb0eb9bd41f6a7fc91184e2f9679dab488fc4e33aa3ee913a94e2e406b39b9a3805437731097e7c525d614fbed2389acdfda0842e3b640 +SHA512 (4ti2-1.6.7.tar.gz) = 313bc4ca4b329b4f25c3c63131224c0970382371b3ca962cfef1de5af40109b40efb9ac09d4fbcebf74440b42a1e213cb44af99be24b4a7460b859f9b8d3c37d SHA512 (cohomCalg-031b.zip) = 20c362e2a5485b3e102b87c6c12779d60516af1dd71a3893fbdd891ad703dcb6e69d120558d54b9bb8fec635f92bd8e51baf0b564afbb2a09a4934779395070d +SHA512 (Csdp-6.2.0.tgz) = 6f6c44abcb7b0e277f5a42a1e31acbd41c8fbdce0c1641982a48199fe1d922b28d86433d1a98ac71ae521bea04188a830c441db1e9d8eebf174debf501430e82 SHA512 (factory-4.1.1.tar.gz) = f08d74cb860145c07b9f1cc0a3fe44cb6fb2fc158a9b992f0db55eeef9e93d280cf66a5c8822236389e54b8084d2a37c174b32864e4dc12b8ee3c4760e9fe2bf SHA512 (flint-2.5.2.tar.gz) = cce36947b558aabecaf780171b4bbc0e1330c3b1a7e3580717584be5cab4991d33b190531c7995b224a3a440e28c4a610d6f781901e29f48ced12a9c5ba960a2 +SHA512 (frobby_v0.9.0.tar.gz) = bc96ff20ec334932b5eaa8a3d15d0e36eab41eb85e8b74dbdc374dcaafc9873e44a8af16f6caae649aeea17cd6284caf244d4d345689ad43288f199c591a68a6 SHA512 (gfan0.6.2.tar.gz) = 08a9cc543967771af959a506b79db5b55e0e4942e4170dad8691db35ef7d381d878e1ea6534a3cacc0f5d30ec31564ec94cc20b46792d06f18a3a8a3c0aac91d SHA512 (givaro-4.0.2.tar.gz) = 8338a8e348c04be08e59fe9744febd918d4913a831ff0b7dba0577fd639dbfde802f15e90f10d42ddf6c544117f4d256bdc8c51996afbbee6c314c1537d165f6 +SHA512 (glpk-4.59.tar.gz) = ca05bd085880143acf4a440cf7efd2392d4dde89bed53a0e5726526cb210eee004bfcd434aeb8ca8abb1dc89ff93e72054489911e5e2c843e0ed631d50c55f56 SHA512 (gtest-1.8.0.tar.gz) = 54da3f3884685f0ff17fb12236063f32eeb78a4305883b1b2010818ec19c8e8221f2ee62fda21ba1b9d4c9d07cc5ac9eba688e4bcad30782897d5ba2417a19c3 -SHA512 (lapack-3.6.0.tgz) = de2845f4185f70392e365bf33cbc53635d8990e9f453c8b69124d8941fbec4c9c74284a297fbb6ddfae0be0e5da08469f776c4b5d03e38395966dcb1d0013670 +SHA512 (lapack-3.6.0.tgz) = 0975c721abe38ef46cda2ba446060428e2f576ec4558cc0205ca6af2af2bd8f7f4c31fd0c90d77a92719a73e1942fade19b4c17e6fe2da29d54ad1adccf5a6b2 SHA512 (libfplll-5.2.0.tar.gz) = 67d1a8deb92d3f9245983b09b7593b19c5d43c8fe77cfea893ea9dfb744bcb77b7239d73e4f619450cc6960f4c48fb1c6ba46268208b0f31f855cf1af6bfaa29 SHA512 (lrslib-062.tar.gz) = 78fa6d470b2dd9cb06d1d15023debd8fafc27ed4df93cd90ef746071755f6b1fe9ee2c6a24659030b9a8851bd3ee3a699407586d320f3760c3d8a3a1c79d7116 +SHA512 (mpc-1.1.0.tar.gz) = 72d657958b07c7812dc9c7cbae093118ce0e454c68a585bfb0e2fa559f1bf7c5f49b93906f580ab3f1073e5b595d23c6494d4d76b765d16dde857a18dd239628 SHA512 (mpfr-3.1.6.tar.xz) = 746ee74d5026f267f74ab352d850ed30ff627d530aa840c71b24793e44875f8503946bd7399905dea2b2dd5744326254d7889337fe94cfe58d03c4066e9d8054 -SHA512 (normaliz-3.3.0.tar.gz) = 6a65e240a482f037cc3d5751e5cec017b4f6b88fdeac0a4535a7b43b23118fa077252013ab76fda38781babbc04daddd967656ea07908643e2886e7446d28711 +SHA512 (normaliz-3.6.3.tar.gz) = f749dac30c246615071ebefa37d6aff30cbbaf958985b7a28afef175ddbde689564d65bdefe5e6b7d41d91faee78cc63060a31eca06cfa1ef8e1ad1ba5501c24 SHA512 (TOPCOM-0.17.8.tar.gz) = 8611e8bd36eda00646fb40794435f23e6af81ecbee93c40e8fe5f73905e673e6244cb0f8cc1fe5c29050e40c7d53a44c615c60cbbecc8452b3c85f1d8a816d7a From d5ae2fbd0bc05be02610a57e46f194d36e307636 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Fri, 1 Nov 2019 10:07:21 -0600 Subject: [PATCH 03/70] Rebuild for givaro 4.1.1, fflas-ffpack 2.4.3, and linbox 1.6.3. --- Macaulay2-1.11-fflas-ffpack.patch | 23 +++++++++++++++++++++-- Macaulay2.spec | 5 ++++- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/Macaulay2-1.11-fflas-ffpack.patch b/Macaulay2-1.11-fflas-ffpack.patch index e3b8741..05f40e7 100644 --- a/Macaulay2-1.11-fflas-ffpack.patch +++ b/Macaulay2-1.11-fflas-ffpack.patch @@ -1,5 +1,5 @@ ---- M2/Macaulay2/e/aring-gf-givaro.cpp.orig 2018-03-07 10:43:35.000000000 -0700 -+++ M2/Macaulay2/e/aring-gf-givaro.cpp 2018-05-03 19:05:32.916321453 -0600 +--- M2/Macaulay2/e/aring-gf-givaro.cpp.orig 2019-05-25 08:04:49.000000000 -0600 ++++ M2/Macaulay2/e/aring-gf-givaro.cpp 2019-10-31 08:08:33.256361286 -0600 @@ -409,7 +409,7 @@ void ARingGFGivaro::getGenerator(Element bool ARingGFGivaro::is_unit(const ElementType f) const @@ -9,3 +9,22 @@ } bool ARingGFGivaro::is_zero(const ElementType f) const +--- M2/Macaulay2/e/dmat.cpp.orig 2019-05-25 08:04:49.000000000 -0600 ++++ M2/Macaulay2/e/dmat.cpp 2019-10-31 08:42:04.830167857 -0600 +@@ -98,11 +98,15 @@ void determinant(const DMatZZpFFPACK& ma + // this case. + mat.ring().set_from_long(result_det, 1); + } ++ else if (mat.numRows() != mat.numColumns()) ++ { ++ mat.ring().set_from_long(result_det, 0); ++ } + else + { + DMatZZpFFPACK N(mat); + result_det = FFPACK::Det(mat.ring().field(), +- mat.numRows(), ++ result_det, + mat.numColumns(), + N.array(), + mat.numColumns()); diff --git a/Macaulay2.spec b/Macaulay2.spec index 460bf5a..46688ea 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -37,7 +37,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 Version: 1.14.0.1 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 or GPLv3 URL: http://macaulay2.com/ @@ -465,6 +465,9 @@ time make -k check -C BUILD/%{_target_platform} Verbose=true ||: %changelog +* Fri Nov 1 2019 Jerry James - 1.14.0.1-2 +- Rebuild for givaro 4.1.1, fflas-ffpack 2.4.3, and linbox 1.6.3 + * Thu Sep 26 2019 Jerry James - 1.14.0.1-1 - Macaulay2-1.14.0.1 - Drop upstreamed -format and -exception patches From 4c636f474a64381e016fea64d2830f921cc4c2df Mon Sep 17 00:00:00 2001 From: Jerry James Date: Fri, 1 Nov 2019 22:28:40 -0600 Subject: [PATCH 04/70] Actually remove the exception and format patches. --- Macaulay2-1.12-exception.patch | 1749 -------------------------------- Macaulay2-1.12-format.patch | 11 - 2 files changed, 1760 deletions(-) delete mode 100644 Macaulay2-1.12-exception.patch delete mode 100644 Macaulay2-1.12-format.patch diff --git a/Macaulay2-1.12-exception.patch b/Macaulay2-1.12-exception.patch deleted file mode 100644 index f4d7077..0000000 --- a/Macaulay2-1.12-exception.patch +++ /dev/null @@ -1,1749 +0,0 @@ ---- M2/Macaulay2/d/engine.dd.orig 2018-07-30 05:57:05.000000000 -0600 -+++ M2/Macaulay2/d/engine.dd 2018-08-06 14:19:21.326178130 -0600 -@@ -104,21 +104,21 @@ export EngineError(d:string):string := ( - - -- operators - export (x:RawMonomial) * (y:RawMonomial) : RawMonomialOrNull := Ccode(returns, " -- try { return *x * *y; } catch (exc::engine_error e) { ERROR(e.what()); return NULL; } "); -+ try { return *x * *y; } catch (exc::engine_error &e) { ERROR(e.what()); return NULL; } "); - export (x:RawMonomial) ^ (n:int) : RawMonomialOrNull := Ccode(returns, " -- try { return x->power(n); } catch (exc::engine_error e) { ERROR(e.what()); return NULL; } "); -+ try { return x->power(n); } catch (exc::engine_error &e) { ERROR(e.what()); return NULL; } "); - export (x:RawMonomial) / (y:RawMonomial) : RawMonomialOrNull := ( - when y^-1 is z:RawMonomial do x*z - is null do RawMonomialOrNull(null())); - export (x:RawRingElement) + (y:RawRingElement) : RawRingElementOrNull := Ccode(returns, " -- try { return *x + *y; } catch (exc::engine_error e) { ERROR(e.what()); return NULL; } "); -+ try { return *x + *y; } catch (exc::engine_error &e) { ERROR(e.what()); return NULL; } "); - export - (y:RawRingElement) : RawRingElement := Ccode(returns, " -- try { return -*y; } catch (exc::engine_error e) { ERROR(e.what()); return NULL; } "); -+ try { return -*y; } catch (exc::engine_error &e) { ERROR(e.what()); return NULL; } "); - export (x:RawRingElement) - (y:RawRingElement) : RawRingElementOrNull := Ccode(returns, " -- try { return *x - *y; } catch (exc::engine_error e) { ERROR(e.what()); return NULL; } "); -+ try { return *x - *y; } catch (exc::engine_error &e) { ERROR(e.what()); return NULL; } "); - export (x:RawRingElement) * (y:RawRingElement) : RawRingElementOrNull := Ccode(returns, " - try { return *x * *y; } -- catch (exc::engine_error e) { ERROR(e.what()); return NULL; } "); -+ catch (exc::engine_error &e) { ERROR(e.what()); return NULL; } "); - export (a:RawRingElement) // (b:RawRingElement) : RawRingElementOrNull := Ccode(returns, " - try { const Ring *R = a->get_ring(); - if (R != b->get_ring()) { -@@ -127,7 +127,7 @@ export (a:RawRingElement) // (b:RawRingE - ring_elem result = R->quotient(a->get_value(), b->get_value()); - if (error()) return 0; - return RingElement::make_raw(R, result); -- } catch (exc::engine_error e) { ERROR(e.what()); return NULL; } "); -+ } catch (exc::engine_error &e) { ERROR(e.what()); return NULL; } "); - export (a:RawRingElement) % (b:RawRingElement) : RawRingElementOrNull := Ccode(returns, " - try { const Ring *R = a->get_ring(); - if (R != b->get_ring()) { -@@ -136,13 +136,13 @@ export (a:RawRingElement) % (b:RawRingEl - ring_elem result = R->remainder(a->get_value(), b->get_value()); - if (error()) return 0; - return RingElement::make_raw(R, result); } -- catch (exc::engine_error e) { ERROR(e.what()); return NULL; } "); -+ catch (exc::engine_error &e) { ERROR(e.what()); return NULL; } "); - export (a:RawRingElement) ^ (n:ZZ) : RawRingElementOrNull := Ccode(returns, " - try { RingElement *z = a->power(n); return error() ? NULL : z; } -- catch (exc::engine_error e) { ERROR(e.what()); return NULL; } "); -+ catch (exc::engine_error &e) { ERROR(e.what()); return NULL; } "); - export (M:RawMatrix) + (N:RawMatrix) : RawMatrixOrNull := Ccode(returns, " - try { return *M + *N; } -- catch (exc::engine_error e) { ERROR(e.what()); return NULL; } " -+ catch (exc::engine_error &e) { ERROR(e.what()); return NULL; } " - -- If the sizes do not match, then NULL is returned. If they do match, - -- the addition is performed. If the targets are not equal, the target - -- of the result is set to have each degree zero. Similarly with the -@@ -159,11 +159,11 @@ export (M:RawMutableMatrix) + (N:RawMuta - -- matrix arithmetic - export - (M:RawMatrix) : RawMatrixOrNull := Ccode(returns, " - try { return - *M; } -- catch (exc::engine_error e) { ERROR(e.what()); return NULL; } "); -+ catch (exc::engine_error &e) { ERROR(e.what()); return NULL; } "); - export - (M:RawMutableMatrix) : RawMutableMatrix := Ccode(returns, "return M->negate();"); - export (M:RawMatrix) - (N:RawMatrix) : RawMatrixOrNull := Ccode(returns, " - try { return *M - *N; } -- catch (exc::engine_error e) { ERROR(e.what()); return NULL; } " -+ catch (exc::engine_error &e) { ERROR(e.what()); return NULL; } " - -- If the sizes do not match, then NULL is returned. If they do match, - -- the addition is performed. If the targets are not equal, the target - -- of the result is set to have each degree zero. Similarly with the -@@ -171,36 +171,36 @@ export (M:RawMatrix) - (N:RawMatrix) : R - ); - export (M:RawMutableMatrix) - (N:RawMutableMatrix) : RawMutableMatrixOrNull := Ccode(returns, " - try { return M->subtract(N); } -- catch (exc::engine_error e) { ERROR(e.what()); return NULL; } " -+ catch (exc::engine_error &e) { ERROR(e.what()); return NULL; } " - ); - export (f:RawRingElement) * (M:RawMatrix) : RawMatrixOrNull := Ccode(returns, " - try { if (f->get_ring() != M->get_ring()) { - ERROR(\"ring element and matrix should have the same base ring\"); - return 0; } - return M->scalar_mult(f->get_value(), false); } -- catch (exc::engine_error e) { ERROR(e.what()); return NULL; } "); -+ catch (exc::engine_error &e) { ERROR(e.what()); return NULL; } "); - export (M:RawMatrix) * (f:RawRingElement) : RawMatrixOrNull := Ccode(returns, " - try { if (f->get_ring() != M->get_ring()) { - ERROR(\"ring element and matrix should have the same base ring\"); - return 0; } - return M->scalar_mult(f->get_value(), true); } -- catch (exc::engine_error e) { ERROR(e.what()); return NULL; } "); -+ catch (exc::engine_error &e) { ERROR(e.what()); return NULL; } "); - export (f:RawRingElement) * (M:RawMutableMatrix) : RawMutableMatrixOrNull := Ccode(returns, " - try { return M->mult(f); } -- catch (exc::engine_error e) { ERROR(e.what()); return NULL; } "); -+ catch (exc::engine_error &e) { ERROR(e.what()); return NULL; } "); - export (M:RawMutableMatrix) * (f:RawRingElement) : RawMutableMatrixOrNull := Ccode(returns, " - try { return M->mult(f); } -- catch (exc::engine_error e) { ERROR(e.what()); return NULL; } "); -+ catch (exc::engine_error &e) { ERROR(e.what()); return NULL; } "); - export (M:RawMatrix) * (N:RawMatrix) : RawMatrixOrNull := Ccode(returns, " - try { return M->mult(N, true); } -- catch (exc::engine_error e) { ERROR(e.what()); return NULL; } " -+ catch (exc::engine_error &e) { ERROR(e.what()); return NULL; } " - -- /* If the sizes do not match, then NULL is returned. If they do match, - -- the multiplication is performed, and the source and target are taken from N,M - -- respectively. The degree of the result is the sum of the two degrees */ - ); - export (M:RawMutableMatrix) * (N:RawMutableMatrix) : RawMutableMatrixOrNull := Ccode(returns, " - try { return M->mult(N); } -- catch (exc::engine_error e) { ERROR(e.what()); return NULL; } " -+ catch (exc::engine_error &e) { ERROR(e.what()); return NULL; } " - ); - -- - -@@ -233,11 +233,11 @@ export (I:RawMonomialIdeal) * (J:RawMono - MonomialIdeal *result = (*I) * (*J); - intern_monideal(result); - return result; } -- catch (exc::engine_error e) { ERROR(e.what()); return NULL; } "); -+ catch (exc::engine_error &e) { ERROR(e.what()); return NULL; } "); - export tostring(a:RawMonomial):string := Ccode(returns," - buffer o; - try { a->text_out(o); } -- catch (exc::engine_error e) { o << \"[unprintable monomial]\"; } -+ catch (exc::engine_error &e) { o << \"[unprintable monomial]\"; } - return o.to_string(); - "); - export hash(a:RawMonomial):uint := Ccode(uint,"a->hash()"); ---- M2/Macaulay2/d/interface.dd.orig 2018-07-30 05:57:05.000000000 -0600 -+++ M2/Macaulay2/d/interface.dd 2018-08-06 14:19:21.328178106 -0600 -@@ -21,7 +21,7 @@ header " - throw (std::runtime_error(\"test\")); - } - int test_catch() { -- try { test_catch0(); } catch (std::runtime_error x) { return 1; } -+ try { test_catch0(); } catch (std::runtime_error &x) { return 1; } - return 0; - } - -@@ -66,7 +66,7 @@ setupfun("rawRandomCC",rawRandomCC); - - rawVarMonomial(v:int,e:int):RawMonomialOrNull := Ccode(returns," - try { return Monomial::make(v,e); } -- catch (exc::engine_error m) { ERROR(m.what()); return NULL; }"); -+ catch (exc::engine_error &m) { ERROR(m.what()); return NULL; }"); - export rawVarMonomial(a:Expr):Expr := ( - when a - is v:ZZcell do -@@ -121,7 +121,7 @@ export rawMakeMonomial(e:Expr):Expr := ( - ret := RawMonomialOrNull(null()); - Ccode(void, " - try { ",ret," = Monomial::make(",getReverseSequenceOfPairsOfSmallIntegers(l.v),"); } -- catch (exc::engine_error e) { ERROR(e.what()); }"); -+ catch (exc::engine_error &e) { ERROR(e.what()); }"); - toExpr(ret))) - else WrongArg("a list of pairs of integers")); - setupfun("rawMakeMonomial",rawMakeMonomial); -@@ -142,7 +142,7 @@ installMethod(Expr(EqualEqualS), rawMono - - rawCompareMonomial(M:RawMonoid,a:RawMonomial,b:RawMonomial):int := Ccode(returns," - try { return a->compare(M,*b); } -- catch (exc::engine_error e) { ERROR(e.what()); return -2; } -+ catch (exc::engine_error &e) { ERROR(e.what()); return -2; } - "); - export rawCompareMonomial(e:Expr):Expr := ( - when e is s:Sequence do if length(s) != 3 then WrongNumArgs(3) else -@@ -162,7 +162,7 @@ setupfun("rawCompareMonomial",rawCompare - - rawMonomialDivides(M:RawMonoid,a:RawMonomial,b:RawMonomial):int := Ccode(returns," - try { return a->divides(M,*b); } -- catch (exc::engine_error e) { ERROR(e.what()); return -2; } " -+ catch (exc::engine_error &e) { ERROR(e.what()); return -2; } " - -- returns 1 if in the monoid M, there is a monomial c such that a*c === b, 0 if not, -2 if exception occurred - ); - export rawMonomialDivides(e:Expr):Expr := ( -@@ -180,7 +180,7 @@ setupfun("rawMonomialDivides",rawMonomia - - rawMonomialDivide(M:RawMonoid,a:RawMonomial,b:RawMonomial):RawMonomialOrNull := Ccode(returns," - try { if (a->divides(M,*b)) return (*a)/(*b); else return NULL; } -- catch (exc::engine_error e) { ERROR(e.what()); return NULL; } " -+ catch (exc::engine_error &e) { ERROR(e.what()); return NULL; } " - -- returns a/b if b divides a in the monoid M, and null otherwise - ); - export rawMonomialDivide(e:Expr):Expr := ( -@@ -275,7 +275,7 @@ setupfun("rawLCM",rawLCM); - - rawSaturateMonomial(a:RawMonomial,b:RawMonomial):RawMonomialOrNull := Ccode(returns, " - try { return a->erase(*b); } -- catch (exc::engine_error e) { ERROR(e.what()); return NULL; } " -+ catch (exc::engine_error &e) { ERROR(e.what()); return NULL; } " - -- return the monomial whose i th exponent is ai if bi is 0, 0 if bi != 0 - ); - export rawSaturate(e:Expr):Expr := ( -@@ -300,7 +300,7 @@ rawSyzygy(a:RawMonomial,b:RawMonomial):R - result->a = aa; - result->b = bb; - return result; } -- catch (exc::engine_error e) { ERROR(e.what()); return NULL; } "); -+ catch (exc::engine_error &e) { ERROR(e.what()); return NULL; } "); - export rawSyzygy(e:Expr):Expr := ( - when e is s:Sequence do - if length(s) != 2 then WrongNumArgs(2) else -@@ -313,7 +313,7 @@ setupfun("rawSyzygy",rawSyzygy); - - rawColonMonomial(a:RawMonomial,b:RawMonomial):RawMonomialOrNull := Ccode(returns, " - try { return (*a) / (*b); } -- catch (exc::engine_error e) { ERROR(e.what()); return NULL; } -+ catch (exc::engine_error &e) { ERROR(e.what()); return NULL; } - " - -- returns the monomial whose i th exponent is max(ai-bi,0) - ); ---- M2/Macaulay2/e/exceptions.hpp.orig 2018-07-30 05:57:05.000000000 -0600 -+++ M2/Macaulay2/e/exceptions.hpp 2018-08-06 14:19:21.329178093 -0600 -@@ -28,7 +28,7 @@ struct internal_error : public engine_er - { - #define CATCH \ - } \ -- catch (exc::engine_error __x424621) \ -+ catch (exc::engine_error &__x424621) \ - { \ - ERROR(__x424621.what()); \ - return NULL; \ ---- M2/Macaulay2/e/f4/res-f4-m2-interface.cpp.orig 2018-07-30 05:57:05.000000000 -0600 -+++ M2/Macaulay2/e/f4/res-f4-m2-interface.cpp 2018-08-06 14:19:21.329178093 -0600 -@@ -808,7 +808,7 @@ M2_arrayint rawMinimalBetti(Computation* - length_limit); // Computes it if needed - ERROR("expected resolution computed via res(...,FastNonminimal=>true)"); - return nullptr; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return nullptr; ---- M2/Macaulay2/e/finalize.cpp.orig 2018-07-30 05:57:05.000000000 -0600 -+++ M2/Macaulay2/e/finalize.cpp 2018-08-06 14:19:21.330178081 -0600 -@@ -229,7 +229,7 @@ M2_string engineMemory() - << ") #left = " << (schorder_nfinalized - schorder_nremoved) << newline; - - return o.to_string(); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - o << "Internal error: [unprintable memory display]"; - return o.to_string(); ---- M2/Macaulay2/e/mutablemat-imp.hpp.orig 2018-07-30 05:57:05.000000000 -0600 -+++ M2/Macaulay2/e/mutablemat-imp.hpp 2018-08-06 14:19:21.330178081 -0600 -@@ -56,7 +56,7 @@ MutableMatrix* MutableMat::rowReduced - // ignore returned value (the rank of mat): - MatrixOps::rowReducedEchelonForm(mat, result->mat); - return result; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - delete result; - throw(e); ---- M2/Macaulay2/e/x-aring.cpp.orig 2018-07-30 05:57:05.000000000 -0600 -+++ M2/Macaulay2/e/x-aring.cpp 2018-08-06 14:19:21.331178069 -0600 -@@ -94,7 +94,7 @@ const Ring /* or null */ *rawARingGalois - { - M2::ARingGFM2 *A = new M2::ARingGFM2(*R, f->get_value()); - return M2::ConcreteRing::create(A); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -108,7 +108,7 @@ const Ring /* or null */ *rawARingGalois - { - M2::ARingGFFlintBig *A = new M2::ARingGFFlintBig(*R, f->get_value()); - return M2::ConcreteRing::create(A); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -123,7 +123,7 @@ const Ring /* or null */ *rawARingGalois - { - M2::ARingGFFlint *A = new M2::ARingGFFlint(*R, f->get_value()); - return M2::ConcreteRing::create(A); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -185,7 +185,7 @@ const Ring /* or null */ *rawARingGalois - ERROR("add --enable-fflas-ffpack --enable-givaro when building M2"); - return 0; - #endif -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -243,7 +243,7 @@ const Ring /* or null */ *rawARingGalois - M2::ARingGFGivaro *A = new M2::ARingGFGivaro( - R->characteristic(), modPoly, primitiveElementPoly, *R); - return M2::ConcreteRing::create(A); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -305,7 +305,7 @@ const Ring /* or null */ *rawARingTower1 - auto varnames = M2_ArrayString_to_stdvector(names); - const M2::ARingTower *T = M2::ARingTower::create(A, varnames); - return M2::ConcreteRing::create(T); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -329,7 +329,7 @@ const Ring /* or null */ *rawARingTower2 - auto new_varnames = M2_ArrayString_to_stdvector(new_names); - const M2::ARingTower *T = M2::ARingTower::create(A, new_varnames); - return M2::ConcreteRing::create(T); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -366,7 +366,7 @@ const Ring /* or null */ *rawARingTower3 - } - const M2::ARingTower *T = M2::ARingTower::create(A, extensions); - return M2::ConcreteRing::create(T); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return 0; ---- M2/Macaulay2/e/x-factor.cpp.orig 2018-07-30 05:57:05.000000000 -0600 -+++ M2/Macaulay2/e/x-factor.cpp 2018-08-06 14:19:21.332178057 -0600 -@@ -720,7 +720,7 @@ void rawFactorBase(const RingElement *g, - } - algebraicElement_M2 = NULL; - if (error()) *result_factors = NULL, *result_powers = NULL; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return; -@@ -798,7 +798,7 @@ M2_arrayintOrNull rawIdealReorder(const - M2_arrayint result = M2_makearrayint(N); - for (i = 0; i < N; i++) result->array[i] = u[i]; - return result; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -864,7 +864,7 @@ engine_RawMatrixArrayOrNull rawCharSerie - } - - return result; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; ---- M2/Macaulay2/e/x-free.cpp.orig 2018-07-30 05:57:05.000000000 -0600 -+++ M2/Macaulay2/e/x-free.cpp 2018-08-06 14:19:21.333178045 -0600 -@@ -26,7 +26,7 @@ const FreeModule /* or null */ *IM2_Free - return 0; - } - return R->make_FreeModule(rank); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -59,7 +59,7 @@ const FreeModule /* or null */ *IM2_Free - F->append(deg); - } - return F; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -71,7 +71,7 @@ const FreeModule /* or null */ *IM2_Free - try - { - return FreeModule::make_schreyer(m); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -119,7 +119,7 @@ const FreeModule /* or null */ *IM2_Free - try - { - return F->tensor(G); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -131,7 +131,7 @@ const FreeModule /* or null */ *IM2_Free - try - { - return F->transpose(); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -143,7 +143,7 @@ const FreeModule *IM2_FreeModule_symm(in - try - { - return F->symm(n); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -155,7 +155,7 @@ const FreeModule *IM2_FreeModule_exterio - try - { - return F->exterior(n); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -168,7 +168,7 @@ const FreeModule *IM2_FreeModule_submodu - try - { - return F->sub_space(selection); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -182,7 +182,7 @@ M2_arrayintOrNull rawFreeModuleSelectByD - try - { - return F->select_by_degrees(lo, hi); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; ---- M2/Macaulay2/e/x-gb.cpp.orig 2018-07-30 05:57:05.000000000 -0600 -+++ M2/Macaulay2/e/x-gb.cpp 2018-08-06 14:19:21.334178033 -0600 -@@ -66,7 +66,7 @@ EngineComputationOrNull *rawGB( - algorithm, - strategy, - max_reduction_count)); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -83,7 +83,7 @@ EngineComputationOrNull *rawGBSetHilbert - if (G != 0) return G->set_hilbert_function(h); - ERROR("computation type unknown or not implemented"); - return 0; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -161,7 +161,7 @@ EngineComputationOrNull *rawStartEngineC - } - } - return error() ? 0 : C; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -190,7 +190,7 @@ const Matrix /* or null */ *rawEngineGBG - if (G != 0) return G->get_GroebnerBasis()->get_gb(); - ERROR("computation type unknown or not implemented"); - return 0; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -210,7 +210,7 @@ const Matrix /* or null */ *rawEngineGBM - if (G != 0) return G->get_GroebnerBasis()->get_mingens(); - ERROR("computation type unknown or not implemented"); - return 0; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -231,7 +231,7 @@ const Matrix /* or null */ *rawEngineGBC - if (G != 0) return G->get_GroebnerBasis()->get_change(); - ERROR("computation type unknown or not implemented"); - return 0; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -248,7 +248,7 @@ const Matrix /* or null */ *rawEngineGBG - if (G != 0) return G->get_GroebnerBasis()->get_initial(nparts); - ERROR("computation type unknown or not implemented"); - return 0; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -266,7 +266,7 @@ const Matrix /* or null */ *rawEngineGBG - if (G != 0) return G->get_GroebnerBasis()->get_parallel_lead_terms(w); - ERROR("computation type unknown or not implemented"); - return 0; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -287,7 +287,7 @@ const Matrix /* or null */ *rawEngineGBS - if (G != 0) return G->get_GroebnerBasis()->get_syzygies(); - ERROR("computation type unknown or not implemented"); - return 0; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -304,7 +304,7 @@ const Matrix /* or null */ *rawEngineGBM - if (G != 0) return G->get_GroebnerBasis()->matrix_remainder(m); - ERROR("computation type unknown or not implemented"); - return 0; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -325,7 +325,7 @@ void rawEngineGBMatrixDivMod(EngineCompu - m, result_remainder, result_quotient); - else - ERROR("computation type unknown or not implemented"); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return; -@@ -341,7 +341,7 @@ int rawEngineGBMatrixContains(EngineComp - if (G != 0) return G->get_GroebnerBasis()->contains(m); - ERROR("computation type unknown or not implemented"); - return -2; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return -2; -@@ -358,7 +358,7 @@ EngineComputationOrNull *rawEngineGBDecl - { - return EngineGBComputation::create( - GBDeclared::create(m, gb, change, syz)); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -376,7 +376,7 @@ EngineComputationOrNull *rawMarkedEngine - { - return EngineGBComputation::create( - GBDeclared::create(leadterms, m, gb, change, syz)); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -389,7 +389,7 @@ EngineComputationOrNull *rawEngineGroebn - try - { - return EngineGBComputation::create(GBWalker::create(gb, order1)); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -403,7 +403,7 @@ M2_string rawEngineComputationToString(E - { - C->text_out(o); - return o.to_string(); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - o << "[unprintable computation]"; - return o.to_string(); -@@ -425,7 +425,7 @@ const RingElement /* or null */ *IM2_Mat - try - { - return hilb_comp::hilbertNumerator(M); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -461,7 +461,7 @@ Computation /* or null */ *IM2_GB_make( - algorithm, - strategy, - max_reduction_count); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -488,7 +488,7 @@ Computation /* or null */ *IM2_res_make( - max_slanted_degree, - algorithm, - strategy); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -510,7 +510,7 @@ Computation /* or null */ *IM2_GB_set_hi - if (G != 0) return G->set_hilbert_function(h); - ERROR("computation type unknown or not implemented"); - return 0; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -527,7 +527,7 @@ Computation /* or null */ *IM2_GB_force( - try - { - return GBDeclared::create(m, gb, change, syz); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -545,7 +545,7 @@ Computation /* or null */ *rawMarkedGB( - try - { - return GBDeclared::create(leadterms, m, gb, change, syz); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -558,7 +558,7 @@ Computation /* or null */ *rawGroebnerWa - try - { - return GBWalker::create(gb, order1); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -591,7 +591,7 @@ Computation /* or null */ *IM2_Computati - subring_limit, - just_min_gens, - length_limit); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -644,7 +644,7 @@ Computation /* or null */ *rawStartCompu - } - - return error() ? 0 : C; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -665,7 +665,7 @@ const Matrix /* or null */ *rawGBGetMatr - if (G != 0) return G->get_gb(); - ERROR("computation type unknown or not implemented"); - return 0; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -685,7 +685,7 @@ const Matrix /* or null */ *rawGBMinimal - if (G != 0) return G->get_mingens(); - ERROR("computation type unknown or not implemented"); - return 0; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -706,7 +706,7 @@ const Matrix /* or null */ *rawGBChangeO - if (G != 0) return G->get_change(); - ERROR("computation type unknown or not implemented"); - return 0; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -722,7 +722,7 @@ const Matrix /* or null */ *rawGBGetLead - if (G != 0) return G->get_initial(nparts); - ERROR("computation type unknown or not implemented"); - return 0; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -739,7 +739,7 @@ const Matrix /* or null */ *rawGBGetPara - if (G != 0) return G->get_parallel_lead_terms(w); - ERROR("computation type unknown or not implemented"); - return 0; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -760,7 +760,7 @@ const Matrix /* or null */ *rawGBSyzygie - if (G != 0) return G->get_syzygies(); - ERROR("computation type unknown or not implemented"); - return 0; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -777,7 +777,7 @@ const Matrix /* or null */ *rawGBMatrixR - if (G != 0) return G->matrix_remainder(m); - ERROR("computation type unknown or not implemented"); - return 0; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -797,7 +797,7 @@ M2_bool IM2_GB_matrix_lift(Computation * - return G->matrix_lift(m, result_remainder, result_quotient); - else - ERROR("computation type unknown or not implemented"); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - } -@@ -813,7 +813,7 @@ int IM2_GB_contains(Computation *C, cons - if (G != 0) return G->contains(m); - ERROR("computation type unknown or not implemented"); - return -2; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return -2; -@@ -829,7 +829,7 @@ const Matrix /* or null */ *rawResolutio - if (G != 0) return G->get_matrix(level); - ERROR("expected resolution computation type"); - return 0; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -847,7 +847,7 @@ MutableMatrix /* or null */ *rawResoluti - if (G != 0) return G->get_matrix(level, degree); - ERROR("expected resolution computation type"); - return 0; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -870,7 +870,7 @@ MutableMatrix /* or null */ *rawResoluti - if (G != 0) return G->get_mutable_matrix(R, level); - ERROR("expected fast nonminimal resolution computation type"); - return 0; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -890,7 +890,7 @@ MutableMatrix /* or null */ *rawResoluti - if (G != 0) return G->get_mutable_matrix(KK, level, degree); - ERROR("expected fast nonminimal resolution computation type"); - return 0; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -906,7 +906,7 @@ const FreeModule /* or null */ *rawResol - if (G != 0) return G->get_free(level); - ERROR("expected resolution computation type"); - return 0; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -953,7 +953,7 @@ M2_arrayintOrNull rawResolutionBetti(Com - if (G != 0) return G->get_betti(type); - ERROR("expected resolution computation type"); - return NULL; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -968,7 +968,7 @@ M2_string IM2_GB_to_string(Computation * - { - C->text_out(o); - return o.to_string(); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - o << "[unprintable gb]"; - return o.to_string(); -@@ -989,7 +989,7 @@ Matrix /* or null */ *rawSubduction(cons - return 0; - } - return sagbi::subduct(M, F, G); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -1180,7 +1180,7 @@ const Matrix *rawMGB( - // callback.callCount(), result); - // rawDisplayMatrixStream(result); - return result; -- } catch (std::runtime_error e) -+ } catch (std::runtime_error &e) - { - ERROR(e.what()); - return NULL; ---- M2/Macaulay2/e/x-mat.cpp.orig 2018-07-30 05:57:05.000000000 -0600 -+++ M2/Macaulay2/e/x-mat.cpp 2018-08-06 14:19:21.335178020 -0600 -@@ -25,7 +25,7 @@ M2_string IM2_Matrix_to_string(const Mat - { - M->text_out(o); - return o.to_string(); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - o << "[unprintable matrix]"; - return o.to_string(); -@@ -54,7 +54,7 @@ const RingElement /* or null */ *IM2_Mat - ring_elem result; - result = M->elem(r, c); - return RingElement::make_raw(M->get_ring(), result); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -171,7 +171,7 @@ const Matrix /* or null */ *IM2_Matrix_r - #warning prefer_dense not yet used - #endif - return M->remake(target); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -204,7 +204,7 @@ int // 1 = true, 0 = false, -1 = error - Therefore, it can happen that M-N == 0, but M != N. - */ - return M->is_equal(*N); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return -1; -@@ -246,7 +246,7 @@ const Matrix /* or null */ *IM2_Matrix_c - } - } - return mat.to_matrix(); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -278,7 +278,7 @@ const Matrix /* or null */ *IM2_Matrix_d - result = result->direct_sum(Ms->array[i]); - - return result; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -290,7 +290,7 @@ const Matrix /* or null */ *IM2_Matrix_t - try - { - return M->tensor(N); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -302,7 +302,7 @@ const Matrix /* or null */ *rawModuleTen - try - { - return M->module_tensor(N); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -314,7 +314,7 @@ const Matrix /* or null */ *IM2_Matrix_t - try - { - return M->transpose(); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -328,7 +328,7 @@ const Matrix /* or null */ *IM2_Matrix_r - try - { - return M->reshape(F, G); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -341,7 +341,7 @@ const Matrix /* or null */ *IM2_Matrix_f - try - { - return Matrix::flip(F, G); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -356,7 +356,7 @@ const Matrix /* or null */ *rawWedgeProd - try - { - return Matrix::wedge_product(p, q, F); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -370,7 +370,7 @@ const Matrix /* or null */ *IM2_Matrix_s - try - { - return M->sub_matrix(rows, cols); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -383,7 +383,7 @@ const Matrix /* or null */ *IM2_Matrix_s - try - { - return M->sub_matrix(cols); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -395,7 +395,7 @@ const Matrix /* or null */ *IM2_Matrix_k - try - { - return M->koszul(p); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -417,7 +417,7 @@ const Matrix /* or null */ *rawKoszulMon - return 0; - } - return Matrix::koszul_monomials(nskew, M, N); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -429,7 +429,7 @@ const Matrix /* or null */ *IM2_Matrix_s - try - { - return M->symm(p); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -450,7 +450,7 @@ M2_arrayintOrNull IM2_Matrix_sort_column - try - { - return M->sort(deg_order, mon_order); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -664,7 +664,7 @@ const Matrix /* or null */ *IM2_Matrix_p - } - mat.compute_column_degrees(); - return mat.to_matrix(); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -694,7 +694,7 @@ const Matrix /* or null */ *IM2_Matrix_l - mat.compute_column_degrees(); - *success_return = 1; - return mat.to_matrix(); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; ---- M2/Macaulay2/e/x-monideal.cpp.orig 2018-07-30 05:57:05.000000000 -0600 -+++ M2/Macaulay2/e/x-monideal.cpp 2018-08-06 14:19:21.336178008 -0600 -@@ -19,7 +19,7 @@ engine_RawMonomialIdealOrNull IM2_Monomi - MonomialIdeal *result = m->make_monideal(n); - intern_monideal(result); - return result; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -32,7 +32,7 @@ const Matrix /* or null */ *IM2_Monomial - try - { - return Matrix::make(I); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -46,7 +46,7 @@ M2_string MonomialIdeal_to_string(const - { - I->text_out(o); - return o.to_string(); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - o << "[unprintable monomial ideal]"; - return o.to_string(); -@@ -61,7 +61,7 @@ int IM2_MonomialIdeal_is_equal(const Mon - { - if (I->get_ring() != J->get_ring()) return false; - return I->is_equal(*J); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return -1; -@@ -77,7 +77,7 @@ const MonomialIdeal /* or null */ *rawRa - intern_monideal(result); - return result; - -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -98,7 +98,7 @@ const MonomialIdeal /* or null */ *IM2_M - MonomialIdeal *result = I->intersect(*J); - intern_monideal(result); - return result; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -116,7 +116,7 @@ const MonomialIdeal /* or null */ *rawCo - MonomialIdeal *result = I->quotient(a->ints()); - intern_monideal(result); - return result; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -139,7 +139,7 @@ const MonomialIdeal /* or null */ *rawCo - if (M2_gbTrace >= 1) dstash(); - return result; - -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -155,7 +155,7 @@ const MonomialIdeal /* or null */ *rawSa - MonomialIdeal *result = I->erase(a->ints()); - intern_monideal(result); - return result; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -176,7 +176,7 @@ const MonomialIdeal /* or null */ *rawSa - MonomialIdeal *result = I->sat(*J); - intern_monideal(result); - return result; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -191,7 +191,7 @@ const MonomialIdeal /* or null */ *IM2_M - MonomialIdeal *result = I->borel(); - intern_monideal(result); - return result; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -209,7 +209,7 @@ int IM2_MonomialIdeal_codim(const Monomi - { - MinimalPrimes ap(I); - return ap.codimension(); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return -1; // -1 is not a valid codimension, and interface.d knows it -@@ -225,7 +225,7 @@ rawMonomialMinimalPrimes(const MonomialI - MonomialIdeal *result = ap.alg1_min_primes(codim_limit, count); - intern_monideal(result); - return result; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -242,7 +242,7 @@ const MonomialIdeal /* or null */ *rawMa - MonomialIdeal *result = ap.associated_primes(count); - intern_monideal(result); - return result; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -258,7 +258,7 @@ const RingElement /* or null */ *IM2_Mon - try - { - return hilb_comp::hilbertNumerator(I); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -400,7 +400,7 @@ const MonomialIdeal /* or null */ *rawAl - MonomialIdeal *result = alexDual(I, top, strategy); - intern_monideal(result); - return result; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; ---- M2/Macaulay2/e/x-mutablemat.cpp.orig 2018-07-30 05:57:05.000000000 -0600 -+++ M2/Macaulay2/e/x-mutablemat.cpp 2018-08-06 14:19:21.336178008 -0600 -@@ -480,7 +480,7 @@ MutableMatrix /* or null */ *rawMutableM - try - { - return internMutableMatrix(M->transpose()); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -591,7 +591,7 @@ M2_arrayintOrNull rawLU(const MutableMat - try - { - return A->LU(L, U); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -639,7 +639,7 @@ M2_bool rawEigenvalues(MutableMatrix *A, - try - { - return A->eigenvalues(eigenvalues, is_symm_or_hermitian); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return false; -@@ -654,7 +654,7 @@ M2_bool rawEigenvectors(MutableMatrix *A - try - { - return A->eigenvectors(eigenvalues, eigenvectors, is_symm_or_hermitian); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return false; -@@ -670,7 +670,7 @@ M2_bool rawSVD(MutableMatrix *A, - try - { - return A->SVD(Sigma, U, VT, use_divide_and_conquer); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return false; -@@ -698,7 +698,7 @@ M2_bool rawLeastSquares(MutableMatrix *A - return false; - } - return A->least_squares(b, x, assume_full_rank); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return false; -@@ -713,7 +713,7 @@ M2_bool rawQR(const MutableMatrix *A, - try - { - return A->QR(Q, R, return_QR); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return false; -@@ -734,7 +734,7 @@ const Matrix /* or null */ *rawMatrixCle - return 0; - } - return M->clean(epsilon); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return nullptr; -@@ -764,7 +764,7 @@ MutableMatrix /* or null */ *rawMutableM - } - M->clean(epsilon); - return M; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return nullptr; -@@ -830,7 +830,7 @@ long rawLinAlgRank(MutableMatrix *M) - try - { - return M->rank(); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return -1; -@@ -842,7 +842,7 @@ const RingElement *rawLinAlgDeterminant( - try - { - return A->determinant(); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -854,7 +854,7 @@ MutableMatrix *rawLinAlgInverse(MutableM - try - { - return internMutableMatrix(A->invert()); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -866,7 +866,7 @@ MutableMatrix *rawLinAlgRREF(MutableMatr - try - { - return internMutableMatrix(A->rowReducedEchelonForm()); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -878,7 +878,7 @@ M2_arrayintOrNull rawLinAlgRankProfile(M - try - { - return A->rankProfile(row_profile); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -890,7 +890,7 @@ MutableMatrix *rawLinAlgNullSpace(Mutabl - try - { - return internMutableMatrix(A->nullSpace()); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -913,7 +913,7 @@ MutableMatrix *rawLinAlgSolve(const Muta - { - return NULL; - } -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - *success = 0; - ERROR(e.what()); -@@ -937,7 +937,7 @@ MutableMatrix *rawLinAlgSolveInvertible( - { - return NULL; - } -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - *success = 0; - ERROR(e.what()); -@@ -953,7 +953,7 @@ M2_bool rawLinAlgAddMult(MutableMatrix * - { - C->addMultipleTo(A, B); - return true; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return false; -@@ -968,7 +968,7 @@ M2_bool rawLinAlgSubMult(MutableMatrix * - { - C->subtractMultipleTo(A, B); - return true; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return false; -@@ -984,7 +984,7 @@ MutableMatrix * /* or null */ rawLinAlgM - try - { - return internMutableMatrix(A->mult(B)); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; ---- M2/Macaulay2/e/x-relem.cpp.orig 2018-07-30 05:57:05.000000000 -0600 -+++ M2/Macaulay2/e/x-relem.cpp 2018-08-06 14:21:32.356577677 -0600 -@@ -75,7 +75,7 @@ const Ring /* or null */ *rawGaloisField - try - { - return GF::create(f); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -108,7 +108,7 @@ const Ring /* or null */ *IM2_Ring_polyr - const PolyRing *result = PolyRing::create(K, M); - intern_polyring(result); - return result; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -148,7 +148,7 @@ const Ring /* or null */ *IM2_Ring_skew_ - P->getCoefficients(), P->getMonoid(), skewvars); - intern_polyring(result); - return result; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -175,7 +175,7 @@ const Ring /* or null */ *IM2_Ring_weyl_ - homog_var); - intern_polyring(result); - return result; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -196,7 +196,7 @@ const Ring /* or null */ *IM2_Ring_solva - SolvableAlgebra *result = SolvableAlgebra::create(P, Q); - intern_polyring(result); - return result; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -245,7 +245,7 @@ const Ring /* or null */ *IM2_Ring_frac( - return 0; - } - return FractionField::create(P); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -274,7 +274,7 @@ const Ring /* or null */ *IM2_Ring_local - return nullptr; - } - return LocalRing::create(PR, P); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -303,7 +303,7 @@ const Ring /* or null */ *IM2_Ring_quoti - PolynomialRing *result = PolynomialRing::create_quotient(P, I); - intern_polyring(result); - return result; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -333,7 +333,7 @@ const Ring /* or null */ *IM2_Ring_quoti - PolynomialRing *result = PolyRingQuotient::create_quotient(R1, B1); - intern_polyring(result); - return result; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -353,7 +353,7 @@ const Ring /* or null */ *IM2_Ring_schur - SchurRing *result = SchurRing::create(P); - intern_polyring(result); - return result; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -366,7 +366,7 @@ const Ring *rawSchurRing1(const Ring *A) - { - SchurRing2 *result = SchurRing2::createInfinite(A); - return result; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -379,7 +379,7 @@ const Ring *rawSchurRing2(const Ring *A, - { - SchurRing2 *result = SchurRing2::create(A, n); - return result; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -392,7 +392,7 @@ const Ring *rawSchurSnRing(const Ring *A - { - SchurSnRing *result = SchurSnRing::create(A, n); - return result; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -416,7 +416,7 @@ const Ring /* or null */ *rawTowerRing2( - return 0; - } - return Tower::create(R, new_names); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return 0; -@@ -446,7 +446,7 @@ const Ring /* or null */ *rawTowerRing3( - extensions.push_back(f->get_value()); - } - return Tower::create(R, extensions); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return 0; -@@ -671,7 +671,7 @@ long rawDiscreteLog(const RingElement *h - { - const Ring *R = h->get_ring(); - return R->discreteLog(h->get_value()); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return -1; -@@ -690,7 +690,7 @@ const RingElement /* or null */ *IM2_Rin - ring_elem a = R->var(v); - if (error()) return 0; - return RingElement::make_raw(R, a); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -731,7 +731,7 @@ engine_RawRingElementPair IM2_RingElemen - result->a = RingElement::make_raw(R, fquot); - result->b = RingElement::make_raw(R, frem); - return result; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -751,7 +751,7 @@ int rawRingElementCompare(const RingElem - // } - // if (b->is_zero()) return -1; - return R->compare_elems(a->get_value(), b->get_value()); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return -2; -@@ -767,7 +767,7 @@ const RingElement *IM2_RingElement_promo - if (f->promote(S, result)) return result; - ERROR("cannot promote given ring element"); - return 0; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -789,7 +789,7 @@ const RingElement /* or null */ *IM2_Rin - } - // ERROR("cannot lift given ring element"); - return 0; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -806,7 +806,7 @@ M2_arrayint IM2_RingElement_multidegree( - try - { - return a->multi_degree(); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -819,7 +819,7 @@ const RingElement * /* or null */ rawRin - { - const Ring *R = f->get_ring(); - return RingElement::make_raw(R, R->antipode(f->get_value())); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -845,7 +845,7 @@ gmp_ZZpairOrNull rawWeightRange(M2_array - mpz_init_set_si(p->a, static_cast(lo)); - mpz_init_set_si(p->b, static_cast(hi)); - return p; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -861,7 +861,7 @@ const RingElement /* or null */ *IM2_Rin - try - { - return a->homogenize(v, deg, wts); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -874,7 +874,7 @@ IM2_RingElement_homogenize(const RingEle - try - { - return a->homogenize(v, wts); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -904,7 +904,7 @@ const RingElement /* or null */ *IM2_Rin - varpower::to_ntuple(nvars0, m->ints(), exp); - ring_elem val = P->make_logical_term(a->get_ring(), a->get_value(), exp); - return RingElement::make_raw(R, val); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -936,7 +936,7 @@ const RingElement /* or null */ *IM2_Rin - try - { - return a->get_coeff(coeffRing, m); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -950,7 +950,7 @@ const RingElement /* or null */ *IM2_Rin - try - { - return a->lead_coeff(coeffRing); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -964,7 +964,7 @@ const Monomial /* or null */ *IM2_RingEl - try - { - return a->lead_monom(nvars); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -996,7 +996,7 @@ engine_RawArrayPairOrNull IM2_RingElemen - } - ERROR("expected a polynomial"); - return 0; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -1026,7 +1026,7 @@ engine_RawRingElementArray rawGetParts(c - result->array[i] = RingElement::make_raw(P, relems[i]); - deletearray(relems); - return result; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -1130,7 +1130,7 @@ engine_RawRingElementArrayOrNull rawConv - result->array[i] = RingElement::make_raw(P, output_relems[i]); - - return result; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -1160,7 +1160,7 @@ const RingElement /* or null */ *rawGetP - ring_elem g = P->get_part( - wts, f->get_value(), lobound_given, hibound_given, lobound, hibound); - return RingElement::make_raw(P, g); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -1199,7 +1199,7 @@ const RingElement /* or null */ *rawAsso - } - return RingElement::make_raw( - P->getCoefficients(), P->preferred_associate_divisor(f->get_value())); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -1233,7 +1233,7 @@ const RingElement /* or null */ *IM2_Rin - try - { - return a->numerator(); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -1246,7 +1246,7 @@ const RingElement /* or null */ *IM2_Rin - try - { - return a->denominator(); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -1262,7 +1262,7 @@ const RingElement /* or null */ *IM2_Rin - const RingElement *f = a->fraction(R, b); - if (error()) return NULL; - return f; -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -1282,7 +1282,7 @@ gmp_ZZorNull rawSchurDimension(const Rin - ring_elem result = S->dimension(f->get_value()); - #warning "const cast from mpz_srcptr to mpz_ptr" - return const_cast(result.get_mpz()); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -1308,7 +1308,7 @@ const RingElement /* or null */ *rawSchu - } - ring_elem result = R->tensor_mult(a->get_value(), b->get_value()); - return RingElement::make_raw(R, result); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -1335,7 +1335,7 @@ const RingElement /* or null */ *rawSchu - if (!S->is_valid_partition(part)) return 0; - ring_elem result = S->from_partition(part); - return RingElement::make_raw(S, result); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; ---- M2/Macaulay2/e/x-ringmap.cpp.orig 2018-07-30 05:57:05.000000000 -0600 -+++ M2/Macaulay2/e/x-ringmap.cpp 2018-08-06 14:19:21.337177996 -0600 -@@ -12,7 +12,7 @@ M2_string IM2_RingMap_to_string(const Ri - { - F->text_out(o); - return o.to_string(); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - o << "[unprintable ringmap]"; - return o.to_string(); -@@ -34,7 +34,7 @@ const RingElement /* or null */ *IM2_Rin - try - { - return F->eval(a); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -53,7 +53,7 @@ const Matrix /* or null */ *IM2_RingMap_ - try - { - return F->eval(newTarget, M); -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; -@@ -68,7 +68,7 @@ MutableMatrix /* or null */ *rawRingMapE - return MutableMatrix::zero_matrix( - F->get_ring(), M->n_rows(), M->n_cols(), M->is_dense()); - // TODO: now map it! -- } catch (exc::engine_error e) -+ } catch (exc::engine_error &e) - { - ERROR(e.what()); - return NULL; diff --git a/Macaulay2-1.12-format.patch b/Macaulay2-1.12-format.patch deleted file mode 100644 index e9434b2..0000000 --- a/Macaulay2-1.12-format.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- M2/Macaulay2/e/f4/monhashtable.cpp.orig 2018-08-06 14:17:15.131719510 -0600 -+++ M2/Macaulay2/e/f4/monhashtable.cpp 2018-08-06 14:18:07.327081977 -0600 -@@ -206,7 +206,7 @@ void MonomialHashTable::show( - fprintf(stderr, "-- %ld zero elements --\n", nzeros); - nzeros = 0; - } -- fprintf(stderr, "hash %ld monomial ", M->hash_value(m)); -+ fprintf(stderr, "hash %ld monomial ", (long)M->hash_value(m)); - M->show(m); - fprintf(stderr, "\n"); - } From 9547d588fa1f47fb4e9b2c278a106f1007cfced8 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Fri, 10 Jan 2020 08:20:14 -0700 Subject: [PATCH 05/70] Rebuild for ntl 11.4.3. --- Macaulay2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index 46688ea..e1b2b96 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -37,7 +37,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 Version: 1.14.0.1 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 or GPLv3 URL: http://macaulay2.com/ @@ -465,6 +465,9 @@ time make -k check -C BUILD/%{_target_platform} Verbose=true ||: %changelog +* Fri Jan 10 2020 Jerry James - 1.14.0.1-3 +- Rebuild for ntl 11.4.3 + * Fri Nov 1 2019 Jerry James - 1.14.0.1-2 - Rebuild for givaro 4.1.1, fflas-ffpack 2.4.3, and linbox 1.6.3 From 3e2d3865f1f5cf5f9fe34fdc78ceb33e6e23dd62 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 28 Jan 2020 09:31:19 +0000 Subject: [PATCH 06/70] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- Macaulay2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index e1b2b96..8d5f3c8 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -37,7 +37,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 Version: 1.14.0.1 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 or GPLv3 URL: http://macaulay2.com/ @@ -465,6 +465,9 @@ time make -k check -C BUILD/%{_target_platform} Verbose=true ||: %changelog +* Tue Jan 28 2020 Fedora Release Engineering - 1.14.0.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Fri Jan 10 2020 Jerry James - 1.14.0.1-3 - Rebuild for ntl 11.4.3 From db498402a8a6a221db7ab72bd5f4797970f5058c Mon Sep 17 00:00:00 2001 From: Jerry James Date: Tue, 11 Feb 2020 09:24:41 -0700 Subject: [PATCH 07/70] Add -fno-common patch to fix FTBFS with GCC 10. --- Macaulay2-1.12-fno-common.patch | 21 +++++++++++++++++++++ Macaulay2.spec | 6 ++++++ 2 files changed, 27 insertions(+) create mode 100644 Macaulay2-1.12-fno-common.patch diff --git a/Macaulay2-1.12-fno-common.patch b/Macaulay2-1.12-fno-common.patch new file mode 100644 index 0000000..38f07a0 --- /dev/null +++ b/Macaulay2-1.12-fno-common.patch @@ -0,0 +1,21 @@ +--- M2/Macaulay2/c/scc1.c.orig 2019-05-25 08:04:49.000000000 -0600 ++++ M2/Macaulay2/c/scc1.c 2020-02-11 07:59:24.257856975 -0700 +@@ -2,6 +2,7 @@ + + #include "scc.h" + ++scope global_scope; + FILE *dependfile; + char *targetname; + char *outfilename; +--- M2/Macaulay2/c/scc.h.orig 2019-05-25 08:04:49.000000000 -0600 ++++ M2/Macaulay2/c/scc.h 2020-02-11 07:58:17.865064556 -0700 +@@ -18,7 +18,7 @@ + struct POS { char *filename; short lineno, column; } ; + typedef struct NODE *node; + typedef struct SCOPE *scope; +-scope global_scope; ++extern scope global_scope; + typedef node (*chkfun) (node,scope); + + #define clear_memory(v) memset(v,0,sizeof(*v)) diff --git a/Macaulay2.spec b/Macaulay2.spec index 8d5f3c8..eae571b 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -124,6 +124,8 @@ Patch9: %{name}-1.11-fflas-ffpack.patch Patch10: %{name}-1.11-fplll.patch # do not override the debug level Patch11: %{name}-1.12-configure.patch +# fix the build with -fno-common, default for GCC 10 +Patch12: %{name}-1.12-fno-common.patch BuildRequires: 4ti2 BuildRequires: autoconf @@ -302,6 +304,7 @@ ln -s %{_datadir}/factory \ %patch9 -p1 -b .fflas-ffpack %patch10 -p1 -b .fplll %patch11 -p1 -b .configure +%patch12 -p1 -b .fno-common # repeatable builds: inject a node name sed -i 's,`uname -n`,build.fedoraproject.org,' configure.ac @@ -465,6 +468,9 @@ time make -k check -C BUILD/%{_target_platform} Verbose=true ||: %changelog +* Tue Feb 11 2020 Jerry James - 1.14.0.1-4 +- Add -fno-common patch to fix FTBFS with GCC 10 + * Tue Jan 28 2020 Fedora Release Engineering - 1.14.0.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild From 87226fd8ee0a96911a648c9a9bf8684e1e46c0d0 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Wed, 3 Jun 2020 09:00:44 -0600 Subject: [PATCH 08/70] Version 1.15.1.0. - Drop upstreamed patches: -no_Werror, -mpir, -pthreads, -fflas-ffpack, -fno-common, -gtest, -pthreads. --- Macaulay2-1.11-fflas-ffpack.patch | 30 - Macaulay2-1.11-gtest.patch | 22 - Macaulay2-1.11-mpir.patch | 13 - Macaulay2-1.11-no_Werror.patch | 11 - Macaulay2-1.11-no_gftables.patch | 11 - Macaulay2-1.11-pthreads.patch | 9 - Macaulay2-1.12-default_make_targets.patch | 11 - Macaulay2-1.12-fno-common.patch | 21 - Macaulay2-1.15-default_make_targets.patch | 11 + ...-fplll.patch => Macaulay2-1.15-fplll.patch | 17 +- Macaulay2-1.15-no_gftables.patch | 11 + ...ags.patch => Macaulay2-1.15-optflags.patch | 8 +- Macaulay2.spec | 123 +- flint-2.5.2.patch | 280 --- flint-20200414.patch | 391 ++++ mathicgb-1.0.patch | 43 + mpfr-3.1.6.patch | 399 ---- mpfr-4.0.2.patch | 1614 +++++++++++++++++ sources | 20 +- 19 files changed, 2158 insertions(+), 887 deletions(-) delete mode 100644 Macaulay2-1.11-fflas-ffpack.patch delete mode 100644 Macaulay2-1.11-gtest.patch delete mode 100644 Macaulay2-1.11-mpir.patch delete mode 100644 Macaulay2-1.11-no_Werror.patch delete mode 100644 Macaulay2-1.11-no_gftables.patch delete mode 100644 Macaulay2-1.11-pthreads.patch delete mode 100644 Macaulay2-1.12-default_make_targets.patch delete mode 100644 Macaulay2-1.12-fno-common.patch create mode 100644 Macaulay2-1.15-default_make_targets.patch rename Macaulay2-1.11-fplll.patch => Macaulay2-1.15-fplll.patch (82%) create mode 100644 Macaulay2-1.15-no_gftables.patch rename Macaulay2-1.11-optflags.patch => Macaulay2-1.15-optflags.patch (70%) delete mode 100644 flint-2.5.2.patch create mode 100644 flint-20200414.patch create mode 100644 mathicgb-1.0.patch delete mode 100644 mpfr-3.1.6.patch create mode 100644 mpfr-4.0.2.patch diff --git a/Macaulay2-1.11-fflas-ffpack.patch b/Macaulay2-1.11-fflas-ffpack.patch deleted file mode 100644 index 05f40e7..0000000 --- a/Macaulay2-1.11-fflas-ffpack.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- M2/Macaulay2/e/aring-gf-givaro.cpp.orig 2019-05-25 08:04:49.000000000 -0600 -+++ M2/Macaulay2/e/aring-gf-givaro.cpp 2019-10-31 08:08:33.256361286 -0600 -@@ -409,7 +409,7 @@ void ARingGFGivaro::getGenerator(Element - - bool ARingGFGivaro::is_unit(const ElementType f) const - { -- return givaroField.isunit(f); -+ return givaroField.isUnit(f); - } - - bool ARingGFGivaro::is_zero(const ElementType f) const ---- M2/Macaulay2/e/dmat.cpp.orig 2019-05-25 08:04:49.000000000 -0600 -+++ M2/Macaulay2/e/dmat.cpp 2019-10-31 08:42:04.830167857 -0600 -@@ -98,11 +98,15 @@ void determinant(const DMatZZpFFPACK& ma - // this case. - mat.ring().set_from_long(result_det, 1); - } -+ else if (mat.numRows() != mat.numColumns()) -+ { -+ mat.ring().set_from_long(result_det, 0); -+ } - else - { - DMatZZpFFPACK N(mat); - result_det = FFPACK::Det(mat.ring().field(), -- mat.numRows(), -+ result_det, - mat.numColumns(), - N.array(), - mat.numColumns()); diff --git a/Macaulay2-1.11-gtest.patch b/Macaulay2-1.11-gtest.patch deleted file mode 100644 index 98923cd..0000000 --- a/Macaulay2-1.11-gtest.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- M2/Macaulay2/e/unit-tests/gtest-include.cpp.orig 2018-03-07 10:43:35.000000000 -0700 -+++ M2/Macaulay2/e/unit-tests/gtest-include.cpp 2018-04-22 15:01:04.870644118 -0600 -@@ -5,7 +5,7 @@ - // the compiler flags are the same, which is the whole point of the - // recommendation to build gtest for each program. - --#include "src/gtest-all.cc" -+#include - - // Local Variables: - // compile-command: "make -C $M2BUILDDIR/Macaulay2/e/unit-tests check " ---- M2/Macaulay2/e/unit-tests/Makefile.in.orig 2018-03-07 10:43:35.000000000 -0700 -+++ M2/Macaulay2/e/unit-tests/Makefile.in 2018-04-22 15:01:04.870644118 -0600 -@@ -25,7 +25,7 @@ LOADLIBES += @BUILTLIBS@ @LIBS@ -lmathic - - # do not link with gtest -- it's supposed to get compiled in via #include: - # LDFLAGS += -L$(GTEST_DIR)/lib/.libs --# LOADLIBES += -lgtest -+LOADLIBES += -lgtest - - .PHONY: place_into_lib runtests - diff --git a/Macaulay2-1.11-mpir.patch b/Macaulay2-1.11-mpir.patch deleted file mode 100644 index 01a189d..0000000 --- a/Macaulay2-1.11-mpir.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- M2/configure.ac.orig 2018-04-22 14:59:03.284992098 -0600 -+++ M2/configure.ac 2018-04-22 15:00:26.272754584 -0600 -@@ -869,8 +869,8 @@ dnl make some programs optional: - BUILD_cddplus=no - BUILD_gftables=no - --BUILD_mpir=yes --BUILD_ALWAYS="mpir $BUILD_ALWAYS" -+BUILD_mpir=no -+#BUILD_ALWAYS="mpir $BUILD_ALWAYS" - # We always build mpir so we can patch the routine mp_set_memory_functions() in - # it so it does nothing; that prevents libraries such as pari from telling it - # what memory allocation functions to use. But we should instead set diff --git a/Macaulay2-1.11-no_Werror.patch b/Macaulay2-1.11-no_Werror.patch deleted file mode 100644 index 715a20b..0000000 --- a/Macaulay2-1.11-no_Werror.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- M2/Macaulay2/c/Makefile.in.orig 2018-03-07 10:43:35.000000000 -0700 -+++ M2/Macaulay2/c/Makefile.in 2018-04-22 14:56:59.444346532 -0600 -@@ -32,7 +32,7 @@ SRCFILES := $(HFILES) $(CNAMES) grammar. - CPPFLAGS := -I../../include -I/include -I@srcdir@/../../include -I@srcdir@ $(CPPFLAGS) - - # we include -Wno-unknown-attributes because libgc incorrectly assumes that clang 6 accepts __attribute__((__alloc_size__(1))): --CFLAGS += -Wall -Wno-unknown-attributes -Werror -+CFLAGS += -Wall -Wno-unknown-attributes - ifeq "@__INTEL_COMPILER@" "no" - CFLAGS += -Wimplicit-function-declaration - endif diff --git a/Macaulay2-1.11-no_gftables.patch b/Macaulay2-1.11-no_gftables.patch deleted file mode 100644 index b16dd88..0000000 --- a/Macaulay2-1.11-no_gftables.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- M2/configure.ac.orig 2019-09-14 15:08:16.044196840 -0600 -+++ M2/configure.ac 2019-09-14 15:08:50.832185220 -0600 -@@ -885,7 +885,7 @@ AC_SUBST(BUILTLIBS,) - # mpack depends on gmp (which mpir provides) mpfr mpc qd - # flint depends on gmp or mpir and mpfr - # pari uses gmp, so if we build gmp, we should build pari --AC_SUBST(PROGLIST, "4ti2 gfan normaliz csdp nauty cddplus lrslib gftables topcom cohomcalg") -+AC_SUBST(PROGLIST, "4ti2 gfan normaliz csdp nauty cddplus lrslib topcom cohomcalg") - AC_SUBST(LIBLIST, " atomic_ops gc gdbm mpir mpfr pari readline ntl flint factory lapack frobby glpk cddlib fplll givaro linbox boost mpc qd mpack gtest ") - AC_SUBST(SUBLIST, " memtailor mathic mathicgb fflas_ffpack ") - diff --git a/Macaulay2-1.11-pthreads.patch b/Macaulay2-1.11-pthreads.patch deleted file mode 100644 index 4f80467..0000000 --- a/Macaulay2-1.11-pthreads.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- M2/Macaulay2/system/pthread-methods.hpp.orig 2016-08-15 12:38:31.000000000 -0600 -+++ M2/Macaulay2/system/pthread-methods.hpp 2017-04-07 16:47:50.027572916 -0600 -@@ -5,5 +5,5 @@ - static inline int operator!=(pthread_t t, pthread_t u) { return t.p != u.p || t.x != u.x; } - static inline int operator< (pthread_t t, pthread_t u) { return t.p < u.p || t.p == u.p && t.x < u.x; } - #else -- #define clearThread(t) t = NULL -+ #define clearThread(t) t = 0 - #endif diff --git a/Macaulay2-1.12-default_make_targets.patch b/Macaulay2-1.12-default_make_targets.patch deleted file mode 100644 index 7e5a040..0000000 --- a/Macaulay2-1.12-default_make_targets.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- M2/Macaulay2/Makefile.in.orig 2018-08-06 14:14:27.212770531 -0600 -+++ M2/Macaulay2/Makefile.in 2018-08-06 14:15:10.889237052 -0600 -@@ -7,7 +7,7 @@ SUBDIRS = compat util probe regex c - ifeq "@DUMPDATA@" "yes" - SUBDIRS += dumpdata - endif --SUBDIRS += e-includes d e system kernel bin m2 man packages emacs html-check-links tests -+SUBDIRS += e-includes d e system kernel bin m2 man packages emacs - SUBDIRS += book - SUBDIRS += packages/Macaulay2Doc/test - diff --git a/Macaulay2-1.12-fno-common.patch b/Macaulay2-1.12-fno-common.patch deleted file mode 100644 index 38f07a0..0000000 --- a/Macaulay2-1.12-fno-common.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- M2/Macaulay2/c/scc1.c.orig 2019-05-25 08:04:49.000000000 -0600 -+++ M2/Macaulay2/c/scc1.c 2020-02-11 07:59:24.257856975 -0700 -@@ -2,6 +2,7 @@ - - #include "scc.h" - -+scope global_scope; - FILE *dependfile; - char *targetname; - char *outfilename; ---- M2/Macaulay2/c/scc.h.orig 2019-05-25 08:04:49.000000000 -0600 -+++ M2/Macaulay2/c/scc.h 2020-02-11 07:58:17.865064556 -0700 -@@ -18,7 +18,7 @@ - struct POS { char *filename; short lineno, column; } ; - typedef struct NODE *node; - typedef struct SCOPE *scope; --scope global_scope; -+extern scope global_scope; - typedef node (*chkfun) (node,scope); - - #define clear_memory(v) memset(v,0,sizeof(*v)) diff --git a/Macaulay2-1.15-default_make_targets.patch b/Macaulay2-1.15-default_make_targets.patch new file mode 100644 index 0000000..0c209c9 --- /dev/null +++ b/Macaulay2-1.15-default_make_targets.patch @@ -0,0 +1,11 @@ +--- M2/Macaulay2/Makefile.in.orig 2020-05-28 20:16:53.246808781 -0600 ++++ M2/Macaulay2/Makefile.in 2020-05-28 20:17:27.293787155 -0600 +@@ -7,7 +7,7 @@ SUBDIRS = util regex c + ifeq "@DUMPDATA@" "yes" + SUBDIRS += dumpdata + endif +-SUBDIRS += d e system bin m2 man packages emacs html-check-links tests ++SUBDIRS += d e system bin m2 man packages emacs + SUBDIRS += book + + define do-in-subdirs diff --git a/Macaulay2-1.11-fplll.patch b/Macaulay2-1.15-fplll.patch similarity index 82% rename from Macaulay2-1.11-fplll.patch rename to Macaulay2-1.15-fplll.patch index ccedcfa..c216db9 100644 --- a/Macaulay2-1.11-fplll.patch +++ b/Macaulay2-1.15-fplll.patch @@ -1,14 +1,13 @@ ---- M2/Macaulay2/e/fplll-interface.cpp.orig 2018-03-07 10:43:35.000000000 -0700 -+++ M2/Macaulay2/e/fplll-interface.cpp 2018-05-15 09:24:10.586961150 -0600 -@@ -1,11 +1,9 @@ +--- M2/Macaulay2/e/fplll-interface.cpp.orig 2020-05-22 08:58:09.000000000 -0600 ++++ M2/Macaulay2/e/fplll-interface.cpp 2020-05-31 20:25:06.775601853 -0600 +@@ -1,10 +1,10 @@ -#include "fplll-interface.hpp" -#include "mutablemat.hpp" - --#ifdef HAVE_FPLLL + #ifdef HAVE_FPLLL #include - #include -#include --#endif + #endif +#include + +#include "fplll-interface.hpp" @@ -16,7 +15,7 @@ bool fp_LLL(MutableMatrix *M, MutableMatrix *U, int strategy) { -@@ -16,15 +14,15 @@ bool fp_LLL(MutableMatrix *M, MutableMat +@@ -15,15 +15,15 @@ bool fp_LLL(MutableMatrix *M, MutableMat assert(U == NULL); double delta = 0.99; double eta = 0.51; @@ -36,7 +35,7 @@ for (int i = 0; i < nrows; i++) for (int j = 0; j < ncols; j++) -@@ -32,21 +30,21 @@ bool fp_LLL(MutableMatrix *M, MutableMat +@@ -31,21 +31,21 @@ bool fp_LLL(MutableMatrix *M, MutableMat ring_elem a; if (M->get_entry(j, i, a)) { @@ -63,7 +62,7 @@ ERROR("infinite loop in LLL"); return 0; default: -@@ -61,7 +59,7 @@ bool fp_LLL(MutableMatrix *M, MutableMat +@@ -60,7 +60,7 @@ bool fp_LLL(MutableMatrix *M, MutableMat for (int j = 0; j < ncols; j++) for (int i = 0; i < nrows; i++) { diff --git a/Macaulay2-1.15-no_gftables.patch b/Macaulay2-1.15-no_gftables.patch new file mode 100644 index 0000000..7aa2807 --- /dev/null +++ b/Macaulay2-1.15-no_gftables.patch @@ -0,0 +1,11 @@ +--- M2/configure.ac.orig 2020-05-28 20:18:37.577744116 -0600 ++++ M2/configure.ac 2020-05-28 20:19:23.942716638 -0600 +@@ -711,7 +711,7 @@ AC_SUBST(BUILTLIBS) + AC_SUBST(LIBLIST, " atomic_ops gc gdbm gmp mpir mpfr readline ntl flint factory lapack mpsolve frobby glpk cddlib fplll givaro linbox boost gtest ") + # The list LIBLIST is the list of libraries that might be used and linked into M2. + +-AC_SUBST(PROGLIST, "4ti2 gfan normaliz csdp nauty cddplus lrslib gftables topcom cohomcalg") ++AC_SUBST(PROGLIST, "4ti2 gfan normaliz csdp nauty cddplus lrslib topcom cohomcalg") + # The list PROGLIST is the list of programs and libraries for them that are distributed with M2. + # Initially, we offer no option for not compiling some of them. + diff --git a/Macaulay2-1.11-optflags.patch b/Macaulay2-1.15-optflags.patch similarity index 70% rename from Macaulay2-1.11-optflags.patch rename to Macaulay2-1.15-optflags.patch index 6780095..d27c278 100644 --- a/Macaulay2-1.11-optflags.patch +++ b/Macaulay2-1.15-optflags.patch @@ -1,6 +1,6 @@ ---- M2/configure.ac.orig 2018-03-07 10:43:35.000000000 -0700 -+++ M2/configure.ac 2018-04-22 14:46:43.486215685 -0600 -@@ -292,12 +292,12 @@ fi +--- M2/configure.ac.orig 2020-05-22 08:58:09.000000000 -0600 ++++ M2/configure.ac 2020-05-28 19:59:37.838647299 -0600 +@@ -308,12 +308,12 @@ fi ] if test "$OPTIMIZE" = yes @@ -18,4 +18,4 @@ + FCFLAGS="-O0 $FCFLAGS" fi - AC_SUBST(GCCVERSION,) + AC_SUBST(GCCVERSION) diff --git a/Macaulay2.spec b/Macaulay2.spec index eae571b..b8b9da2 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -2,11 +2,11 @@ # Macaulay2's memory management scheme requires close cooperation with libgc, # and some of the supporting libraries must be compiled with special options to # accomplish this. In particular, Macaulay2 needs: +# - mathicgb configured --without-tbb # - mpfr configured with --disable-thread-safe # - flint linked with the GC-enabled mpfr # - factory (from Singular) configured with --disable-omalloc --enable-streamio # and linked with the flint that is linked with the GC-enabled mpfr -# - mpc linked with the GC-enabled mpfr # Since the main Fedora packages are not built in this way, we are forced to # bundle these packages to avoid random GC-related crashes. # @@ -36,8 +36,8 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 -Version: 1.14.0.1 -Release: 4%{?dist} +Version: 1.15.1.0 +Release: 1%{?dist} License: GPLv2 or GPLv3 URL: http://macaulay2.com/ @@ -55,80 +55,79 @@ Source20: etags.sh ## BUNDLED code # Normaliz must sometimes be bundled due to version differences -Source100: http://www.math.uiuc.edu/Macaulay2/Downloads/OtherSourceCode/normaliz-3.6.3.tar.gz -Provides: bundled(normaliz) = 3.6.3 +%global normalizver 3.7.2 +Source100: http://www.math.uiuc.edu/Macaulay2/Downloads/OtherSourceCode/normaliz-%{normalizver}.tar.gz +Provides: bundled(normaliz) = %{normalizver} # MPFR is bundled because it must be built with different threading options -%global mpfrver 3.1.6 +%global mpfrver 4.0.2 Source101: http://www.mpfr.org/mpfr-%{mpfrver}/mpfr-%{mpfrver}.tar.xz Provides: bundled(mpfr) = %{mpfrver} # FLINT is bundled because it must be linked with the specially-built MPFR -%global flintver 2.5.2 -Source102: http://www.flintlib.org/flint-%{flintver}.tar.gz +%global flintver 20200414 +Source102: https://faculty.math.illinois.edu/Macaulay2/Downloads/OtherSourceCode/flint-%{flintver}.tar.gz +#Source102: http://www.flintlib.org/flint-%%{flintver}.tar.gz Provides: bundled(flint) = %{flintver} # FACTORY is bundled because it must be built with special options %global factoryver 4.1.1 -Source103: http://www.math.illinois.edu/Macaulay2/Downloads/OtherSourceCode/factory-%{factoryver}.tar.gz +Source103: http://faculty.math.illinois.edu/Macaulay2/Downloads/OtherSourceCode/factory-%{factoryver}.tar.gz Provides: bundled(factory) = %{factoryver} -# MPC is bundled because it must be linked with the specially-built MPFR -%global mpcver 1.1.0 -Source104: https://ftp.gnu.org/gnu/mpc/mpc-%{mpcver}.tar.gz -Provides: bundled(libmpc) = %{mpcver} +# MATHICGB is bundled because it must be built with different threading options +%global mathicgbver 1.0 +%global mathicgbcommit 636952f94bf6bb6d82a84f0c9ac7f44373f8a34f +Source104: https://github.com/Macaulay2/mathicgb/tarball/%{mathicgbcommit}/mathicgb-%{mathicgbver}.tar.gz +Provides: bundled(mathicgb) = %{mathicgbver} + +# GTEST is bundled because MATHICGB refuses to build otherwise +%global gtestver 1.10.0 +Source105: https://faculty.math.illinois.edu/Macaulay2/Downloads/OtherSourceCode/gtest-%{gtestver}.tar.gz ## PATCHES FOR BUNDLED code -# Fix multiple flint build and runtime issues; see patches in the flint package -Source200: flint-2.5.2.patch +# Fix flint memory leaks +Source200: flint-20200414.patch # Fix factory build failure. REPLACES the upstream patch. Source201: factory-4.1.1.patch -# Upstream mpfr patches subsequent to the 3.1.6 release. -Source202: mpfr-3.1.6.patch +# Upstream mpfr patches subsequent to the 4.0.2 release. +Source202: mpfr-4.0.2.patch +# Fix mathicgb build on big endian machines. +Source203: mathicgb-1.0.patch ## FAKE library tarballs that convince Macaulay2 to use the system versions Source300: frobby_v0.9.0.tar.gz -Source301: gtest-1.8.0.tar.gz +Source301: cddlib-094h.tar.gz Source302: lapack-3.6.0.tgz -Source303: 4ti2-1.6.7.tar.gz +Source303: 4ti2-1.6.9.tar.gz Source304: libfplll-5.2.0.tar.gz Source305: gfan0.6.2.tar.gz -Source306: givaro-4.0.2.tar.gz +Source306: givaro-4.1.1.tar.gz Source307: lrslib-062.tar.gz Source308: TOPCOM-0.17.8.tar.gz -Source309: cohomCalg-031b.zip +Source309: cohomCalg-0.32.tar.gz Source310: glpk-4.59.tar.gz Source311: Csdp-6.2.0.tgz +Source312: mpsolve-3.1.8.tar.gz # let Fedora optflags override the defaults -Patch0: %{name}-1.11-optflags.patch +Patch0: %{name}-1.15-optflags.patch # use xdg-open as the default browser Patch1: %{name}-1.11-xdg_open.patch # fix paths to nauty binaries Patch2: %{name}-1.11-nauty-paths.patch # drop 'tests' from default make target -Patch3: %{name}-1.12-default_make_targets.patch +Patch3: %{name}-1.15-default_make_targets.patch # disable check for gftables -Patch4: %{name}-1.11-no_gftables.patch -# don't use -Werror -Patch5: %{name}-1.11-no_Werror.patch -# link to gmp, not mpir to avoid possible issues with gmp'ed pari -Patch6: %{name}-1.11-mpir.patch -# use the system gtest -Patch7: %{name}-1.11-gtest.patch -# fix invalid access to the pthread_t type -Patch8: %{name}-1.11-pthreads.patch -# adapt to fflas-ffpack 2.3.x -Patch9: %{name}-1.11-fflas-ffpack.patch +Patch4: %{name}-1.15-no_gftables.patch # adapt to libfplll 5.2.1 -Patch10: %{name}-1.11-fplll.patch +Patch5: %{name}-1.15-fplll.patch # do not override the debug level -Patch11: %{name}-1.12-configure.patch -# fix the build with -fno-common, default for GCC 10 -Patch12: %{name}-1.12-fno-common.patch +Patch6: %{name}-1.12-configure.patch BuildRequires: 4ti2 BuildRequires: autoconf +BuildRequires: autoconf-archive BuildRequires: bison BuildRequires: boost-devel BuildRequires: cddlib-devel @@ -171,7 +170,6 @@ BuildRequires: libtool BuildRequires: libatomic_ops-devel BuildRequires: libfplll-static BuildRequires: libfrobby-devel -BuildRequires: libmpc-devel BuildRequires: libnauty-devel %if 0%{?system_normaliz} BuildRequires: libnormaliz-devel >= 3.6.3 @@ -182,7 +180,7 @@ BuildRequires: lrslib-utils BuildRequires: mariadb-devel BuildRequires: memtailor-devel BuildRequires: mathic-devel -BuildRequires: mathicgb-devel +BuildRequires: mpsolve-devel BuildRequires: nauty BuildRequires: normaliz BuildRequires: ntl-devel @@ -262,9 +260,13 @@ sed -e '/PROGRAMS =/aPATCHFILE = @abs_srcdir@/patch-$(VERSION)' \ -e '/PRECONFIGURE/d' \ -i libraries/normaliz/Makefile.in %endif -install -p -m644 %{SOURCE101} %{SOURCE102} %{SOURCE103} %{SOURCE104} \ +install -p -m644 %{SOURCE101} %{SOURCE102} %{SOURCE103} %{SOURCE105} \ BUILD/tarfiles/ sed -i 's/\(VERSION = \).*/\1%{mpfrver}/' libraries/mpfr/Makefile.in +pushd submodules/mathicgb +tar -xf %{SOURCE104} --strip-components=1 +patch -p0 < %{SOURCE203} +popd ## patches for bundled code cp -p %{SOURCE200} libraries/flint/patch-%{flintver} @@ -273,16 +275,16 @@ sed -e 's/# PATCHFILE/PATCHFILE/' \ -i libraries/flint/Makefile.in cp -p %{SOURCE201} libraries/factory/patch-%{factoryver} cp -p %{SOURCE202} libraries/mpfr/patch-%{mpfrver} +cp -p %{SOURCE203} submodules/mathicgb/patch-%{mathicgbver} ## fake library tarballs install -p -m644 %{SOURCE300} %{SOURCE301} %{SOURCE302} %{SOURCE303} \ %{SOURCE304} %{SOURCE305} %{SOURCE306} %{SOURCE307} %{SOURCE308} \ - %{SOURCE309} %{SOURCE310} %{SOURCE311} BUILD/tarfiles/ -sed -i '/PRECONFIGURE/d' libraries/{4ti2,normaliz,topcom}/Makefile.in + %{SOURCE309} %{SOURCE310} %{SOURCE311} %{SOURCE312} BUILD/tarfiles/ +sed -i '/PRECONFIGURE/d' libraries/{4ti2,cddlib,givaro,normaliz,topcom}/Makefile.in sed -i 's/VERSION = 4\.0\.4/VERSION = 5.2.0/;/PATCHFILE/d' libraries/fplll/Makefile.in -sed -i '/PATCHFILE/d' libraries/{csdp,frobby,gfan,normaliz,topcom}/Makefile.in +sed -i '/PATCHFILE/d' libraries/{csdp,frobby,gfan,givaro,mpsolve,normaliz,topcom}/Makefile.in sed -i '/INSTALLCMD/,/stdinc/d' libraries/frobby/Makefile.in -sed -i '/TARDIR/d;/PRECONFIGURE/d' libraries/gtest/Makefile.in sed -i 's,install \(lib.*\.a\),ln -s %{_libdir}/\1,' libraries/lapack/Makefile.in sed -i '/TARFILE/iPATCHFILE = @abs_srcdir@/patch-$(VERSION)' libraries/mpfr/Makefile.in @@ -291,20 +293,12 @@ sed -i '/TARFILE/iPATCHFILE = @abs_srcdir@/patch-$(VERSION)' libraries/mpfr/Make %patch2 -p1 -b .nauty %patch3 -p1 -b .default_make_targets %patch4 -p1 -b .no_gftables -%patch5 -p1 -b .no_Werror -%if 0%{?gmp} -%patch6 -p1 -b .mpir -%endif # factory-gftables symlink mkdir -p BUILD/%{_target_platform}/usr-dist/common/share/Macaulay2/Core ln -s %{_datadir}/factory \ BUILD/%{_target_platform}/usr-dist/common/share/Macaulay2/Core/factory -%patch7 -p1 -b .gtest -%patch8 -p1 -b .pthreads -%patch9 -p1 -b .fflas-ffpack -%patch10 -p1 -b .fplll -%patch11 -p1 -b .configure -%patch12 -p1 -b .fno-common +%patch5 -p1 -b .fplll +%patch6 -p1 -b .configure # repeatable builds: inject a node name sed -i 's,`uname -n`,build.fedoraproject.org,' configure.ac @@ -331,11 +325,15 @@ sed -e 's/^BUILD_cddlib=yes/BUILD_cddlib=no/' \ -e 's,\$added_fclibs != yes,"$added_fclibs" != yes,' \ -i configure.ac -# Use, but don't build, memtailor, mathic, and mathicgb. Link with qd. -sed -e 's/\(LIBDEPS_FOR_BUILD := \).*/\1/' \ +# Use, but don't build, memtailor and mathic. Link with qd. +sed -e '/LIBDEPS_FOR_BUILD/s/ memtailor mathic//' \ -e '/LDLIBS_FOR_BUILD/s/mathicgb/& qd/' \ -i include/config.Makefile.in +# We want to build mathicgb, but not mathic or memtailor. This line in +# GNUmakefile assumes that building mathicgb means building the other two. +sed -i '/all-in-mathicgb:all-in-mathic all-in-memtailor/d' GNUmakefile.in + # (re)generate configure [ -f configure -a -f include/config.h ] || make @@ -368,13 +366,17 @@ LIBS="-lopenblas" \ --disable-strip \ --enable-fplll \ --enable-linbox \ +%if 0%{?gmp} + --with-integer-package=gmp \ +%else + --with-integer-package=mpir \ +%endif --with-unbuilt-programs="cddplus nauty" \ --enable-build-libraries="mpfr flint factory lapack fplll givaro gtest" # The list of libraries and submodules above should include only those that: # 1. We bundle (mpfr, flint, and factory) # 2. We sneakily substitute one library for another (lapack -> openblas) # 3. Have to be linked with the static library (fplll and givaro) - # 4. Have to be faked because Macaulay2 wants to find sources (gtest) popd # link with static libraries when global constructors run prior to GC @@ -468,6 +470,11 @@ time make -k check -C BUILD/%{_target_platform} Verbose=true ||: %changelog +* Wed Jun 3 2020 Jerry James - 1.15.1.0-1 +- Version 1.15.1.0 +- Drop upstreamed patches: -no_Werror, -mpir, -pthreads, -fflas-ffpack, + -fno-common, -gtest, -pthreads + * Tue Feb 11 2020 Jerry James - 1.14.0.1-4 - Add -fno-common patch to fix FTBFS with GCC 10 diff --git a/flint-2.5.2.patch b/flint-2.5.2.patch deleted file mode 100644 index 50fa7dc..0000000 --- a/flint-2.5.2.patch +++ /dev/null @@ -1,280 +0,0 @@ ---- flint-2.5.2/configure.orig 2015-08-13 10:16:22.000000000 -0600 -+++ flint-2.5.2/configure 2017-03-10 10:38:00.397968044 -0700 -@@ -434,16 +434,16 @@ if [ -z "$FLINT_LIB" ]; then - Darwin) - FLINT_LIBNAME="libflint.dylib" - FLINT_LIB="libflint-$FLINT_MAJOR.$FLINT_MINOR.$FLINT_PATCH.dylib" -- EXTRA_SHARED_FLAGS="-install_name $PREFIX/lib/$FLINT_LIB -compatibility_version $FLINT_MAJOR.$FLINT_MINOR -current_version $FLINT_MAJOR.$FLINT_MINOR.$FLINT_PATCH -Wl,-rpath,$GMP_LIB_DIR -Wl,-rpath,$MPFR_LIB_DIR";; -+ EXTRA_SHARED_FLAGS="-install_name $PREFIX/lib/$FLINT_LIB -compatibility_version $FLINT_MAJOR.$FLINT_MINOR -current_version $FLINT_MAJOR.$FLINT_MINOR.$FLINT_PATCH";; - CYGWIN* | MINGW*) - FLINT_LIBNAME="libflint.dll" - FLINT_LIB="libflint-$FLINT_MAJOR.dll" -- EXTRA_SHARED_FLAGS="-static-libgcc -shared -Wl,--export-all-symbols -Wl,-soname,libflint-$FLINT_MAJOR.dll.$FLINT_MINOR.$FLINT_PATCH -Wl,-rpath,$GMP_LIB_DIR -Wl,-rpath,$MPFR_LIB_DIR" -+ EXTRA_SHARED_FLAGS="-static-libgcc -shared -Wl,--export-all-symbols -Wl,-soname,libflint-$FLINT_MAJOR.dll.$FLINT_MINOR.$FLINT_PATCH" - FLINT_DLL=1;; - *) - FLINT_LIBNAME="libflint.so" - FLINT_LIB="libflint.so.$FLINT_MAJOR.$FLINT_MINOR.$FLINT_PATCH" -- EXTRA_SHARED_FLAGS="-Wl,-soname,libflint.so.$FLINT_MAJOR -Wl,-rpath,$GMP_LIB_DIR -Wl,-rpath,$MPFR_LIB_DIR" -+ EXTRA_SHARED_FLAGS="-Wl,-soname,libflint.so.$FLINT_MAJOR" - FLINT_SOLIB=1 - esac - fi ---- flint-2.5.2/d_mat/gso.c.orig 2015-08-13 10:16:22.000000000 -0600 -+++ flint-2.5.2/d_mat/gso.c 2015-09-23 21:24:08.367946615 -0600 -@@ -84,7 +84,9 @@ d_mat_gso(d_mat_t B, const d_mat_t A) - flag = 0; - if (s < t) - { -- if (s * D_EPS == 0) -+ double u = s * D_EPS; -+ -+ if (u > -1.0e-308 && u < 1.0e-308) - s = 0; - else - flag = 1; ---- flint-2.5.2/d_mat/qr.c.orig 2015-08-13 10:16:22.000000000 -0600 -+++ flint-2.5.2/d_mat/qr.c 2015-09-23 21:24:16.687286447 -0600 -@@ -92,8 +92,10 @@ d_mat_qr(d_mat_t Q, d_mat_t R, const d_m - flag = 0; - if (s < t) - { -+ double u = s * D_EPS; -+ - orig = 0; -- if (s * D_EPS == 0) -+ if (u > -1.0e-308 && u < 1.0e-308) - s = 0; - else - flag = 1; ---- flint-2.5.2/fmpz/get_d_2exp.c.orig 2015-08-13 10:16:22.000000000 -0600 -+++ flint-2.5.2/fmpz/get_d_2exp.c 2017-03-10 10:36:40.122534392 -0700 -@@ -52,9 +52,14 @@ fmpz_get_d_2exp(slong *exp, const fmpz_t - return __gmpn_get_d((mp_limb_t *) &d, WORD(1), WORD(1), -*exp); - } - else -+ { - #if defined(__MPIR_VERSION) - return mpz_get_d_2exp(exp, COEFF_TO_PTR(d)); - #else -- return mpz_get_d_2exp((long *) exp, COEFF_TO_PTR(d)); -+ long exp2; -+ double m = mpz_get_d_2exp(&exp2, COEFF_TO_PTR(d)); -+ *exp = exp2; -+ return m; - #endif -+ } - } ---- flint-2.5.2/fmpz_mod_poly_factor/inlines.c.orig 2017-03-10 10:36:40.137534286 -0700 -+++ flint-2.5.2/fmpz_mod_poly_factor/inlines.c 2017-03-10 10:36:40.137534286 -0700 -@@ -0,0 +1,41 @@ -+/*============================================================================= -+ -+ This file is part of FLINT. -+ -+ FLINT is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2 of the License, or -+ (at your option) any later version. -+ -+ FLINT is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with FLINT; if not, write to the Free Software -+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ -+=============================================================================*/ -+/****************************************************************************** -+ -+ Copyright (C) 2015 Tommy Hofmann -+ -+******************************************************************************/ -+ -+#define FMPZ_MOD_POLY_FACTOR_INLINES_C -+ -+#define ulong ulongxx /* interferes with system includes */ -+#include -+#include -+#undef ulong -+#include -+#include "flint.h" -+#include "ulong_extras.h" -+#include "fmpz_mod_poly.h" -+ -+void fmpz_mod_poly_factor_get_fmpz_mod_poly(fmpz_mod_poly_t z, fmpz_mod_poly_factor_t fac, slong i) -+{ -+ fmpz_mod_poly_set(z, fac->poly + i); -+} -+ ---- flint-2.5.2/fmpz_poly/pseudo_divrem_basecase.c.orig 2015-08-13 10:16:22.000000000 -0600 -+++ flint-2.5.2/fmpz_poly/pseudo_divrem_basecase.c 2017-03-10 10:36:40.137534286 -0700 -@@ -49,7 +49,7 @@ _fmpz_poly_pseudo_divrem_basecase(fmpz * - - while (iR >= lenB - 1) - { -- if (inv) -+ if (inv != NULL) - fmpz_fdiv_qr_preinvn(Q + iQ, rem, R + iR, leadB, inv); - else - fmpz_fdiv_qr(Q + iQ, rem, R + iR, leadB); ---- flint-2.5.2/fmpz/popcnt.c.orig 2015-08-13 10:16:22.000000000 -0600 -+++ flint-2.5.2/fmpz/popcnt.c 2018-05-01 21:07:11.375129225 -0600 -@@ -25,6 +25,53 @@ static __inline__ mp_bitcnt_t shortCount - } - #endif - -+#ifdef __x86_64__ -+#include -+ -+static mp_bitcnt_t slow_fmpz_popcnt(const fmpz_t c) -+{ -+ fmpz c1; -+ c1 = *c; -+ if(!COEFF_IS_MPZ(c1)) -+ { -+ if(*c < 0) return 0; -+ else return __builtin_popcountl(*c); -+ } else -+ { -+ __mpz_struct *t = COEFF_TO_PTR(c1); -+ if(flint_mpz_cmp_si(t,0) < 0) return 0; -+ else return mpz_popcount(t); -+ } -+} -+ -+static mp_bitcnt_t __attribute__((target ("popcnt"))) -+fast_fmpz_popcnt(const fmpz_t c) -+{ -+ fmpz c1; -+ c1 = *c; -+ if(!COEFF_IS_MPZ(c1)) -+ { -+ if(*c < 0) return 0; -+ else return __builtin_popcountl(*c); -+ } else -+ { -+ __mpz_struct *t = COEFF_TO_PTR(c1); -+ if(flint_mpz_cmp_si(t,0) < 0) return 0; -+ else return mpz_popcount(t); -+ } -+} -+ -+static mp_bitcnt_t (*resolve_fmpz_popcnt(void))(const fmpz_t c) { -+ unsigned int eax, ebx, ecx, edx; -+ return (__get_cpuid(1, &eax, &ebx, &ecx, &edx) && -+ (ecx & bit_POPCNT) != 0) -+ ? &fast_fmpz_popcnt -+ : &slow_fmpz_popcnt; -+} -+ -+mp_bitcnt_t __attribute__((ifunc ("resolve_fmpz_popcnt"))) -+fmpz_popcnt(const fmpz_t c); -+#else - mp_bitcnt_t fmpz_popcnt(const fmpz_t c) - { - fmpz c1; -@@ -40,3 +87,4 @@ mp_bitcnt_t fmpz_popcnt(const fmpz_t c) - else return mpz_popcount(t); - } - } -+#endif ---- flint-2.5.2/fq_poly_templates/get_str_pretty.c.orig 2015-08-13 10:16:22.000000000 -0600 -+++ flint-2.5.2/fq_poly_templates/get_str_pretty.c 2017-03-10 10:36:40.138534279 -0700 -@@ -87,16 +87,16 @@ char *_TEMPLATE(T, poly_get_str_pretty) - continue; - if (!TEMPLATE(T, is_one) (poly + i, ctx)) - { -- off += flint_sprintf(str + off, "+(%s)", coeffstrs[i]); -+ off += flint_sprintf(str + off, "+(%s)*", coeffstrs[i]); - } - else - { - off += flint_sprintf(str + off, "+"); - } - if (i > 1) -- off += flint_sprintf(str + off, "*%s^%wd", x, i); -+ off += flint_sprintf(str + off, "%s^%wd", x, i); - else -- off += flint_sprintf(str + off, "*%s", x); -+ off += flint_sprintf(str + off, "%s", x); - } - - if (!TEMPLATE(T, is_zero) (poly + i, ctx)) ---- flint-2.5.2/Makefile.in.orig 2015-08-13 10:16:22.000000000 -0600 -+++ flint-2.5.2/Makefile.in 2017-03-10 10:38:48.091631580 -0700 -@@ -86,7 +86,7 @@ dist: - profile: library $(PROF_SOURCES) $(EXT_PROF_SOURCES) build/profiler.o - mkdir -p build/profile - ifndef MOD -- $(AT)$(foreach prog, $(PROFS), $(CC) $(CFLAGS) -std=gnu99 $(INCS) $(prog).c build/profiler.o -o build/$(prog) $(LIBS) || exit $$?;) -+ $(AT)$(foreach prog, $(PROFS), $(CC) $(CFLAGS) -std=gnu99 $(INCS) $(prog).c build/profiler.o -o build/$(prog) $(LDFLAGS) $(LIBS) || exit $$?;) - $(AT)$(foreach dir, $(BUILD_DIRS), mkdir -p build/$(dir)/profile; BUILD_DIR=../build/$(dir); export BUILD_DIR; $(MAKE) -f ../Makefile.subdirs -C $(dir) profile || exit $$?;) - $(AT)$(foreach ext, $(EXTENSIONS), $(foreach dir, $(filter-out %templates, $(patsubst $(ext)/%.h, %, $(wildcard $(ext)/*.h))), mkdir -p build/$(dir)/profile; BUILD_DIR=$(CURDIR)/build/$(dir); export BUILD_DIR; MOD_DIR=$(dir); export MOD_DIR; $(MAKE) -f $(CURDIR)/Makefile.subdirs -C $(ext)/$(dir) profile || exit $$?;)) - else -@@ -95,14 +95,14 @@ endif - - tune: library $(TUNE_SOURCES) $(EXT_TUNE_SOURCES) - mkdir -p build/tune -- $(AT)$(foreach prog, $(TUNE), $(CC) $(CFLAGS) $(INCS) $(prog).c -o build/$(prog) $(LIBS) || exit $$?;) -+ $(AT)$(foreach prog, $(TUNE), $(CC) $(CFLAGS) $(INCS) $(prog).c -o build/$(prog) $(LDFLAGS) $(LIBS) || exit $$?;) - $(AT)$(foreach dir, $(BUILD_DIRS), mkdir -p build/$(dir)/tune; BUILD_DIR=../build/$(dir); export BUILD_DIR; $(MAKE) -f ../Makefile.subdirs -C $(dir) tune || exit $$?;) - $(AT)$(foreach ext, $(EXTENSIONS), $(foreach dir, $(patsubst $(ext)/%.h, %, $(wildcard $(ext)/*.h)), mkdir -p build/$(dir)/tune; BUILD_DIR=$(CURDIR)/build/$(dir); export BUILD_DIR; MOD_DIR=$(dir); export MOD_DIR; $(MAKE) -f $(CURDIR)/Makefile.subdirs -C $(ext)/$(dir) tune || exit $$?;)) - - examples: library $(EXMP_SOURCES) $(EXT_EXMP_SOURCES) $(EXT_HEADERS) - mkdir -p build/examples -- $(AT)$(foreach prog, $(EXMPS), $(CC) $(CFLAGS) $(INCS) $(prog).c -o build/$(prog) $(LIBS) || exit $$?;) -- $(AT)$(foreach ext, $(EXTENSIONS), $(foreach prog, $(patsubst $(ext)/examples/%.c, %, $(wildcard $(ext)/examples/*.c)), $(CC) $(CFLAGS) $(INCS) $(ext)/examples/$(prog).c -o build/examples/$(prog) $(LIBS) || exit $$?;)) -+ $(AT)$(foreach prog, $(EXMPS), $(CC) $(CFLAGS) $(INCS) $(prog).c -o build/$(prog) $(LDFLAGS) $(LIBS) || exit $$?;) -+ $(AT)$(foreach ext, $(EXTENSIONS), $(foreach prog, $(patsubst $(ext)/examples/%.c, %, $(wildcard $(ext)/examples/*.c)), $(CC) $(CFLAGS) $(INCS) $(ext)/examples/$(prog).c -o build/examples/$(prog) $(LDFLAGS) $(LIBS) || exit $$?;)) - - $(FLINT_LIB): $(LOBJS) $(LIB_SOURCES) $(EXT_SOURCES) $(HEADERS) $(EXT_HEADERS) | build build/interfaces - $(AT)$(foreach ext, $(EXTENSIONS), $(foreach dir, $(filter-out %templates, $(patsubst $(ext)/%.h, %, $(wildcard $(ext)/*.h))), mkdir -p build/$(dir); BUILD_DIR=$(CURDIR)/build/$(dir); export BUILD_DIR; MOD_DIR=$(dir); export MOD_DIR; $(MAKE) -f $(CURDIR)/Makefile.subdirs -C $(ext)/$(dir) shared || exit $$?;)) -@@ -227,7 +227,7 @@ build/%.o: %.c $(HEADERS) | build - $(QUIET_CC) $(CC) $(CFLAGS) $(INCS) -c $< -o $@; - - build/test/%$(EXEEXT): test/%.c $(HEADERS) | build/test -- $(QUIET_CC) $(CC) $(CFLAGS) $(INCS) $< -o $@ $(LIBS) -+ $(QUIET_CC) $(CC) $(CFLAGS) $(INCS) $< -o $@ $(LDFLAGS) $(LIBS) - - build/test: - mkdir -p build/test -@@ -242,7 +242,7 @@ build/interfaces/NTL-interface.o: interf - $(QUIET_CXX) $(CXX) $(CXXFLAGS) $(INCS) -c $< -o $@ - - build/interfaces/test/t-NTL-interface$(EXEEXT): interfaces/test/t-NTL-interface.cpp build/interfaces/NTL-interface.o -- $(QUIET_CXX) $(CXX) $(CXXFLAGS) $(INCS) $< build/interfaces/NTL-interface.o -o $@ $(LIBS) -+ $(QUIET_CXX) $(CXX) $(CXXFLAGS) $(INCS) $< build/interfaces/NTL-interface.o -o $@ $(LDFLAGS) $(LIBS) - - print-%: - @echo '$*=$($*)' ---- flint-2.5.2/Makefile.subdirs.orig 2015-08-13 10:16:22.000000000 -0600 -+++ flint-2.5.2/Makefile.subdirs 2017-03-10 10:38:48.092631573 -0700 -@@ -48,10 +48,10 @@ profile: $(PROFS) - -include $(patsubst %, %.d, $(PROFS)) - - $(BUILD_DIR)/profile/%$(EXEEXT): profile/%.c $(BUILD_DIR)/../profiler.o -- $(QUIET_CC) $(CC) $(CFLAGS) -std=gnu99 $(INCS) $< $(BUILD_DIR)/../profiler.o -o $@ $(LIBS) -MMD -MP -MF $@.d -MT "$@" -MT "$@.d" -+ $(QUIET_CC) $(CC) $(CFLAGS) -std=gnu99 $(INCS) $< $(BUILD_DIR)/../profiler.o -o $@ $(LDFLAGS) $(LIBS) -MMD -MP -MF $@.d -MT "$@" -MT "$@.d" - - tune: $(TUNE_SOURCES) $(HEADERS) -- $(AT)$(foreach prog, $(TUNE), $(CC) $(CFLAGS) $(INCS) $(prog).c -o $(BUILD_DIR)/$(prog) $(LIBS) || exit $$?;) -+ $(AT)$(foreach prog, $(TUNE), $(CC) $(CFLAGS) $(INCS) $(prog).c -o $(BUILD_DIR)/$(prog) $(LDFLAGS) $(LIBS) || exit $$?;) - - -include $(OBJS:.o=.d) - -@@ -82,10 +82,10 @@ $(BUILD_DIR)/test/%$(EXEEXT): $(BUILD_DI - endif - - $(BUILD_DIR)/test/%$(EXEEXT): test/%.c $(BUILD_DIR)/../../test_helpers.o -- $(QUIET_CC) $(CC) $(CFLAGS) $(INCS) $< $(BUILD_DIR)/../../test_helpers.o -o $@ $(LIBS) -MMD -MP -MF $@.d -MT "$@" -MT "$@.d" -+ $(QUIET_CC) $(CC) $(CFLAGS) $(INCS) $< $(BUILD_DIR)/../../test_helpers.o -o $@ $(LDFLAGS) $(LIBS) -MMD -MP -MF $@.d -MT "$@" -MT "$@.d" - - $(BUILD_DIR)/test/%$(EXEEXT): test/%.cpp $(BUILD_DIR)/../../test_helpers.o -- $(QUIET_CC) $(CXX) $(CFLAGS) $(INCS) $< $(BUILD_DIR)/../../test_helpers.o -o $@ $(LIBS) -MMD -MP -MF $@.d -MT "$@" -MT "$@.d" -+ $(QUIET_CC) $(CXX) $(CFLAGS) $(INCS) $< $(BUILD_DIR)/../../test_helpers.o -o $@ $(LDFLAGS) $(LIBS) -MMD -MP -MF $@.d -MT "$@" -MT "$@.d" - - %_RUN: % - @$< diff --git a/flint-20200414.patch b/flint-20200414.patch new file mode 100644 index 0000000..494f4c1 --- /dev/null +++ b/flint-20200414.patch @@ -0,0 +1,391 @@ +--- aprcl/test/t-unity_zp_reduce_cyclotomic.c ++++ aprcl/test/t-unity_zp_reduce_cyclotomic.c +@@ -72,6 +72,7 @@ int main(void) + abort(); + } + ++ fmpz_clear(n); + fmpz_mod_poly_clear(cyclo_poly); + unity_zp_clear(f); + unity_zp_clear(g); +--- fmpq_mpoly/test/t-get_set_term_coeff_fmpq.c ++++ fmpq_mpoly/test/t-get_set_term_coeff_fmpq.c +@@ -41,7 +41,12 @@ main(void) + + fmpq_mpoly_randtest_bits(f, state, len, coeff_bits, exp_bits, ctx); + if (fmpq_mpoly_length(f, ctx) == WORD(0)) ++ { ++ fmpq_mpoly_clear(f, ctx); ++ fmpq_clear(c); ++ fmpq_clear(d); + continue; ++ } + + for (j = 0; j < 10; j++) + { +--- fmpq_mpoly/test/t-get_set_term_exp_fmpz.c ++++ fmpq_mpoly/test/t-get_set_term_exp_fmpz.c +@@ -43,7 +43,10 @@ main(void) + + fmpq_mpoly_randtest_bits(f, state, len, coeff_bits, exp_bits, ctx); + if (fmpq_mpoly_length(f, ctx) == 0) ++ { ++ fmpq_mpoly_clear(f, ctx); + continue; ++ } + + for (j = 0; j < 10; j++) + { +--- fmpz_factor/pollard_brent.c ++++ fmpz_factor/pollard_brent.c +@@ -143,6 +143,7 @@ fmpz_factor_pollard_brent(fmpz_t p_factor, flint_rand_t state, fmpz_t n_in, + fmpz_clear(fa); + fmpz_clear(fy); + fmpz_clear(maxa); ++ fmpz_clear(maxy); + + TMP_END; + +--- fmpz_factor/test/t-pollard_brent_single.c ++++ fmpz_factor/test/t-pollard_brent_single.c +@@ -94,6 +94,10 @@ int main(void) + fmpz_clear(primeprod); + fmpz_clear(fac); + fmpz_clear(modval); ++ fmpz_clear(a); ++ fmpz_clear(y); ++ fmpz_clear(maxa); ++ fmpz_clear(maxy); + + flint_printf("PASS\n"); + return 0; +--- fmpz_mat/test/t-hnf_minors_transform.c ++++ fmpz_mat/test/t-hnf_minors_transform.c +@@ -87,6 +87,8 @@ main(void) + abort(); + } + ++ fmpz_mat_clear(UA); ++ fmpz_mat_clear(U); + fmpz_mat_clear(H2); + fmpz_mat_clear(H); + fmpz_mat_clear(A); +--- fmpz_mod_poly/compose_mod_brent_kung_vec_preinv.c ++++ fmpz_mod_poly/compose_mod_brent_kung_vec_preinv.c +@@ -145,6 +145,7 @@ fmpz_mod_poly_compose_mod_brent_kung_vec_preinv(fmpz_mod_poly_struct * res, + { + for (i = 0; i < n; i++) + { ++ fmpz_mod_poly_clear(res + i); + fmpz_mod_poly_init(res + i, &poly->p); + fmpz_mod_poly_zero(res + i); + } +@@ -156,6 +157,7 @@ fmpz_mod_poly_compose_mod_brent_kung_vec_preinv(fmpz_mod_poly_struct * res, + { + for (i = 0; i < n; i++) + { ++ fmpz_mod_poly_clear(res + i); + fmpz_mod_poly_init(res + i, &poly->p); + fmpz_mod_poly_set(res + i, polys + i); + } +--- fmpz_mod_poly/test/t-print_read.c ++++ fmpz_mod_poly/test/t-print_read.c +@@ -101,6 +101,9 @@ int main(void) + } + } + ++ for (j = 0; j < n; j++) ++ fmpz_mod_poly_clear(a[j]); ++ flint_free(a); + fclose(out); + exit(0); + } +--- fmpz_mod_poly/test/t-product_roots_fmpz_vec.c ++++ fmpz_mod_poly/test/t-product_roots_fmpz_vec.c +@@ -80,6 +80,7 @@ main(void) + fmpz_poly_clear(Q); + fmpz_poly_clear(tmp); + _fmpz_vec_clear(x, n); ++ fmpz_clear(mod); + } + + FLINT_TEST_CLEANUP(state); +--- fmpz_mpoly/test/t-get_set_term_exp_fmpz.c ++++ fmpz_mpoly/test/t-get_set_term_exp_fmpz.c +@@ -45,7 +45,11 @@ main(void) + + fmpz_mpoly_randtest_bits(f, state, len, coeff_bits, exp_bits, ctx); + if (f->length == WORD(0)) ++ { ++ fmpz_mpoly_clear(f, ctx); ++ fmpz_mpoly_ctx_clear(ctx); + continue; ++ } + + for (j = 0; j < 10; j++) + { +--- fmpz_poly/div_basecase.c ++++ fmpz_poly/div_basecase.c +@@ -56,6 +56,7 @@ _fmpz_poly_div_basecase(fmpz * Q, fmpz * R, const fmpz * A, slong lenA, + { + if (exact && !fmpz_is_zero(R + lenA - 1)) + { ++ fmpz_clear(r); + if (alloc) + _fmpz_vec_clear(R, alloc); + +@@ -71,8 +72,9 @@ _fmpz_poly_div_basecase(fmpz * Q, fmpz * R, const fmpz * A, slong lenA, + + if (!fmpz_is_zero(r)) + { ++ fmpz_clear(r); + if (alloc) +- _fmpz_vec_clear(R, alloc); ++ _fmpz_vec_clear(R, alloc); + + return 0; + } +--- fmpz_poly/div_series_divconquer.c ++++ fmpz_poly/div_series_divconquer.c +@@ -27,7 +27,7 @@ _fmpz_poly_div_series_divconquer(fmpz * Q, const fmpz * A, slong Alen, + if (!_fmpz_poly_div(Q, Arev, 2*n - 1, Brev, n, 1)) + { + _fmpz_vec_clear(Arev, 2*n - 1); +- _fmpz_vec_clear(Brev, n - 1); ++ _fmpz_vec_clear(Brev, n); + + flint_printf("Not an exact division\n"); + flint_abort(); +@@ -36,7 +36,7 @@ _fmpz_poly_div_series_divconquer(fmpz * Q, const fmpz * A, slong Alen, + _fmpz_poly_reverse(Q, Q, n, n); + + _fmpz_vec_clear(Arev, 2*n - 1); +- _fmpz_vec_clear(Brev, n - 1); ++ _fmpz_vec_clear(Brev, n); + } + + void fmpz_poly_div_series_divconquer(fmpz_poly_t Q, const fmpz_poly_t A, +--- fmpz_poly/mullow_SS_precache.c ++++ fmpz_poly/mullow_SS_precache.c +@@ -145,6 +145,7 @@ void _fmpz_poly_mullow_SS_precache(fmpz * output, const fmpz * input1, + len_out, t1, t2, s1, tt); + + _fmpz_vec_set_fft(output, trunc, ii, pre->limbs, 1); /* write output */ ++ flint_free(ii); + } + + void +--- fq_embed_templates/test/t-composition_matrix.c ++++ fq_embed_templates/test/t-composition_matrix.c +@@ -39,7 +39,10 @@ main(void) + TEMPLATE(T, ctx_randtest)(ctx, state); + d = TEMPLATE(T, ctx_degree)(ctx); + if (d == 1) ++ { ++ TEMPLATE(T, ctx_clear)(ctx); + continue; ++ } + modulus = TEMPLATE(T, ctx_modulus)(ctx); + + TEMPLATE(T, init)(frob, ctx); +--- fq_embed_templates/test/t-embed_matrices.c ++++ fq_embed_templates/test/t-embed_matrices.c +@@ -86,6 +86,7 @@ main(void) + n = m*j; + if (m == 1) { + i--; ++ TEMPLATE(T, ctx_clear)(ctx1); + continue; + } + modulus = TEMPLATE(T, ctx_modulus)(ctx1); +--- fq_mat_templates/charpoly_danilevsky.c ++++ fq_mat_templates/charpoly_danilevsky.c +@@ -189,6 +189,8 @@ TEMPLATE(T, mat_charpoly_danilevsky) (TEMPLATE(T, poly_t) p, + + cleanup: + ++ TEMPLATE(T, clear) (c, ctx); ++ TEMPLATE(T, clear) (h, ctx); + TEMPLATE(T, poly_clear) (b, ctx); + _TEMPLATE(T, vec_clear) (T, A->r, ctx); + _TEMPLATE(T, vec_clear) (V, A->r, ctx); +--- fq_mat_templates/lu_classical.c ++++ fq_mat_templates/lu_classical.c +@@ -76,7 +76,10 @@ TEMPLATE(T, mat_lu_classical) (slong * P, + if (TEMPLATE(T, mat_pivot) (A, P, row, col, ctx) == 0) + { + if (rank_check) +- return 0; ++ { ++ rank = 0; ++ goto cleanup; ++ } + col++; + continue; + } +@@ -105,6 +108,7 @@ TEMPLATE(T, mat_lu_classical) (slong * P, + col++; + } + ++cleanup: + TEMPLATE(T, clear) (d, ctx); + TEMPLATE(T, clear) (e, ctx); + TEMPLATE(T, clear) (neg_e, ctx); +--- fq_templates/test/t-multiplicative_order.c ++++ fq_templates/test/t-multiplicative_order.c +@@ -71,24 +71,24 @@ main(void) + fmpz_init(pm1); + + TEMPLATE(T, gen)(X, ctx); +- if (!TEMPLATE(T, is_primitive)(X, ctx)) +- continue; +- +- fmpz_sub_ui(pm1, TEMPLATE(T, ctx_prime)(ctx), 1); +- TEMPLATE(T, pow)(a, X, pm1, ctx); +- result = TEMPLATE(T, multiplicative_order)(ord, a, ctx); +- fmpz_mul(ord, ord, pm1); +- +- TEMPLATE(T, ctx_order)(size, ctx); +- fmpz_sub(size, size, ord); +- +- if (result && !fmpz_is_one(size)) ++ if (TEMPLATE(T, is_primitive)(X, ctx)) + { +- flint_printf("FAIL:\n\n"); +- flint_printf("a = "), TEMPLATE(T, print_pretty)(a, ctx), flint_printf("\n"); +- flint_printf("ord = "), fmpz_print(ord), flint_printf("\n"); +- TEMPLATE(T, ctx_print)(ctx); +- abort(); ++ fmpz_sub_ui(pm1, TEMPLATE(T, ctx_prime)(ctx), 1); ++ TEMPLATE(T, pow)(a, X, pm1, ctx); ++ result = TEMPLATE(T, multiplicative_order)(ord, a, ctx); ++ fmpz_mul(ord, ord, pm1); ++ ++ TEMPLATE(T, ctx_order)(size, ctx); ++ fmpz_sub(size, size, ord); ++ ++ if (result && !fmpz_is_one(size)) ++ { ++ flint_printf("FAIL:\n\n"); ++ flint_printf("a = "), TEMPLATE(T, print_pretty)(a, ctx), flint_printf("\n"); ++ flint_printf("ord = "), fmpz_print(ord), flint_printf("\n"); ++ TEMPLATE(T, ctx_print)(ctx); ++ abort(); ++ } + } + + fmpz_clear(pm1); +--- mpn_extras/test/t-mulmod_preinvn.c ++++ mpn_extras/test/t-mulmod_preinvn.c +@@ -74,6 +74,11 @@ int main(void) + while (size_d && r2->_mp_d[size_d - 1] == 0) size_d--; + r2->_mp_size = size_d; + r2->_mp_alloc = size_d; ++ if (size_d == 0) ++ { ++ flint_free(r2->_mp_d); ++ r2->_mp_d = NULL; ++ } + + mpz_div_2exp(r2, r2, norm); + mpz_div_2exp(a, a, norm); +@@ -93,7 +98,8 @@ int main(void) + abort(); + } + +- flint_free(r2->_mp_d); ++ if (r2->_mp_d != NULL) ++ flint_free(r2->_mp_d); + flint_free(dinv); + } + +--- nmod_mpoly/test/t-mul_array.c ++++ nmod_mpoly/test/t-mul_array.c +@@ -77,6 +77,8 @@ main(void) + nmod_mpoly_clear(g, ctx); + nmod_mpoly_clear(h, ctx); + nmod_mpoly_clear(k, ctx); ++ ++ nmod_mpoly_ctx_clear(ctx); + } + + /* Check aliasing first argument */ +@@ -129,6 +131,8 @@ main(void) + nmod_mpoly_clear(f, ctx); + nmod_mpoly_clear(g, ctx); + nmod_mpoly_clear(h, ctx); ++ ++ nmod_mpoly_ctx_clear(ctx); + } + + /* Check aliasing second argument */ +@@ -181,6 +185,8 @@ main(void) + nmod_mpoly_clear(f, ctx); + nmod_mpoly_clear(g, ctx); + nmod_mpoly_clear(h, ctx); ++ ++ nmod_mpoly_ctx_clear(ctx); + } + + FLINT_TEST_CLEANUP(state); +--- qsieve/test/t-primes_init.c ++++ qsieve/test/t-primes_init.c +@@ -52,12 +52,12 @@ int main(void) + + fmpz_randtest_unsigned(n, state, 130); + +- if (fmpz_is_zero(n) || fmpz_is_one(n)) continue; ++ if (fmpz_is_zero(n) || fmpz_is_one(n)) goto cleanup; + + qsieve_init(qs_inf, n); + small_factor = qsieve_knuth_schroeppel(qs_inf); + +- if (small_factor) continue; ++ if (small_factor) goto cleanup; + + fmpz_mul_ui(qs_inf->kn, qs_inf->n, qs_inf->k); /* haven't calculated earlier */ + small_factor = qsieve_primes_init(qs_inf); +@@ -73,7 +73,7 @@ int main(void) + flint_printf("\n"); + abort(); + } +- else continue; ++ else goto cleanup; + } + + for (j = 3; j < qs_inf->num_primes; j++) +@@ -120,7 +120,7 @@ int main(void) + flint_printf("\n"); + abort(); + } +- else continue; ++ else goto cleanup; + } + + for (j = k; j < qs_inf->num_primes; j++) +@@ -164,7 +164,7 @@ int main(void) + flint_printf("\n"); + abort(); + } +- else continue; ++ else goto cleanup; + } + + for (j = k; j < qs_inf->num_primes; j++) +@@ -208,7 +208,7 @@ int main(void) + flint_printf("\n"); + abort(); + } +- else continue; ++ else goto cleanup; + } + + for (j = k; j < qs_inf->num_primes; j++) +@@ -239,6 +239,7 @@ int main(void) + } + } + ++cleanup: + qsieve_clear(qs_inf); + fmpz_clear(n); + fmpz_clear(x); diff --git a/mathicgb-1.0.patch b/mathicgb-1.0.patch new file mode 100644 index 0000000..a92d072 --- /dev/null +++ b/mathicgb-1.0.patch @@ -0,0 +1,43 @@ +--- src/mathicgb/MonoMonoid.hpp.orig 2018-11-23 16:20:05.000000000 -0700 ++++ src/mathicgb/MonoMonoid.hpp 2020-02-12 13:29:57.348568082 -0700 +@@ -18,6 +18,18 @@ + #include + #include + ++#ifdef _MSC_VER ++// So far as I am aware, Windows runs on little endian CPUs only ++#define le64toh(x) (x) ++#elif defined(__APPLE__) ++#include ++#define le64toh(x) OSSwapLittleToHostInt64(x) ++#elif defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) ++#include ++#else ++#include ++#endif ++ + MATHICGB_NAMESPACE_BEGIN + + /// Implements the monoid of (monic) monomials with integer +@@ -589,6 +601,9 @@ public: + std::memcpy(&A, ptr(a, i*2), 8); + std::memcpy(&B, ptr(b, i*2), 8); + std::memcpy(&AB, ptr(ab, i*2), 8); ++ A = le64toh(A); ++ B = le64toh(B); ++ AB = le64toh(AB); + orOfXor |= AB ^ (A + B); + } + MATHICGB_ASSERT((orOfXor == 0) == isProductOf(a, b, ab)); +@@ -613,6 +628,11 @@ public: + std::memcpy(&B, ptr(b, i*2), 8); + std::memcpy(&A1B, ptr(a1b, i*2), 8); + std::memcpy(&A2B, ptr(a2b, i*2), 8); ++ A1 = le64toh(A1); ++ A2 = le64toh(A2); ++ B = le64toh(B); ++ A1B = le64toh(A1B); ++ A2B = le64toh(A2B); + orOfXor |= (A1B ^ (A1 + B)) | (A2B ^ (A2 + B)); + } + MATHICGB_ASSERT diff --git a/mpfr-3.1.6.patch b/mpfr-3.1.6.patch deleted file mode 100644 index 91277b9..0000000 --- a/mpfr-3.1.6.patch +++ /dev/null @@ -1,399 +0,0 @@ -Upstream mpfr 3.1.6 patches, fetched on 7-Aug-2018 from -http://www.mpfr.org/mpfr-3.1.6/allpatches, then modified slightly because the -Macaulay2 library makefile applies patches with -p0. -diff -Naurd mpfr-3.1.6.orig/PATCHES mpfr-3.1.6/PATCHES ---- mpfr-3.1.6.orig/PATCHES 2017-10-26 13:55:51.168013439 +0000 -+++ mpfr-3.1.6/PATCHES 2017-10-26 13:55:51.236013121 +0000 -@@ -0,0 +1 @@ -+mpfr_get -diff -Naurd mpfr-3.1.6.orig/VERSION mpfr-3.1.6/VERSION ---- mpfr-3.1.6.orig/VERSION 2017-09-07 11:36:44.000000000 +0000 -+++ mpfr-3.1.6/VERSION 2017-10-26 13:55:51.236013121 +0000 -@@ -1 +1 @@ --3.1.6 -+3.1.6-p1 -diff -Naurd mpfr-3.1.6.orig/src/get_ld.c mpfr-3.1.6/src/get_ld.c ---- mpfr-3.1.6.orig/src/get_ld.c 2017-01-01 01:39:09.000000000 +0000 -+++ mpfr-3.1.6/src/get_ld.c 2017-10-26 13:55:51.208013252 +0000 -@@ -41,6 +41,9 @@ - mpfr_exp_t sh; /* exponent shift, so that x/2^sh is in the double range */ - mpfr_t y, z; - int sign; -+ MPFR_SAVE_EXPO_DECL (expo); -+ -+ MPFR_SAVE_EXPO_MARK (expo); - - /* first round x to the target long double precision, so that - all subsequent operations are exact (this avoids double rounding -@@ -103,6 +106,7 @@ - } - if (sign < 0) - r = -r; -+ MPFR_SAVE_EXPO_FREE (expo); - return r; - } - } -diff -Naurd mpfr-3.1.6.orig/src/get_si.c mpfr-3.1.6/src/get_si.c ---- mpfr-3.1.6.orig/src/get_si.c 2017-01-01 01:39:09.000000000 +0000 -+++ mpfr-3.1.6/src/get_si.c 2017-10-26 13:55:51.208013252 +0000 -@@ -28,6 +28,7 @@ - mpfr_prec_t prec; - long s; - mpfr_t x; -+ MPFR_SAVE_EXPO_DECL (expo); - - if (MPFR_UNLIKELY (!mpfr_fits_slong_p (f, rnd))) - { -@@ -39,14 +40,22 @@ - if (MPFR_IS_ZERO (f)) - return (long) 0; - -- /* determine prec of long */ -- for (s = LONG_MIN, prec = 0; s != 0; s /= 2, prec++) -+ /* Determine the precision of long. |LONG_MIN| may have one more bit -+ as an integer, but in this case, this is a power of 2, thus fits -+ in a precision-prec floating-point number. */ -+ for (s = LONG_MAX, prec = 0; s != 0; s /= 2, prec++) - { } - -+ MPFR_SAVE_EXPO_MARK (expo); -+ - /* first round to prec bits */ - mpfr_init2 (x, prec); - mpfr_rint (x, f, rnd); - -+ /* The flags from mpfr_rint are the wanted ones. In particular, -+ it sets the inexact flag when necessary. */ -+ MPFR_SAVE_EXPO_UPDATE_FLAGS (expo, __gmpfr_flags); -+ - /* warning: if x=0, taking its exponent is illegal */ - if (MPFR_UNLIKELY (MPFR_IS_ZERO(x))) - s = 0; -@@ -65,5 +74,7 @@ - - mpfr_clear (x); - -+ MPFR_SAVE_EXPO_FREE (expo); -+ - return s; - } -diff -Naurd mpfr-3.1.6.orig/src/get_sj.c mpfr-3.1.6/src/get_sj.c ---- mpfr-3.1.6.orig/src/get_sj.c 2017-01-01 01:39:09.000000000 +0000 -+++ mpfr-3.1.6/src/get_sj.c 2017-10-26 13:55:51.208013252 +0000 -@@ -35,6 +35,7 @@ - intmax_t r; - mpfr_prec_t prec; - mpfr_t x; -+ MPFR_SAVE_EXPO_DECL (expo); - - if (MPFR_UNLIKELY (!mpfr_fits_intmax_p (f, rnd))) - { -@@ -46,20 +47,24 @@ - if (MPFR_IS_ZERO (f)) - return (intmax_t) 0; - -- /* determine the precision of intmax_t */ -- for (r = MPFR_INTMAX_MIN, prec = 0; r != 0; r /= 2, prec++) -+ /* Determine the precision of intmax_t. |INTMAX_MIN| may have one -+ more bit as an integer, but in this case, this is a power of 2, -+ thus fits in a precision-prec floating-point number. */ -+ for (r = MPFR_INTMAX_MAX, prec = 0; r != 0; r /= 2, prec++) - { } -- /* Note: though INTMAX_MAX would have been sufficient for the conversion, -- we chose INTMAX_MIN so that INTMAX_MIN - 1 is always representable in -- precision prec; this is useful to detect overflows in MPFR_RNDZ (will -- be needed later). */ - -- /* Now, r = 0. */ -+ MPFR_ASSERTD (r == 0); -+ -+ MPFR_SAVE_EXPO_MARK (expo); - - mpfr_init2 (x, prec); - mpfr_rint (x, f, rnd); - MPFR_ASSERTN (MPFR_IS_FP (x)); - -+ /* The flags from mpfr_rint are the wanted ones. In particular, -+ it sets the inexact flag when necessary. */ -+ MPFR_SAVE_EXPO_UPDATE_FLAGS (expo, __gmpfr_flags); -+ - if (MPFR_NOTZERO (x)) - { - mp_limb_t *xp; -@@ -67,15 +72,15 @@ - - xp = MPFR_MANT (x); - sh = MPFR_GET_EXP (x); -- MPFR_ASSERTN ((mpfr_prec_t) sh <= prec); -+ MPFR_ASSERTN ((mpfr_prec_t) sh <= prec + 1); - if (MPFR_INTMAX_MIN + MPFR_INTMAX_MAX != 0 -- && MPFR_UNLIKELY ((mpfr_prec_t) sh == prec)) -+ && MPFR_UNLIKELY ((mpfr_prec_t) sh > prec)) - { - /* 2's complement and x <= INTMAX_MIN: in the case mp_limb_t - has the same size as intmax_t, we cannot use the code in - the for loop since the operations would be performed in - unsigned arithmetic. */ -- MPFR_ASSERTN (MPFR_IS_NEG (x) && (mpfr_powerof2_raw (x))); -+ MPFR_ASSERTN (MPFR_IS_NEG (x) && mpfr_powerof2_raw (x)); - r = MPFR_INTMAX_MIN; - } - else if (MPFR_IS_POS (x)) -@@ -117,6 +122,8 @@ - - mpfr_clear (x); - -+ MPFR_SAVE_EXPO_FREE (expo); -+ - return r; - } - -diff -Naurd mpfr-3.1.6.orig/src/get_ui.c mpfr-3.1.6/src/get_ui.c ---- mpfr-3.1.6.orig/src/get_ui.c 2017-01-01 01:39:09.000000000 +0000 -+++ mpfr-3.1.6/src/get_ui.c 2017-10-26 13:55:51.208013252 +0000 -@@ -30,6 +30,7 @@ - mpfr_t x; - mp_size_t n; - mpfr_exp_t exp; -+ MPFR_SAVE_EXPO_DECL (expo); - - if (MPFR_UNLIKELY (!mpfr_fits_ulong_p (f, rnd))) - { -@@ -44,10 +45,16 @@ - for (s = ULONG_MAX, prec = 0; s != 0; s /= 2, prec ++) - { } - -+ MPFR_SAVE_EXPO_MARK (expo); -+ - /* first round to prec bits */ - mpfr_init2 (x, prec); - mpfr_rint (x, f, rnd); - -+ /* The flags from mpfr_rint are the wanted ones. In particular, -+ it sets the inexact flag when necessary. */ -+ MPFR_SAVE_EXPO_UPDATE_FLAGS (expo, __gmpfr_flags); -+ - /* warning: if x=0, taking its exponent is illegal */ - if (MPFR_IS_ZERO(x)) - s = 0; -@@ -61,5 +68,7 @@ - - mpfr_clear (x); - -+ MPFR_SAVE_EXPO_FREE (expo); -+ - return s; - } -diff -Naurd mpfr-3.1.6.orig/src/get_uj.c mpfr-3.1.6/src/get_uj.c ---- mpfr-3.1.6.orig/src/get_uj.c 2017-01-01 01:39:09.000000000 +0000 -+++ mpfr-3.1.6/src/get_uj.c 2017-10-26 13:55:51.208013252 +0000 -@@ -35,6 +35,7 @@ - uintmax_t r; - mpfr_prec_t prec; - mpfr_t x; -+ MPFR_SAVE_EXPO_DECL (expo); - - if (MPFR_UNLIKELY (!mpfr_fits_uintmax_p (f, rnd))) - { -@@ -50,12 +51,18 @@ - for (r = MPFR_UINTMAX_MAX, prec = 0; r != 0; r /= 2, prec++) - { } - -- /* Now, r = 0. */ -+ MPFR_ASSERTD (r == 0); -+ -+ MPFR_SAVE_EXPO_MARK (expo); - - mpfr_init2 (x, prec); - mpfr_rint (x, f, rnd); - MPFR_ASSERTN (MPFR_IS_FP (x)); - -+ /* The flags from mpfr_rint are the wanted ones. In particular, -+ it sets the inexact flag when necessary. */ -+ MPFR_SAVE_EXPO_UPDATE_FLAGS (expo, __gmpfr_flags); -+ - if (MPFR_NOTZERO (x)) - { - mp_limb_t *xp; -@@ -76,6 +83,8 @@ - - mpfr_clear (x); - -+ MPFR_SAVE_EXPO_FREE (expo); -+ - return r; - } - -diff -Naurd mpfr-3.1.6.orig/src/get_z.c mpfr-3.1.6/src/get_z.c ---- mpfr-3.1.6.orig/src/get_z.c 2017-01-01 01:39:09.000000000 +0000 -+++ mpfr-3.1.6/src/get_z.c 2017-10-26 13:55:51.208013252 +0000 -@@ -29,6 +29,7 @@ - int inex; - mpfr_t r; - mpfr_exp_t exp; -+ MPFR_SAVE_EXPO_DECL (expo); - - if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (f))) - { -@@ -41,6 +42,8 @@ - return 0; - } - -+ MPFR_SAVE_EXPO_MARK (expo); -+ - exp = MPFR_GET_EXP (f); - /* if exp <= 0, then |f|<1, thus |o(f)|<=1 */ - MPFR_ASSERTN (exp < 0 || exp <= MPFR_PREC_MAX); -@@ -50,6 +53,11 @@ - MPFR_ASSERTN (inex != 1 && inex != -1); /* integral part of f is - representable in r */ - MPFR_ASSERTN (MPFR_IS_FP (r)); -+ -+ /* The flags from mpfr_rint are the wanted ones. In particular, -+ it sets the inexact flag when necessary. */ -+ MPFR_SAVE_EXPO_UPDATE_FLAGS (expo, __gmpfr_flags); -+ - exp = mpfr_get_z_2exp (z, r); - if (exp >= 0) - mpz_mul_2exp (z, z, exp); -@@ -57,5 +65,7 @@ - mpz_fdiv_q_2exp (z, z, -exp); - mpfr_clear (r); - -+ MPFR_SAVE_EXPO_FREE (expo); -+ - return inex; - } -diff -Naurd mpfr-3.1.6.orig/src/mpfr.h mpfr-3.1.6/src/mpfr.h ---- mpfr-3.1.6.orig/src/mpfr.h 2017-09-07 11:36:44.000000000 +0000 -+++ mpfr-3.1.6/src/mpfr.h 2017-10-26 13:55:51.232013138 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 6 --#define MPFR_VERSION_STRING "3.1.6" -+#define MPFR_VERSION_STRING "3.1.6-p1" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.6.orig/src/version.c mpfr-3.1.6/src/version.c ---- mpfr-3.1.6.orig/src/version.c 2017-09-07 11:36:44.000000000 +0000 -+++ mpfr-3.1.6/src/version.c 2017-10-26 13:55:51.232013138 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.6"; -+ return "3.1.6-p1"; - } -diff -Naurd mpfr-3.1.6.orig/PATCHES mpfr-3.1.6/PATCHES ---- mpfr-3.1.6.orig/PATCHES 2017-12-15 12:37:44.074256548 +0000 -+++ mpfr-3.1.6/PATCHES 2017-12-15 12:37:44.146256304 +0000 -@@ -0,0 +1 @@ -+root -diff -Naurd mpfr-3.1.6.orig/VERSION mpfr-3.1.6/VERSION ---- mpfr-3.1.6.orig/VERSION 2017-10-26 13:55:51.236013121 +0000 -+++ mpfr-3.1.6/VERSION 2017-12-15 12:37:44.142256319 +0000 -@@ -1 +1 @@ --3.1.6-p1 -+3.1.6-p2 -diff -Naurd mpfr-3.1.6.orig/src/mpfr.h mpfr-3.1.6/src/mpfr.h ---- mpfr-3.1.6.orig/src/mpfr.h 2017-10-26 13:55:51.232013138 +0000 -+++ mpfr-3.1.6/src/mpfr.h 2017-12-15 12:37:44.142256319 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 6 --#define MPFR_VERSION_STRING "3.1.6-p1" -+#define MPFR_VERSION_STRING "3.1.6-p2" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.6.orig/src/root.c mpfr-3.1.6/src/root.c ---- mpfr-3.1.6.orig/src/root.c 2017-01-01 01:39:09.000000000 +0000 -+++ mpfr-3.1.6/src/root.c 2017-12-15 12:37:44.118256398 +0000 -@@ -107,6 +107,11 @@ - MPFR_RET_NAN; - } - -+ /* Special case |x| = 1. Note that if x = -1, then k is odd -+ (NaN results have already been filtered), so that y = -1. */ -+ if (mpfr_cmpabs (x, __gmpfr_one) == 0) -+ return mpfr_set (y, x, rnd_mode); -+ - /* General case */ - - /* For large k, use exp(log(x)/k). The threshold of 100 seems to be quite -@@ -188,6 +193,14 @@ - Assume all special cases have been eliminated before. - In the extended exponent range, overflows/underflows are not possible. - Assume x > 0, or x < 0 and k odd. -+ Also assume |x| <> 1 because log(1) = 0, which does not have an exponent -+ and would yield a failure in the error bound computation. A priori, this -+ constraint is quite artificial because if |x| is close enough to 1, then -+ the exponent of log|x| does not need to be used (in the code, err would -+ be 1 in such a domain). So this constraint |x| <> 1 could be avoided in -+ the code. However, this is an exact case easy to detect, so that such a -+ change would be useless. Values very close to 1 are not an issue, since -+ an underflow is not possible before the MPFR_GET_EXP. - */ - static int - mpfr_root_aux (mpfr_ptr y, mpfr_srcptr x, unsigned long k, mpfr_rnd_t rnd_mode) -@@ -219,7 +232,8 @@ - mpfr_log (t, absx, MPFR_RNDN); - /* t = log|x| * (1 + theta) with |theta| <= 2^(-w) */ - mpfr_div_ui (t, t, k, MPFR_RNDN); -- expt = MPFR_GET_EXP (t); -+ /* No possible underflow in mpfr_log and mpfr_div_ui. */ -+ expt = MPFR_GET_EXP (t); /* assumes t <> 0 */ - /* t = log|x|/k * (1 + theta) + eps with |theta| <= 2^(-w) - and |eps| <= 1/2 ulp(t), thus the total error is bounded - by 1.5 * 2^(expt - w) */ -diff -Naurd mpfr-3.1.6.orig/src/version.c mpfr-3.1.6/src/version.c ---- mpfr-3.1.6.orig/src/version.c 2017-10-26 13:55:51.232013138 +0000 -+++ mpfr-3.1.6/src/version.c 2017-12-15 12:37:44.142256319 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.6-p1"; -+ return "3.1.6-p2"; - } -diff -Naurd mpfr-3.1.6.orig/tests/troot.c mpfr-3.1.6/tests/troot.c ---- mpfr-3.1.6.orig/tests/troot.c 2017-01-01 01:39:09.000000000 +0000 -+++ mpfr-3.1.6/tests/troot.c 2017-12-15 12:37:44.118256398 +0000 -@@ -405,6 +405,26 @@ - mpfr_clears (x, y1, y2, (mpfr_ptr) 0); - } - -+static void -+bug20171214 (void) -+{ -+ mpfr_t x, y; -+ int inex; -+ -+ mpfr_init2 (x, 805); -+ mpfr_init2 (y, 837); -+ mpfr_set_ui (x, 1, MPFR_RNDN); -+ inex = mpfr_root (y, x, 120, MPFR_RNDN); -+ MPFR_ASSERTN (inex == 0); -+ MPFR_ASSERTN (mpfr_cmp_ui (y, 1) == 0); -+ mpfr_set_si (x, -1, MPFR_RNDN); -+ inex = mpfr_root (y, x, 121, MPFR_RNDN); -+ MPFR_ASSERTN (inex == 0); -+ MPFR_ASSERTN (mpfr_cmp_si (y, -1) == 0); -+ mpfr_clear (x); -+ mpfr_clear (y); -+} -+ - int - main (void) - { -@@ -415,6 +435,7 @@ - - tests_start_mpfr (); - -+ bug20171214 (); - exact_powers (3, 1000); - special (); - bigint (); diff --git a/mpfr-4.0.2.patch b/mpfr-4.0.2.patch new file mode 100644 index 0000000..15d7526 --- /dev/null +++ b/mpfr-4.0.2.patch @@ -0,0 +1,1614 @@ +--- mpfr-4.0.2/PATCHES 2019-06-02 17:05:36.121226916 +0000 ++++ mpfr-4.0.2/PATCHES 2019-06-02 17:05:36.157226621 +0000 +@@ -0,0 +1 @@ ++include-float +--- mpfr-4.0.2/VERSION 2019-01-31 20:29:48.000000000 +0000 ++++ mpfr-4.0.2/VERSION 2019-06-02 17:05:36.157226621 +0000 +@@ -1 +1 @@ +-4.0.2 ++4.0.2-p1 +--- mpfr-4.0.2/src/mpfr-impl.h 2019-01-27 18:30:16.000000000 +0000 ++++ mpfr-4.0.2/src/mpfr-impl.h 2019-06-02 17:05:36.145226719 +0000 +@@ -57,6 +57,7 @@ + + #include + #include ++#include /* for FLT_RADIX, etc., tested below */ + + + /****************************************************** +--- mpfr-4.0.2/src/mpfr.h 2019-01-31 20:29:48.000000000 +0000 ++++ mpfr-4.0.2/src/mpfr.h 2019-06-02 17:05:36.153226653 +0000 +@@ -27,7 +27,7 @@ + #define MPFR_VERSION_MAJOR 4 + #define MPFR_VERSION_MINOR 0 + #define MPFR_VERSION_PATCHLEVEL 2 +-#define MPFR_VERSION_STRING "4.0.2" ++#define MPFR_VERSION_STRING "4.0.2-p1" + + /* User macros: + MPFR_USE_FILE: Define it to make MPFR define functions dealing +--- mpfr-4.0.2/src/version.c 2019-01-31 20:29:48.000000000 +0000 ++++ mpfr-4.0.2/src/version.c 2019-06-02 17:05:36.153226653 +0000 +@@ -25,5 +25,5 @@ + const char * + mpfr_get_version (void) + { +- return "4.0.2"; ++ return "4.0.2-p1"; + } +--- mpfr-4.0.2/PATCHES 2020-03-30 13:02:08.103248669 +0000 ++++ mpfr-4.0.2/PATCHES 2020-03-30 13:02:08.143248189 +0000 +@@ -0,0 +1 @@ ++int-overflow +--- mpfr-4.0.2/VERSION 2019-06-02 17:05:36.157226621 +0000 ++++ mpfr-4.0.2/VERSION 2020-03-30 13:02:08.143248189 +0000 +@@ -1 +1 @@ +-4.0.2-p1 ++4.0.2-p2 +--- mpfr-4.0.2/src/agm.c 2019-01-07 13:53:20.000000000 +0000 ++++ mpfr-4.0.2/src/agm.c 2020-03-30 13:02:08.131248333 +0000 +@@ -220,7 +220,7 @@ + mpfr_add (vf, u, v, MPFR_RNDN); /* No overflow? */ + mpfr_div_2ui (vf, vf, 1, MPFR_RNDN); + /* See proof in algorithms.tex */ +- if (4*eq > p) ++ if (eq > p / 4) + { + mpfr_t w; + MPFR_BLOCK_DECL (flags3); +--- mpfr-4.0.2/src/mpfr.h 2019-06-02 17:05:36.153226653 +0000 ++++ mpfr-4.0.2/src/mpfr.h 2020-03-30 13:02:08.143248189 +0000 +@@ -27,7 +27,7 @@ + #define MPFR_VERSION_MAJOR 4 + #define MPFR_VERSION_MINOR 0 + #define MPFR_VERSION_PATCHLEVEL 2 +-#define MPFR_VERSION_STRING "4.0.2-p1" ++#define MPFR_VERSION_STRING "4.0.2-p2" + + /* User macros: + MPFR_USE_FILE: Define it to make MPFR define functions dealing +--- mpfr-4.0.2/src/pow.c 2019-01-07 13:53:20.000000000 +0000 ++++ mpfr-4.0.2/src/pow.c 2020-03-30 13:02:08.131248333 +0000 +@@ -34,8 +34,7 @@ + mpfr_rnd_t rnd_mode, int *inexact) + { + mpz_t a, c; +- mpfr_exp_t d, b; +- unsigned long i; ++ mpfr_exp_t d, b, i; + int res; + + MPFR_ASSERTD (!MPFR_IS_SINGULAR (y)); +@@ -48,7 +47,9 @@ + if (MPFR_IS_NEG (y)) + return 0; /* x is not a power of two => x^-y is not exact */ + +- /* compute d such that y = c*2^d with c odd integer */ ++ /* Compute d such that y = c*2^d with c odd integer. ++ Since c comes from a regular MPFR number, due to the constraints on the ++ exponent and the precision, there can be no integer overflow below. */ + mpz_init (c); + d = mpfr_get_z_2exp (c, y); + i = mpz_scan1 (c, 0); +@@ -58,7 +59,9 @@ + /* Since y is not an integer, d is necessarily < 0 */ + MPFR_ASSERTD (d < 0); + +- /* Compute a,b such that x=a*2^b */ ++ /* Compute a,b such that x=a*2^b. ++ Since a comes from a regular MPFR number, due to the constrainst on the ++ exponent and the precision, there can be no integer overflow below. */ + mpz_init (a); + b = mpfr_get_z_2exp (a, x); + i = mpz_scan1 (a, 0); +--- mpfr-4.0.2/src/rem1.c 2019-01-07 13:53:20.000000000 +0000 ++++ mpfr-4.0.2/src/rem1.c 2020-03-30 13:02:08.131248333 +0000 +@@ -100,9 +100,11 @@ + mpz_abs (my, my); + q_is_odd = 0; + +- /* divide my by 2^k if possible to make operations mod my easier */ ++ /* Divide my by 2^k if possible to make operations mod my easier. ++ Since my comes from a regular MPFR number, due to the constraints on the ++ exponent and the precision, there can be no integer overflow below. */ + { +- unsigned long k = mpz_scan1 (my, 0); ++ mpfr_exp_t k = mpz_scan1 (my, 0); + ey += k; + mpz_fdiv_q_2exp (my, my, k); + } +--- mpfr-4.0.2/src/version.c 2019-06-02 17:05:36.153226653 +0000 ++++ mpfr-4.0.2/src/version.c 2020-03-30 13:02:08.143248189 +0000 +@@ -25,5 +25,5 @@ + const char * + mpfr_get_version (void) + { +- return "4.0.2-p1"; ++ return "4.0.2-p2"; + } +--- mpfr-4.0.2/PATCHES 2020-03-30 13:05:16.224990169 +0000 ++++ mpfr-4.0.2/PATCHES 2020-03-30 13:05:16.264989689 +0000 +@@ -0,0 +1 @@ ++set-int +--- mpfr-4.0.2/VERSION 2020-03-30 13:02:08.143248189 +0000 ++++ mpfr-4.0.2/VERSION 2020-03-30 13:05:16.264989689 +0000 +@@ -1 +1 @@ +-4.0.2-p2 ++4.0.2-p3 +--- mpfr-4.0.2/src/mpfr.h 2020-03-30 13:02:08.143248189 +0000 ++++ mpfr-4.0.2/src/mpfr.h 2020-03-30 13:05:16.260989737 +0000 +@@ -27,7 +27,7 @@ + #define MPFR_VERSION_MAJOR 4 + #define MPFR_VERSION_MINOR 0 + #define MPFR_VERSION_PATCHLEVEL 2 +-#define MPFR_VERSION_STRING "4.0.2-p2" ++#define MPFR_VERSION_STRING "4.0.2-p3" + + /* User macros: + MPFR_USE_FILE: Define it to make MPFR define functions dealing +--- mpfr-4.0.2/src/set_si_2exp.c 2019-01-07 13:53:20.000000000 +0000 ++++ mpfr-4.0.2/src/set_si_2exp.c 2020-03-30 13:05:16.248989881 +0000 +@@ -40,6 +40,15 @@ + mp_limb_t ai, *xp; + int inex = 0; + ++ /* Early underflow/overflow checking is necessary to avoid ++ integer overflow or errors due to special exponent values. */ ++ if (MPFR_UNLIKELY (e < __gmpfr_emin - (mpfr_exp_t) ++ (sizeof (unsigned long) * CHAR_BIT + 1))) ++ return mpfr_underflow (x, rnd_mode == MPFR_RNDN ? ++ MPFR_RNDZ : rnd_mode, i < 0 ? -1 : 1); ++ if (MPFR_UNLIKELY (e >= __gmpfr_emax)) ++ return mpfr_overflow (x, rnd_mode, i < 0 ? -1 : 1); ++ + /* FIXME: support int limbs (e.g. 16-bit limbs on 16-bit proc) */ + ai = SAFE_ABS (unsigned long, i); + MPFR_ASSERTN (SAFE_ABS (unsigned long, i) == ai); +--- mpfr-4.0.2/src/set_ui_2exp.c 2019-01-07 13:53:20.000000000 +0000 ++++ mpfr-4.0.2/src/set_ui_2exp.c 2020-03-30 13:05:16.248989881 +0000 +@@ -41,6 +41,15 @@ + mp_limb_t *xp; + int inex = 0; + ++ /* Early underflow/overflow checking is necessary to avoid ++ integer overflow or errors due to special exponent values. */ ++ if (MPFR_UNLIKELY (e < __gmpfr_emin - (mpfr_exp_t) ++ (sizeof (unsigned long) * CHAR_BIT + 1))) ++ return mpfr_underflow (x, rnd_mode == MPFR_RNDN ? ++ MPFR_RNDZ : rnd_mode, i < 0 ? -1 : 1); ++ if (MPFR_UNLIKELY (e >= __gmpfr_emax)) ++ return mpfr_overflow (x, rnd_mode, i < 0 ? -1 : 1); ++ + /* FIXME: support int limbs (e.g. 16-bit limbs on 16-bit proc) */ + MPFR_ASSERTD (i == (mp_limb_t) i); + +--- mpfr-4.0.2/src/set_uj.c 2019-01-07 13:53:20.000000000 +0000 ++++ mpfr-4.0.2/src/set_uj.c 2020-03-30 13:05:16.248989881 +0000 +@@ -41,7 +41,7 @@ + int + mpfr_set_uj_2exp (mpfr_t x, uintmax_t j, intmax_t e, mpfr_rnd_t rnd) + { +- int cnt; ++ int cnt, inex; + mp_size_t i, k; + mp_limb_t limb; + mp_limb_t yp[uintmaxpml]; +@@ -57,6 +57,10 @@ + MPFR_RET(0); + } + ++ /* early overflow detection to avoid a possible integer overflow below */ ++ if (MPFR_UNLIKELY(e >= __gmpfr_emax)) ++ return mpfr_overflow (x, rnd, MPFR_SIGN_POS); ++ + MPFR_ASSERTN (sizeof(uintmax_t) % sizeof(mp_limb_t) == 0); + + /* Create an auxiliary var */ +@@ -107,7 +111,9 @@ + e += k * GMP_NUMB_BITS - cnt; /* Update Expo */ + MPFR_ASSERTD (MPFR_LIMB_MSB(yp[numberof (yp) - 1]) != 0); + +- /* Check expo underflow / overflow (can't use mpfr_check_range) */ ++ MPFR_RNDRAW (inex, x, yp, uintmax_bit_size, rnd, MPFR_SIGN_POS, e++); ++ ++ /* Check expo underflow / overflow */ + if (MPFR_UNLIKELY(e < __gmpfr_emin)) + { + /* The following test is necessary because in the rounding to the +@@ -116,16 +122,18 @@ + * _ |x| < 2^(emin-2), or + * _ |x| = 2^(emin-2) and the absolute value of the exact + * result is <= 2^(emin-2). */ +- if (rnd == MPFR_RNDN && (e+1 < __gmpfr_emin || mpfr_powerof2_raw(y))) ++ if (rnd == MPFR_RNDN && ++ (e + 1 < __gmpfr_emin || ++ (mpfr_powerof2_raw (x) && inex >= 0))) + rnd = MPFR_RNDZ; + return mpfr_underflow (x, rnd, MPFR_SIGN_POS); + } + if (MPFR_UNLIKELY(e > __gmpfr_emax)) + return mpfr_overflow (x, rnd, MPFR_SIGN_POS); +- MPFR_SET_EXP (y, e); + +- /* Final: set x to y (rounding if necessary) */ +- return mpfr_set (x, y, rnd); ++ MPFR_SET_SIGN (x, MPFR_SIGN_POS); ++ MPFR_SET_EXP (x, e); ++ MPFR_RET (inex); + } + + #endif +--- mpfr-4.0.2/src/version.c 2020-03-30 13:02:08.143248189 +0000 ++++ mpfr-4.0.2/src/version.c 2020-03-30 13:05:16.264989689 +0000 +@@ -25,5 +25,5 @@ + const char * + mpfr_get_version (void) + { +- return "4.0.2-p2"; ++ return "4.0.2-p3"; + } +--- mpfr-4.0.2/tests/tset_si.c 2019-01-07 13:53:20.000000000 +0000 ++++ mpfr-4.0.2/tests/tset_si.c 2020-03-30 13:05:16.248989881 +0000 +@@ -90,6 +90,135 @@ + mpfr_clear (x); + } + ++#define REXP 1024 ++ ++static void ++test_2exp_extreme_aux (void) ++{ ++ mpfr_t x1, x2, y; ++ mpfr_exp_t e, ep[1 + 8 * 5], eb[] = ++ { MPFR_EMIN_MIN, -REXP, REXP, MPFR_EMAX_MAX, MPFR_EXP_MAX }; ++ mpfr_flags_t flags1, flags2; ++ int i, j, rnd, inex1, inex2; ++ char s; ++ ++ ep[0] = MPFR_EXP_MIN; ++ for (i = 0; i < numberof(eb); i++) ++ for (j = 0; j < 8; j++) ++ ep[1 + 8 * i + j] = eb[i] - j; ++ ++ mpfr_inits2 (3, x1, x2, (mpfr_ptr) 0); ++ mpfr_init2 (y, 32); ++ ++ for (i = 0; i < numberof(ep); i++) ++ for (j = -31; j <= 31; j++) ++ RND_LOOP_NO_RNDF (rnd) ++ { ++ int sign = j < 0 ? -1 : 1; ++ ++ /* Compute the expected value, inex and flags */ ++ inex1 = mpfr_set_si (y, j, MPFR_RNDN); ++ MPFR_ASSERTN (inex1 == 0); ++ inex1 = mpfr_set (x1, y, (mpfr_rnd_t) rnd); ++ /* x1 is the rounded value and inex1 the ternary value, ++ assuming that the exponent argument is 0 (this is the ++ rounded significand of the final result, assuming an ++ unbounded exponent range). The multiplication by a ++ power of 2 is exact, unless underflow/overflow occurs. ++ The tests on the exponent below avoid integer overflows ++ (ep[i] may take extreme values). */ ++ e = mpfr_get_exp (x1); ++ mpfr_clear_flags (); ++ if (j != 0 && ep[i] < __gmpfr_emin - e) /* underflow */ ++ { ++ mpfr_rnd_t r = ++ (rnd == MPFR_RNDN && ++ (ep[i] < __gmpfr_emin - mpfr_get_exp (y) - 1 || ++ IS_POW2 (sign * j))) ? ++ MPFR_RNDZ : (mpfr_rnd_t) rnd; ++ inex1 = mpfr_underflow (x1, r, sign); ++ flags1 = __gmpfr_flags; ++ } ++ else if (j != 0 && ep[i] > __gmpfr_emax - e) /* overflow */ ++ { ++ inex1 = mpfr_overflow (x1, (mpfr_rnd_t) rnd, sign); ++ flags1 = __gmpfr_flags; ++ } ++ else ++ { ++ if (j != 0) ++ mpfr_set_exp (x1, ep[i] + e); ++ flags1 = inex1 != 0 ? MPFR_FLAGS_INEXACT : 0; ++ } ++ ++ /* Test mpfr_set_si_2exp */ ++ mpfr_clear_flags (); ++ inex2 = mpfr_set_si_2exp (x2, j, ep[i], (mpfr_rnd_t) rnd); ++ flags2 = __gmpfr_flags; ++ ++ if (! (flags1 == flags2 && SAME_SIGN (inex1, inex2) && ++ mpfr_equal_p (x1, x2))) ++ { ++ s = 's'; ++ goto err_extreme; ++ } ++ ++ if (j < 0) ++ continue; ++ ++ /* Test mpfr_set_ui_2exp */ ++ mpfr_clear_flags (); ++ inex2 = mpfr_set_ui_2exp (x2, j, ep[i], (mpfr_rnd_t) rnd); ++ flags2 = __gmpfr_flags; ++ ++ if (! (flags1 == flags2 && SAME_SIGN (inex1, inex2) && ++ mpfr_equal_p (x1, x2))) ++ { ++ s = 'u'; ++ err_extreme: ++ printf ("Error in extreme mpfr_set_%ci_2exp for i=%d j=%d %s\n", ++ s, i, j, mpfr_print_rnd_mode ((mpfr_rnd_t) rnd)); ++ printf ("emin=%" MPFR_EXP_FSPEC "d " ++ "emax=%" MPFR_EXP_FSPEC "d\n", ++ (mpfr_eexp_t) __gmpfr_emin, ++ (mpfr_eexp_t) __gmpfr_emax); ++ printf ("ep[%d] = %" MPFR_EXP_FSPEC "d\n", ++ i, (mpfr_eexp_t) ep[i]); ++ printf ("Expected "); ++ mpfr_dump (x1); ++ printf ("with inex = %d and flags =", inex1); ++ flags_out (flags1); ++ printf ("Got "); ++ mpfr_dump (x2); ++ printf ("with inex = %d and flags =", inex2); ++ flags_out (flags2); ++ exit (1); ++ } ++ } ++ ++ mpfr_clears (x1, x2, y, (mpfr_ptr) 0); ++} ++ ++static void ++test_2exp_extreme (void) ++{ ++ mpfr_exp_t emin, emax; ++ ++ emin = mpfr_get_emin (); ++ emax = mpfr_get_emax (); ++ ++ set_emin (MPFR_EMIN_MIN); ++ set_emax (MPFR_EMAX_MAX); ++ test_2exp_extreme_aux (); ++ ++ set_emin (-REXP); ++ set_emax (REXP); ++ test_2exp_extreme_aux (); ++ ++ set_emin (emin); ++ set_emax (emax); ++} ++ + static void + test_macros (void) + { +@@ -639,6 +768,7 @@ + mpfr_clear (x); + + test_2exp (); ++ test_2exp_extreme (); + test_macros (); + test_macros_keyword (); + test_get_ui_smallneg (); +--- mpfr-4.0.2/tests/tset_sj.c 2019-01-07 13:53:20.000000000 +0000 ++++ mpfr-4.0.2/tests/tset_sj.c 2020-03-30 13:05:16.248989881 +0000 +@@ -176,6 +176,154 @@ + mpfr_clear (x); + } + ++#define REXP 1024 ++ ++static void ++test_2exp_extreme_aux (void) ++{ ++ mpfr_t x1, x2, y; ++ mpfr_exp_t e, ep[1 + 8 * 5], eb[] = ++ { MPFR_EMIN_MIN, -REXP, REXP, MPFR_EMAX_MAX, MPFR_EXP_MAX }; ++ mpfr_flags_t flags1, flags2; ++ int i, j, rnd, inex1, inex2; ++ char s; ++ ++ ep[0] = MPFR_EXP_MIN; ++ for (i = 0; i < numberof(eb); i++) ++ for (j = 0; j < 8; j++) ++ ep[1 + 8 * i + j] = eb[i] - j; ++ ++ mpfr_inits2 (3, x1, x2, (mpfr_ptr) 0); ++ mpfr_init2 (y, 32); ++ ++ /* The cast to int is needed if numberof(ep) is of unsigned type, in ++ which case the condition without the cast would be always false. */ ++ for (i = -2; i < (int) numberof(ep); i++) ++ for (j = -31; j <= 31; j++) ++ RND_LOOP_NO_RNDF (rnd) ++ { ++ int sign = j < 0 ? -1 : 1; ++ intmax_t em; ++ ++ if (i < 0) ++ { ++ em = i == -2 ? INTMAX_MIN : INTMAX_MAX; ++ mpfr_clear_flags (); ++ inex1 = j == 0 ? ++ (mpfr_set_zero (x1, +1), 0) : i == -2 ? ++ mpfr_underflow (x1, rnd == MPFR_RNDN ? ++ MPFR_RNDZ : (mpfr_rnd_t) rnd, sign) : ++ mpfr_overflow (x1, (mpfr_rnd_t) rnd, sign); ++ flags1 = __gmpfr_flags; ++ } ++ else ++ { ++ em = ep[i]; ++ /* Compute the expected value, inex and flags */ ++ inex1 = mpfr_set_si (y, j, MPFR_RNDN); ++ MPFR_ASSERTN (inex1 == 0); ++ inex1 = mpfr_set (x1, y, (mpfr_rnd_t) rnd); ++ /* x1 is the rounded value and inex1 the ternary value, ++ assuming that the exponent argument is 0 (this is the ++ rounded significand of the final result, assuming an ++ unbounded exponent range). The multiplication by a ++ power of 2 is exact, unless underflow/overflow occurs. ++ The tests on the exponent below avoid integer overflows ++ (ep[i] may take extreme values). */ ++ e = mpfr_get_exp (x1); ++ mpfr_clear_flags (); ++ if (j != 0 && ep[i] < __gmpfr_emin - e) /* underflow */ ++ { ++ mpfr_rnd_t r = ++ (rnd == MPFR_RNDN && ++ (ep[i] < __gmpfr_emin - mpfr_get_exp (y) - 1 || ++ IS_POW2 (sign * j))) ? ++ MPFR_RNDZ : (mpfr_rnd_t) rnd; ++ inex1 = mpfr_underflow (x1, r, sign); ++ flags1 = __gmpfr_flags; ++ } ++ else if (j != 0 && ep[i] > __gmpfr_emax - e) /* overflow */ ++ { ++ inex1 = mpfr_overflow (x1, (mpfr_rnd_t) rnd, sign); ++ flags1 = __gmpfr_flags; ++ } ++ else ++ { ++ if (j != 0) ++ mpfr_set_exp (x1, ep[i] + e); ++ flags1 = inex1 != 0 ? MPFR_FLAGS_INEXACT : 0; ++ } ++ } ++ ++ /* Test mpfr_set_sj_2exp */ ++ mpfr_clear_flags (); ++ inex2 = mpfr_set_sj_2exp (x2, j, em, (mpfr_rnd_t) rnd); ++ flags2 = __gmpfr_flags; ++ ++ if (! (flags1 == flags2 && SAME_SIGN (inex1, inex2) && ++ mpfr_equal_p (x1, x2))) ++ { ++ s = 's'; ++ goto err_extreme; ++ } ++ ++ if (j < 0) ++ continue; ++ ++ /* Test mpfr_set_uj_2exp */ ++ mpfr_clear_flags (); ++ inex2 = mpfr_set_uj_2exp (x2, j, em, (mpfr_rnd_t) rnd); ++ flags2 = __gmpfr_flags; ++ ++ if (! (flags1 == flags2 && SAME_SIGN (inex1, inex2) && ++ mpfr_equal_p (x1, x2))) ++ { ++ s = 'u'; ++ err_extreme: ++ printf ("Error in extreme mpfr_set_%cj_2exp for i=%d j=%d %s\n", ++ s, i, j, mpfr_print_rnd_mode ((mpfr_rnd_t) rnd)); ++ printf ("emin=%" MPFR_EXP_FSPEC "d " ++ "emax=%" MPFR_EXP_FSPEC "d\n", ++ (mpfr_eexp_t) __gmpfr_emin, ++ (mpfr_eexp_t) __gmpfr_emax); ++#ifdef MPFR_PRINTF_MAXLM ++ printf ("e = %" MPFR_PRINTF_MAXLM "d\n", em); ++#endif ++ printf ("Expected "); ++ mpfr_dump (x1); ++ printf ("with inex = %d and flags =", inex1); ++ flags_out (flags1); ++ printf ("Got "); ++ mpfr_dump (x2); ++ printf ("with inex = %d and flags =", inex2); ++ flags_out (flags2); ++ exit (1); ++ } ++ } ++ ++ mpfr_clears (x1, x2, y, (mpfr_ptr) 0); ++} ++ ++static void ++test_2exp_extreme (void) ++{ ++ mpfr_exp_t emin, emax; ++ ++ emin = mpfr_get_emin (); ++ emax = mpfr_get_emax (); ++ ++ set_emin (MPFR_EMIN_MIN); ++ set_emax (MPFR_EMAX_MAX); ++ test_2exp_extreme_aux (); ++ ++ set_emin (-REXP); ++ set_emax (REXP); ++ test_2exp_extreme_aux (); ++ ++ set_emin (emin); ++ set_emax (emax); ++} ++ + int + main (int argc, char *argv[]) + { +@@ -185,6 +333,7 @@ + check_set_uj_2exp (); + check_set_sj (); + check_set_sj_2exp (); ++ test_2exp_extreme (); + + tests_end_mpfr (); + return 0; +--- mpfr-4.0.2/PATCHES 2020-03-30 13:09:17.466071979 +0000 ++++ mpfr-4.0.2/PATCHES 2020-03-30 13:09:17.502071540 +0000 +@@ -0,0 +1 @@ ++sub1-ubf +--- mpfr-4.0.2/VERSION 2020-03-30 13:05:16.264989689 +0000 ++++ mpfr-4.0.2/VERSION 2020-03-30 13:09:17.502071540 +0000 +@@ -1 +1 @@ +-4.0.2-p3 ++4.0.2-p4 +--- mpfr-4.0.2/src/add1.c 2019-01-07 13:53:20.000000000 +0000 ++++ mpfr-4.0.2/src/add1.c 2020-03-30 13:09:17.490071686 +0000 +@@ -41,7 +41,7 @@ + + if (MPFR_UNLIKELY (MPFR_IS_UBF (b))) + { +- exp = mpfr_ubf_zexp2exp (MPFR_ZEXP (b)); ++ exp = MPFR_UBF_GET_EXP (b); + if (exp > __gmpfr_emax) + return mpfr_overflow (a, rnd_mode, MPFR_SIGN (b));; + } +--- mpfr-4.0.2/src/mpfr-impl.h 2019-06-02 17:05:36.145226719 +0000 ++++ mpfr-4.0.2/src/mpfr-impl.h 2020-03-30 13:09:17.490071686 +0000 +@@ -2406,11 +2406,28 @@ + } + #endif + +-#define MPFR_ZEXP(x) \ +- ((void) (x)->_mpfr_exp /* to check that x has a correct type */, \ ++/* Get the _mpfr_zexp field (pointer to a mpz_t) of a UBF object. ++ For practical reasons, the type of the argument x can be either ++ mpfr_ubf_ptr or mpfr_ptr, since the latter is used in functions ++ that accept both MPFR numbers and UBF's; this is checked by the ++ code "(x)->_mpfr_exp" (the "sizeof" prevents an access, which ++ could be invalid when MPFR_ZEXP(x) is used for an assignment, ++ and also avoids breaking the aliasing rules if they are dealt ++ with in the future). ++ This macro can be used when building a UBF. So we do not check ++ that the _mpfr_exp field has the value MPFR_EXP_UBF. */ ++#define MPFR_ZEXP(x) \ ++ ((void) sizeof ((x)->_mpfr_exp), \ + ((mpfr_ubf_ptr) (x))->_mpfr_zexp) + ++/* If x is a UBF, clear its mpz_t exponent. */ + #define MPFR_UBF_CLEAR_EXP(x) \ + ((void) (MPFR_IS_UBF (x) && (mpz_clear (MPFR_ZEXP (x)), 0))) + ++/* Like MPFR_GET_EXP, but accepts UBF (with exponent saturated to ++ the interval [MPFR_EXP_MIN,MPFR_EXP_MAX]). */ ++#define MPFR_UBF_GET_EXP(x) \ ++ (MPFR_IS_UBF (x) ? mpfr_ubf_zexp2exp (MPFR_ZEXP (x)) : \ ++ MPFR_GET_EXP ((mpfr_ptr) (x))) ++ + #endif /* __MPFR_IMPL_H__ */ +--- mpfr-4.0.2/src/mpfr.h 2020-03-30 13:05:16.260989737 +0000 ++++ mpfr-4.0.2/src/mpfr.h 2020-03-30 13:09:17.498071589 +0000 +@@ -27,7 +27,7 @@ + #define MPFR_VERSION_MAJOR 4 + #define MPFR_VERSION_MINOR 0 + #define MPFR_VERSION_PATCHLEVEL 2 +-#define MPFR_VERSION_STRING "4.0.2-p3" ++#define MPFR_VERSION_STRING "4.0.2-p4" + + /* User macros: + MPFR_USE_FILE: Define it to make MPFR define functions dealing +--- mpfr-4.0.2/src/sub1.c 2019-01-07 13:53:20.000000000 +0000 ++++ mpfr-4.0.2/src/sub1.c 2020-03-30 13:09:17.490071686 +0000 +@@ -91,9 +91,20 @@ + + if (MPFR_UNLIKELY (MPFR_IS_UBF (b) || MPFR_IS_UBF (c))) + { +- exp_b = MPFR_IS_UBF (b) ? +- mpfr_ubf_zexp2exp (MPFR_ZEXP (b)) : MPFR_GET_EXP (b); ++ exp_b = MPFR_UBF_GET_EXP (b); ++ /* Early underflow detection. Rare, but a test is needed anyway ++ since in the "MAX (aq, bq) + 2 <= diff_exp" branch, the exponent ++ may decrease and MPFR_EXP_MIN would yield an integer overflow. */ ++ if (MPFR_UNLIKELY (exp_b < __gmpfr_emin - 1)) ++ { ++ if (rnd_mode == MPFR_RNDN) ++ rnd_mode = MPFR_RNDZ; ++ return mpfr_underflow (a, rnd_mode, MPFR_SIGN(a)); ++ } + diff_exp = mpfr_ubf_diff_exp (b, c); ++ /* mpfr_set4 below used with MPFR_RNDF does not support UBF. */ ++ if (rnd_mode == MPFR_RNDF) ++ rnd_mode = MPFR_RNDN; + } + else + { +@@ -123,11 +134,11 @@ + if (rnd_mode == MPFR_RNDF) + return mpfr_set4 (a, b, MPFR_RNDZ, MPFR_SIGN (a)); + +- MPFR_EXP (a) = exp_b; /* may be up to MPFR_EXP_MAX */ ++ exp_a = exp_b; /* may be any out-of-range value due to UBF */ + MPFR_RNDRAW_EVEN (inexact, a, MPFR_MANT (b), bq, + rnd_mode, MPFR_SIGN (a), +- if (MPFR_EXP (a) != MPFR_EXP_MAX) +- ++ MPFR_EXP (a)); ++ if (exp_a != MPFR_EXP_MAX) ++ exp_a ++); + MPFR_LOG_MSG (("inexact=%d\n", inexact)); + if (inexact == 0) + { +@@ -139,7 +150,7 @@ + if (! MPFR_IS_LIKE_RNDZ (rnd_mode, MPFR_IS_NEG (a))) + { + inexact = MPFR_INT_SIGN (a); +- goto check_overflow; ++ goto end_of_c_small; + } + } + else /* inexact != 0 */ +@@ -164,7 +175,7 @@ + which means we get a wrong rounded result if x == 1, + i.e. inexact == MPFR_EVEN_INEX (for positive numbers). */ + if (MPFR_LIKELY (inexact != MPFR_EVEN_INEX * MPFR_INT_SIGN (a))) +- goto check_overflow; ++ goto end_of_c_small; + } + /* We need to take the value preceding |a|. We can't use + mpfr_nexttozero due to a possible out-of-range exponent. +@@ -174,16 +185,26 @@ + mpn_sub_1 (ap, ap, an, MPFR_LIMB_ONE << sh); + if (MPFR_UNLIKELY (MPFR_LIMB_MSB (ap[an-1]) == 0)) + { +- MPFR_EXP (a) --; ++ exp_a --; + /* The following is valid whether an = 1 or an > 1. */ + ap[an-1] |= MPFR_LIMB_HIGHBIT; + } + inexact = - MPFR_INT_SIGN (a); +- check_overflow: +- if (MPFR_UNLIKELY (MPFR_EXP (a) > __gmpfr_emax)) ++ end_of_c_small: ++ /* The underflow case is possible only with UBF. The overflow case ++ is also possible with normal FP due to rounding. */ ++ if (MPFR_UNLIKELY (exp_a > __gmpfr_emax)) + return mpfr_overflow (a, rnd_mode, MPFR_SIGN (a)); +- else +- MPFR_RET (inexact); ++ if (MPFR_UNLIKELY (exp_a < __gmpfr_emin)) ++ { ++ if (rnd_mode == MPFR_RNDN && ++ (exp_a < __gmpfr_emin - 1 || ++ (inexact * MPFR_INT_SIGN (a) >= 0 && mpfr_powerof2_raw (a)))) ++ rnd_mode = MPFR_RNDZ; ++ return mpfr_underflow (a, rnd_mode, MPFR_SIGN(a)); ++ } ++ MPFR_SET_EXP (a, exp_a); ++ MPFR_RET (inexact); + } + + /* reserve a space to store b aligned with the result, i.e. shifted by +@@ -656,6 +677,15 @@ + if (MPFR_LIKELY(cancel)) + { + cancel -= add_exp; /* OK: add_exp is an int equal to 0 or 1 */ ++ MPFR_ASSERTD (cancel >= 0); ++ /* Detect an underflow case to avoid a possible integer overflow ++ with UBF in the computation of exp_a. */ ++ if (MPFR_UNLIKELY (exp_b < __gmpfr_emin - 1)) ++ { ++ if (rnd_mode == MPFR_RNDN) ++ rnd_mode = MPFR_RNDZ; ++ return mpfr_underflow (a, rnd_mode, MPFR_SIGN(a)); ++ } + exp_a = exp_b - cancel; + /* The following assertion corresponds to a limitation of the MPFR + implementation. It may fail with a 32-bit ABI and huge precisions, +--- mpfr-4.0.2/src/version.c 2020-03-30 13:05:16.264989689 +0000 ++++ mpfr-4.0.2/src/version.c 2020-03-30 13:09:17.502071540 +0000 +@@ -25,5 +25,5 @@ + const char * + mpfr_get_version (void) + { +- return "4.0.2-p3"; ++ return "4.0.2-p4"; + } +--- mpfr-4.0.2/tests/tfma.c 2019-01-07 13:53:20.000000000 +0000 ++++ mpfr-4.0.2/tests/tfma.c 2020-03-30 13:09:17.490071686 +0000 +@@ -47,7 +47,7 @@ + mpfr_add (r1, r1, c, (mpfr_rnd_t) rnd)) + { + if (rnd == MPFR_RNDF) +- break; ++ continue; + printf ("test_exact internal error for (%d,%d,%d,%d,%s)\n", + i, j, k, rnd, mpfr_print_rnd_mode ((mpfr_rnd_t) rnd)); + exit (1); +@@ -664,7 +664,7 @@ + Note: The purpose of the s * 2^(emin-7) term is to yield + double rounding when scaling for k = 4, s != 0, MPFR_RNDN. */ + +- RND_LOOP (rnd) ++ RND_LOOP_NO_RNDF (rnd) + { + mpfr_clear_flags (); + inex1 = mpfr_set_si_2exp (t1, sign * (8*k+s-64), e-6, +--- mpfr-4.0.2/tests/tfmma.c 2019-01-07 13:53:20.000000000 +0000 ++++ mpfr-4.0.2/tests/tfmma.c 2020-03-30 13:09:17.490071686 +0000 +@@ -480,6 +480,123 @@ + mpfr_clears (x, y, z, (mpfr_ptr) 0); + } + ++static void ++underflow_tests (void) ++{ ++ mpfr_t x, y, z; ++ mpfr_prec_t p; ++ mpfr_exp_t emin; ++ ++ emin = mpfr_get_emin (); ++ mpfr_set_emin (-17); ++ for (p = MPFR_PREC_MIN; p <= 1024; p++) ++ { ++ mpfr_inits2 (p, x, y, (mpfr_ptr) 0); ++ mpfr_init2 (z, p + 1); ++ mpfr_set_str_binary (x, "1e-10"); ++ mpfr_set_str_binary (y, "1e-11"); ++ mpfr_clear_underflow (); ++ mpfr_fmms (z, x, x, y, y, MPFR_RNDN); ++ /* the exact result is 2^-20-2^-22, and should underflow */ ++ MPFR_ASSERTN(mpfr_underflow_p ()); ++ MPFR_ASSERTN(mpfr_zero_p (z)); ++ MPFR_ASSERTN(mpfr_signbit (z) == 0); ++ mpfr_clears (x, y, z, (mpfr_ptr) 0); ++ } ++ mpfr_set_emin (emin); ++} ++ ++static void ++bug20180604 (void) ++{ ++ mpfr_t x, y, yneg, z; ++ mpfr_exp_t emin; ++ int ret; ++ ++ emin = mpfr_get_emin (); ++ mpfr_set_emin (-1073741821); ++ mpfr_inits2 (564, x, y, yneg, (mpfr_ptr) 0); ++ mpfr_init2 (z, 2256); ++ mpfr_set_str_binary (x, "1.10010000111100110011001101111111101000111001011000110100110010000101000100010001000000111100010000101001011011111001111000110101111100101111001100001100011101100100011110000000011000010110111100111000100101010001011111010111011001110010001011101111001011001110110000010000011100010001010001011100100110111110101001001111001011101111110011101110101010110100010010111011111100010101111100011110111001011111101110101101101110100101111010000101011110100000000110111101000001100001000100010110100111010011011010110011100111010000101110010101111001011100110101100001100E-737194993"); ++ mpfr_set_str_binary (y, "-1.00101000100001001101011110100010110011101010011011010111100110101011111100000100101000111010111101100100110010001110011011100100110110000001011001000111101111101111110101100110111000000011000001101001010100010010001110001000011010000100111001001100101111111100010101110101001101101101111010100011011110001000010000010100011000011000010110101100000111111110111001100100100001101011111011100101110111000100101010110100010011101010110010100110100111000000100111101101101000000011110000100110100100011000010011110010001010000110100011111101101101110001110001101101010E-737194903"); ++ ++ mpfr_clear_underflow (); ++ ret = mpfr_fmms (z, x, x, y, y, MPFR_RNDN); ++ MPFR_ASSERTN(mpfr_underflow_p ()); ++ MPFR_ASSERTN(mpfr_zero_p (z)); ++ MPFR_ASSERTN(mpfr_signbit (z) == 1); ++ MPFR_ASSERTN(ret > 0); ++ ++ mpfr_clear_underflow (); ++ ret = mpfr_fmms (z, y, y, x, x, MPFR_RNDN); ++ MPFR_ASSERTN(mpfr_underflow_p ()); ++ MPFR_ASSERTN(mpfr_zero_p (z)); ++ MPFR_ASSERTN(mpfr_signbit (z) == 0); ++ MPFR_ASSERTN(ret < 0); ++ ++ mpfr_neg (yneg, y, MPFR_RNDN); ++ mpfr_clear_underflow (); ++ ret = mpfr_fmms (z, x, x, y, yneg, MPFR_RNDN); ++ MPFR_ASSERTN(mpfr_underflow_p ()); ++ MPFR_ASSERTN(mpfr_zero_p (z)); ++ MPFR_ASSERTN(mpfr_signbit (z) == 0); ++ MPFR_ASSERTN(ret < 0); ++ ++ mpfr_clear_underflow (); ++ ret = mpfr_fmms (z, y, yneg, x, x, MPFR_RNDN); ++ MPFR_ASSERTN(mpfr_underflow_p ()); ++ MPFR_ASSERTN(mpfr_zero_p (z)); ++ MPFR_ASSERTN(mpfr_signbit (z) == 1); ++ MPFR_ASSERTN(ret > 0); ++ ++ mpfr_clears (x, y, yneg, z, (mpfr_ptr) 0); ++ mpfr_set_emin (emin); ++} ++ ++/* this bug was discovered from mpc_mul */ ++static void ++bug20200206 (void) ++{ ++ mpfr_exp_t emin = mpfr_get_emin (); ++ mpfr_t xre, xim, yre, yim, zre; ++ ++ mpfr_set_emin (-1073); ++ mpfr_inits2 (53, xre, xim, yre, yim, zre, (mpfr_ptr) 0); ++ mpfr_set_str (xre, "-0x8.294611b331c8p-904", 16, MPFR_RNDN); ++ mpfr_set_str (xim, "-0x1.859278c2992fap-676", 16, MPFR_RNDN); ++ mpfr_set_str (yre, "0x9.ac54802a95f8p-820", 16, MPFR_RNDN); ++ mpfr_set_str (yim, "0x3.17e59e7612aap-412", 16, MPFR_RNDN); ++ mpfr_fmms (zre, xre, yre, xim, yim, MPFR_RNDN); ++ if (mpfr_regular_p (zre) && mpfr_get_exp (zre) < -1073) ++ { ++ printf ("Error, mpfr_fmms returns an out-of-range exponent:\n"); ++ mpfr_dump (zre); ++ exit (1); ++ } ++ mpfr_clears (xre, xim, yre, yim, zre, (mpfr_ptr) 0); ++ mpfr_set_emin (emin); ++} ++ ++/* check for integer overflow (see bug fixed in r13798) */ ++static void ++extreme_underflow (void) ++{ ++ mpfr_t x, y, z; ++ mpfr_exp_t emin = mpfr_get_emin (); ++ ++ set_emin (MPFR_EMIN_MIN); ++ mpfr_inits2 (64, x, y, z, (mpfr_ptr) 0); ++ mpfr_set_ui_2exp (x, 1, MPFR_EMIN_MIN - 1, MPFR_RNDN); ++ mpfr_set (y, x, MPFR_RNDN); ++ mpfr_nextabove (x); ++ mpfr_clear_flags (); ++ mpfr_fmms (z, x, x, y, y, MPFR_RNDN); ++ MPFR_ASSERTN (__gmpfr_flags == (MPFR_FLAGS_UNDERFLOW | MPFR_FLAGS_INEXACT)); ++ MPFR_ASSERTN (MPFR_IS_ZERO (z) && MPFR_IS_POS (z)); ++ mpfr_clears (x, y, z, (mpfr_ptr) 0); ++ set_emin (emin); ++} ++ + /* Test double-rounding cases in mpfr_set_1_2, which is called when + all the precisions are the same. With set.c before r13347, this + triggers errors for neg=0. */ +@@ -548,6 +665,9 @@ + { + tests_start_mpfr (); + ++ bug20200206 (); ++ bug20180604 (); ++ underflow_tests (); + random_tests (); + zero_tests (); + max_tests (); +@@ -555,6 +675,7 @@ + half_plus_half (); + bug20170405 (); + double_rounding (); ++ extreme_underflow (); + + tests_end_mpfr (); + return 0; +--- mpfr-4.0.2/tests/tsub.c 2019-01-07 13:53:20.000000000 +0000 ++++ mpfr-4.0.2/tests/tsub.c 2020-03-30 13:09:17.490071686 +0000 +@@ -1159,6 +1159,358 @@ + } + } + ++/* Tests on UBF. ++ * ++ * Note: mpfr_sub1sp will never be used as it does not support UBF. ++ * Thus there is no need to generate tests for both mpfr_sub1 and ++ * mpfr_sub1sp. ++ * ++ * Note that mpfr_sub1 has a special branch "c small", where the second ++ * argument c is sufficiently smaller than the ulp of the first argument ++ * and the ulp of the result: MAX (aq, bq) + 2 <= diff_exp. ++ * Tests should be done for both the main branch and this special branch ++ * when this makes sense. ++ */ ++#define REXP 1024 ++ ++static void test_ubf_aux (void) ++{ ++ mpfr_ubf_t x[11]; ++ mpfr_ptr p[11]; ++ int ex[11]; ++ mpfr_t ee, y, z, w; ++ int i, j, k, neg, inexact, rnd; ++ const int kn = 2; ++ mpfr_exp_t e[] = ++ { MPFR_EXP_MIN, MPFR_EMIN_MIN, -REXP, 0, ++ REXP, MPFR_EMAX_MAX, MPFR_EXP_MAX }; ++ ++ mpfr_init2 (ee, sizeof (mpfr_exp_t) * CHAR_BIT); ++ mpfr_inits2 (64, y, z, (mpfr_ptr) 0); ++ mpfr_init2 (w, 2); ++ ++ for (i = 0; i < 11; i++) ++ p[i] = (mpfr_ptr) x[i]; ++ ++ /* exact zero result, with small and large exponents */ ++ for (i = 0; i < 2; i++) ++ { ++ mpfr_init2 (p[i], 5 + (randlimb () % 128)); ++ mpfr_set_ui (p[i], 17, MPFR_RNDN); ++ mpz_init (MPFR_ZEXP (p[i])); ++ MPFR_SET_UBF (p[i]); ++ } ++ for (j = 0; j < numberof (e); j++) ++ { ++ inexact = mpfr_set_exp_t (ee, e[j], MPFR_RNDN); ++ MPFR_ASSERTD (inexact == 0); ++ inexact = mpfr_get_z (MPFR_ZEXP (p[0]), ee, MPFR_RNDN); ++ MPFR_ASSERTD (inexact == 0); ++ mpz_sub_ui (MPFR_ZEXP (p[0]), MPFR_ZEXP (p[0]), kn); ++ ++ for (k = -kn; k <= kn; k++) ++ { ++ /* exponent: e[j] + k, with |k| <= kn */ ++ mpz_set (MPFR_ZEXP (p[1]), MPFR_ZEXP (p[0])); ++ ++ for (neg = 0; neg <= 1; neg++) ++ { ++ RND_LOOP (rnd) ++ { ++ /* Note: x[0] and x[1] are equal MPFR numbers, but do not ++ test mpfr_sub with arg2 == arg3 as pointers in order to ++ skip potentially optimized mpfr_sub code. */ ++ inexact = mpfr_sub (z, p[0], p[1], (mpfr_rnd_t) rnd); ++ if (inexact != 0 || MPFR_NOTZERO (z) || ++ (rnd != MPFR_RNDD ? MPFR_IS_NEG (z) : MPFR_IS_POS (z))) ++ { ++ printf ("Error 1 in test_ubf for exact zero result: " ++ "j=%d k=%d neg=%d, rnd=%s\nGot ", j, k, neg, ++ mpfr_print_rnd_mode ((mpfr_rnd_t) rnd)); ++ mpfr_dump (z); ++ printf ("inexact = %d\n", inexact); ++ exit (1); ++ } ++ } ++ ++ for (i = 0; i < 2; i++) ++ MPFR_CHANGE_SIGN (p[i]); ++ } ++ ++ mpz_add_ui (MPFR_ZEXP (p[0]), MPFR_ZEXP (p[0]), 1); ++ } ++ } ++ for (i = 0; i < 2; i++) ++ { ++ MPFR_UBF_CLEAR_EXP (p[i]); ++ mpfr_clear (p[i]); ++ } ++ ++ /* Up to a given exponent (for the result) and sign, test: ++ * (t + .11010) - (t + .00001) = .11001 ++ * (t + 8) - (t + 111.00111) = .11001 ++ * where t = 0 or a power of 2, e.g. 2^200. Test various exponents ++ * (including those near the underflow/overflow boundaries) so that ++ * the subtraction yields a normal number, an overflow or an underflow. ++ * In MPFR_RNDA, also test with a 2-bit precision target, as this ++ * yields an exponent change. ++ * ++ * Also test the "MAX (aq, bq) + 2 <= diff_exp" branch of sub1.c with ++ * .1 - epsilon (possible decrease of the exponent) and .111 - epsilon ++ * in precision 2 (possible increase of the exponent). The first test ++ * triggers a possible decrease of the exponent (see bug fixed in r13806). ++ * The second test triggers a possible increase of the exponent (see the ++ * "exp_a != MPFR_EXP_MAX" test to avoid an integer overflow). ++ */ ++ for (i = 0; i < 8; i++) ++ { ++ static int v[4] = { 26, 1, 256, 231 }; ++ ++ mpfr_init2 (p[i], i < 4 ? 5 + (randlimb () % 128) : 256); ++ if (i < 4) ++ mpfr_set_si_2exp (p[i], v[i], -5, MPFR_RNDN); ++ else ++ { ++ mpfr_set_si_2exp (p[i], 1, 200, MPFR_RNDN); ++ mpfr_add (p[i], p[i], p[i-4], MPFR_RNDN); ++ } ++ ex[i] = mpfr_get_exp (p[i]) + 5; ++ MPFR_ASSERTD (ex[i] >= 0); ++ } ++ mpfr_inits2 (3, p[8], p[9], p[10], (mpfr_ptr) 0); ++ mpfr_set_si_2exp (p[8], 1, 0, MPFR_RNDN); ++ ex[8] = 5; ++ mpfr_set_si_2exp (p[9], 1, 0, MPFR_RNDN); /* will be epsilon */ ++ ex[9] = 0; ++ mpfr_set_si_2exp (p[10], 7, 0, MPFR_RNDN); ++ ex[10] = 5; ++ ++ for (i = 0; i < 11; i++) ++ { ++ mpz_init (MPFR_ZEXP (p[i])); ++ MPFR_SET_UBF (p[i]); ++ } ++ ++ for (j = 0; j < numberof (e); j++) ++ { ++ inexact = mpfr_set_exp_t (ee, e[j], MPFR_RNDN); ++ MPFR_ASSERTD (inexact == 0); ++ inexact = mpfr_get_z (MPFR_ZEXP (p[0]), ee, MPFR_RNDN); ++ MPFR_ASSERTD (inexact == 0); ++ for (i = 1; i < 11; i++) ++ mpz_set (MPFR_ZEXP (p[i]), MPFR_ZEXP (p[0])); ++ for (i = 0; i < 11; i++) ++ { ++ mpz_add_ui (MPFR_ZEXP (p[i]), MPFR_ZEXP (p[i]), ex[i]); ++ mpz_sub_ui (MPFR_ZEXP (p[i]), MPFR_ZEXP (p[i]), 5 + kn); ++ } ++ mpz_sub_ui (MPFR_ZEXP (p[9]), MPFR_ZEXP (p[9]), 256); ++ for (k = -kn; k <= kn; k++) ++ { ++ for (neg = 0; neg <= 1; neg++) ++ { ++ int sign = neg ? -1 : 1; ++ ++ RND_LOOP (rnd) ++ for (i = 0; i <= 10; i += 2) ++ { ++ mpfr_exp_t e0; ++ mpfr_flags_t flags, flags_y; ++ int inex_y; ++ ++ if (i >= 8) ++ { ++ int d; ++ ++ e0 = MPFR_UBF_GET_EXP (p[i]); ++ if (e0 < MPFR_EXP_MIN + 3) ++ e0 += 3; ++ ++ if (rnd == MPFR_RNDN) ++ d = i == 8 ? (e0 == __gmpfr_emin - 1 ? 3 : 4) : 6; ++ else if (MPFR_IS_LIKE_RNDZ (rnd, neg)) ++ d = i == 8 ? 3 : 6; ++ else ++ d = i == 8 ? 4 : 8; ++ ++ mpfr_clear_flags (); ++ inex_y = mpfr_set_si_2exp (w, sign * d, e0 - 3, ++ (mpfr_rnd_t) rnd); ++ flags_y = __gmpfr_flags | MPFR_FLAGS_INEXACT; ++ if (inex_y == 0) ++ inex_y = rnd == MPFR_RNDN ? ++ sign * (i == 8 ? 1 : -1) : ++ MPFR_IS_LIKE_RNDD ((mpfr_rnd_t) rnd, sign) ? ++ -1 : 1; ++ mpfr_set (y, w, MPFR_RNDN); ++ ++ mpfr_clear_flags (); ++ inexact = mpfr_sub (w, p[i], p[9], (mpfr_rnd_t) rnd); ++ flags = __gmpfr_flags; ++ ++ /* For MPFR_RNDF, only do a basic test. */ ++ MPFR_ASSERTN (mpfr_check (w)); ++ if (rnd == MPFR_RNDF) ++ continue; ++ ++ goto testw; ++ } ++ ++ mpfr_clear_flags (); ++ inexact = mpfr_sub (z, p[i], p[i+1], (mpfr_rnd_t) rnd); ++ flags = __gmpfr_flags; ++ ++ /* For MPFR_RNDF, only do a basic test. */ ++ MPFR_ASSERTN (mpfr_check (z)); ++ if (rnd == MPFR_RNDF) ++ continue; ++ ++ e0 = MPFR_UBF_GET_EXP (p[0]); ++ ++ if (e0 < __gmpfr_emin) ++ { ++ mpfr_rnd_t r = ++ rnd == MPFR_RNDN && e0 < __gmpfr_emin - 1 ? ++ MPFR_RNDZ : (mpfr_rnd_t) rnd; ++ flags_y = MPFR_FLAGS_UNDERFLOW | MPFR_FLAGS_INEXACT; ++ inex_y = mpfr_underflow (y, r, sign); ++ } ++ else if (e0 > __gmpfr_emax) ++ { ++ flags_y = MPFR_FLAGS_OVERFLOW | MPFR_FLAGS_INEXACT; ++ inex_y = mpfr_overflow (y, (mpfr_rnd_t) rnd, sign); ++ } ++ else ++ { ++ mpfr_set_si_2exp (y, sign * 25, e0 - 5, MPFR_RNDN); ++ flags_y = 0; ++ inex_y = 0; ++ } ++ ++ if (flags != flags_y || ++ ! SAME_SIGN (inexact, inex_y) || ++ ! mpfr_equal_p (y, z)) ++ { ++ printf ("Error 2 in test_ubf with " ++ "j=%d k=%d neg=%d i=%d rnd=%s\n", ++ j, k, neg, i, ++ mpfr_print_rnd_mode ((mpfr_rnd_t) rnd)); ++ printf ("emin=%" MPFR_EXP_FSPEC "d " ++ "emax=%" MPFR_EXP_FSPEC "d\n", ++ (mpfr_eexp_t) __gmpfr_emin, ++ (mpfr_eexp_t) __gmpfr_emax); ++ printf ("b = "); ++ mpfr_dump (p[i]); ++ printf ("c = "); ++ mpfr_dump (p[i+1]); ++ printf ("Expected "); ++ mpfr_dump (y); ++ printf ("with inex = %d and flags =", inex_y); ++ flags_out (flags_y); ++ printf ("Got "); ++ mpfr_dump (z); ++ printf ("with inex = %d and flags =", inexact); ++ flags_out (flags); ++ exit (1); ++ } ++ ++ /* Do the following 2-bit precision test only in RNDA. */ ++ if (rnd != MPFR_RNDA) ++ continue; ++ ++ mpfr_clear_flags (); ++ inexact = mpfr_sub (w, p[i], p[i+1], MPFR_RNDA); ++ flags = __gmpfr_flags; ++ if (e0 < MPFR_EXP_MAX) ++ e0++; ++ ++ if (e0 < __gmpfr_emin) ++ { ++ flags_y = MPFR_FLAGS_UNDERFLOW | MPFR_FLAGS_INEXACT; ++ inex_y = mpfr_underflow (y, MPFR_RNDA, sign); ++ } ++ else if (e0 > __gmpfr_emax) ++ { ++ flags_y = MPFR_FLAGS_OVERFLOW | MPFR_FLAGS_INEXACT; ++ inex_y = mpfr_overflow (y, MPFR_RNDA, sign); ++ } ++ else ++ { ++ mpfr_set_si_2exp (y, sign, e0 - 1, MPFR_RNDN); ++ flags_y = MPFR_FLAGS_INEXACT; ++ inex_y = sign; ++ } ++ ++ testw: ++ if (flags != flags_y || ++ ! SAME_SIGN (inexact, inex_y) || ++ ! mpfr_equal_p (y, w)) ++ { ++ printf ("Error 3 in test_ubf with " ++ "j=%d k=%d neg=%d i=%d rnd=%s\n", ++ j, k, neg, i, ++ mpfr_print_rnd_mode ((mpfr_rnd_t) rnd)); ++ printf ("emin=%" MPFR_EXP_FSPEC "d " ++ "emax=%" MPFR_EXP_FSPEC "d\n", ++ (mpfr_eexp_t) __gmpfr_emin, ++ (mpfr_eexp_t) __gmpfr_emax); ++ printf ("b = "); ++ mpfr_dump (p[i]); ++ printf ("c = "); ++ mpfr_dump (p[i <= 8 ? i+1 : 9]); ++ printf ("Expected "); ++ /* Set y to a 2-bit precision just for the output. ++ Since we exit, this will have no other effect. */ ++ mpfr_prec_round (y, 2, MPFR_RNDA); ++ mpfr_dump (y); ++ printf ("with inex = %d and flags =", inex_y); ++ flags_out (flags_y); ++ printf ("Got "); ++ mpfr_dump (w); ++ printf ("with inex = %d and flags =", inexact); ++ flags_out (flags); ++ exit (1); ++ } ++ } ++ ++ for (i = 0; i < 11; i++) ++ MPFR_CHANGE_SIGN (p[i]); ++ } ++ ++ for (i = 0; i < 11; i++) ++ mpz_add_ui (MPFR_ZEXP (p[i]), MPFR_ZEXP (p[i]), 1); ++ } ++ } ++ for (i = 0; i < 11; i++) ++ { ++ MPFR_UBF_CLEAR_EXP (p[i]); ++ mpfr_clear (p[i]); ++ } ++ ++ mpfr_clears (ee, y, z, w, (mpfr_ptr) 0); ++} ++ ++/* Run the tests on UBF with the maximum exponent range and with a ++ reduced exponent range. */ ++static void test_ubf (void) ++{ ++ mpfr_exp_t emin, emax; ++ ++ emin = mpfr_get_emin (); ++ emax = mpfr_get_emax (); ++ ++ set_emin (MPFR_EMIN_MIN); ++ set_emax (MPFR_EMAX_MAX); ++ test_ubf_aux (); ++ ++ set_emin (-REXP); ++ set_emax (REXP); ++ test_ubf_aux (); ++ ++ set_emin (emin); ++ set_emax (emax); ++} ++ + #define TEST_FUNCTION test_sub + #define TWO_ARGS + #define RAND_FUNCTION(x) mpfr_random2(x, MPFR_LIMB_SIZE (x), randlimb () % 100, RANDS) +@@ -1188,6 +1540,7 @@ + for (i=0; i<50; i++) + check_two_sum (p); + test_generic (MPFR_PREC_MIN, 800, 100); ++ test_ubf (); + + tests_end_mpfr (); + return 0; +--- mpfr-4.0.2/PATCHES 2020-03-30 16:31:45.813415121 +0000 ++++ mpfr-4.0.2/PATCHES 2020-03-30 16:33:54.623893528 +0000 +@@ -0,0 +1 @@ ++const +--- mpfr-4.0.2/VERSION 2020-03-30 13:09:17.502071540 +0000 ++++ mpfr-4.0.2/VERSION 2020-03-30 15:17:31.535330224 +0000 +@@ -1 +1 @@ +-4.0.2-p4 ++4.0.2-p5 +--- mpfr-4.0.2/acinclude.m4 2019-01-27 18:30:16.000000000 +0000 ++++ mpfr-4.0.2/acinclude.m4 2019-01-27 18:30:16.000000000 +0000 +@@ -438,12 +438,14 @@ + AC_MSG_WARN([platform and/or document the behavior.]) + fi + +-dnl Check if the chars '0' to '9' are consecutive values ++dnl Check if the chars '0' to '9', 'a' to 'z', and 'A' to 'Z' are ++dnl consecutive values. ++dnl The const is necessary with GCC's "-Wwrite-strings -Werror". + AC_MSG_CHECKING([if charset has consecutive values]) + AC_RUN_IFELSE([AC_LANG_PROGRAM([[ +-char *number = "0123456789"; +-char *lower = "abcdefghijklmnopqrstuvwxyz"; +-char *upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; ++const char *number = "0123456789"; ++const char *lower = "abcdefghijklmnopqrstuvwxyz"; ++const char *upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + ]],[[ + int i; + unsigned char *p; +--- mpfr-4.0.2/configure 2019-01-31 20:43:19.000000000 +0000 ++++ mpfr-4.0.2/configure 2020-03-30 16:33:29.340190160 +0000 +@@ -15868,9 +15868,9 @@ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +-char *number = "0123456789"; +-char *lower = "abcdefghijklmnopqrstuvwxyz"; +-char *upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; ++const char *number = "0123456789"; ++const char *lower = "abcdefghijklmnopqrstuvwxyz"; ++const char *upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + + int + main (void) +--- mpfr-4.0.2/src/mpfr.h 2020-03-30 13:09:17.498071589 +0000 ++++ mpfr-4.0.2/src/mpfr.h 2020-03-30 15:17:31.535330224 +0000 +@@ -27,7 +27,7 @@ + #define MPFR_VERSION_MAJOR 4 + #define MPFR_VERSION_MINOR 0 + #define MPFR_VERSION_PATCHLEVEL 2 +-#define MPFR_VERSION_STRING "4.0.2-p4" ++#define MPFR_VERSION_STRING "4.0.2-p5" + + /* User macros: + MPFR_USE_FILE: Define it to make MPFR define functions dealing +--- mpfr-4.0.2/src/version.c 2020-03-30 13:09:17.502071540 +0000 ++++ mpfr-4.0.2/src/version.c 2020-03-30 15:17:31.535330224 +0000 +@@ -25,5 +25,5 @@ + const char * + mpfr_get_version (void) + { +- return "4.0.2-p4"; ++ return "4.0.2-p5"; + } +--- mpfr-4.0.2/tests/tdiv.c 2019-01-07 13:53:20.000000000 +0000 ++++ mpfr-4.0.2/tests/tdiv.c 2020-03-30 15:17:31.523330366 +0000 +@@ -23,7 +23,7 @@ + #include "mpfr-test.h" + + static void +-check_equal (mpfr_srcptr a, mpfr_srcptr a2, char *s, ++check_equal (mpfr_srcptr a, mpfr_srcptr a2, const char *s, + mpfr_srcptr b, mpfr_srcptr c, mpfr_rnd_t r) + { + if (SAME_VAL (a, a2)) +--- mpfr-4.0.2/tests/tfpif.c 2019-01-07 13:53:20.000000000 +0000 ++++ mpfr-4.0.2/tests/tfpif.c 2020-03-30 15:17:31.523330366 +0000 +@@ -30,8 +30,8 @@ + static void + doit (int argc, char *argv[], mpfr_prec_t p1, mpfr_prec_t p2) + { +- char *filenameCompressed = FILE_NAME_RW; +- char *data = FILE_NAME_R; ++ const char *filenameCompressed = FILE_NAME_RW; ++ const char *data = FILE_NAME_R; + int status; + FILE *fh; + mpfr_t x[9]; +@@ -198,7 +198,7 @@ + static void + check_bad (void) + { +- char *filenameCompressed = FILE_NAME_RW; ++ const char *filenameCompressed = FILE_NAME_RW; + int status; + FILE *fh; + mpfr_t x; +@@ -340,7 +340,7 @@ + static void + extra (void) + { +- char *data = FILE_NAME_R2; ++ const char *data = FILE_NAME_R2; + mpfr_t x; + FILE *fp; + int ret; +--- mpfr-4.0.2/tests/tmul_2exp.c 2019-01-07 13:53:20.000000000 +0000 ++++ mpfr-4.0.2/tests/tmul_2exp.c 2020-03-30 15:17:31.523330366 +0000 +@@ -258,7 +258,7 @@ + mpfr_exp_t old_emax; + mpfr_t x, y1, y2; + int neg, r, op; +- static char *sop[4] = { "mul_2ui", "mul_2si", "div_2ui", "div_2si" }; ++ static const char *sop[4] = { "mul_2ui", "mul_2si", "div_2ui", "div_2si" }; + + old_emax = mpfr_get_emax (); + set_emax (emax); +--- mpfr-4.0.2/tests/trandom.c 2019-01-07 13:53:20.000000000 +0000 ++++ mpfr-4.0.2/tests/trandom.c 2020-03-30 15:17:31.523330366 +0000 +@@ -185,7 +185,7 @@ + { + gmp_randstate_t s; + mpfr_t x; +- char *str = "0.1010111100000000000000000000000000000000E-32"; ++ const char *str = "0.1010111100000000000000000000000000000000E-32"; + int k; + + gmp_randinit_default (s); +--- mpfr-4.0.2/tests/trint.c 2019-01-25 02:00:06.000000000 +0000 ++++ mpfr-4.0.2/tests/trint.c 2020-03-30 15:17:31.523330366 +0000 +@@ -308,7 +308,7 @@ + #if __MPFR_STDC (199901L) + + static void +-test_fct (double (*f)(double), int (*g)(), char *s, mpfr_rnd_t r) ++test_fct (double (*f)(double), int (*g)(), const char *s, mpfr_rnd_t r) + { + double d, y; + mpfr_t dd, yy; +--- mpfr-4.0.2/tests/tsum.c 2019-01-07 13:53:20.000000000 +0000 ++++ mpfr-4.0.2/tests/tsum.c 2020-03-30 15:17:31.523330366 +0000 +@@ -285,7 +285,7 @@ + static void + check_more_special (void) + { +- char *str[NC] = { "NaN", "+Inf", "-Inf", "+0", "-0", "+1", "-1" }; ++ const char *str[NC] = { "NaN", "+Inf", "-Inf", "+0", "-0", "+1", "-1" }; + int i, r, k[NS]; + mpfr_t c[NC], s[NS], sum; + mpfr_ptr p[NS]; +@@ -724,7 +724,7 @@ + { + mpfr_t sum, t[4]; + mpfr_ptr p[4]; +- char *s[4] = { ++ const char *s[4] = { + "0x1p1000", + "-0x0.fffffffffffff80000000000000001p1000", + "-0x1p947", +@@ -771,7 +771,11 @@ + { + mpfr_t sum1, sum2, t[3]; + mpfr_ptr p[3]; +- char *s[3] = { "0.10000111110101000010101011100001", "1E-100", "0.1E95" }; ++ const char *s[3] = { ++ "0.10000111110101000010101011100001", ++ "1E-100", ++ "0.1E95" ++ }; + int i, r; + + mpfr_inits2 (58, sum1, sum2, (mpfr_ptr) 0); +@@ -1268,7 +1272,7 @@ + { + mpfr_t r, t[4]; + mpfr_ptr p[4]; +- char *s[4] = { "0.10E20", "0", "0.11E382", "0.10E826" }; ++ const char *s[4] = { "0.10E20", "0", "0.11E382", "0.10E826" }; + int i; + + mpfr_init2 (r, 2); +--- mpfr-4.0.2/tests/turandom.c 2019-01-07 13:53:20.000000000 +0000 ++++ mpfr-4.0.2/tests/turandom.c 2020-03-30 15:17:31.523330366 +0000 +@@ -526,7 +526,7 @@ + #define N 6 + /* Run this program with the MPFR_REPROD_ABI_OUTPUT environment variable + set to get the array of strings. */ +- char *t[5 * N] = { ++ const char *t[5 * N] = { + "1.0@-1", + "3.0@-1", + "7.0@-1", +--- mpfr-4.0.2/PATCHES 2020-03-30 16:50:17.064231191 +0000 ++++ mpfr-4.0.2/PATCHES 2020-03-30 16:50:17.096230810 +0000 +@@ -0,0 +1 @@ ++array-length +--- mpfr-4.0.2/VERSION 2020-03-30 15:17:31.535330224 +0000 ++++ mpfr-4.0.2/VERSION 2020-03-30 16:50:17.096230810 +0000 +@@ -1 +1 @@ +-4.0.2-p5 ++4.0.2-p6 +--- mpfr-4.0.2/src/mpfr-impl.h 2020-03-30 13:09:17.490071686 +0000 ++++ mpfr-4.0.2/src/mpfr-impl.h 2020-03-30 16:50:17.084230953 +0000 +@@ -2026,7 +2026,21 @@ + struct mpfr_group_t { + size_t alloc; + mp_limb_t *mant; ++#if MPFR_GROUP_STATIC_SIZE != 0 + mp_limb_t tab[MPFR_GROUP_STATIC_SIZE]; ++#else ++ /* In order to detect memory leaks when testing, MPFR_GROUP_STATIC_SIZE ++ can be set to 0, in which case tab will not be used. ISO C does not ++ support zero-length arrays[*], thus let's use a flexible array member ++ (which will be equivalent here). Note: this is new in C99, but this ++ is just used for testing. ++ [*] Zero-length arrays are a GNU extension: ++ https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html ++ and as such an extension is forbidden in ISO C, it triggers an ++ error with -Werror=pedantic. ++ */ ++ mp_limb_t tab[]; ++#endif + }; + + #define MPFR_GROUP_DECL(g) struct mpfr_group_t g +--- mpfr-4.0.2/src/mpfr.h 2020-03-30 15:17:31.535330224 +0000 ++++ mpfr-4.0.2/src/mpfr.h 2020-03-30 16:50:17.096230810 +0000 +@@ -27,7 +27,7 @@ + #define MPFR_VERSION_MAJOR 4 + #define MPFR_VERSION_MINOR 0 + #define MPFR_VERSION_PATCHLEVEL 2 +-#define MPFR_VERSION_STRING "4.0.2-p5" ++#define MPFR_VERSION_STRING "4.0.2-p6" + + /* User macros: + MPFR_USE_FILE: Define it to make MPFR define functions dealing +--- mpfr-4.0.2/src/version.c 2020-03-30 15:17:31.535330224 +0000 ++++ mpfr-4.0.2/src/version.c 2020-03-30 16:50:17.096230810 +0000 +@@ -25,5 +25,5 @@ + const char * + mpfr_get_version (void) + { +- return "4.0.2-p5"; ++ return "4.0.2-p6"; + } +--- mpfr-4.0.2/PATCHES 2020-04-03 13:54:03.807946879 +0000 ++++ mpfr-4.0.2/PATCHES 2020-04-03 13:54:03.891945830 +0000 +@@ -0,0 +1 @@ ++sub1-ubftest +--- mpfr-4.0.2/VERSION 2020-03-30 16:50:17.096230810 +0000 ++++ mpfr-4.0.2/VERSION 2020-04-03 13:54:03.891945830 +0000 +@@ -1 +1 @@ +-4.0.2-p6 ++4.0.2-p7 +--- mpfr-4.0.2/src/mpfr.h 2020-03-30 16:50:17.096230810 +0000 ++++ mpfr-4.0.2/src/mpfr.h 2020-04-03 13:54:03.891945830 +0000 +@@ -27,7 +27,7 @@ + #define MPFR_VERSION_MAJOR 4 + #define MPFR_VERSION_MINOR 0 + #define MPFR_VERSION_PATCHLEVEL 2 +-#define MPFR_VERSION_STRING "4.0.2-p6" ++#define MPFR_VERSION_STRING "4.0.2-p7" + + /* User macros: + MPFR_USE_FILE: Define it to make MPFR define functions dealing +--- mpfr-4.0.2/src/version.c 2020-03-30 16:50:17.096230810 +0000 ++++ mpfr-4.0.2/src/version.c 2020-04-03 13:54:03.891945830 +0000 +@@ -25,5 +25,5 @@ + const char * + mpfr_get_version (void) + { +- return "4.0.2-p6"; ++ return "4.0.2-p7"; + } +--- mpfr-4.0.2/tests/tsub.c 2020-03-30 13:09:17.490071686 +0000 ++++ mpfr-4.0.2/tests/tsub.c 2020-04-03 13:54:03.827946629 +0000 +@@ -1203,9 +1203,9 @@ + for (j = 0; j < numberof (e); j++) + { + inexact = mpfr_set_exp_t (ee, e[j], MPFR_RNDN); +- MPFR_ASSERTD (inexact == 0); ++ MPFR_ASSERTN (inexact == 0); + inexact = mpfr_get_z (MPFR_ZEXP (p[0]), ee, MPFR_RNDN); +- MPFR_ASSERTD (inexact == 0); ++ MPFR_ASSERTN (inexact == 0); + mpz_sub_ui (MPFR_ZEXP (p[0]), MPFR_ZEXP (p[0]), kn); + + for (k = -kn; k <= kn; k++) +@@ -1266,23 +1266,31 @@ + { + static int v[4] = { 26, 1, 256, 231 }; + +- mpfr_init2 (p[i], i < 4 ? 5 + (randlimb () % 128) : 256); ++ mpfr_init2 (p[i], i < 4 ? 8 + (randlimb () % 128) : 256); + if (i < 4) +- mpfr_set_si_2exp (p[i], v[i], -5, MPFR_RNDN); ++ { ++ inexact = mpfr_set_si_2exp (p[i], v[i], -5, MPFR_RNDN); ++ MPFR_ASSERTN (inexact == 0); ++ } + else + { +- mpfr_set_si_2exp (p[i], 1, 200, MPFR_RNDN); +- mpfr_add (p[i], p[i], p[i-4], MPFR_RNDN); ++ inexact = mpfr_set_si_2exp (p[i], 1, 200, MPFR_RNDN); ++ MPFR_ASSERTN (inexact == 0); ++ inexact = mpfr_add (p[i], p[i], p[i-4], MPFR_RNDN); ++ MPFR_ASSERTN (inexact == 0); + } + ex[i] = mpfr_get_exp (p[i]) + 5; +- MPFR_ASSERTD (ex[i] >= 0); ++ MPFR_ASSERTN (ex[i] >= 0); + } + mpfr_inits2 (3, p[8], p[9], p[10], (mpfr_ptr) 0); +- mpfr_set_si_2exp (p[8], 1, 0, MPFR_RNDN); ++ inexact = mpfr_set_si_2exp (p[8], 1, 0, MPFR_RNDN); ++ MPFR_ASSERTN (inexact == 0); + ex[8] = 5; +- mpfr_set_si_2exp (p[9], 1, 0, MPFR_RNDN); /* will be epsilon */ ++ inexact = mpfr_set_si_2exp (p[9], 1, 0, MPFR_RNDN); /* will be epsilon */ ++ MPFR_ASSERTN (inexact == 0); + ex[9] = 0; +- mpfr_set_si_2exp (p[10], 7, 0, MPFR_RNDN); ++ inexact = mpfr_set_si_2exp (p[10], 7, 0, MPFR_RNDN); ++ MPFR_ASSERTN (inexact == 0); + ex[10] = 5; + + for (i = 0; i < 11; i++) +@@ -1294,9 +1302,9 @@ + for (j = 0; j < numberof (e); j++) + { + inexact = mpfr_set_exp_t (ee, e[j], MPFR_RNDN); +- MPFR_ASSERTD (inexact == 0); ++ MPFR_ASSERTN (inexact == 0); + inexact = mpfr_get_z (MPFR_ZEXP (p[0]), ee, MPFR_RNDN); +- MPFR_ASSERTD (inexact == 0); ++ MPFR_ASSERTN (inexact == 0); + for (i = 1; i < 11; i++) + mpz_set (MPFR_ZEXP (p[i]), MPFR_ZEXP (p[0])); + for (i = 0; i < 11; i++) diff --git a/sources b/sources index 29c10d5..454bac6 100644 --- a/sources +++ b/sources @@ -1,19 +1,21 @@ SHA512 (Macaulay2-icons.tar.xz) = 069aa0ad70a0253583b00091c094da9b79d2a2f0f2d38aa97f543081f5df5fd3b5a9e1463febd6947c3151cf01844133174c7372f57e158c2d3faba6baed5d1d -SHA512 (version-1.14.0.1.tar.gz) = aa537123348d71374bdb0eb9bd41f6a7fc91184e2f9679dab488fc4e33aa3ee913a94e2e406b39b9a3805437731097e7c525d614fbed2389acdfda0842e3b640 -SHA512 (4ti2-1.6.7.tar.gz) = 313bc4ca4b329b4f25c3c63131224c0970382371b3ca962cfef1de5af40109b40efb9ac09d4fbcebf74440b42a1e213cb44af99be24b4a7460b859f9b8d3c37d -SHA512 (cohomCalg-031b.zip) = 20c362e2a5485b3e102b87c6c12779d60516af1dd71a3893fbdd891ad703dcb6e69d120558d54b9bb8fec635f92bd8e51baf0b564afbb2a09a4934779395070d +SHA512 (version-1.15.1.0.tar.gz) = 7ffe9f5e15ab43cec72100ccb5ee4fd646d34f6c5096e2f8b6e856a556f4e05627721836321836fea21d14c978e37f653b3e3e32c26aa71c9a58b29f083c95bd +SHA512 (4ti2-1.6.9.tar.gz) = f02b61ba04d7512e86d9574574669ec764d053fc5d01744dc6b521518d4165b41355ae12344923f1549b323406130c6562a4d9272b1b88de2ecc2c20d3d892d5 +SHA512 (cddlib-094h.tar.gz) = 94a3ef03fd86ece7e61e4f9bec283862594b05a6faca76897e33ad15762527c885cee5439bb8a5d337a608ceb17baff24910da326071a3107df17a0c07f5e774 +SHA512 (cohomCalg-0.32.tar.gz) = 70e72363467e557c32a2d20192cfcb12bcce77edc251ebfaeb9062fa456043b749758a9e3273325613d4b5572c7771aee7853fc244a3ed8957145e02d80de128 SHA512 (Csdp-6.2.0.tgz) = 6f6c44abcb7b0e277f5a42a1e31acbd41c8fbdce0c1641982a48199fe1d922b28d86433d1a98ac71ae521bea04188a830c441db1e9d8eebf174debf501430e82 SHA512 (factory-4.1.1.tar.gz) = f08d74cb860145c07b9f1cc0a3fe44cb6fb2fc158a9b992f0db55eeef9e93d280cf66a5c8822236389e54b8084d2a37c174b32864e4dc12b8ee3c4760e9fe2bf -SHA512 (flint-2.5.2.tar.gz) = cce36947b558aabecaf780171b4bbc0e1330c3b1a7e3580717584be5cab4991d33b190531c7995b224a3a440e28c4a610d6f781901e29f48ced12a9c5ba960a2 +SHA512 (flint-20200414.tar.gz) = 06f8d4fc5dde0476ed18c37d9342d4350745a92410eb80c6d98cf10f557bdba1134d2d5a97db5f0d226ae5617fbd0d9db0b36b81ce350576e5615bbcdac3ab1e SHA512 (frobby_v0.9.0.tar.gz) = bc96ff20ec334932b5eaa8a3d15d0e36eab41eb85e8b74dbdc374dcaafc9873e44a8af16f6caae649aeea17cd6284caf244d4d345689ad43288f199c591a68a6 SHA512 (gfan0.6.2.tar.gz) = 08a9cc543967771af959a506b79db5b55e0e4942e4170dad8691db35ef7d381d878e1ea6534a3cacc0f5d30ec31564ec94cc20b46792d06f18a3a8a3c0aac91d -SHA512 (givaro-4.0.2.tar.gz) = 8338a8e348c04be08e59fe9744febd918d4913a831ff0b7dba0577fd639dbfde802f15e90f10d42ddf6c544117f4d256bdc8c51996afbbee6c314c1537d165f6 +SHA512 (givaro-4.1.1.tar.gz) = 415c24146fb41ed5db1ffbe687bf0fd62a68e82b69e1aece7721ad75ae9fede2d37223a3fa11f770f41bcd2d426e5aa9b2b8f1bc1e62eac44821c6e1a215114e SHA512 (glpk-4.59.tar.gz) = ca05bd085880143acf4a440cf7efd2392d4dde89bed53a0e5726526cb210eee004bfcd434aeb8ca8abb1dc89ff93e72054489911e5e2c843e0ed631d50c55f56 -SHA512 (gtest-1.8.0.tar.gz) = 54da3f3884685f0ff17fb12236063f32eeb78a4305883b1b2010818ec19c8e8221f2ee62fda21ba1b9d4c9d07cc5ac9eba688e4bcad30782897d5ba2417a19c3 +SHA512 (gtest-1.10.0.tar.gz) = bd52abe938c3722adc2347afad52ea3a17ecc76730d8d16b065e165bc7477d762bce0997a427131866a89f1001e3f3315198204ffa5d643a9355f1f4d0d7b1a9 SHA512 (lapack-3.6.0.tgz) = 0975c721abe38ef46cda2ba446060428e2f576ec4558cc0205ca6af2af2bd8f7f4c31fd0c90d77a92719a73e1942fade19b4c17e6fe2da29d54ad1adccf5a6b2 SHA512 (libfplll-5.2.0.tar.gz) = 67d1a8deb92d3f9245983b09b7593b19c5d43c8fe77cfea893ea9dfb744bcb77b7239d73e4f619450cc6960f4c48fb1c6ba46268208b0f31f855cf1af6bfaa29 SHA512 (lrslib-062.tar.gz) = 78fa6d470b2dd9cb06d1d15023debd8fafc27ed4df93cd90ef746071755f6b1fe9ee2c6a24659030b9a8851bd3ee3a699407586d320f3760c3d8a3a1c79d7116 -SHA512 (mpc-1.1.0.tar.gz) = 72d657958b07c7812dc9c7cbae093118ce0e454c68a585bfb0e2fa559f1bf7c5f49b93906f580ab3f1073e5b595d23c6494d4d76b765d16dde857a18dd239628 -SHA512 (mpfr-3.1.6.tar.xz) = 746ee74d5026f267f74ab352d850ed30ff627d530aa840c71b24793e44875f8503946bd7399905dea2b2dd5744326254d7889337fe94cfe58d03c4066e9d8054 -SHA512 (normaliz-3.6.3.tar.gz) = f749dac30c246615071ebefa37d6aff30cbbaf958985b7a28afef175ddbde689564d65bdefe5e6b7d41d91faee78cc63060a31eca06cfa1ef8e1ad1ba5501c24 +SHA512 (mathicgb-1.0.tar.gz) = de4917f88771e17f0f3446ac4254a142f179bc87cb5596c18c30b4547ff0c1131694a18247d0a6f91cbe39d91590d0dedebd74e6634c3aad344935722c037afc +SHA512 (mpfr-4.0.2.tar.xz) = d583555d08863bf36c89b289ae26bae353d9a31f08ee3894520992d2c26e5683c4c9c193d7ad139632f71c0a476d85ea76182702a98bf08dde7b6f65a54f8b88 +SHA512 (mpsolve-3.1.8.tar.gz) = 843ab1e2719600740e95a6f5e740bb6731c7b74039a2d7ccabff680fd455e5a350e0709a3261b551d80da76b49448b9ea9ac480e3a07c03a35576c4eb6746f9e +SHA512 (normaliz-3.7.2.tar.gz) = 044a1b5c7e877cdfceedbe6b283b982b66e58f0cc5b0ccf6a63a293044d1348290fde92531b4c4a0a58f5263bb7696a2511b5a1dff94222c9e56a2fe3fccb69b SHA512 (TOPCOM-0.17.8.tar.gz) = 8611e8bd36eda00646fb40794435f23e6af81ecbee93c40e8fe5f73905e673e6244cb0f8cc1fe5c29050e40c7d53a44c615c60cbbecc8452b3c85f1d8a816d7a From 8be572e1a546da5e6fa822f5ca4e89d56f071eb8 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Wed, 1 Jul 2020 12:55:44 -0600 Subject: [PATCH 09/70] Disable LTO --- Macaulay2.spec | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index b8b9da2..0e9c589 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -37,7 +37,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 Version: 1.15.1.0 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 or GPLv3 URL: http://macaulay2.com/ @@ -339,6 +339,13 @@ sed -i '/all-in-mathicgb:all-in-mathic all-in-memtailor/d' GNUmakefile.in %build +# This package has a configure test which compiles code and expects it to +# behave in a very specific way (__builtin_return_address). LTO changs the +# behavior and the configure test does not know how to handle it. +# Until the configure script is fixed this seems like the best thing to do +# Disable LTO +%define _lto_cflags %{nil} + ## configure macro currently broken, due to some odd prefix-checks. probably fixable -- Rex mkdir -p BUILD/%{_target_platform} pushd BUILD/%{_target_platform} @@ -470,6 +477,9 @@ time make -k check -C BUILD/%{_target_platform} Verbose=true ||: %changelog +* Wed Jul 1 2020 Jeff Law - 1.15.1.0-2 +- Disable LTO + * Wed Jun 3 2020 Jerry James - 1.15.1.0-1 - Version 1.15.1.0 - Drop upstreamed patches: -no_Werror, -mpir, -pthreads, -fflas-ffpack, From 555ee6d1073015ca0ea152c2d0f21cd045b6bbdc Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 27 Jul 2020 10:27:55 +0000 Subject: [PATCH 10/70] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- Macaulay2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index 0e9c589..b9b0ec2 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -37,7 +37,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 Version: 1.15.1.0 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 or GPLv3 URL: http://macaulay2.com/ @@ -477,6 +477,9 @@ time make -k check -C BUILD/%{_target_platform} Verbose=true ||: %changelog +* Mon Jul 27 2020 Fedora Release Engineering - 1.15.1.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Wed Jul 1 2020 Jeff Law - 1.15.1.0-2 - Disable LTO From 31dbcc740f172f3734cb6691c2ef08d4210edbe4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 1 Aug 2020 04:22:37 +0000 Subject: [PATCH 11/70] - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- Macaulay2.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index b9b0ec2..549a4f1 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -37,7 +37,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 Version: 1.15.1.0 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 or GPLv3 URL: http://macaulay2.com/ @@ -477,6 +477,10 @@ time make -k check -C BUILD/%{_target_platform} Verbose=true ||: %changelog +* Sat Aug 01 2020 Fedora Release Engineering - 1.15.1.0-4 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Mon Jul 27 2020 Fedora Release Engineering - 1.15.1.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From 2c54347bc4078c58de5bdbb76bb25c98fd159ff8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1aki=20=C3=9Acar?= Date: Mon, 17 Aug 2020 01:38:57 +0200 Subject: [PATCH 12/70] https://fedoraproject.org/wiki/Changes/FlexiBLAS_as_BLAS/LAPACK_manager --- Macaulay2.spec | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index 549a4f1..ec63552 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -34,10 +34,16 @@ # The examples contain some python files which should not be byte compiled %global _python_bytecompile_extra 0 +%if 0%{?fedora} >= 33 +%global blaslib flexiblas +%else +%global blaslib openblas +%endif + Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 Version: 1.15.1.0 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2 or GPLv3 URL: http://macaulay2.com/ @@ -164,7 +170,6 @@ BuildRequires: mpir-devel %endif BuildRequires: gtest-devel BuildRequires: info -BuildRequires: lapack-devel BuildRequires: libgfan-devel BuildRequires: libtool BuildRequires: libatomic_ops-devel @@ -184,7 +189,7 @@ BuildRequires: mpsolve-devel BuildRequires: nauty BuildRequires: normaliz BuildRequires: ntl-devel -BuildRequires: openblas-devel +BuildRequires: %{blaslib}-devel BuildRequires: pari-devel BuildRequires: pkgconfig(bdw-gc) >= 7.6.2 BuildRequires: pkgconfig(libxml-2.0) @@ -271,7 +276,7 @@ popd ## patches for bundled code cp -p %{SOURCE200} libraries/flint/patch-%{flintver} sed -e 's/# PATCHFILE/PATCHFILE/' \ - -e 's,--with-blas,&=%{_includedir}/openblas --with-ntl,' \ + -e 's,--with-blas,&=%{_includedir}/%{blaslib} --with-ntl,' \ -i libraries/flint/Makefile.in cp -p %{SOURCE201} libraries/factory/patch-%{factoryver} cp -p %{SOURCE202} libraries/mpfr/patch-%{mpfrver} @@ -313,7 +318,7 @@ chmod a-x Macaulay2/packages/NumericalAlgebraicGeometry/hom4ps2_in_out # Use, but don't build, cddlib, fflas-ffpack, gc, and linbox. Use the static # versions of libfplll and givaro. Do not invoke git on a nonrepository. Link -# with openblas instead of the reference blas and lapack. Fix a typo. +# with blaslib instead of the reference blas and lapack. Fix a typo. sed -e 's/^BUILD_cddlib=yes/BUILD_cddlib=no/' \ -e 's/^BUILD_gc=yes/BUILD_gc=no/' \ -e 's/BUILD_linbox=yes/BUILD_linbox=no/' \ @@ -321,7 +326,7 @@ sed -e 's/^BUILD_cddlib=yes/BUILD_cddlib=no/' \ -e 's/^\(GIT_DESCRIPTION=\).*/\1"unknown"/' \ -e 's,-lfplll,%{_libdir}/libfplll.a,' \ -e 's,-lgivaro,%{_libdir}/libgivaro.a,' \ - -e 's,-llapack -lrefblas,-lopenblas,' \ + -e 's,-llapack -lrefblas,-l%{blaslib},' \ -e 's,\$added_fclibs != yes,"$added_fclibs" != yes,' \ -i configure.ac @@ -361,7 +366,6 @@ cxxflags="%{optflags} -fsigned-char" CPPFLAGS="-I%{_includedir}/cddlib -I%{_includedir}/frobby" \ CFLAGS="%{optflags} -fsigned-char" \ CXXFLAGS="$cxxflags" \ -LIBS="-lopenblas" \ ../../configure \ --build=%{_build} \ --host=%{_host} \ @@ -382,7 +386,7 @@ LIBS="-lopenblas" \ --enable-build-libraries="mpfr flint factory lapack fplll givaro gtest" # The list of libraries and submodules above should include only those that: # 1. We bundle (mpfr, flint, and factory) - # 2. We sneakily substitute one library for another (lapack -> openblas) + # 2. We sneakily substitute one library for another (lapack -> blaslib) # 3. Have to be linked with the static library (fplll and givaro) popd @@ -477,6 +481,9 @@ time make -k check -C BUILD/%{_target_platform} Verbose=true ||: %changelog +* Sun Aug 16 2020 Iñaki Úcar - 1.15.1.0-5 +- https://fedoraproject.org/wiki/Changes/FlexiBLAS_as_BLAS/LAPACK_manager + * Sat Aug 01 2020 Fedora Release Engineering - 1.15.1.0-4 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From 1690102d4b3adc2f729e6640d62b91412a6c29b0 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Mon, 31 Aug 2020 21:19:59 -0600 Subject: [PATCH 13/70] Version 1.16. - Drop upstreamed patch: -xdg_open. - Add -ulimit patch for the slower builders. - Add -format and -rightarrow patches. - Bundle packages due to garbage collector crashes: linbox, memtailor, mathic. - Drop the XEmacs subpackage; XEmacs support no longer works. --- Macaulay2-1.11-xdg_open.patch | 20 - Macaulay2-1.15-default_make_targets.patch | 11 - Macaulay2-1.16-default_make_targets.patch | 11 + Macaulay2-1.16-format.patch | 11 + ....patch => Macaulay2-1.16-no_gftables.patch | 8 +- Macaulay2-1.16-rightarrow.patch | 11 + Macaulay2-1.16-ulimit.patch | 115 ++ Macaulay2.spec | 200 +- factory-4.1.1.patch | 39 +- flint-20200414.patch | 391 ---- linbox-1.6.3.patch | 35 + mathicgb-1.0.patch | 61 +- mpfr-4.0.2.patch | 1614 ----------------- sources | 18 +- 14 files changed, 384 insertions(+), 2161 deletions(-) delete mode 100644 Macaulay2-1.11-xdg_open.patch delete mode 100644 Macaulay2-1.15-default_make_targets.patch create mode 100644 Macaulay2-1.16-default_make_targets.patch create mode 100644 Macaulay2-1.16-format.patch rename Macaulay2-1.15-no_gftables.patch => Macaulay2-1.16-no_gftables.patch (67%) create mode 100644 Macaulay2-1.16-rightarrow.patch create mode 100644 Macaulay2-1.16-ulimit.patch delete mode 100644 flint-20200414.patch create mode 100644 linbox-1.6.3.patch delete mode 100644 mpfr-4.0.2.patch diff --git a/Macaulay2-1.11-xdg_open.patch b/Macaulay2-1.11-xdg_open.patch deleted file mode 100644 index b7e7740..0000000 --- a/Macaulay2-1.11-xdg_open.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- M2/Macaulay2/m2/html.m2.orig 2018-03-07 10:43:35.000000000 -0700 -+++ M2/Macaulay2/m2/html.m2 2018-04-22 14:48:26.637899340 -0600 -@@ -1263,6 +1263,7 @@ chk := ret -> if ret != 0 then ( - error "external command failed" - ) - browserMethods := hashTable { -+ "xdg open" => url -> {"xdg-open", url}, - "firefox" => url -> {"firefox", url}, - "open" => url -> {"open", url}, - "cygstart" => url -> {"cygstart", url}, -@@ -1278,7 +1279,8 @@ show URL := x -> ( - else - if version#"issue" === "Cygwin" then browser = "cygstart"; - if browser === "" then ( -- if runnable "firefox" then browser = "firefox" -+ if runnable "xdg-open" then browser = "xdg-open" -+ else if runnable "firefox" then browser = "firefox" - else if runnable "netscape" then browser = "netscape" - else error "no browser found, and none specified in $WWWBROWSER" - ); diff --git a/Macaulay2-1.15-default_make_targets.patch b/Macaulay2-1.15-default_make_targets.patch deleted file mode 100644 index 0c209c9..0000000 --- a/Macaulay2-1.15-default_make_targets.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- M2/Macaulay2/Makefile.in.orig 2020-05-28 20:16:53.246808781 -0600 -+++ M2/Macaulay2/Makefile.in 2020-05-28 20:17:27.293787155 -0600 -@@ -7,7 +7,7 @@ SUBDIRS = util regex c - ifeq "@DUMPDATA@" "yes" - SUBDIRS += dumpdata - endif --SUBDIRS += d e system bin m2 man packages emacs html-check-links tests -+SUBDIRS += d e system bin m2 man packages emacs - SUBDIRS += book - - define do-in-subdirs diff --git a/Macaulay2-1.16-default_make_targets.patch b/Macaulay2-1.16-default_make_targets.patch new file mode 100644 index 0000000..1e77bcf --- /dev/null +++ b/Macaulay2-1.16-default_make_targets.patch @@ -0,0 +1,11 @@ +--- M2/Macaulay2/Makefile.in.orig 2020-07-12 19:17:33.241211749 -0600 ++++ M2/Macaulay2/Makefile.in 2020-07-12 19:18:07.133195781 -0600 +@@ -3,7 +3,7 @@ + VPATH = @srcdir@ + include ../include/config.Makefile + all: @pre_docdir@/COPYING-GPL-2 @pre_docdir@/COPYING-GPL-3 @pre_docdir@/README @pre_docdir@/LAYOUT +-SUBDIRS = util regex c d e system bin m2 man packages editors html-check-links tests ++SUBDIRS = util regex c d e system bin m2 man packages editors + + define do-in-subdirs + $(foreach d,$(SUBDIRS), diff --git a/Macaulay2-1.16-format.patch b/Macaulay2-1.16-format.patch new file mode 100644 index 0000000..2ffd3f5 --- /dev/null +++ b/Macaulay2-1.16-format.patch @@ -0,0 +1,11 @@ +--- M2/Macaulay2/e/mem.cpp.orig 2020-07-11 05:04:29.000000000 -0600 ++++ M2/Macaulay2/e/mem.cpp 2020-07-12 19:26:39.391982818 -0600 +@@ -71,7 +71,7 @@ void stash::text_out(buffer &o) const + { + char s[200]; + sprintf(s, +- "%16s %9dk %9dk %10zd %10lu %10lu %10lu %10lu%s", ++ "%16s %9dk %9dk %10zu %10zu %10zu %10zu %10zu%s", + name, + static_cast((element_size * highwater + 1023) / 1024), + static_cast((element_size * n_inuse + 1023) / 1024), diff --git a/Macaulay2-1.15-no_gftables.patch b/Macaulay2-1.16-no_gftables.patch similarity index 67% rename from Macaulay2-1.15-no_gftables.patch rename to Macaulay2-1.16-no_gftables.patch index 7aa2807..e491a6e 100644 --- a/Macaulay2-1.15-no_gftables.patch +++ b/Macaulay2-1.16-no_gftables.patch @@ -1,7 +1,7 @@ ---- M2/configure.ac.orig 2020-05-28 20:18:37.577744116 -0600 -+++ M2/configure.ac 2020-05-28 20:19:23.942716638 -0600 -@@ -711,7 +711,7 @@ AC_SUBST(BUILTLIBS) - AC_SUBST(LIBLIST, " atomic_ops gc gdbm gmp mpir mpfr readline ntl flint factory lapack mpsolve frobby glpk cddlib fplll givaro linbox boost gtest ") +--- M2/configure.ac.orig 2020-07-12 19:15:12.986277846 -0600 ++++ M2/configure.ac 2020-07-12 19:19:00.202170774 -0600 +@@ -673,7 +673,7 @@ AC_SUBST(BUILTLIBS) + AC_SUBST(LIBLIST, " atomic_ops gc gdbm gmp mpir mpfr readline ntl flint factory lapack mpsolve frobby glpk cddlib fplll linbox gtest ") # The list LIBLIST is the list of libraries that might be used and linked into M2. -AC_SUBST(PROGLIST, "4ti2 gfan normaliz csdp nauty cddplus lrslib gftables topcom cohomcalg") diff --git a/Macaulay2-1.16-rightarrow.patch b/Macaulay2-1.16-rightarrow.patch new file mode 100644 index 0000000..1c4abd5 --- /dev/null +++ b/Macaulay2-1.16-rightarrow.patch @@ -0,0 +1,11 @@ +--- M2/Macaulay2/packages/Macaulay2Doc/overview_modules.m2.orig 2020-07-11 05:04:29.000000000 -0600 ++++ M2/Macaulay2/packages/Macaulay2Doc/overview_modules.m2 2020-07-12 19:27:28.520963206 -0600 +@@ -347,7 +347,7 @@ document { + }, + TEX "Macaulay2 represents each module (at least conceptually) as a subquotient module, that is, a submodule of + a quotient of an ambient free module. A subquotient module is determined by two +- matrices $f : R^m \\rightarrow{} R^n$ and $g : R^p \\rightarrow{} R^n$. ++ matrices $f : R^m \\rightarrow R^n$ and $g : R^p \\rightarrow R^n$. + The {\\em subquotient module} with generators $f$ and relations $g$ is by definition the module + $M = ((image f) + (image g))/(image g)$.", + PARA{}, diff --git a/Macaulay2-1.16-ulimit.patch b/Macaulay2-1.16-ulimit.patch new file mode 100644 index 0000000..96065a5 --- /dev/null +++ b/Macaulay2-1.16-ulimit.patch @@ -0,0 +1,115 @@ +--- M2/GNUmakefile.in.orig 2020-07-11 05:04:29.000000000 -0600 ++++ M2/GNUmakefile.in 2020-07-12 19:24:55.838024149 -0600 +@@ -136,7 +136,7 @@ build-in-$1: submodules/$1/Makefile + $(MAKE) -C submodules/$1 all + check-in-$1: run-configure-in-$1 + ifeq ($(no-check-$1),) +- ulimit -v 1000000 && $(MAKE) -C submodules/$1 check ++ ulimit -v 2000000 && $(MAKE) -C submodules/$1 check + endif + + install-in-$1: build-in-$1; + $(MAKE) -C submodules/$1 install +--- M2/libraries/Makefile.library.in.orig 2020-07-11 05:04:29.000000000 -0600 ++++ M2/libraries/Makefile.library.in 2020-07-12 19:20:23.705132772 -0600 +@@ -238,10 +238,10 @@ distclean: package-distclean + clean::; rm -rf .patched* .untarred* $(LIBNAME)* .checked* .compiled* .configured* .installed* .untarred2* diffs tmp $(UNTARDIR) $(OLDUNTARDIR) + distclean: clean ; rm -rf Makefile + +-SLIMIT ?= 8192 +-TLIMIT ?= 100 +-MLIMIT ?= 400000 +-VLIMIT ?= 400000 ++SLIMIT ?= 16384 ++TLIMIT ?= 200 ++MLIMIT ?= 800000 ++VLIMIT ?= 800000 + LIMIT := : + ifeq (@ULIMIT_T@,yes) + LIMIT += ; ulimit -t $(TLIMIT) +--- M2/Macaulay2/m2/basictests/Makefile.in.orig 2020-07-11 05:04:29.000000000 -0600 ++++ M2/Macaulay2/m2/basictests/Makefile.in 2020-07-12 19:23:46.653051760 -0600 +@@ -22,17 +22,17 @@ $(TESTRESULTS) : @pre_exec_prefix@/bin/M + ARGS := --silent -q --stop --no-setup -e 'srcdir = "@srcdir@/"' + + ifeq "@DEBUG@" "no" +-TLIMIT ?= 20 +-MLIMIT ?= 600000 +-VLIMIT ?= 600000 ++TLIMIT ?= 40 ++MLIMIT ?= 1200000 ++VLIMIT ?= 1200000 + else +-TLIMIT ?= 60 +-MLIMIT ?= 700000 +-VLIMIT ?= 700000 ++TLIMIT ?= 120 ++MLIMIT ?= 1400000 ++VLIMIT ?= 1400000 + endif + + # make the stack limit always the same as it would be under MacOS +-SLIMIT ?= 8192 ++SLIMIT ?= 16384 + + LIMIT := + ifeq (@ULIMIT_T@,yes) +--- M2/Macaulay2/m2/run.m2.orig 2020-07-11 05:04:29.000000000 -0600 ++++ M2/Macaulay2/m2/run.m2 2020-07-12 19:22:43.157077109 -0600 +@@ -7,7 +7,7 @@ + utest := opt -> ( + cmd := "ulimit " | opt | "; "; + if chkrun("2>/dev/null >/dev/null "|cmd) == 0 then cmd else "") +-ulimit := utest "-c unlimited" | utest "-t 700" | utest "-m 850000" | utest "-s 8192" | utest "-n 512" ++ulimit := utest "-c unlimited" | utest "-t 1400" | utest "-m 1700000" | utest "-s 16384" | utest "-n 512" + + M2statusRegexp := "^--status:" + statusLines := file -> select(lines file, s -> match(M2statusRegexp,s)) +--- M2/Macaulay2/tests/ComputationsBook/Makefile.chapter.in.orig 2020-07-11 05:04:29.000000000 -0600 ++++ M2/Macaulay2/tests/ComputationsBook/Makefile.chapter.in 2020-07-12 19:20:27.318131329 -0600 +@@ -15,16 +15,16 @@ diff: + + LIMIT := + ifeq (@ULIMIT_T@,yes) +-LIMIT += ulimit -t 1200 ; ++LIMIT += ulimit -t 2400 ; + endif + ifeq (@ULIMIT_V@,yes) +-LIMIT += ulimit -v 1600000 ; ++LIMIT += ulimit -v 3200000 ; + endif + ifeq (@ULIMIT_M@,yes) +-LIMIT += ulimit -m 800000 ; ++LIMIT += ulimit -m 1600000 ; + endif + ifeq (@ULIMIT_S@,yes) +-LIMIT += ulimit -s 8192 ; ++LIMIT += ulimit -s 16834 ; + endif + + +--- M2/Macaulay2/tests/Makefile.test.in.orig 2020-07-11 05:04:29.000000000 -0600 ++++ M2/Macaulay2/tests/Makefile.test.in 2020-07-12 19:20:27.319131328 -0600 +@@ -6,18 +6,18 @@ DEFERRED ?= no + + DOTS ?= ../.. + ifeq "@DEBUG@" "no" +-TLIMIT ?= 90 ++TLIMIT ?= 180 + # one test doesn't work with only 150MB RAM, ext-total.m2, on a 64 bit intel machine: +-MLIMIT ?= 800000 ++MLIMIT ?= 1600000 + VLIMIT ?= 2000000 + else + # give the debug version more time and space +-TLIMIT ?= 140 +-MLIMIT ?= 1200000 ++TLIMIT ?= 280 ++MLIMIT ?= 2400000 + VLIMIT ?= 2000000 + endif + # make the stack limit always the same as it would be under MacOS +-SLIMIT ?= 8192 ++SLIMIT ?= 16384 + + LIMIT := + ifeq (@ULIMIT_T@,yes) diff --git a/Macaulay2.spec b/Macaulay2.spec index ec63552..b28494a 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -8,13 +8,29 @@ # - factory (from Singular) configured with --disable-omalloc --enable-streamio # and linked with the flint that is linked with the GC-enabled mpfr # Since the main Fedora packages are not built in this way, we are forced to -# bundle these packages to avoid random GC-related crashes. +# bundle these packages to avoid random GC-related crashes. The packages +# memtailor and mathic, which sit underneath mathicgb, must also be bundled or +# we get random GC-related crashes for an as yet undiagnosed reason. # -# In addition, we have to use the static versions of the libfplll and givaro -# libraries. Both have global objects whose constructors run before GC is -# initialized. If we allow the shared libraries to be unloaded, which happens -# as a normal part of Macaulay2's functioning, then GC tries to free objects it -# did not allocate, which leads to a segfault. +# We have to use the static version of the libfplll and givaro library. They +# have global objects whose constructors run before GC is initialized. If we +# allow the shared libraries to be unloaded, which happens as a normal part of +# Macaulay2's functioning, then GC tries to free objects it did not allocate, +# which leads to a segfault. +# +# We have to bundle the linbox package. It has global constructors that cause +# the same problem as libfplll. + +# Upstream wants us to build the final commit in a release branch. We wait +# for a release announcement, then pull from git. The tarballs in the git repo +# are for upstream's use, not for distributions to build. +%global commit 94c4b7db5dcafeaf2b97315a2bed6ac8ba16ee6b +%global shortcommit %(cut -b -7 <<< %{commit}) +%global m2url https://github.com/Macaulay2/M2 + +%global emacscommit 7460c448d40571866e8290ac862abbc28c1b5b37 +%global emacsurl https://github.com/Macaulay2/M2-emacs +%global emacsshort %(cut -b -7 <<< %{emacscommit}) # Address randomization interferes with Macaulay2's memory management scheme, # and linking with -z now breaks configure. @@ -42,16 +58,17 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 -Version: 1.15.1.0 -Release: 5%{?dist} +Version: 1.16 +Release: 1%{?dist} License: GPLv2 or GPLv3 URL: http://macaulay2.com/ %if 0%{?snap:1} -Source0: Macaulay2-%{version}-%{snap}.tar.xz +Source0: %{name}-%{version}-%{snap}.tar.xz %else -Source0: https://github.com/%{name}/M2/archive/version-%{version}.tar.gz +Source0: %{m2url}/tarball/%{commit}/%{name}-%{version}.tar.gz %endif +Source1: %{emacsurl}/tarball/%{emacscommit}/M2-emacs-%{emacsshort}.tar.gz # Various sizes of the planets icon from macaulay2.com. See README.icons in # the tar file for details on how these icons were created. @@ -66,14 +83,13 @@ Source100: http://www.math.uiuc.edu/Macaulay2/Downloads/OtherSourceCode/normaliz Provides: bundled(normaliz) = %{normalizver} # MPFR is bundled because it must be built with different threading options -%global mpfrver 4.0.2 +%global mpfrver 4.1.0 Source101: http://www.mpfr.org/mpfr-%{mpfrver}/mpfr-%{mpfrver}.tar.xz Provides: bundled(mpfr) = %{mpfrver} # FLINT is bundled because it must be linked with the specially-built MPFR -%global flintver 20200414 -Source102: https://faculty.math.illinois.edu/Macaulay2/Downloads/OtherSourceCode/flint-%{flintver}.tar.gz -#Source102: http://www.flintlib.org/flint-%%{flintver}.tar.gz +%global flintver 2.6.3 +Source102: http://www.flintlib.org/flint-%{flintver}.tar.gz Provides: bundled(flint) = %{flintver} # FACTORY is bundled because it must be built with special options @@ -83,7 +99,7 @@ Provides: bundled(factory) = %{factoryver} # MATHICGB is bundled because it must be built with different threading options %global mathicgbver 1.0 -%global mathicgbcommit 636952f94bf6bb6d82a84f0c9ac7f44373f8a34f +%global mathicgbcommit 0d70da731a84008143a00cf1effd978dc8607879 Source104: https://github.com/Macaulay2/mathicgb/tarball/%{mathicgbcommit}/mathicgb-%{mathicgbver}.tar.gz Provides: bundled(mathicgb) = %{mathicgbver} @@ -91,15 +107,30 @@ Provides: bundled(mathicgb) = %{mathicgbver} %global gtestver 1.10.0 Source105: https://faculty.math.illinois.edu/Macaulay2/Downloads/OtherSourceCode/gtest-%{gtestver}.tar.gz +# MEMTAILOR is bundled because it causes garbage collector crashes otherwise +%global memtailorver 1.0 +%global memtailorcommit 1d13f96bc7d84b7ac401e6b8c936fad26f08786c +Source106: https://github.com/Macaulay2/memtailor/tarball/%{memtailorcommit}/memtailor-%{memtailorver}.tar.gz +Provides: bundled(memtailor) = %{memtailorver} + +# MATHIC is bundled because it causes garbage collector crashes otherwise +%global mathicver 1.0 +%global mathiccommit 44095b846a83c05cbff6f3e8765070e5cda40e67 +Source107: https://github.com/Macaulay2/mathic/tarball/%{mathiccommit}/mathic-%{mathicver}.tar.gz +Provides: bundled(mathic) = %{mathicver} + +# LINBOX is bundled because it introduces static global objects +%global linboxver 1.6.3 +Source108: https://github.com/linbox-team/linbox/archive/v%{linboxver}}/linbox-%{linboxver}.tar.gz +Provides: bundled(linbox) = %{linboxver} + ## PATCHES FOR BUNDLED code -# Fix flint memory leaks -Source200: flint-20200414.patch +# Work around an ambiguous overload on 32-bit platforms +Source200: linbox-1.6.3.patch # Fix factory build failure. REPLACES the upstream patch. Source201: factory-4.1.1.patch -# Upstream mpfr patches subsequent to the 4.0.2 release. -Source202: mpfr-4.0.2.patch # Fix mathicgb build on big endian machines. -Source203: mathicgb-1.0.patch +Source202: mathicgb-1.0.patch ## FAKE library tarballs that convince Macaulay2 to use the system versions Source300: frobby_v0.9.0.tar.gz @@ -114,22 +145,26 @@ Source308: TOPCOM-0.17.8.tar.gz Source309: cohomCalg-0.32.tar.gz Source310: glpk-4.59.tar.gz Source311: Csdp-6.2.0.tgz -Source312: mpsolve-3.1.8.tar.gz +Source312: mpsolve-3.2.1.tar.gz # let Fedora optflags override the defaults Patch0: %{name}-1.15-optflags.patch -# use xdg-open as the default browser -Patch1: %{name}-1.11-xdg_open.patch +# give the build a little more time and space than upstream permits +Patch1: %{name}-1.16-ulimit.patch # fix paths to nauty binaries Patch2: %{name}-1.11-nauty-paths.patch # drop 'tests' from default make target -Patch3: %{name}-1.15-default_make_targets.patch +Patch3: %{name}-1.16-default_make_targets.patch # disable check for gftables -Patch4: %{name}-1.15-no_gftables.patch +Patch4: %{name}-1.16-no_gftables.patch # adapt to libfplll 5.2.1 Patch5: %{name}-1.15-fplll.patch # do not override the debug level Patch6: %{name}-1.12-configure.patch +# fix some -Wformat warnings +Patch7: %{name}-1.16-format.patch +# Fix "error: in conversion to html, unknown TeX control sequence(s): \rightarrow" +Patch8: %{name}-1.16-rightarrow.patch BuildRequires: 4ti2 BuildRequires: autoconf @@ -151,6 +186,7 @@ BuildRequires: doxygen %endif # etags BuildRequires: emacs +BuildRequires: expat-devel BuildRequires: factory-gftables BuildRequires: fflas-ffpack-devel BuildRequires: flex @@ -161,6 +197,7 @@ BuildRequires: gdb BuildRequires: gdbm-devel BuildRequires: gettext-devel BuildRequires: gfan +BuildRequires: git-core BuildRequires: givaro-static BuildRequires: glpk-devel %if 0%{?gmp} @@ -169,6 +206,7 @@ BuildRequires: gmp-devel BuildRequires: mpir-devel %endif BuildRequires: gtest-devel +BuildRequires: iml-devel BuildRequires: info BuildRequires: libgfan-devel BuildRequires: libtool @@ -179,12 +217,12 @@ BuildRequires: libnauty-devel %if 0%{?system_normaliz} BuildRequires: libnormaliz-devel >= 3.6.3 %endif -BuildRequires: linbox-devel +BuildRequires: libtool BuildRequires: lrslib-devel BuildRequires: lrslib-utils +BuildRequires: m4ri-devel +BuildRequires: m4rie-devel BuildRequires: mariadb-devel -BuildRequires: memtailor-devel -BuildRequires: mathic-devel BuildRequires: mpsolve-devel BuildRequires: nauty BuildRequires: normaliz @@ -198,10 +236,11 @@ BuildRequires: polymake BuildRequires: python3 BuildRequires: qd-devel BuildRequires: readline-devel -BuildRequires: tbb-devel BuildRequires: time +BuildRequires: tinyxml2-devel BuildRequires: TOPCOM -BuildRequires: xemacs +BuildRequires: transfig +BuildRequires: valgrind Requires: 4ti2 Requires: cohomCalg @@ -213,7 +252,8 @@ Requires: hicolor-icon-theme Requires: lrslib-utils Requires: nauty Requires: TOPCOM -Requires: xemacs-filesystem + +Recommends: mathicgb %if 0%{?common} Requires: %{name}-common = %{version}-%{release} @@ -235,6 +275,10 @@ Requires: xdg-utils Requires: normaliz %endif +# Macaulay2 no longer builds successfully on 32-bit platforms +# https://bugzilla.redhat.com/show_bug.cgi?id=1874318 +ExcludeArch: %{ix86} %{arm} + # Do not advertise the bundled mpfr %global __provides_exclude libmpfr.so* @@ -253,8 +297,9 @@ BuildArch: noarch %prep -%setup -q -n M2-version-%{version}/M2 -%setup -q -n M2-version-%{version}/M2 -T -D -a 10 +%setup -q -n %{name}-M2-%{shortcommit}/M2 +%setup -q -n %{name}-M2-%{shortcommit}/M2 -T -D -a 10 +tar -C Macaulay2/editors/emacs --strip-components=1 -xzf %{SOURCE1} install -p -m755 %{SOURCE20} ./etags @@ -266,21 +311,23 @@ sed -e '/PROGRAMS =/aPATCHFILE = @abs_srcdir@/patch-$(VERSION)' \ -i libraries/normaliz/Makefile.in %endif install -p -m644 %{SOURCE101} %{SOURCE102} %{SOURCE103} %{SOURCE105} \ - BUILD/tarfiles/ + %{SOURCE108} BUILD/tarfiles/ sed -i 's/\(VERSION = \).*/\1%{mpfrver}/' libraries/mpfr/Makefile.in -pushd submodules/mathicgb -tar -xf %{SOURCE104} --strip-components=1 -patch -p0 < %{SOURCE203} -popd +sed -e 's/\(VERSION = \).*/\1%{linboxver}/' \ + -e 's/^#\(PATCHFILE\)/\1/' \ + -e 's,--with-gmp.*,GIVARO_CFLAGS=-I$(LIBRARIESDIR) GIVARO_LIBS="%{_libdir}/libgivaro.a",' \ + -i libraries/linbox/Makefile.in +tar -C submodules/mathicgb -xf %{SOURCE104} --strip-components=1 +patch -d submodules/mathicgb -p0 < %{SOURCE202} +tar -C submodules/memtailor -xf %{SOURCE106} --strip-components=1 +tar -C submodules/mathic -xf %{SOURCE107} --strip-components=1 ## patches for bundled code -cp -p %{SOURCE200} libraries/flint/patch-%{flintver} -sed -e 's/# PATCHFILE/PATCHFILE/' \ - -e 's,--with-blas,&=%{_includedir}/%{blaslib} --with-ntl,' \ +sed -e 's,--with-blas,&=%{_includedir}/%{blaslib} --with-ntl,' \ + -e 's,2\.6\.0,%{flintver},' \ -i libraries/flint/Makefile.in +cp -p %{SOURCE200} libraries/linbox/patch-%{linboxver} cp -p %{SOURCE201} libraries/factory/patch-%{factoryver} -cp -p %{SOURCE202} libraries/mpfr/patch-%{mpfrver} -cp -p %{SOURCE203} submodules/mathicgb/patch-%{mathicgbver} ## fake library tarballs install -p -m644 %{SOURCE300} %{SOURCE301} %{SOURCE302} %{SOURCE303} \ @@ -291,10 +338,12 @@ sed -i 's/VERSION = 4\.0\.4/VERSION = 5.2.0/;/PATCHFILE/d' libraries/fplll/Makef sed -i '/PATCHFILE/d' libraries/{csdp,frobby,gfan,givaro,mpsolve,normaliz,topcom}/Makefile.in sed -i '/INSTALLCMD/,/stdinc/d' libraries/frobby/Makefile.in sed -i 's,install \(lib.*\.a\),ln -s %{_libdir}/\1,' libraries/lapack/Makefile.in -sed -i '/TARFILE/iPATCHFILE = @abs_srcdir@/patch-$(VERSION)' libraries/mpfr/Makefile.in + +## fake givaro submodule +tar -C submodules/givaro --strip-components=1 -xzf %{SOURCE306} %patch0 -p1 -b .optflags -%patch1 -p1 -b .xdg_open +%patch1 -p1 -b .ulimit %patch2 -p1 -b .nauty %patch3 -p1 -b .default_make_targets %patch4 -p1 -b .no_gftables @@ -304,6 +353,8 @@ ln -s %{_datadir}/factory \ BUILD/%{_target_platform}/usr-dist/common/share/Macaulay2/Core/factory %patch5 -p1 -b .fplll %patch6 -p1 -b .configure +%patch7 -p1 -b .format +%patch8 -p1 -b .rightarrow # repeatable builds: inject a node name sed -i 's,`uname -n`,build.fedoraproject.org,' configure.ac @@ -313,34 +364,22 @@ if [ "$HOME" = "/builddir" ]; then echo "set auto-load safe-path /" > /builddir/.gdbinit fi -# fix executable bits -chmod a-x Macaulay2/packages/NumericalAlgebraicGeometry/hom4ps2_in_out - -# Use, but don't build, cddlib, fflas-ffpack, gc, and linbox. Use the static -# versions of libfplll and givaro. Do not invoke git on a nonrepository. Link -# with blaslib instead of the reference blas and lapack. Fix a typo. +# Use, but don't build, cddlib, fflas-ffpack, and gc. Use the static versions +# of libfplll and givaro. Do not invoke git on a nonrepository. Link with +# blaslib instead of the reference blas and lapack. Fix typos. sed -e 's/^BUILD_cddlib=yes/BUILD_cddlib=no/' \ -e 's/^BUILD_gc=yes/BUILD_gc=no/' \ - -e 's/BUILD_linbox=yes/BUILD_linbox=no/' \ -e 's/BUILD_fflas_ffpack=yes/BUILD_fflas_ffpack=no/' \ -e 's/^\(GIT_DESCRIPTION=\).*/\1"unknown"/' \ - -e 's,-lfplll,%{_libdir}/libfplll.a,' \ + -e 's,-lfplll,%{_libdir}/libfplll.a -lqd,' \ + -e 's,`\$PKG_CONFIG --libs givaro`,%{_libdir}/libgivaro.a,' \ -e 's,-lgivaro,%{_libdir}/libgivaro.a,' \ -e 's,-llapack -lrefblas,-l%{blaslib},' \ -e 's,\$added_fclibs != yes,"$added_fclibs" != yes,' \ -i configure.ac -# Use, but don't build, memtailor and mathic. Link with qd. -sed -e '/LIBDEPS_FOR_BUILD/s/ memtailor mathic//' \ - -e '/LDLIBS_FOR_BUILD/s/mathicgb/& qd/' \ - -i include/config.Makefile.in - -# We want to build mathicgb, but not mathic or memtailor. This line in -# GNUmakefile assumes that building mathicgb means building the other two. -sed -i '/all-in-mathicgb:all-in-mathic all-in-memtailor/d' GNUmakefile.in - # (re)generate configure -[ -f configure -a -f include/config.h ] || make +autoreconf -fi . %build @@ -366,6 +405,7 @@ cxxflags="%{optflags} -fsigned-char" CPPFLAGS="-I%{_includedir}/cddlib -I%{_includedir}/frobby" \ CFLAGS="%{optflags} -fsigned-char" \ CXXFLAGS="$cxxflags" \ +LIBS="-l%{blaslib}" \ ../../configure \ --build=%{_build} \ --host=%{_host} \ @@ -383,9 +423,9 @@ CXXFLAGS="$cxxflags" \ --with-integer-package=mpir \ %endif --with-unbuilt-programs="cddplus nauty" \ - --enable-build-libraries="mpfr flint factory lapack fplll givaro gtest" + --enable-build-libraries="mpfr flint factory lapack fplll givaro linbox gtest" # The list of libraries and submodules above should include only those that: - # 1. We bundle (mpfr, flint, and factory) + # 1. We bundle (mpfr, flint, factory, and linbox) # 2. We sneakily substitute one library for another (lapack -> blaslib) # 3. Have to be linked with the static library (fplll and givaro) popd @@ -434,24 +474,19 @@ desktop-file-install --vendor="" \ --dir=%{buildroot}%{_datadir}/applications \ %{SOURCE11} -# Byte compile the (X)Emacs files, and move the documentation -mkdir -p %{buildroot}%{_xemacs_sitelispdir} -cp -p %{buildroot}%{_emacs_sitelispdir}/*.el %{buildroot}%{_xemacs_sitelispdir} -pushd %{buildroot}%{_emacs_sitelispdir} -mv M2-emacs* M2-README %{buildroot}%{_pkgdocdir} +# Byte compile the Emacs files, and move the documentation +pushd %{buildroot}%{_emacs_sitelispdir}/%{name} +mv M2-emacs* %{buildroot}%{_pkgdocdir} +mv README.md %{buildroot}%{_pkgdocdir}/README-emacs.md %{_emacs_bytecompile} *.el -cd %{buildroot}%{_xemacs_sitelispdir} -%{_xemacs_bytecompile} *.el popd -# Missing executable bit -chmod a+x %{buildroot}%{_datadir}/Macaulay2/NumericalAlgebraicGeometry/hom4ps2_in_out - ## unpackaged files # info dir rm -fv %{buildroot}%{_infodir}/dir -# source control file -rm -f %{buildroot}%{_datadir}/Macaulay2/Macaulay2Doc/test/.gitignore + +# Delete misinstalled memtailor, mathic, and mathicgb libraries +rm -fr %{buildroot}/builddir %check @@ -476,11 +511,18 @@ time make -k check -C BUILD/%{_target_platform} Verbose=true ||: %{_docdir}/Macaulay2/ %{_infodir}/*.info* %{_mandir}/man1/* -%{_emacs_sitelispdir}/* -%{_xemacs_sitelispdir}/* +%{_emacs_sitelispdir}/%{name}/ %changelog +* Mon Aug 31 2020 Jerry James - 1.16-1 +- Version 1.16 +- Drop upstreamed patch: -xdg_open +- Add -ulimit patch for the slower builders +- Add -format and -rightarrow patches +- Bundle packages due to garbage collector crashes: linbox, memtailor, mathic +- Drop the XEmacs subpackage; XEmacs support no longer works + * Sun Aug 16 2020 Iñaki Úcar - 1.15.1.0-5 - https://fedoraproject.org/wiki/Changes/FlexiBLAS_as_BLAS/LAPACK_manager diff --git a/factory-4.1.1.patch b/factory-4.1.1.patch index 81f4286..4438666 100644 --- a/factory-4.1.1.patch +++ b/factory-4.1.1.patch @@ -1,3 +1,25 @@ +--- m4/flags.m4.orig 2018-02-15 07:02:18.000000000 -0700 ++++ m4/flags.m4 2020-07-12 20:46:53.024384864 -0600 +@@ -122,7 +122,7 @@ AC_DEFUN([SING_CHECK_SET_ARGS], [ + ## for clang: -Wunneeded-internal-declaration + + if test "x${ENABLE_OPTIMIZATION}" != xno; then +- OPTFLAGS="-g0 -O3 -Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -fno-enforce-eh-specs -fconserve-space -funroll-loops -fno-delete-null-pointer-checks" ++ OPTFLAGS="-Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -fno-enforce-eh-specs -fconserve-space -funroll-loops -fno-delete-null-pointer-checks" + # -O3 - crashes gcc???!!! + # -fpermissive + AC_LANG_PUSH([C]) +--- m4/flint-check.m4.orig 2018-02-15 07:02:18.000000000 -0700 ++++ m4/flint-check.m4 2020-07-12 20:46:08.072325817 -0600 +@@ -69,7 +69,7 @@ for FLINT_HOME in ${FLINT_HOME_PATH} + [ + AC_TRY_RUN( + [#include +- int main () { if ((int) version[0] < 2) return -1; else return 0; } ++ int main () { if (__FLINT_VERSION < 2) return -1; else return 0; } + ],[ + flint_found="yes" + break --- factory-4.1.1/cf_factory.h.orig 2017-12-06 10:37:14.000000000 -0700 +++ factory-4.1.1/cf_factory.h 2018-02-17 14:34:52.000000000 -0700 @@ -15,7 +15,7 @@ @@ -9,9 +31,9 @@ class InternalCF; class CanonicalForm; ---- factory-4.1.1/cf_switches.cc 2017-12-06 12:37:11.000000000 -0500 -+++ factory-4.1.1/cf_switches.cc 2018-06-26 11:07:29.000000000 -0400 -@@ -31,6 +31,7 @@ +--- factory-4.1.1/cf_switches.cc.orig 2017-12-06 10:37:11.000000000 -0700 ++++ factory-4.1.1/cf_switches.cc 2018-06-26 09:07:29.000000000 -0600 +@@ -31,6 +31,7 @@ CFSwitches::CFSwitches () // and set the default (recommended) On-values: #ifdef HAVE_NTL On(SW_USE_CHINREM_GCD); @@ -20,7 +42,7 @@ #endif On(SW_USE_EZGCD); --- factory-4.1.1/configure.orig 2018-02-09 07:29:54.000000000 -0700 -+++ factory-4.1.1/configure 2018-05-15 12:28:52.454714806 -0600 ++++ factory-4.1.1/configure 2020-07-12 20:19:22.755415850 -0600 @@ -5827,7 +5827,7 @@ done ## for clang: -Wunneeded-internal-declaration @@ -30,6 +52,15 @@ # -O3 - crashes gcc???!!! # -fpermissive ac_ext=c +@@ -22481,7 +22481,7 @@ else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include +- int main () { if ((int) version[0] < 2) return -1; else return 0; } ++ int main () { if (__FLINT_VERSION < 2) return -1; else return 0; } + + _ACEOF + if ac_fn_c_try_run "$LINENO"; then : --- factory-4.1.1/ftmpl_inst.cc.orig 2017-12-06 10:37:12.000000000 -0700 +++ factory-4.1.1/ftmpl_inst.cc 2018-05-15 12:28:00.560409016 -0600 @@ -73,7 +73,7 @@ template List Difference ( con diff --git a/flint-20200414.patch b/flint-20200414.patch deleted file mode 100644 index 494f4c1..0000000 --- a/flint-20200414.patch +++ /dev/null @@ -1,391 +0,0 @@ ---- aprcl/test/t-unity_zp_reduce_cyclotomic.c -+++ aprcl/test/t-unity_zp_reduce_cyclotomic.c -@@ -72,6 +72,7 @@ int main(void) - abort(); - } - -+ fmpz_clear(n); - fmpz_mod_poly_clear(cyclo_poly); - unity_zp_clear(f); - unity_zp_clear(g); ---- fmpq_mpoly/test/t-get_set_term_coeff_fmpq.c -+++ fmpq_mpoly/test/t-get_set_term_coeff_fmpq.c -@@ -41,7 +41,12 @@ main(void) - - fmpq_mpoly_randtest_bits(f, state, len, coeff_bits, exp_bits, ctx); - if (fmpq_mpoly_length(f, ctx) == WORD(0)) -+ { -+ fmpq_mpoly_clear(f, ctx); -+ fmpq_clear(c); -+ fmpq_clear(d); - continue; -+ } - - for (j = 0; j < 10; j++) - { ---- fmpq_mpoly/test/t-get_set_term_exp_fmpz.c -+++ fmpq_mpoly/test/t-get_set_term_exp_fmpz.c -@@ -43,7 +43,10 @@ main(void) - - fmpq_mpoly_randtest_bits(f, state, len, coeff_bits, exp_bits, ctx); - if (fmpq_mpoly_length(f, ctx) == 0) -+ { -+ fmpq_mpoly_clear(f, ctx); - continue; -+ } - - for (j = 0; j < 10; j++) - { ---- fmpz_factor/pollard_brent.c -+++ fmpz_factor/pollard_brent.c -@@ -143,6 +143,7 @@ fmpz_factor_pollard_brent(fmpz_t p_factor, flint_rand_t state, fmpz_t n_in, - fmpz_clear(fa); - fmpz_clear(fy); - fmpz_clear(maxa); -+ fmpz_clear(maxy); - - TMP_END; - ---- fmpz_factor/test/t-pollard_brent_single.c -+++ fmpz_factor/test/t-pollard_brent_single.c -@@ -94,6 +94,10 @@ int main(void) - fmpz_clear(primeprod); - fmpz_clear(fac); - fmpz_clear(modval); -+ fmpz_clear(a); -+ fmpz_clear(y); -+ fmpz_clear(maxa); -+ fmpz_clear(maxy); - - flint_printf("PASS\n"); - return 0; ---- fmpz_mat/test/t-hnf_minors_transform.c -+++ fmpz_mat/test/t-hnf_minors_transform.c -@@ -87,6 +87,8 @@ main(void) - abort(); - } - -+ fmpz_mat_clear(UA); -+ fmpz_mat_clear(U); - fmpz_mat_clear(H2); - fmpz_mat_clear(H); - fmpz_mat_clear(A); ---- fmpz_mod_poly/compose_mod_brent_kung_vec_preinv.c -+++ fmpz_mod_poly/compose_mod_brent_kung_vec_preinv.c -@@ -145,6 +145,7 @@ fmpz_mod_poly_compose_mod_brent_kung_vec_preinv(fmpz_mod_poly_struct * res, - { - for (i = 0; i < n; i++) - { -+ fmpz_mod_poly_clear(res + i); - fmpz_mod_poly_init(res + i, &poly->p); - fmpz_mod_poly_zero(res + i); - } -@@ -156,6 +157,7 @@ fmpz_mod_poly_compose_mod_brent_kung_vec_preinv(fmpz_mod_poly_struct * res, - { - for (i = 0; i < n; i++) - { -+ fmpz_mod_poly_clear(res + i); - fmpz_mod_poly_init(res + i, &poly->p); - fmpz_mod_poly_set(res + i, polys + i); - } ---- fmpz_mod_poly/test/t-print_read.c -+++ fmpz_mod_poly/test/t-print_read.c -@@ -101,6 +101,9 @@ int main(void) - } - } - -+ for (j = 0; j < n; j++) -+ fmpz_mod_poly_clear(a[j]); -+ flint_free(a); - fclose(out); - exit(0); - } ---- fmpz_mod_poly/test/t-product_roots_fmpz_vec.c -+++ fmpz_mod_poly/test/t-product_roots_fmpz_vec.c -@@ -80,6 +80,7 @@ main(void) - fmpz_poly_clear(Q); - fmpz_poly_clear(tmp); - _fmpz_vec_clear(x, n); -+ fmpz_clear(mod); - } - - FLINT_TEST_CLEANUP(state); ---- fmpz_mpoly/test/t-get_set_term_exp_fmpz.c -+++ fmpz_mpoly/test/t-get_set_term_exp_fmpz.c -@@ -45,7 +45,11 @@ main(void) - - fmpz_mpoly_randtest_bits(f, state, len, coeff_bits, exp_bits, ctx); - if (f->length == WORD(0)) -+ { -+ fmpz_mpoly_clear(f, ctx); -+ fmpz_mpoly_ctx_clear(ctx); - continue; -+ } - - for (j = 0; j < 10; j++) - { ---- fmpz_poly/div_basecase.c -+++ fmpz_poly/div_basecase.c -@@ -56,6 +56,7 @@ _fmpz_poly_div_basecase(fmpz * Q, fmpz * R, const fmpz * A, slong lenA, - { - if (exact && !fmpz_is_zero(R + lenA - 1)) - { -+ fmpz_clear(r); - if (alloc) - _fmpz_vec_clear(R, alloc); - -@@ -71,8 +72,9 @@ _fmpz_poly_div_basecase(fmpz * Q, fmpz * R, const fmpz * A, slong lenA, - - if (!fmpz_is_zero(r)) - { -+ fmpz_clear(r); - if (alloc) -- _fmpz_vec_clear(R, alloc); -+ _fmpz_vec_clear(R, alloc); - - return 0; - } ---- fmpz_poly/div_series_divconquer.c -+++ fmpz_poly/div_series_divconquer.c -@@ -27,7 +27,7 @@ _fmpz_poly_div_series_divconquer(fmpz * Q, const fmpz * A, slong Alen, - if (!_fmpz_poly_div(Q, Arev, 2*n - 1, Brev, n, 1)) - { - _fmpz_vec_clear(Arev, 2*n - 1); -- _fmpz_vec_clear(Brev, n - 1); -+ _fmpz_vec_clear(Brev, n); - - flint_printf("Not an exact division\n"); - flint_abort(); -@@ -36,7 +36,7 @@ _fmpz_poly_div_series_divconquer(fmpz * Q, const fmpz * A, slong Alen, - _fmpz_poly_reverse(Q, Q, n, n); - - _fmpz_vec_clear(Arev, 2*n - 1); -- _fmpz_vec_clear(Brev, n - 1); -+ _fmpz_vec_clear(Brev, n); - } - - void fmpz_poly_div_series_divconquer(fmpz_poly_t Q, const fmpz_poly_t A, ---- fmpz_poly/mullow_SS_precache.c -+++ fmpz_poly/mullow_SS_precache.c -@@ -145,6 +145,7 @@ void _fmpz_poly_mullow_SS_precache(fmpz * output, const fmpz * input1, - len_out, t1, t2, s1, tt); - - _fmpz_vec_set_fft(output, trunc, ii, pre->limbs, 1); /* write output */ -+ flint_free(ii); - } - - void ---- fq_embed_templates/test/t-composition_matrix.c -+++ fq_embed_templates/test/t-composition_matrix.c -@@ -39,7 +39,10 @@ main(void) - TEMPLATE(T, ctx_randtest)(ctx, state); - d = TEMPLATE(T, ctx_degree)(ctx); - if (d == 1) -+ { -+ TEMPLATE(T, ctx_clear)(ctx); - continue; -+ } - modulus = TEMPLATE(T, ctx_modulus)(ctx); - - TEMPLATE(T, init)(frob, ctx); ---- fq_embed_templates/test/t-embed_matrices.c -+++ fq_embed_templates/test/t-embed_matrices.c -@@ -86,6 +86,7 @@ main(void) - n = m*j; - if (m == 1) { - i--; -+ TEMPLATE(T, ctx_clear)(ctx1); - continue; - } - modulus = TEMPLATE(T, ctx_modulus)(ctx1); ---- fq_mat_templates/charpoly_danilevsky.c -+++ fq_mat_templates/charpoly_danilevsky.c -@@ -189,6 +189,8 @@ TEMPLATE(T, mat_charpoly_danilevsky) (TEMPLATE(T, poly_t) p, - - cleanup: - -+ TEMPLATE(T, clear) (c, ctx); -+ TEMPLATE(T, clear) (h, ctx); - TEMPLATE(T, poly_clear) (b, ctx); - _TEMPLATE(T, vec_clear) (T, A->r, ctx); - _TEMPLATE(T, vec_clear) (V, A->r, ctx); ---- fq_mat_templates/lu_classical.c -+++ fq_mat_templates/lu_classical.c -@@ -76,7 +76,10 @@ TEMPLATE(T, mat_lu_classical) (slong * P, - if (TEMPLATE(T, mat_pivot) (A, P, row, col, ctx) == 0) - { - if (rank_check) -- return 0; -+ { -+ rank = 0; -+ goto cleanup; -+ } - col++; - continue; - } -@@ -105,6 +108,7 @@ TEMPLATE(T, mat_lu_classical) (slong * P, - col++; - } - -+cleanup: - TEMPLATE(T, clear) (d, ctx); - TEMPLATE(T, clear) (e, ctx); - TEMPLATE(T, clear) (neg_e, ctx); ---- fq_templates/test/t-multiplicative_order.c -+++ fq_templates/test/t-multiplicative_order.c -@@ -71,24 +71,24 @@ main(void) - fmpz_init(pm1); - - TEMPLATE(T, gen)(X, ctx); -- if (!TEMPLATE(T, is_primitive)(X, ctx)) -- continue; -- -- fmpz_sub_ui(pm1, TEMPLATE(T, ctx_prime)(ctx), 1); -- TEMPLATE(T, pow)(a, X, pm1, ctx); -- result = TEMPLATE(T, multiplicative_order)(ord, a, ctx); -- fmpz_mul(ord, ord, pm1); -- -- TEMPLATE(T, ctx_order)(size, ctx); -- fmpz_sub(size, size, ord); -- -- if (result && !fmpz_is_one(size)) -+ if (TEMPLATE(T, is_primitive)(X, ctx)) - { -- flint_printf("FAIL:\n\n"); -- flint_printf("a = "), TEMPLATE(T, print_pretty)(a, ctx), flint_printf("\n"); -- flint_printf("ord = "), fmpz_print(ord), flint_printf("\n"); -- TEMPLATE(T, ctx_print)(ctx); -- abort(); -+ fmpz_sub_ui(pm1, TEMPLATE(T, ctx_prime)(ctx), 1); -+ TEMPLATE(T, pow)(a, X, pm1, ctx); -+ result = TEMPLATE(T, multiplicative_order)(ord, a, ctx); -+ fmpz_mul(ord, ord, pm1); -+ -+ TEMPLATE(T, ctx_order)(size, ctx); -+ fmpz_sub(size, size, ord); -+ -+ if (result && !fmpz_is_one(size)) -+ { -+ flint_printf("FAIL:\n\n"); -+ flint_printf("a = "), TEMPLATE(T, print_pretty)(a, ctx), flint_printf("\n"); -+ flint_printf("ord = "), fmpz_print(ord), flint_printf("\n"); -+ TEMPLATE(T, ctx_print)(ctx); -+ abort(); -+ } - } - - fmpz_clear(pm1); ---- mpn_extras/test/t-mulmod_preinvn.c -+++ mpn_extras/test/t-mulmod_preinvn.c -@@ -74,6 +74,11 @@ int main(void) - while (size_d && r2->_mp_d[size_d - 1] == 0) size_d--; - r2->_mp_size = size_d; - r2->_mp_alloc = size_d; -+ if (size_d == 0) -+ { -+ flint_free(r2->_mp_d); -+ r2->_mp_d = NULL; -+ } - - mpz_div_2exp(r2, r2, norm); - mpz_div_2exp(a, a, norm); -@@ -93,7 +98,8 @@ int main(void) - abort(); - } - -- flint_free(r2->_mp_d); -+ if (r2->_mp_d != NULL) -+ flint_free(r2->_mp_d); - flint_free(dinv); - } - ---- nmod_mpoly/test/t-mul_array.c -+++ nmod_mpoly/test/t-mul_array.c -@@ -77,6 +77,8 @@ main(void) - nmod_mpoly_clear(g, ctx); - nmod_mpoly_clear(h, ctx); - nmod_mpoly_clear(k, ctx); -+ -+ nmod_mpoly_ctx_clear(ctx); - } - - /* Check aliasing first argument */ -@@ -129,6 +131,8 @@ main(void) - nmod_mpoly_clear(f, ctx); - nmod_mpoly_clear(g, ctx); - nmod_mpoly_clear(h, ctx); -+ -+ nmod_mpoly_ctx_clear(ctx); - } - - /* Check aliasing second argument */ -@@ -181,6 +185,8 @@ main(void) - nmod_mpoly_clear(f, ctx); - nmod_mpoly_clear(g, ctx); - nmod_mpoly_clear(h, ctx); -+ -+ nmod_mpoly_ctx_clear(ctx); - } - - FLINT_TEST_CLEANUP(state); ---- qsieve/test/t-primes_init.c -+++ qsieve/test/t-primes_init.c -@@ -52,12 +52,12 @@ int main(void) - - fmpz_randtest_unsigned(n, state, 130); - -- if (fmpz_is_zero(n) || fmpz_is_one(n)) continue; -+ if (fmpz_is_zero(n) || fmpz_is_one(n)) goto cleanup; - - qsieve_init(qs_inf, n); - small_factor = qsieve_knuth_schroeppel(qs_inf); - -- if (small_factor) continue; -+ if (small_factor) goto cleanup; - - fmpz_mul_ui(qs_inf->kn, qs_inf->n, qs_inf->k); /* haven't calculated earlier */ - small_factor = qsieve_primes_init(qs_inf); -@@ -73,7 +73,7 @@ int main(void) - flint_printf("\n"); - abort(); - } -- else continue; -+ else goto cleanup; - } - - for (j = 3; j < qs_inf->num_primes; j++) -@@ -120,7 +120,7 @@ int main(void) - flint_printf("\n"); - abort(); - } -- else continue; -+ else goto cleanup; - } - - for (j = k; j < qs_inf->num_primes; j++) -@@ -164,7 +164,7 @@ int main(void) - flint_printf("\n"); - abort(); - } -- else continue; -+ else goto cleanup; - } - - for (j = k; j < qs_inf->num_primes; j++) -@@ -208,7 +208,7 @@ int main(void) - flint_printf("\n"); - abort(); - } -- else continue; -+ else goto cleanup; - } - - for (j = k; j < qs_inf->num_primes; j++) -@@ -239,6 +239,7 @@ int main(void) - } - } - -+cleanup: - qsieve_clear(qs_inf); - fmpz_clear(n); - fmpz_clear(x); diff --git a/linbox-1.6.3.patch b/linbox-1.6.3.patch new file mode 100644 index 0000000..f2481c0 --- /dev/null +++ b/linbox-1.6.3.patch @@ -0,0 +1,35 @@ +--- linbox-1.6.3/configure.ac.orig 2019-06-07 07:22:08.000000000 -0600 ++++ linbox-1.6.3/configure.ac 2020-06-05 12:24:32.920910975 -0600 +@@ -65,9 +65,8 @@ AC_PROG_CXX + + AC_COMPILER_NAME + +-STDFLAG=${CXXFLAGS} ++STDFLAG="" + +-CXXFLAGS="" + + # We need a C++11 compiler now - AB 2014-12-12 + # clang-3.8 does not support __float128 without explicitly passing it -std=c++11 +@@ -187,10 +186,6 @@ echo "---------------------------------- + echo " START LINBOX CONFIG " + echo "-----------------------------------------------" + +-# Checks which SIMD optimization flags to use and set SIMD_CFLAGS accordingly +-INSTR_SET +-AC_SUBST(SIMD_FLAGS) +- + dnl gcc-4.9.2 bug See https://trac.sagemath.org/ticket/17635#comment:178 + AS_IF([ test "x$CCNAM" = "xgcc492" ],[CXXFLAGS="${CXXFLAGS} -fpermissive"],[]) + +--- linbox-1.6.3/linbox/algorithms/gauss/gauss-solve-gf2.inl.orig 2019-06-07 07:22:08.000000000 -0600 ++++ linbox-1.6.3/linbox/algorithms/gauss/gauss-solve-gf2.inl 2020-02-01 16:19:20.692143829 -0700 +@@ -72,7 +72,7 @@ namespace LinBox + + Vector1 w(F2, A.coldim()); + +- for(typename Vector1::iterator it=w.begin()+(ptrdiff_t)Rank;it!=w.end();++it) ++ for(typename Vector1::iterator it=w.begin()+(long)Rank;it!=w.end();++it) + F2.assign(*it,F2.zero); + + return this->solve(x, w, Rank, Q, L, A, P, b); diff --git a/mathicgb-1.0.patch b/mathicgb-1.0.patch index a92d072..bcadb6a 100644 --- a/mathicgb-1.0.patch +++ b/mathicgb-1.0.patch @@ -1,43 +1,42 @@ ---- src/mathicgb/MonoMonoid.hpp.orig 2018-11-23 16:20:05.000000000 -0700 -+++ src/mathicgb/MonoMonoid.hpp 2020-02-12 13:29:57.348568082 -0700 -@@ -18,6 +18,18 @@ - #include - #include - -+#ifdef _MSC_VER -+// So far as I am aware, Windows runs on little endian CPUs only -+#define le64toh(x) (x) -+#elif defined(__APPLE__) -+#include -+#define le64toh(x) OSSwapLittleToHostInt64(x) -+#elif defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) -+#include -+#else -+#include -+#endif -+ - MATHICGB_NAMESPACE_BEGIN - - /// Implements the monoid of (monic) monomials with integer -@@ -589,6 +601,9 @@ public: +--- src/mathicgb/MonoMonoid.hpp.orig 2017-06-06 10:08:53.000000000 -0600 ++++ src/mathicgb/MonoMonoid.hpp 2018-10-06 16:57:04.776068625 -0600 +@@ -582,6 +582,7 @@ public: + MATHICGB_ASSERT(i == varCount() / 2 || access(a, i*2+1) >= 0); + + uint64 A, B, AB; ++#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ + // We have to use std::memcpy here because just casting to a int64 breaks + // the strict aliasing rule which implies undefined behavior. Both MSVC and + // gcc don't actually call memcpy here. MSVC is a tiny bit slower for this +@@ -589,6 +590,11 @@ public: std::memcpy(&A, ptr(a, i*2), 8); std::memcpy(&B, ptr(b, i*2), 8); std::memcpy(&AB, ptr(ab, i*2), 8); -+ A = le64toh(A); -+ B = le64toh(B); -+ AB = le64toh(AB); ++#else ++ A = *ptr(a, i*2) | (((uint64)*ptr(a, i*2 + 1)) << 32); ++ B = *ptr(b, i*2) | (((uint64)*ptr(b, i*2 + 1)) << 32); ++ AB = *ptr(ab, i*2) | (((uint64)*ptr(ab, i*2 + 1)) << 32); ++#endif orOfXor |= AB ^ (A + B); } MATHICGB_ASSERT((orOfXor == 0) == isProductOf(a, b, ab)); -@@ -613,6 +628,11 @@ public: +@@ -608,11 +614,19 @@ public: + uint64 orOfXor = 0; + for (VarIndex i = varCount() / 2; i != beforeEntriesIndexBegin(); --i) { + uint64 A1, A2, B, A1B, A2B; ++#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ + std::memcpy(&A1, ptr(a1, i*2), 8); + std::memcpy(&A2, ptr(a2, i*2), 8); std::memcpy(&B, ptr(b, i*2), 8); std::memcpy(&A1B, ptr(a1b, i*2), 8); std::memcpy(&A2B, ptr(a2b, i*2), 8); -+ A1 = le64toh(A1); -+ A2 = le64toh(A2); -+ B = le64toh(B); -+ A1B = le64toh(A1B); -+ A2B = le64toh(A2B); ++#else ++ A1 = *ptr(a1, i*2) | (((uint64)*ptr(a1, i*2 + 1)) << 32); ++ A2 = *ptr(a2, i*2) | (((uint64)*ptr(a2, i*2 + 1)) << 32); ++ B = *ptr(b, i*2) | (((uint64)*ptr(b, i*2 + 1)) << 32); ++ A1B = *ptr(a1b, i*2) | (((uint64)*ptr(a1b, i*2 + 1)) << 32); ++ A2B = *ptr(a2b, i*2) | (((uint64)*ptr(a2b, i*2 + 1)) << 32); ++#endif orOfXor |= (A1B ^ (A1 + B)) | (A2B ^ (A2 + B)); } MATHICGB_ASSERT diff --git a/mpfr-4.0.2.patch b/mpfr-4.0.2.patch deleted file mode 100644 index 15d7526..0000000 --- a/mpfr-4.0.2.patch +++ /dev/null @@ -1,1614 +0,0 @@ ---- mpfr-4.0.2/PATCHES 2019-06-02 17:05:36.121226916 +0000 -+++ mpfr-4.0.2/PATCHES 2019-06-02 17:05:36.157226621 +0000 -@@ -0,0 +1 @@ -+include-float ---- mpfr-4.0.2/VERSION 2019-01-31 20:29:48.000000000 +0000 -+++ mpfr-4.0.2/VERSION 2019-06-02 17:05:36.157226621 +0000 -@@ -1 +1 @@ --4.0.2 -+4.0.2-p1 ---- mpfr-4.0.2/src/mpfr-impl.h 2019-01-27 18:30:16.000000000 +0000 -+++ mpfr-4.0.2/src/mpfr-impl.h 2019-06-02 17:05:36.145226719 +0000 -@@ -57,6 +57,7 @@ - - #include - #include -+#include /* for FLT_RADIX, etc., tested below */ - - - /****************************************************** ---- mpfr-4.0.2/src/mpfr.h 2019-01-31 20:29:48.000000000 +0000 -+++ mpfr-4.0.2/src/mpfr.h 2019-06-02 17:05:36.153226653 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 4 - #define MPFR_VERSION_MINOR 0 - #define MPFR_VERSION_PATCHLEVEL 2 --#define MPFR_VERSION_STRING "4.0.2" -+#define MPFR_VERSION_STRING "4.0.2-p1" - - /* User macros: - MPFR_USE_FILE: Define it to make MPFR define functions dealing ---- mpfr-4.0.2/src/version.c 2019-01-31 20:29:48.000000000 +0000 -+++ mpfr-4.0.2/src/version.c 2019-06-02 17:05:36.153226653 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "4.0.2"; -+ return "4.0.2-p1"; - } ---- mpfr-4.0.2/PATCHES 2020-03-30 13:02:08.103248669 +0000 -+++ mpfr-4.0.2/PATCHES 2020-03-30 13:02:08.143248189 +0000 -@@ -0,0 +1 @@ -+int-overflow ---- mpfr-4.0.2/VERSION 2019-06-02 17:05:36.157226621 +0000 -+++ mpfr-4.0.2/VERSION 2020-03-30 13:02:08.143248189 +0000 -@@ -1 +1 @@ --4.0.2-p1 -+4.0.2-p2 ---- mpfr-4.0.2/src/agm.c 2019-01-07 13:53:20.000000000 +0000 -+++ mpfr-4.0.2/src/agm.c 2020-03-30 13:02:08.131248333 +0000 -@@ -220,7 +220,7 @@ - mpfr_add (vf, u, v, MPFR_RNDN); /* No overflow? */ - mpfr_div_2ui (vf, vf, 1, MPFR_RNDN); - /* See proof in algorithms.tex */ -- if (4*eq > p) -+ if (eq > p / 4) - { - mpfr_t w; - MPFR_BLOCK_DECL (flags3); ---- mpfr-4.0.2/src/mpfr.h 2019-06-02 17:05:36.153226653 +0000 -+++ mpfr-4.0.2/src/mpfr.h 2020-03-30 13:02:08.143248189 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 4 - #define MPFR_VERSION_MINOR 0 - #define MPFR_VERSION_PATCHLEVEL 2 --#define MPFR_VERSION_STRING "4.0.2-p1" -+#define MPFR_VERSION_STRING "4.0.2-p2" - - /* User macros: - MPFR_USE_FILE: Define it to make MPFR define functions dealing ---- mpfr-4.0.2/src/pow.c 2019-01-07 13:53:20.000000000 +0000 -+++ mpfr-4.0.2/src/pow.c 2020-03-30 13:02:08.131248333 +0000 -@@ -34,8 +34,7 @@ - mpfr_rnd_t rnd_mode, int *inexact) - { - mpz_t a, c; -- mpfr_exp_t d, b; -- unsigned long i; -+ mpfr_exp_t d, b, i; - int res; - - MPFR_ASSERTD (!MPFR_IS_SINGULAR (y)); -@@ -48,7 +47,9 @@ - if (MPFR_IS_NEG (y)) - return 0; /* x is not a power of two => x^-y is not exact */ - -- /* compute d such that y = c*2^d with c odd integer */ -+ /* Compute d such that y = c*2^d with c odd integer. -+ Since c comes from a regular MPFR number, due to the constraints on the -+ exponent and the precision, there can be no integer overflow below. */ - mpz_init (c); - d = mpfr_get_z_2exp (c, y); - i = mpz_scan1 (c, 0); -@@ -58,7 +59,9 @@ - /* Since y is not an integer, d is necessarily < 0 */ - MPFR_ASSERTD (d < 0); - -- /* Compute a,b such that x=a*2^b */ -+ /* Compute a,b such that x=a*2^b. -+ Since a comes from a regular MPFR number, due to the constrainst on the -+ exponent and the precision, there can be no integer overflow below. */ - mpz_init (a); - b = mpfr_get_z_2exp (a, x); - i = mpz_scan1 (a, 0); ---- mpfr-4.0.2/src/rem1.c 2019-01-07 13:53:20.000000000 +0000 -+++ mpfr-4.0.2/src/rem1.c 2020-03-30 13:02:08.131248333 +0000 -@@ -100,9 +100,11 @@ - mpz_abs (my, my); - q_is_odd = 0; - -- /* divide my by 2^k if possible to make operations mod my easier */ -+ /* Divide my by 2^k if possible to make operations mod my easier. -+ Since my comes from a regular MPFR number, due to the constraints on the -+ exponent and the precision, there can be no integer overflow below. */ - { -- unsigned long k = mpz_scan1 (my, 0); -+ mpfr_exp_t k = mpz_scan1 (my, 0); - ey += k; - mpz_fdiv_q_2exp (my, my, k); - } ---- mpfr-4.0.2/src/version.c 2019-06-02 17:05:36.153226653 +0000 -+++ mpfr-4.0.2/src/version.c 2020-03-30 13:02:08.143248189 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "4.0.2-p1"; -+ return "4.0.2-p2"; - } ---- mpfr-4.0.2/PATCHES 2020-03-30 13:05:16.224990169 +0000 -+++ mpfr-4.0.2/PATCHES 2020-03-30 13:05:16.264989689 +0000 -@@ -0,0 +1 @@ -+set-int ---- mpfr-4.0.2/VERSION 2020-03-30 13:02:08.143248189 +0000 -+++ mpfr-4.0.2/VERSION 2020-03-30 13:05:16.264989689 +0000 -@@ -1 +1 @@ --4.0.2-p2 -+4.0.2-p3 ---- mpfr-4.0.2/src/mpfr.h 2020-03-30 13:02:08.143248189 +0000 -+++ mpfr-4.0.2/src/mpfr.h 2020-03-30 13:05:16.260989737 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 4 - #define MPFR_VERSION_MINOR 0 - #define MPFR_VERSION_PATCHLEVEL 2 --#define MPFR_VERSION_STRING "4.0.2-p2" -+#define MPFR_VERSION_STRING "4.0.2-p3" - - /* User macros: - MPFR_USE_FILE: Define it to make MPFR define functions dealing ---- mpfr-4.0.2/src/set_si_2exp.c 2019-01-07 13:53:20.000000000 +0000 -+++ mpfr-4.0.2/src/set_si_2exp.c 2020-03-30 13:05:16.248989881 +0000 -@@ -40,6 +40,15 @@ - mp_limb_t ai, *xp; - int inex = 0; - -+ /* Early underflow/overflow checking is necessary to avoid -+ integer overflow or errors due to special exponent values. */ -+ if (MPFR_UNLIKELY (e < __gmpfr_emin - (mpfr_exp_t) -+ (sizeof (unsigned long) * CHAR_BIT + 1))) -+ return mpfr_underflow (x, rnd_mode == MPFR_RNDN ? -+ MPFR_RNDZ : rnd_mode, i < 0 ? -1 : 1); -+ if (MPFR_UNLIKELY (e >= __gmpfr_emax)) -+ return mpfr_overflow (x, rnd_mode, i < 0 ? -1 : 1); -+ - /* FIXME: support int limbs (e.g. 16-bit limbs on 16-bit proc) */ - ai = SAFE_ABS (unsigned long, i); - MPFR_ASSERTN (SAFE_ABS (unsigned long, i) == ai); ---- mpfr-4.0.2/src/set_ui_2exp.c 2019-01-07 13:53:20.000000000 +0000 -+++ mpfr-4.0.2/src/set_ui_2exp.c 2020-03-30 13:05:16.248989881 +0000 -@@ -41,6 +41,15 @@ - mp_limb_t *xp; - int inex = 0; - -+ /* Early underflow/overflow checking is necessary to avoid -+ integer overflow or errors due to special exponent values. */ -+ if (MPFR_UNLIKELY (e < __gmpfr_emin - (mpfr_exp_t) -+ (sizeof (unsigned long) * CHAR_BIT + 1))) -+ return mpfr_underflow (x, rnd_mode == MPFR_RNDN ? -+ MPFR_RNDZ : rnd_mode, i < 0 ? -1 : 1); -+ if (MPFR_UNLIKELY (e >= __gmpfr_emax)) -+ return mpfr_overflow (x, rnd_mode, i < 0 ? -1 : 1); -+ - /* FIXME: support int limbs (e.g. 16-bit limbs on 16-bit proc) */ - MPFR_ASSERTD (i == (mp_limb_t) i); - ---- mpfr-4.0.2/src/set_uj.c 2019-01-07 13:53:20.000000000 +0000 -+++ mpfr-4.0.2/src/set_uj.c 2020-03-30 13:05:16.248989881 +0000 -@@ -41,7 +41,7 @@ - int - mpfr_set_uj_2exp (mpfr_t x, uintmax_t j, intmax_t e, mpfr_rnd_t rnd) - { -- int cnt; -+ int cnt, inex; - mp_size_t i, k; - mp_limb_t limb; - mp_limb_t yp[uintmaxpml]; -@@ -57,6 +57,10 @@ - MPFR_RET(0); - } - -+ /* early overflow detection to avoid a possible integer overflow below */ -+ if (MPFR_UNLIKELY(e >= __gmpfr_emax)) -+ return mpfr_overflow (x, rnd, MPFR_SIGN_POS); -+ - MPFR_ASSERTN (sizeof(uintmax_t) % sizeof(mp_limb_t) == 0); - - /* Create an auxiliary var */ -@@ -107,7 +111,9 @@ - e += k * GMP_NUMB_BITS - cnt; /* Update Expo */ - MPFR_ASSERTD (MPFR_LIMB_MSB(yp[numberof (yp) - 1]) != 0); - -- /* Check expo underflow / overflow (can't use mpfr_check_range) */ -+ MPFR_RNDRAW (inex, x, yp, uintmax_bit_size, rnd, MPFR_SIGN_POS, e++); -+ -+ /* Check expo underflow / overflow */ - if (MPFR_UNLIKELY(e < __gmpfr_emin)) - { - /* The following test is necessary because in the rounding to the -@@ -116,16 +122,18 @@ - * _ |x| < 2^(emin-2), or - * _ |x| = 2^(emin-2) and the absolute value of the exact - * result is <= 2^(emin-2). */ -- if (rnd == MPFR_RNDN && (e+1 < __gmpfr_emin || mpfr_powerof2_raw(y))) -+ if (rnd == MPFR_RNDN && -+ (e + 1 < __gmpfr_emin || -+ (mpfr_powerof2_raw (x) && inex >= 0))) - rnd = MPFR_RNDZ; - return mpfr_underflow (x, rnd, MPFR_SIGN_POS); - } - if (MPFR_UNLIKELY(e > __gmpfr_emax)) - return mpfr_overflow (x, rnd, MPFR_SIGN_POS); -- MPFR_SET_EXP (y, e); - -- /* Final: set x to y (rounding if necessary) */ -- return mpfr_set (x, y, rnd); -+ MPFR_SET_SIGN (x, MPFR_SIGN_POS); -+ MPFR_SET_EXP (x, e); -+ MPFR_RET (inex); - } - - #endif ---- mpfr-4.0.2/src/version.c 2020-03-30 13:02:08.143248189 +0000 -+++ mpfr-4.0.2/src/version.c 2020-03-30 13:05:16.264989689 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "4.0.2-p2"; -+ return "4.0.2-p3"; - } ---- mpfr-4.0.2/tests/tset_si.c 2019-01-07 13:53:20.000000000 +0000 -+++ mpfr-4.0.2/tests/tset_si.c 2020-03-30 13:05:16.248989881 +0000 -@@ -90,6 +90,135 @@ - mpfr_clear (x); - } - -+#define REXP 1024 -+ -+static void -+test_2exp_extreme_aux (void) -+{ -+ mpfr_t x1, x2, y; -+ mpfr_exp_t e, ep[1 + 8 * 5], eb[] = -+ { MPFR_EMIN_MIN, -REXP, REXP, MPFR_EMAX_MAX, MPFR_EXP_MAX }; -+ mpfr_flags_t flags1, flags2; -+ int i, j, rnd, inex1, inex2; -+ char s; -+ -+ ep[0] = MPFR_EXP_MIN; -+ for (i = 0; i < numberof(eb); i++) -+ for (j = 0; j < 8; j++) -+ ep[1 + 8 * i + j] = eb[i] - j; -+ -+ mpfr_inits2 (3, x1, x2, (mpfr_ptr) 0); -+ mpfr_init2 (y, 32); -+ -+ for (i = 0; i < numberof(ep); i++) -+ for (j = -31; j <= 31; j++) -+ RND_LOOP_NO_RNDF (rnd) -+ { -+ int sign = j < 0 ? -1 : 1; -+ -+ /* Compute the expected value, inex and flags */ -+ inex1 = mpfr_set_si (y, j, MPFR_RNDN); -+ MPFR_ASSERTN (inex1 == 0); -+ inex1 = mpfr_set (x1, y, (mpfr_rnd_t) rnd); -+ /* x1 is the rounded value and inex1 the ternary value, -+ assuming that the exponent argument is 0 (this is the -+ rounded significand of the final result, assuming an -+ unbounded exponent range). The multiplication by a -+ power of 2 is exact, unless underflow/overflow occurs. -+ The tests on the exponent below avoid integer overflows -+ (ep[i] may take extreme values). */ -+ e = mpfr_get_exp (x1); -+ mpfr_clear_flags (); -+ if (j != 0 && ep[i] < __gmpfr_emin - e) /* underflow */ -+ { -+ mpfr_rnd_t r = -+ (rnd == MPFR_RNDN && -+ (ep[i] < __gmpfr_emin - mpfr_get_exp (y) - 1 || -+ IS_POW2 (sign * j))) ? -+ MPFR_RNDZ : (mpfr_rnd_t) rnd; -+ inex1 = mpfr_underflow (x1, r, sign); -+ flags1 = __gmpfr_flags; -+ } -+ else if (j != 0 && ep[i] > __gmpfr_emax - e) /* overflow */ -+ { -+ inex1 = mpfr_overflow (x1, (mpfr_rnd_t) rnd, sign); -+ flags1 = __gmpfr_flags; -+ } -+ else -+ { -+ if (j != 0) -+ mpfr_set_exp (x1, ep[i] + e); -+ flags1 = inex1 != 0 ? MPFR_FLAGS_INEXACT : 0; -+ } -+ -+ /* Test mpfr_set_si_2exp */ -+ mpfr_clear_flags (); -+ inex2 = mpfr_set_si_2exp (x2, j, ep[i], (mpfr_rnd_t) rnd); -+ flags2 = __gmpfr_flags; -+ -+ if (! (flags1 == flags2 && SAME_SIGN (inex1, inex2) && -+ mpfr_equal_p (x1, x2))) -+ { -+ s = 's'; -+ goto err_extreme; -+ } -+ -+ if (j < 0) -+ continue; -+ -+ /* Test mpfr_set_ui_2exp */ -+ mpfr_clear_flags (); -+ inex2 = mpfr_set_ui_2exp (x2, j, ep[i], (mpfr_rnd_t) rnd); -+ flags2 = __gmpfr_flags; -+ -+ if (! (flags1 == flags2 && SAME_SIGN (inex1, inex2) && -+ mpfr_equal_p (x1, x2))) -+ { -+ s = 'u'; -+ err_extreme: -+ printf ("Error in extreme mpfr_set_%ci_2exp for i=%d j=%d %s\n", -+ s, i, j, mpfr_print_rnd_mode ((mpfr_rnd_t) rnd)); -+ printf ("emin=%" MPFR_EXP_FSPEC "d " -+ "emax=%" MPFR_EXP_FSPEC "d\n", -+ (mpfr_eexp_t) __gmpfr_emin, -+ (mpfr_eexp_t) __gmpfr_emax); -+ printf ("ep[%d] = %" MPFR_EXP_FSPEC "d\n", -+ i, (mpfr_eexp_t) ep[i]); -+ printf ("Expected "); -+ mpfr_dump (x1); -+ printf ("with inex = %d and flags =", inex1); -+ flags_out (flags1); -+ printf ("Got "); -+ mpfr_dump (x2); -+ printf ("with inex = %d and flags =", inex2); -+ flags_out (flags2); -+ exit (1); -+ } -+ } -+ -+ mpfr_clears (x1, x2, y, (mpfr_ptr) 0); -+} -+ -+static void -+test_2exp_extreme (void) -+{ -+ mpfr_exp_t emin, emax; -+ -+ emin = mpfr_get_emin (); -+ emax = mpfr_get_emax (); -+ -+ set_emin (MPFR_EMIN_MIN); -+ set_emax (MPFR_EMAX_MAX); -+ test_2exp_extreme_aux (); -+ -+ set_emin (-REXP); -+ set_emax (REXP); -+ test_2exp_extreme_aux (); -+ -+ set_emin (emin); -+ set_emax (emax); -+} -+ - static void - test_macros (void) - { -@@ -639,6 +768,7 @@ - mpfr_clear (x); - - test_2exp (); -+ test_2exp_extreme (); - test_macros (); - test_macros_keyword (); - test_get_ui_smallneg (); ---- mpfr-4.0.2/tests/tset_sj.c 2019-01-07 13:53:20.000000000 +0000 -+++ mpfr-4.0.2/tests/tset_sj.c 2020-03-30 13:05:16.248989881 +0000 -@@ -176,6 +176,154 @@ - mpfr_clear (x); - } - -+#define REXP 1024 -+ -+static void -+test_2exp_extreme_aux (void) -+{ -+ mpfr_t x1, x2, y; -+ mpfr_exp_t e, ep[1 + 8 * 5], eb[] = -+ { MPFR_EMIN_MIN, -REXP, REXP, MPFR_EMAX_MAX, MPFR_EXP_MAX }; -+ mpfr_flags_t flags1, flags2; -+ int i, j, rnd, inex1, inex2; -+ char s; -+ -+ ep[0] = MPFR_EXP_MIN; -+ for (i = 0; i < numberof(eb); i++) -+ for (j = 0; j < 8; j++) -+ ep[1 + 8 * i + j] = eb[i] - j; -+ -+ mpfr_inits2 (3, x1, x2, (mpfr_ptr) 0); -+ mpfr_init2 (y, 32); -+ -+ /* The cast to int is needed if numberof(ep) is of unsigned type, in -+ which case the condition without the cast would be always false. */ -+ for (i = -2; i < (int) numberof(ep); i++) -+ for (j = -31; j <= 31; j++) -+ RND_LOOP_NO_RNDF (rnd) -+ { -+ int sign = j < 0 ? -1 : 1; -+ intmax_t em; -+ -+ if (i < 0) -+ { -+ em = i == -2 ? INTMAX_MIN : INTMAX_MAX; -+ mpfr_clear_flags (); -+ inex1 = j == 0 ? -+ (mpfr_set_zero (x1, +1), 0) : i == -2 ? -+ mpfr_underflow (x1, rnd == MPFR_RNDN ? -+ MPFR_RNDZ : (mpfr_rnd_t) rnd, sign) : -+ mpfr_overflow (x1, (mpfr_rnd_t) rnd, sign); -+ flags1 = __gmpfr_flags; -+ } -+ else -+ { -+ em = ep[i]; -+ /* Compute the expected value, inex and flags */ -+ inex1 = mpfr_set_si (y, j, MPFR_RNDN); -+ MPFR_ASSERTN (inex1 == 0); -+ inex1 = mpfr_set (x1, y, (mpfr_rnd_t) rnd); -+ /* x1 is the rounded value and inex1 the ternary value, -+ assuming that the exponent argument is 0 (this is the -+ rounded significand of the final result, assuming an -+ unbounded exponent range). The multiplication by a -+ power of 2 is exact, unless underflow/overflow occurs. -+ The tests on the exponent below avoid integer overflows -+ (ep[i] may take extreme values). */ -+ e = mpfr_get_exp (x1); -+ mpfr_clear_flags (); -+ if (j != 0 && ep[i] < __gmpfr_emin - e) /* underflow */ -+ { -+ mpfr_rnd_t r = -+ (rnd == MPFR_RNDN && -+ (ep[i] < __gmpfr_emin - mpfr_get_exp (y) - 1 || -+ IS_POW2 (sign * j))) ? -+ MPFR_RNDZ : (mpfr_rnd_t) rnd; -+ inex1 = mpfr_underflow (x1, r, sign); -+ flags1 = __gmpfr_flags; -+ } -+ else if (j != 0 && ep[i] > __gmpfr_emax - e) /* overflow */ -+ { -+ inex1 = mpfr_overflow (x1, (mpfr_rnd_t) rnd, sign); -+ flags1 = __gmpfr_flags; -+ } -+ else -+ { -+ if (j != 0) -+ mpfr_set_exp (x1, ep[i] + e); -+ flags1 = inex1 != 0 ? MPFR_FLAGS_INEXACT : 0; -+ } -+ } -+ -+ /* Test mpfr_set_sj_2exp */ -+ mpfr_clear_flags (); -+ inex2 = mpfr_set_sj_2exp (x2, j, em, (mpfr_rnd_t) rnd); -+ flags2 = __gmpfr_flags; -+ -+ if (! (flags1 == flags2 && SAME_SIGN (inex1, inex2) && -+ mpfr_equal_p (x1, x2))) -+ { -+ s = 's'; -+ goto err_extreme; -+ } -+ -+ if (j < 0) -+ continue; -+ -+ /* Test mpfr_set_uj_2exp */ -+ mpfr_clear_flags (); -+ inex2 = mpfr_set_uj_2exp (x2, j, em, (mpfr_rnd_t) rnd); -+ flags2 = __gmpfr_flags; -+ -+ if (! (flags1 == flags2 && SAME_SIGN (inex1, inex2) && -+ mpfr_equal_p (x1, x2))) -+ { -+ s = 'u'; -+ err_extreme: -+ printf ("Error in extreme mpfr_set_%cj_2exp for i=%d j=%d %s\n", -+ s, i, j, mpfr_print_rnd_mode ((mpfr_rnd_t) rnd)); -+ printf ("emin=%" MPFR_EXP_FSPEC "d " -+ "emax=%" MPFR_EXP_FSPEC "d\n", -+ (mpfr_eexp_t) __gmpfr_emin, -+ (mpfr_eexp_t) __gmpfr_emax); -+#ifdef MPFR_PRINTF_MAXLM -+ printf ("e = %" MPFR_PRINTF_MAXLM "d\n", em); -+#endif -+ printf ("Expected "); -+ mpfr_dump (x1); -+ printf ("with inex = %d and flags =", inex1); -+ flags_out (flags1); -+ printf ("Got "); -+ mpfr_dump (x2); -+ printf ("with inex = %d and flags =", inex2); -+ flags_out (flags2); -+ exit (1); -+ } -+ } -+ -+ mpfr_clears (x1, x2, y, (mpfr_ptr) 0); -+} -+ -+static void -+test_2exp_extreme (void) -+{ -+ mpfr_exp_t emin, emax; -+ -+ emin = mpfr_get_emin (); -+ emax = mpfr_get_emax (); -+ -+ set_emin (MPFR_EMIN_MIN); -+ set_emax (MPFR_EMAX_MAX); -+ test_2exp_extreme_aux (); -+ -+ set_emin (-REXP); -+ set_emax (REXP); -+ test_2exp_extreme_aux (); -+ -+ set_emin (emin); -+ set_emax (emax); -+} -+ - int - main (int argc, char *argv[]) - { -@@ -185,6 +333,7 @@ - check_set_uj_2exp (); - check_set_sj (); - check_set_sj_2exp (); -+ test_2exp_extreme (); - - tests_end_mpfr (); - return 0; ---- mpfr-4.0.2/PATCHES 2020-03-30 13:09:17.466071979 +0000 -+++ mpfr-4.0.2/PATCHES 2020-03-30 13:09:17.502071540 +0000 -@@ -0,0 +1 @@ -+sub1-ubf ---- mpfr-4.0.2/VERSION 2020-03-30 13:05:16.264989689 +0000 -+++ mpfr-4.0.2/VERSION 2020-03-30 13:09:17.502071540 +0000 -@@ -1 +1 @@ --4.0.2-p3 -+4.0.2-p4 ---- mpfr-4.0.2/src/add1.c 2019-01-07 13:53:20.000000000 +0000 -+++ mpfr-4.0.2/src/add1.c 2020-03-30 13:09:17.490071686 +0000 -@@ -41,7 +41,7 @@ - - if (MPFR_UNLIKELY (MPFR_IS_UBF (b))) - { -- exp = mpfr_ubf_zexp2exp (MPFR_ZEXP (b)); -+ exp = MPFR_UBF_GET_EXP (b); - if (exp > __gmpfr_emax) - return mpfr_overflow (a, rnd_mode, MPFR_SIGN (b));; - } ---- mpfr-4.0.2/src/mpfr-impl.h 2019-06-02 17:05:36.145226719 +0000 -+++ mpfr-4.0.2/src/mpfr-impl.h 2020-03-30 13:09:17.490071686 +0000 -@@ -2406,11 +2406,28 @@ - } - #endif - --#define MPFR_ZEXP(x) \ -- ((void) (x)->_mpfr_exp /* to check that x has a correct type */, \ -+/* Get the _mpfr_zexp field (pointer to a mpz_t) of a UBF object. -+ For practical reasons, the type of the argument x can be either -+ mpfr_ubf_ptr or mpfr_ptr, since the latter is used in functions -+ that accept both MPFR numbers and UBF's; this is checked by the -+ code "(x)->_mpfr_exp" (the "sizeof" prevents an access, which -+ could be invalid when MPFR_ZEXP(x) is used for an assignment, -+ and also avoids breaking the aliasing rules if they are dealt -+ with in the future). -+ This macro can be used when building a UBF. So we do not check -+ that the _mpfr_exp field has the value MPFR_EXP_UBF. */ -+#define MPFR_ZEXP(x) \ -+ ((void) sizeof ((x)->_mpfr_exp), \ - ((mpfr_ubf_ptr) (x))->_mpfr_zexp) - -+/* If x is a UBF, clear its mpz_t exponent. */ - #define MPFR_UBF_CLEAR_EXP(x) \ - ((void) (MPFR_IS_UBF (x) && (mpz_clear (MPFR_ZEXP (x)), 0))) - -+/* Like MPFR_GET_EXP, but accepts UBF (with exponent saturated to -+ the interval [MPFR_EXP_MIN,MPFR_EXP_MAX]). */ -+#define MPFR_UBF_GET_EXP(x) \ -+ (MPFR_IS_UBF (x) ? mpfr_ubf_zexp2exp (MPFR_ZEXP (x)) : \ -+ MPFR_GET_EXP ((mpfr_ptr) (x))) -+ - #endif /* __MPFR_IMPL_H__ */ ---- mpfr-4.0.2/src/mpfr.h 2020-03-30 13:05:16.260989737 +0000 -+++ mpfr-4.0.2/src/mpfr.h 2020-03-30 13:09:17.498071589 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 4 - #define MPFR_VERSION_MINOR 0 - #define MPFR_VERSION_PATCHLEVEL 2 --#define MPFR_VERSION_STRING "4.0.2-p3" -+#define MPFR_VERSION_STRING "4.0.2-p4" - - /* User macros: - MPFR_USE_FILE: Define it to make MPFR define functions dealing ---- mpfr-4.0.2/src/sub1.c 2019-01-07 13:53:20.000000000 +0000 -+++ mpfr-4.0.2/src/sub1.c 2020-03-30 13:09:17.490071686 +0000 -@@ -91,9 +91,20 @@ - - if (MPFR_UNLIKELY (MPFR_IS_UBF (b) || MPFR_IS_UBF (c))) - { -- exp_b = MPFR_IS_UBF (b) ? -- mpfr_ubf_zexp2exp (MPFR_ZEXP (b)) : MPFR_GET_EXP (b); -+ exp_b = MPFR_UBF_GET_EXP (b); -+ /* Early underflow detection. Rare, but a test is needed anyway -+ since in the "MAX (aq, bq) + 2 <= diff_exp" branch, the exponent -+ may decrease and MPFR_EXP_MIN would yield an integer overflow. */ -+ if (MPFR_UNLIKELY (exp_b < __gmpfr_emin - 1)) -+ { -+ if (rnd_mode == MPFR_RNDN) -+ rnd_mode = MPFR_RNDZ; -+ return mpfr_underflow (a, rnd_mode, MPFR_SIGN(a)); -+ } - diff_exp = mpfr_ubf_diff_exp (b, c); -+ /* mpfr_set4 below used with MPFR_RNDF does not support UBF. */ -+ if (rnd_mode == MPFR_RNDF) -+ rnd_mode = MPFR_RNDN; - } - else - { -@@ -123,11 +134,11 @@ - if (rnd_mode == MPFR_RNDF) - return mpfr_set4 (a, b, MPFR_RNDZ, MPFR_SIGN (a)); - -- MPFR_EXP (a) = exp_b; /* may be up to MPFR_EXP_MAX */ -+ exp_a = exp_b; /* may be any out-of-range value due to UBF */ - MPFR_RNDRAW_EVEN (inexact, a, MPFR_MANT (b), bq, - rnd_mode, MPFR_SIGN (a), -- if (MPFR_EXP (a) != MPFR_EXP_MAX) -- ++ MPFR_EXP (a)); -+ if (exp_a != MPFR_EXP_MAX) -+ exp_a ++); - MPFR_LOG_MSG (("inexact=%d\n", inexact)); - if (inexact == 0) - { -@@ -139,7 +150,7 @@ - if (! MPFR_IS_LIKE_RNDZ (rnd_mode, MPFR_IS_NEG (a))) - { - inexact = MPFR_INT_SIGN (a); -- goto check_overflow; -+ goto end_of_c_small; - } - } - else /* inexact != 0 */ -@@ -164,7 +175,7 @@ - which means we get a wrong rounded result if x == 1, - i.e. inexact == MPFR_EVEN_INEX (for positive numbers). */ - if (MPFR_LIKELY (inexact != MPFR_EVEN_INEX * MPFR_INT_SIGN (a))) -- goto check_overflow; -+ goto end_of_c_small; - } - /* We need to take the value preceding |a|. We can't use - mpfr_nexttozero due to a possible out-of-range exponent. -@@ -174,16 +185,26 @@ - mpn_sub_1 (ap, ap, an, MPFR_LIMB_ONE << sh); - if (MPFR_UNLIKELY (MPFR_LIMB_MSB (ap[an-1]) == 0)) - { -- MPFR_EXP (a) --; -+ exp_a --; - /* The following is valid whether an = 1 or an > 1. */ - ap[an-1] |= MPFR_LIMB_HIGHBIT; - } - inexact = - MPFR_INT_SIGN (a); -- check_overflow: -- if (MPFR_UNLIKELY (MPFR_EXP (a) > __gmpfr_emax)) -+ end_of_c_small: -+ /* The underflow case is possible only with UBF. The overflow case -+ is also possible with normal FP due to rounding. */ -+ if (MPFR_UNLIKELY (exp_a > __gmpfr_emax)) - return mpfr_overflow (a, rnd_mode, MPFR_SIGN (a)); -- else -- MPFR_RET (inexact); -+ if (MPFR_UNLIKELY (exp_a < __gmpfr_emin)) -+ { -+ if (rnd_mode == MPFR_RNDN && -+ (exp_a < __gmpfr_emin - 1 || -+ (inexact * MPFR_INT_SIGN (a) >= 0 && mpfr_powerof2_raw (a)))) -+ rnd_mode = MPFR_RNDZ; -+ return mpfr_underflow (a, rnd_mode, MPFR_SIGN(a)); -+ } -+ MPFR_SET_EXP (a, exp_a); -+ MPFR_RET (inexact); - } - - /* reserve a space to store b aligned with the result, i.e. shifted by -@@ -656,6 +677,15 @@ - if (MPFR_LIKELY(cancel)) - { - cancel -= add_exp; /* OK: add_exp is an int equal to 0 or 1 */ -+ MPFR_ASSERTD (cancel >= 0); -+ /* Detect an underflow case to avoid a possible integer overflow -+ with UBF in the computation of exp_a. */ -+ if (MPFR_UNLIKELY (exp_b < __gmpfr_emin - 1)) -+ { -+ if (rnd_mode == MPFR_RNDN) -+ rnd_mode = MPFR_RNDZ; -+ return mpfr_underflow (a, rnd_mode, MPFR_SIGN(a)); -+ } - exp_a = exp_b - cancel; - /* The following assertion corresponds to a limitation of the MPFR - implementation. It may fail with a 32-bit ABI and huge precisions, ---- mpfr-4.0.2/src/version.c 2020-03-30 13:05:16.264989689 +0000 -+++ mpfr-4.0.2/src/version.c 2020-03-30 13:09:17.502071540 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "4.0.2-p3"; -+ return "4.0.2-p4"; - } ---- mpfr-4.0.2/tests/tfma.c 2019-01-07 13:53:20.000000000 +0000 -+++ mpfr-4.0.2/tests/tfma.c 2020-03-30 13:09:17.490071686 +0000 -@@ -47,7 +47,7 @@ - mpfr_add (r1, r1, c, (mpfr_rnd_t) rnd)) - { - if (rnd == MPFR_RNDF) -- break; -+ continue; - printf ("test_exact internal error for (%d,%d,%d,%d,%s)\n", - i, j, k, rnd, mpfr_print_rnd_mode ((mpfr_rnd_t) rnd)); - exit (1); -@@ -664,7 +664,7 @@ - Note: The purpose of the s * 2^(emin-7) term is to yield - double rounding when scaling for k = 4, s != 0, MPFR_RNDN. */ - -- RND_LOOP (rnd) -+ RND_LOOP_NO_RNDF (rnd) - { - mpfr_clear_flags (); - inex1 = mpfr_set_si_2exp (t1, sign * (8*k+s-64), e-6, ---- mpfr-4.0.2/tests/tfmma.c 2019-01-07 13:53:20.000000000 +0000 -+++ mpfr-4.0.2/tests/tfmma.c 2020-03-30 13:09:17.490071686 +0000 -@@ -480,6 +480,123 @@ - mpfr_clears (x, y, z, (mpfr_ptr) 0); - } - -+static void -+underflow_tests (void) -+{ -+ mpfr_t x, y, z; -+ mpfr_prec_t p; -+ mpfr_exp_t emin; -+ -+ emin = mpfr_get_emin (); -+ mpfr_set_emin (-17); -+ for (p = MPFR_PREC_MIN; p <= 1024; p++) -+ { -+ mpfr_inits2 (p, x, y, (mpfr_ptr) 0); -+ mpfr_init2 (z, p + 1); -+ mpfr_set_str_binary (x, "1e-10"); -+ mpfr_set_str_binary (y, "1e-11"); -+ mpfr_clear_underflow (); -+ mpfr_fmms (z, x, x, y, y, MPFR_RNDN); -+ /* the exact result is 2^-20-2^-22, and should underflow */ -+ MPFR_ASSERTN(mpfr_underflow_p ()); -+ MPFR_ASSERTN(mpfr_zero_p (z)); -+ MPFR_ASSERTN(mpfr_signbit (z) == 0); -+ mpfr_clears (x, y, z, (mpfr_ptr) 0); -+ } -+ mpfr_set_emin (emin); -+} -+ -+static void -+bug20180604 (void) -+{ -+ mpfr_t x, y, yneg, z; -+ mpfr_exp_t emin; -+ int ret; -+ -+ emin = mpfr_get_emin (); -+ mpfr_set_emin (-1073741821); -+ mpfr_inits2 (564, x, y, yneg, (mpfr_ptr) 0); -+ mpfr_init2 (z, 2256); -+ mpfr_set_str_binary (x, "1.10010000111100110011001101111111101000111001011000110100110010000101000100010001000000111100010000101001011011111001111000110101111100101111001100001100011101100100011110000000011000010110111100111000100101010001011111010111011001110010001011101111001011001110110000010000011100010001010001011100100110111110101001001111001011101111110011101110101010110100010010111011111100010101111100011110111001011111101110101101101110100101111010000101011110100000000110111101000001100001000100010110100111010011011010110011100111010000101110010101111001011100110101100001100E-737194993"); -+ mpfr_set_str_binary (y, "-1.00101000100001001101011110100010110011101010011011010111100110101011111100000100101000111010111101100100110010001110011011100100110110000001011001000111101111101111110101100110111000000011000001101001010100010010001110001000011010000100111001001100101111111100010101110101001101101101111010100011011110001000010000010100011000011000010110101100000111111110111001100100100001101011111011100101110111000100101010110100010011101010110010100110100111000000100111101101101000000011110000100110100100011000010011110010001010000110100011111101101101110001110001101101010E-737194903"); -+ -+ mpfr_clear_underflow (); -+ ret = mpfr_fmms (z, x, x, y, y, MPFR_RNDN); -+ MPFR_ASSERTN(mpfr_underflow_p ()); -+ MPFR_ASSERTN(mpfr_zero_p (z)); -+ MPFR_ASSERTN(mpfr_signbit (z) == 1); -+ MPFR_ASSERTN(ret > 0); -+ -+ mpfr_clear_underflow (); -+ ret = mpfr_fmms (z, y, y, x, x, MPFR_RNDN); -+ MPFR_ASSERTN(mpfr_underflow_p ()); -+ MPFR_ASSERTN(mpfr_zero_p (z)); -+ MPFR_ASSERTN(mpfr_signbit (z) == 0); -+ MPFR_ASSERTN(ret < 0); -+ -+ mpfr_neg (yneg, y, MPFR_RNDN); -+ mpfr_clear_underflow (); -+ ret = mpfr_fmms (z, x, x, y, yneg, MPFR_RNDN); -+ MPFR_ASSERTN(mpfr_underflow_p ()); -+ MPFR_ASSERTN(mpfr_zero_p (z)); -+ MPFR_ASSERTN(mpfr_signbit (z) == 0); -+ MPFR_ASSERTN(ret < 0); -+ -+ mpfr_clear_underflow (); -+ ret = mpfr_fmms (z, y, yneg, x, x, MPFR_RNDN); -+ MPFR_ASSERTN(mpfr_underflow_p ()); -+ MPFR_ASSERTN(mpfr_zero_p (z)); -+ MPFR_ASSERTN(mpfr_signbit (z) == 1); -+ MPFR_ASSERTN(ret > 0); -+ -+ mpfr_clears (x, y, yneg, z, (mpfr_ptr) 0); -+ mpfr_set_emin (emin); -+} -+ -+/* this bug was discovered from mpc_mul */ -+static void -+bug20200206 (void) -+{ -+ mpfr_exp_t emin = mpfr_get_emin (); -+ mpfr_t xre, xim, yre, yim, zre; -+ -+ mpfr_set_emin (-1073); -+ mpfr_inits2 (53, xre, xim, yre, yim, zre, (mpfr_ptr) 0); -+ mpfr_set_str (xre, "-0x8.294611b331c8p-904", 16, MPFR_RNDN); -+ mpfr_set_str (xim, "-0x1.859278c2992fap-676", 16, MPFR_RNDN); -+ mpfr_set_str (yre, "0x9.ac54802a95f8p-820", 16, MPFR_RNDN); -+ mpfr_set_str (yim, "0x3.17e59e7612aap-412", 16, MPFR_RNDN); -+ mpfr_fmms (zre, xre, yre, xim, yim, MPFR_RNDN); -+ if (mpfr_regular_p (zre) && mpfr_get_exp (zre) < -1073) -+ { -+ printf ("Error, mpfr_fmms returns an out-of-range exponent:\n"); -+ mpfr_dump (zre); -+ exit (1); -+ } -+ mpfr_clears (xre, xim, yre, yim, zre, (mpfr_ptr) 0); -+ mpfr_set_emin (emin); -+} -+ -+/* check for integer overflow (see bug fixed in r13798) */ -+static void -+extreme_underflow (void) -+{ -+ mpfr_t x, y, z; -+ mpfr_exp_t emin = mpfr_get_emin (); -+ -+ set_emin (MPFR_EMIN_MIN); -+ mpfr_inits2 (64, x, y, z, (mpfr_ptr) 0); -+ mpfr_set_ui_2exp (x, 1, MPFR_EMIN_MIN - 1, MPFR_RNDN); -+ mpfr_set (y, x, MPFR_RNDN); -+ mpfr_nextabove (x); -+ mpfr_clear_flags (); -+ mpfr_fmms (z, x, x, y, y, MPFR_RNDN); -+ MPFR_ASSERTN (__gmpfr_flags == (MPFR_FLAGS_UNDERFLOW | MPFR_FLAGS_INEXACT)); -+ MPFR_ASSERTN (MPFR_IS_ZERO (z) && MPFR_IS_POS (z)); -+ mpfr_clears (x, y, z, (mpfr_ptr) 0); -+ set_emin (emin); -+} -+ - /* Test double-rounding cases in mpfr_set_1_2, which is called when - all the precisions are the same. With set.c before r13347, this - triggers errors for neg=0. */ -@@ -548,6 +665,9 @@ - { - tests_start_mpfr (); - -+ bug20200206 (); -+ bug20180604 (); -+ underflow_tests (); - random_tests (); - zero_tests (); - max_tests (); -@@ -555,6 +675,7 @@ - half_plus_half (); - bug20170405 (); - double_rounding (); -+ extreme_underflow (); - - tests_end_mpfr (); - return 0; ---- mpfr-4.0.2/tests/tsub.c 2019-01-07 13:53:20.000000000 +0000 -+++ mpfr-4.0.2/tests/tsub.c 2020-03-30 13:09:17.490071686 +0000 -@@ -1159,6 +1159,358 @@ - } - } - -+/* Tests on UBF. -+ * -+ * Note: mpfr_sub1sp will never be used as it does not support UBF. -+ * Thus there is no need to generate tests for both mpfr_sub1 and -+ * mpfr_sub1sp. -+ * -+ * Note that mpfr_sub1 has a special branch "c small", where the second -+ * argument c is sufficiently smaller than the ulp of the first argument -+ * and the ulp of the result: MAX (aq, bq) + 2 <= diff_exp. -+ * Tests should be done for both the main branch and this special branch -+ * when this makes sense. -+ */ -+#define REXP 1024 -+ -+static void test_ubf_aux (void) -+{ -+ mpfr_ubf_t x[11]; -+ mpfr_ptr p[11]; -+ int ex[11]; -+ mpfr_t ee, y, z, w; -+ int i, j, k, neg, inexact, rnd; -+ const int kn = 2; -+ mpfr_exp_t e[] = -+ { MPFR_EXP_MIN, MPFR_EMIN_MIN, -REXP, 0, -+ REXP, MPFR_EMAX_MAX, MPFR_EXP_MAX }; -+ -+ mpfr_init2 (ee, sizeof (mpfr_exp_t) * CHAR_BIT); -+ mpfr_inits2 (64, y, z, (mpfr_ptr) 0); -+ mpfr_init2 (w, 2); -+ -+ for (i = 0; i < 11; i++) -+ p[i] = (mpfr_ptr) x[i]; -+ -+ /* exact zero result, with small and large exponents */ -+ for (i = 0; i < 2; i++) -+ { -+ mpfr_init2 (p[i], 5 + (randlimb () % 128)); -+ mpfr_set_ui (p[i], 17, MPFR_RNDN); -+ mpz_init (MPFR_ZEXP (p[i])); -+ MPFR_SET_UBF (p[i]); -+ } -+ for (j = 0; j < numberof (e); j++) -+ { -+ inexact = mpfr_set_exp_t (ee, e[j], MPFR_RNDN); -+ MPFR_ASSERTD (inexact == 0); -+ inexact = mpfr_get_z (MPFR_ZEXP (p[0]), ee, MPFR_RNDN); -+ MPFR_ASSERTD (inexact == 0); -+ mpz_sub_ui (MPFR_ZEXP (p[0]), MPFR_ZEXP (p[0]), kn); -+ -+ for (k = -kn; k <= kn; k++) -+ { -+ /* exponent: e[j] + k, with |k| <= kn */ -+ mpz_set (MPFR_ZEXP (p[1]), MPFR_ZEXP (p[0])); -+ -+ for (neg = 0; neg <= 1; neg++) -+ { -+ RND_LOOP (rnd) -+ { -+ /* Note: x[0] and x[1] are equal MPFR numbers, but do not -+ test mpfr_sub with arg2 == arg3 as pointers in order to -+ skip potentially optimized mpfr_sub code. */ -+ inexact = mpfr_sub (z, p[0], p[1], (mpfr_rnd_t) rnd); -+ if (inexact != 0 || MPFR_NOTZERO (z) || -+ (rnd != MPFR_RNDD ? MPFR_IS_NEG (z) : MPFR_IS_POS (z))) -+ { -+ printf ("Error 1 in test_ubf for exact zero result: " -+ "j=%d k=%d neg=%d, rnd=%s\nGot ", j, k, neg, -+ mpfr_print_rnd_mode ((mpfr_rnd_t) rnd)); -+ mpfr_dump (z); -+ printf ("inexact = %d\n", inexact); -+ exit (1); -+ } -+ } -+ -+ for (i = 0; i < 2; i++) -+ MPFR_CHANGE_SIGN (p[i]); -+ } -+ -+ mpz_add_ui (MPFR_ZEXP (p[0]), MPFR_ZEXP (p[0]), 1); -+ } -+ } -+ for (i = 0; i < 2; i++) -+ { -+ MPFR_UBF_CLEAR_EXP (p[i]); -+ mpfr_clear (p[i]); -+ } -+ -+ /* Up to a given exponent (for the result) and sign, test: -+ * (t + .11010) - (t + .00001) = .11001 -+ * (t + 8) - (t + 111.00111) = .11001 -+ * where t = 0 or a power of 2, e.g. 2^200. Test various exponents -+ * (including those near the underflow/overflow boundaries) so that -+ * the subtraction yields a normal number, an overflow or an underflow. -+ * In MPFR_RNDA, also test with a 2-bit precision target, as this -+ * yields an exponent change. -+ * -+ * Also test the "MAX (aq, bq) + 2 <= diff_exp" branch of sub1.c with -+ * .1 - epsilon (possible decrease of the exponent) and .111 - epsilon -+ * in precision 2 (possible increase of the exponent). The first test -+ * triggers a possible decrease of the exponent (see bug fixed in r13806). -+ * The second test triggers a possible increase of the exponent (see the -+ * "exp_a != MPFR_EXP_MAX" test to avoid an integer overflow). -+ */ -+ for (i = 0; i < 8; i++) -+ { -+ static int v[4] = { 26, 1, 256, 231 }; -+ -+ mpfr_init2 (p[i], i < 4 ? 5 + (randlimb () % 128) : 256); -+ if (i < 4) -+ mpfr_set_si_2exp (p[i], v[i], -5, MPFR_RNDN); -+ else -+ { -+ mpfr_set_si_2exp (p[i], 1, 200, MPFR_RNDN); -+ mpfr_add (p[i], p[i], p[i-4], MPFR_RNDN); -+ } -+ ex[i] = mpfr_get_exp (p[i]) + 5; -+ MPFR_ASSERTD (ex[i] >= 0); -+ } -+ mpfr_inits2 (3, p[8], p[9], p[10], (mpfr_ptr) 0); -+ mpfr_set_si_2exp (p[8], 1, 0, MPFR_RNDN); -+ ex[8] = 5; -+ mpfr_set_si_2exp (p[9], 1, 0, MPFR_RNDN); /* will be epsilon */ -+ ex[9] = 0; -+ mpfr_set_si_2exp (p[10], 7, 0, MPFR_RNDN); -+ ex[10] = 5; -+ -+ for (i = 0; i < 11; i++) -+ { -+ mpz_init (MPFR_ZEXP (p[i])); -+ MPFR_SET_UBF (p[i]); -+ } -+ -+ for (j = 0; j < numberof (e); j++) -+ { -+ inexact = mpfr_set_exp_t (ee, e[j], MPFR_RNDN); -+ MPFR_ASSERTD (inexact == 0); -+ inexact = mpfr_get_z (MPFR_ZEXP (p[0]), ee, MPFR_RNDN); -+ MPFR_ASSERTD (inexact == 0); -+ for (i = 1; i < 11; i++) -+ mpz_set (MPFR_ZEXP (p[i]), MPFR_ZEXP (p[0])); -+ for (i = 0; i < 11; i++) -+ { -+ mpz_add_ui (MPFR_ZEXP (p[i]), MPFR_ZEXP (p[i]), ex[i]); -+ mpz_sub_ui (MPFR_ZEXP (p[i]), MPFR_ZEXP (p[i]), 5 + kn); -+ } -+ mpz_sub_ui (MPFR_ZEXP (p[9]), MPFR_ZEXP (p[9]), 256); -+ for (k = -kn; k <= kn; k++) -+ { -+ for (neg = 0; neg <= 1; neg++) -+ { -+ int sign = neg ? -1 : 1; -+ -+ RND_LOOP (rnd) -+ for (i = 0; i <= 10; i += 2) -+ { -+ mpfr_exp_t e0; -+ mpfr_flags_t flags, flags_y; -+ int inex_y; -+ -+ if (i >= 8) -+ { -+ int d; -+ -+ e0 = MPFR_UBF_GET_EXP (p[i]); -+ if (e0 < MPFR_EXP_MIN + 3) -+ e0 += 3; -+ -+ if (rnd == MPFR_RNDN) -+ d = i == 8 ? (e0 == __gmpfr_emin - 1 ? 3 : 4) : 6; -+ else if (MPFR_IS_LIKE_RNDZ (rnd, neg)) -+ d = i == 8 ? 3 : 6; -+ else -+ d = i == 8 ? 4 : 8; -+ -+ mpfr_clear_flags (); -+ inex_y = mpfr_set_si_2exp (w, sign * d, e0 - 3, -+ (mpfr_rnd_t) rnd); -+ flags_y = __gmpfr_flags | MPFR_FLAGS_INEXACT; -+ if (inex_y == 0) -+ inex_y = rnd == MPFR_RNDN ? -+ sign * (i == 8 ? 1 : -1) : -+ MPFR_IS_LIKE_RNDD ((mpfr_rnd_t) rnd, sign) ? -+ -1 : 1; -+ mpfr_set (y, w, MPFR_RNDN); -+ -+ mpfr_clear_flags (); -+ inexact = mpfr_sub (w, p[i], p[9], (mpfr_rnd_t) rnd); -+ flags = __gmpfr_flags; -+ -+ /* For MPFR_RNDF, only do a basic test. */ -+ MPFR_ASSERTN (mpfr_check (w)); -+ if (rnd == MPFR_RNDF) -+ continue; -+ -+ goto testw; -+ } -+ -+ mpfr_clear_flags (); -+ inexact = mpfr_sub (z, p[i], p[i+1], (mpfr_rnd_t) rnd); -+ flags = __gmpfr_flags; -+ -+ /* For MPFR_RNDF, only do a basic test. */ -+ MPFR_ASSERTN (mpfr_check (z)); -+ if (rnd == MPFR_RNDF) -+ continue; -+ -+ e0 = MPFR_UBF_GET_EXP (p[0]); -+ -+ if (e0 < __gmpfr_emin) -+ { -+ mpfr_rnd_t r = -+ rnd == MPFR_RNDN && e0 < __gmpfr_emin - 1 ? -+ MPFR_RNDZ : (mpfr_rnd_t) rnd; -+ flags_y = MPFR_FLAGS_UNDERFLOW | MPFR_FLAGS_INEXACT; -+ inex_y = mpfr_underflow (y, r, sign); -+ } -+ else if (e0 > __gmpfr_emax) -+ { -+ flags_y = MPFR_FLAGS_OVERFLOW | MPFR_FLAGS_INEXACT; -+ inex_y = mpfr_overflow (y, (mpfr_rnd_t) rnd, sign); -+ } -+ else -+ { -+ mpfr_set_si_2exp (y, sign * 25, e0 - 5, MPFR_RNDN); -+ flags_y = 0; -+ inex_y = 0; -+ } -+ -+ if (flags != flags_y || -+ ! SAME_SIGN (inexact, inex_y) || -+ ! mpfr_equal_p (y, z)) -+ { -+ printf ("Error 2 in test_ubf with " -+ "j=%d k=%d neg=%d i=%d rnd=%s\n", -+ j, k, neg, i, -+ mpfr_print_rnd_mode ((mpfr_rnd_t) rnd)); -+ printf ("emin=%" MPFR_EXP_FSPEC "d " -+ "emax=%" MPFR_EXP_FSPEC "d\n", -+ (mpfr_eexp_t) __gmpfr_emin, -+ (mpfr_eexp_t) __gmpfr_emax); -+ printf ("b = "); -+ mpfr_dump (p[i]); -+ printf ("c = "); -+ mpfr_dump (p[i+1]); -+ printf ("Expected "); -+ mpfr_dump (y); -+ printf ("with inex = %d and flags =", inex_y); -+ flags_out (flags_y); -+ printf ("Got "); -+ mpfr_dump (z); -+ printf ("with inex = %d and flags =", inexact); -+ flags_out (flags); -+ exit (1); -+ } -+ -+ /* Do the following 2-bit precision test only in RNDA. */ -+ if (rnd != MPFR_RNDA) -+ continue; -+ -+ mpfr_clear_flags (); -+ inexact = mpfr_sub (w, p[i], p[i+1], MPFR_RNDA); -+ flags = __gmpfr_flags; -+ if (e0 < MPFR_EXP_MAX) -+ e0++; -+ -+ if (e0 < __gmpfr_emin) -+ { -+ flags_y = MPFR_FLAGS_UNDERFLOW | MPFR_FLAGS_INEXACT; -+ inex_y = mpfr_underflow (y, MPFR_RNDA, sign); -+ } -+ else if (e0 > __gmpfr_emax) -+ { -+ flags_y = MPFR_FLAGS_OVERFLOW | MPFR_FLAGS_INEXACT; -+ inex_y = mpfr_overflow (y, MPFR_RNDA, sign); -+ } -+ else -+ { -+ mpfr_set_si_2exp (y, sign, e0 - 1, MPFR_RNDN); -+ flags_y = MPFR_FLAGS_INEXACT; -+ inex_y = sign; -+ } -+ -+ testw: -+ if (flags != flags_y || -+ ! SAME_SIGN (inexact, inex_y) || -+ ! mpfr_equal_p (y, w)) -+ { -+ printf ("Error 3 in test_ubf with " -+ "j=%d k=%d neg=%d i=%d rnd=%s\n", -+ j, k, neg, i, -+ mpfr_print_rnd_mode ((mpfr_rnd_t) rnd)); -+ printf ("emin=%" MPFR_EXP_FSPEC "d " -+ "emax=%" MPFR_EXP_FSPEC "d\n", -+ (mpfr_eexp_t) __gmpfr_emin, -+ (mpfr_eexp_t) __gmpfr_emax); -+ printf ("b = "); -+ mpfr_dump (p[i]); -+ printf ("c = "); -+ mpfr_dump (p[i <= 8 ? i+1 : 9]); -+ printf ("Expected "); -+ /* Set y to a 2-bit precision just for the output. -+ Since we exit, this will have no other effect. */ -+ mpfr_prec_round (y, 2, MPFR_RNDA); -+ mpfr_dump (y); -+ printf ("with inex = %d and flags =", inex_y); -+ flags_out (flags_y); -+ printf ("Got "); -+ mpfr_dump (w); -+ printf ("with inex = %d and flags =", inexact); -+ flags_out (flags); -+ exit (1); -+ } -+ } -+ -+ for (i = 0; i < 11; i++) -+ MPFR_CHANGE_SIGN (p[i]); -+ } -+ -+ for (i = 0; i < 11; i++) -+ mpz_add_ui (MPFR_ZEXP (p[i]), MPFR_ZEXP (p[i]), 1); -+ } -+ } -+ for (i = 0; i < 11; i++) -+ { -+ MPFR_UBF_CLEAR_EXP (p[i]); -+ mpfr_clear (p[i]); -+ } -+ -+ mpfr_clears (ee, y, z, w, (mpfr_ptr) 0); -+} -+ -+/* Run the tests on UBF with the maximum exponent range and with a -+ reduced exponent range. */ -+static void test_ubf (void) -+{ -+ mpfr_exp_t emin, emax; -+ -+ emin = mpfr_get_emin (); -+ emax = mpfr_get_emax (); -+ -+ set_emin (MPFR_EMIN_MIN); -+ set_emax (MPFR_EMAX_MAX); -+ test_ubf_aux (); -+ -+ set_emin (-REXP); -+ set_emax (REXP); -+ test_ubf_aux (); -+ -+ set_emin (emin); -+ set_emax (emax); -+} -+ - #define TEST_FUNCTION test_sub - #define TWO_ARGS - #define RAND_FUNCTION(x) mpfr_random2(x, MPFR_LIMB_SIZE (x), randlimb () % 100, RANDS) -@@ -1188,6 +1540,7 @@ - for (i=0; i<50; i++) - check_two_sum (p); - test_generic (MPFR_PREC_MIN, 800, 100); -+ test_ubf (); - - tests_end_mpfr (); - return 0; ---- mpfr-4.0.2/PATCHES 2020-03-30 16:31:45.813415121 +0000 -+++ mpfr-4.0.2/PATCHES 2020-03-30 16:33:54.623893528 +0000 -@@ -0,0 +1 @@ -+const ---- mpfr-4.0.2/VERSION 2020-03-30 13:09:17.502071540 +0000 -+++ mpfr-4.0.2/VERSION 2020-03-30 15:17:31.535330224 +0000 -@@ -1 +1 @@ --4.0.2-p4 -+4.0.2-p5 ---- mpfr-4.0.2/acinclude.m4 2019-01-27 18:30:16.000000000 +0000 -+++ mpfr-4.0.2/acinclude.m4 2019-01-27 18:30:16.000000000 +0000 -@@ -438,12 +438,14 @@ - AC_MSG_WARN([platform and/or document the behavior.]) - fi - --dnl Check if the chars '0' to '9' are consecutive values -+dnl Check if the chars '0' to '9', 'a' to 'z', and 'A' to 'Z' are -+dnl consecutive values. -+dnl The const is necessary with GCC's "-Wwrite-strings -Werror". - AC_MSG_CHECKING([if charset has consecutive values]) - AC_RUN_IFELSE([AC_LANG_PROGRAM([[ --char *number = "0123456789"; --char *lower = "abcdefghijklmnopqrstuvwxyz"; --char *upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; -+const char *number = "0123456789"; -+const char *lower = "abcdefghijklmnopqrstuvwxyz"; -+const char *upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; - ]],[[ - int i; - unsigned char *p; ---- mpfr-4.0.2/configure 2019-01-31 20:43:19.000000000 +0000 -+++ mpfr-4.0.2/configure 2020-03-30 16:33:29.340190160 +0000 -@@ -15868,9 +15868,9 @@ - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - --char *number = "0123456789"; --char *lower = "abcdefghijklmnopqrstuvwxyz"; --char *upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; -+const char *number = "0123456789"; -+const char *lower = "abcdefghijklmnopqrstuvwxyz"; -+const char *upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; - - int - main (void) ---- mpfr-4.0.2/src/mpfr.h 2020-03-30 13:09:17.498071589 +0000 -+++ mpfr-4.0.2/src/mpfr.h 2020-03-30 15:17:31.535330224 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 4 - #define MPFR_VERSION_MINOR 0 - #define MPFR_VERSION_PATCHLEVEL 2 --#define MPFR_VERSION_STRING "4.0.2-p4" -+#define MPFR_VERSION_STRING "4.0.2-p5" - - /* User macros: - MPFR_USE_FILE: Define it to make MPFR define functions dealing ---- mpfr-4.0.2/src/version.c 2020-03-30 13:09:17.502071540 +0000 -+++ mpfr-4.0.2/src/version.c 2020-03-30 15:17:31.535330224 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "4.0.2-p4"; -+ return "4.0.2-p5"; - } ---- mpfr-4.0.2/tests/tdiv.c 2019-01-07 13:53:20.000000000 +0000 -+++ mpfr-4.0.2/tests/tdiv.c 2020-03-30 15:17:31.523330366 +0000 -@@ -23,7 +23,7 @@ - #include "mpfr-test.h" - - static void --check_equal (mpfr_srcptr a, mpfr_srcptr a2, char *s, -+check_equal (mpfr_srcptr a, mpfr_srcptr a2, const char *s, - mpfr_srcptr b, mpfr_srcptr c, mpfr_rnd_t r) - { - if (SAME_VAL (a, a2)) ---- mpfr-4.0.2/tests/tfpif.c 2019-01-07 13:53:20.000000000 +0000 -+++ mpfr-4.0.2/tests/tfpif.c 2020-03-30 15:17:31.523330366 +0000 -@@ -30,8 +30,8 @@ - static void - doit (int argc, char *argv[], mpfr_prec_t p1, mpfr_prec_t p2) - { -- char *filenameCompressed = FILE_NAME_RW; -- char *data = FILE_NAME_R; -+ const char *filenameCompressed = FILE_NAME_RW; -+ const char *data = FILE_NAME_R; - int status; - FILE *fh; - mpfr_t x[9]; -@@ -198,7 +198,7 @@ - static void - check_bad (void) - { -- char *filenameCompressed = FILE_NAME_RW; -+ const char *filenameCompressed = FILE_NAME_RW; - int status; - FILE *fh; - mpfr_t x; -@@ -340,7 +340,7 @@ - static void - extra (void) - { -- char *data = FILE_NAME_R2; -+ const char *data = FILE_NAME_R2; - mpfr_t x; - FILE *fp; - int ret; ---- mpfr-4.0.2/tests/tmul_2exp.c 2019-01-07 13:53:20.000000000 +0000 -+++ mpfr-4.0.2/tests/tmul_2exp.c 2020-03-30 15:17:31.523330366 +0000 -@@ -258,7 +258,7 @@ - mpfr_exp_t old_emax; - mpfr_t x, y1, y2; - int neg, r, op; -- static char *sop[4] = { "mul_2ui", "mul_2si", "div_2ui", "div_2si" }; -+ static const char *sop[4] = { "mul_2ui", "mul_2si", "div_2ui", "div_2si" }; - - old_emax = mpfr_get_emax (); - set_emax (emax); ---- mpfr-4.0.2/tests/trandom.c 2019-01-07 13:53:20.000000000 +0000 -+++ mpfr-4.0.2/tests/trandom.c 2020-03-30 15:17:31.523330366 +0000 -@@ -185,7 +185,7 @@ - { - gmp_randstate_t s; - mpfr_t x; -- char *str = "0.1010111100000000000000000000000000000000E-32"; -+ const char *str = "0.1010111100000000000000000000000000000000E-32"; - int k; - - gmp_randinit_default (s); ---- mpfr-4.0.2/tests/trint.c 2019-01-25 02:00:06.000000000 +0000 -+++ mpfr-4.0.2/tests/trint.c 2020-03-30 15:17:31.523330366 +0000 -@@ -308,7 +308,7 @@ - #if __MPFR_STDC (199901L) - - static void --test_fct (double (*f)(double), int (*g)(), char *s, mpfr_rnd_t r) -+test_fct (double (*f)(double), int (*g)(), const char *s, mpfr_rnd_t r) - { - double d, y; - mpfr_t dd, yy; ---- mpfr-4.0.2/tests/tsum.c 2019-01-07 13:53:20.000000000 +0000 -+++ mpfr-4.0.2/tests/tsum.c 2020-03-30 15:17:31.523330366 +0000 -@@ -285,7 +285,7 @@ - static void - check_more_special (void) - { -- char *str[NC] = { "NaN", "+Inf", "-Inf", "+0", "-0", "+1", "-1" }; -+ const char *str[NC] = { "NaN", "+Inf", "-Inf", "+0", "-0", "+1", "-1" }; - int i, r, k[NS]; - mpfr_t c[NC], s[NS], sum; - mpfr_ptr p[NS]; -@@ -724,7 +724,7 @@ - { - mpfr_t sum, t[4]; - mpfr_ptr p[4]; -- char *s[4] = { -+ const char *s[4] = { - "0x1p1000", - "-0x0.fffffffffffff80000000000000001p1000", - "-0x1p947", -@@ -771,7 +771,11 @@ - { - mpfr_t sum1, sum2, t[3]; - mpfr_ptr p[3]; -- char *s[3] = { "0.10000111110101000010101011100001", "1E-100", "0.1E95" }; -+ const char *s[3] = { -+ "0.10000111110101000010101011100001", -+ "1E-100", -+ "0.1E95" -+ }; - int i, r; - - mpfr_inits2 (58, sum1, sum2, (mpfr_ptr) 0); -@@ -1268,7 +1272,7 @@ - { - mpfr_t r, t[4]; - mpfr_ptr p[4]; -- char *s[4] = { "0.10E20", "0", "0.11E382", "0.10E826" }; -+ const char *s[4] = { "0.10E20", "0", "0.11E382", "0.10E826" }; - int i; - - mpfr_init2 (r, 2); ---- mpfr-4.0.2/tests/turandom.c 2019-01-07 13:53:20.000000000 +0000 -+++ mpfr-4.0.2/tests/turandom.c 2020-03-30 15:17:31.523330366 +0000 -@@ -526,7 +526,7 @@ - #define N 6 - /* Run this program with the MPFR_REPROD_ABI_OUTPUT environment variable - set to get the array of strings. */ -- char *t[5 * N] = { -+ const char *t[5 * N] = { - "1.0@-1", - "3.0@-1", - "7.0@-1", ---- mpfr-4.0.2/PATCHES 2020-03-30 16:50:17.064231191 +0000 -+++ mpfr-4.0.2/PATCHES 2020-03-30 16:50:17.096230810 +0000 -@@ -0,0 +1 @@ -+array-length ---- mpfr-4.0.2/VERSION 2020-03-30 15:17:31.535330224 +0000 -+++ mpfr-4.0.2/VERSION 2020-03-30 16:50:17.096230810 +0000 -@@ -1 +1 @@ --4.0.2-p5 -+4.0.2-p6 ---- mpfr-4.0.2/src/mpfr-impl.h 2020-03-30 13:09:17.490071686 +0000 -+++ mpfr-4.0.2/src/mpfr-impl.h 2020-03-30 16:50:17.084230953 +0000 -@@ -2026,7 +2026,21 @@ - struct mpfr_group_t { - size_t alloc; - mp_limb_t *mant; -+#if MPFR_GROUP_STATIC_SIZE != 0 - mp_limb_t tab[MPFR_GROUP_STATIC_SIZE]; -+#else -+ /* In order to detect memory leaks when testing, MPFR_GROUP_STATIC_SIZE -+ can be set to 0, in which case tab will not be used. ISO C does not -+ support zero-length arrays[*], thus let's use a flexible array member -+ (which will be equivalent here). Note: this is new in C99, but this -+ is just used for testing. -+ [*] Zero-length arrays are a GNU extension: -+ https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html -+ and as such an extension is forbidden in ISO C, it triggers an -+ error with -Werror=pedantic. -+ */ -+ mp_limb_t tab[]; -+#endif - }; - - #define MPFR_GROUP_DECL(g) struct mpfr_group_t g ---- mpfr-4.0.2/src/mpfr.h 2020-03-30 15:17:31.535330224 +0000 -+++ mpfr-4.0.2/src/mpfr.h 2020-03-30 16:50:17.096230810 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 4 - #define MPFR_VERSION_MINOR 0 - #define MPFR_VERSION_PATCHLEVEL 2 --#define MPFR_VERSION_STRING "4.0.2-p5" -+#define MPFR_VERSION_STRING "4.0.2-p6" - - /* User macros: - MPFR_USE_FILE: Define it to make MPFR define functions dealing ---- mpfr-4.0.2/src/version.c 2020-03-30 15:17:31.535330224 +0000 -+++ mpfr-4.0.2/src/version.c 2020-03-30 16:50:17.096230810 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "4.0.2-p5"; -+ return "4.0.2-p6"; - } ---- mpfr-4.0.2/PATCHES 2020-04-03 13:54:03.807946879 +0000 -+++ mpfr-4.0.2/PATCHES 2020-04-03 13:54:03.891945830 +0000 -@@ -0,0 +1 @@ -+sub1-ubftest ---- mpfr-4.0.2/VERSION 2020-03-30 16:50:17.096230810 +0000 -+++ mpfr-4.0.2/VERSION 2020-04-03 13:54:03.891945830 +0000 -@@ -1 +1 @@ --4.0.2-p6 -+4.0.2-p7 ---- mpfr-4.0.2/src/mpfr.h 2020-03-30 16:50:17.096230810 +0000 -+++ mpfr-4.0.2/src/mpfr.h 2020-04-03 13:54:03.891945830 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 4 - #define MPFR_VERSION_MINOR 0 - #define MPFR_VERSION_PATCHLEVEL 2 --#define MPFR_VERSION_STRING "4.0.2-p6" -+#define MPFR_VERSION_STRING "4.0.2-p7" - - /* User macros: - MPFR_USE_FILE: Define it to make MPFR define functions dealing ---- mpfr-4.0.2/src/version.c 2020-03-30 16:50:17.096230810 +0000 -+++ mpfr-4.0.2/src/version.c 2020-04-03 13:54:03.891945830 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "4.0.2-p6"; -+ return "4.0.2-p7"; - } ---- mpfr-4.0.2/tests/tsub.c 2020-03-30 13:09:17.490071686 +0000 -+++ mpfr-4.0.2/tests/tsub.c 2020-04-03 13:54:03.827946629 +0000 -@@ -1203,9 +1203,9 @@ - for (j = 0; j < numberof (e); j++) - { - inexact = mpfr_set_exp_t (ee, e[j], MPFR_RNDN); -- MPFR_ASSERTD (inexact == 0); -+ MPFR_ASSERTN (inexact == 0); - inexact = mpfr_get_z (MPFR_ZEXP (p[0]), ee, MPFR_RNDN); -- MPFR_ASSERTD (inexact == 0); -+ MPFR_ASSERTN (inexact == 0); - mpz_sub_ui (MPFR_ZEXP (p[0]), MPFR_ZEXP (p[0]), kn); - - for (k = -kn; k <= kn; k++) -@@ -1266,23 +1266,31 @@ - { - static int v[4] = { 26, 1, 256, 231 }; - -- mpfr_init2 (p[i], i < 4 ? 5 + (randlimb () % 128) : 256); -+ mpfr_init2 (p[i], i < 4 ? 8 + (randlimb () % 128) : 256); - if (i < 4) -- mpfr_set_si_2exp (p[i], v[i], -5, MPFR_RNDN); -+ { -+ inexact = mpfr_set_si_2exp (p[i], v[i], -5, MPFR_RNDN); -+ MPFR_ASSERTN (inexact == 0); -+ } - else - { -- mpfr_set_si_2exp (p[i], 1, 200, MPFR_RNDN); -- mpfr_add (p[i], p[i], p[i-4], MPFR_RNDN); -+ inexact = mpfr_set_si_2exp (p[i], 1, 200, MPFR_RNDN); -+ MPFR_ASSERTN (inexact == 0); -+ inexact = mpfr_add (p[i], p[i], p[i-4], MPFR_RNDN); -+ MPFR_ASSERTN (inexact == 0); - } - ex[i] = mpfr_get_exp (p[i]) + 5; -- MPFR_ASSERTD (ex[i] >= 0); -+ MPFR_ASSERTN (ex[i] >= 0); - } - mpfr_inits2 (3, p[8], p[9], p[10], (mpfr_ptr) 0); -- mpfr_set_si_2exp (p[8], 1, 0, MPFR_RNDN); -+ inexact = mpfr_set_si_2exp (p[8], 1, 0, MPFR_RNDN); -+ MPFR_ASSERTN (inexact == 0); - ex[8] = 5; -- mpfr_set_si_2exp (p[9], 1, 0, MPFR_RNDN); /* will be epsilon */ -+ inexact = mpfr_set_si_2exp (p[9], 1, 0, MPFR_RNDN); /* will be epsilon */ -+ MPFR_ASSERTN (inexact == 0); - ex[9] = 0; -- mpfr_set_si_2exp (p[10], 7, 0, MPFR_RNDN); -+ inexact = mpfr_set_si_2exp (p[10], 7, 0, MPFR_RNDN); -+ MPFR_ASSERTN (inexact == 0); - ex[10] = 5; - - for (i = 0; i < 11; i++) -@@ -1294,9 +1302,9 @@ - for (j = 0; j < numberof (e); j++) - { - inexact = mpfr_set_exp_t (ee, e[j], MPFR_RNDN); -- MPFR_ASSERTD (inexact == 0); -+ MPFR_ASSERTN (inexact == 0); - inexact = mpfr_get_z (MPFR_ZEXP (p[0]), ee, MPFR_RNDN); -- MPFR_ASSERTD (inexact == 0); -+ MPFR_ASSERTN (inexact == 0); - for (i = 1; i < 11; i++) - mpz_set (MPFR_ZEXP (p[i]), MPFR_ZEXP (p[0])); - for (i = 0; i < 11; i++) diff --git a/sources b/sources index 454bac6..dfff0b4 100644 --- a/sources +++ b/sources @@ -1,21 +1,25 @@ SHA512 (Macaulay2-icons.tar.xz) = 069aa0ad70a0253583b00091c094da9b79d2a2f0f2d38aa97f543081f5df5fd3b5a9e1463febd6947c3151cf01844133174c7372f57e158c2d3faba6baed5d1d -SHA512 (version-1.15.1.0.tar.gz) = 7ffe9f5e15ab43cec72100ccb5ee4fd646d34f6c5096e2f8b6e856a556f4e05627721836321836fea21d14c978e37f653b3e3e32c26aa71c9a58b29f083c95bd +SHA512 (Macaulay2-1.16.tar.gz) = 3e69e2dc407af9bc6b4f7db2046788e509effb543286a98406655828ab1c462cb406abe350f91ba5d204934fa3f5d04f82d454cd441dce428f8d02ded68f2372 SHA512 (4ti2-1.6.9.tar.gz) = f02b61ba04d7512e86d9574574669ec764d053fc5d01744dc6b521518d4165b41355ae12344923f1549b323406130c6562a4d9272b1b88de2ecc2c20d3d892d5 SHA512 (cddlib-094h.tar.gz) = 94a3ef03fd86ece7e61e4f9bec283862594b05a6faca76897e33ad15762527c885cee5439bb8a5d337a608ceb17baff24910da326071a3107df17a0c07f5e774 -SHA512 (cohomCalg-0.32.tar.gz) = 70e72363467e557c32a2d20192cfcb12bcce77edc251ebfaeb9062fa456043b749758a9e3273325613d4b5572c7771aee7853fc244a3ed8957145e02d80de128 +SHA512 (cohomCalg-0.32.tar.gz) = b76d8de00b13a8fe8881222178247c5e99c15075c46290830f6c3afffb9dfc18af0d57f738ac5a0d7c00044db81b4465d1e0563c95f7f656a2440be5765c6818 SHA512 (Csdp-6.2.0.tgz) = 6f6c44abcb7b0e277f5a42a1e31acbd41c8fbdce0c1641982a48199fe1d922b28d86433d1a98ac71ae521bea04188a830c441db1e9d8eebf174debf501430e82 SHA512 (factory-4.1.1.tar.gz) = f08d74cb860145c07b9f1cc0a3fe44cb6fb2fc158a9b992f0db55eeef9e93d280cf66a5c8822236389e54b8084d2a37c174b32864e4dc12b8ee3c4760e9fe2bf -SHA512 (flint-20200414.tar.gz) = 06f8d4fc5dde0476ed18c37d9342d4350745a92410eb80c6d98cf10f557bdba1134d2d5a97db5f0d226ae5617fbd0d9db0b36b81ce350576e5615bbcdac3ab1e +SHA512 (flint-2.6.3.tar.gz) = 8e71570364c789b1d4eaaa5f5adf10212cab47bf1a9f45c333211035ed021a86bb7b1de1feec51e83b2e113e8168853e370f127d2d2b1e941a12aec71fe8ae9e SHA512 (frobby_v0.9.0.tar.gz) = bc96ff20ec334932b5eaa8a3d15d0e36eab41eb85e8b74dbdc374dcaafc9873e44a8af16f6caae649aeea17cd6284caf244d4d345689ad43288f199c591a68a6 SHA512 (gfan0.6.2.tar.gz) = 08a9cc543967771af959a506b79db5b55e0e4942e4170dad8691db35ef7d381d878e1ea6534a3cacc0f5d30ec31564ec94cc20b46792d06f18a3a8a3c0aac91d -SHA512 (givaro-4.1.1.tar.gz) = 415c24146fb41ed5db1ffbe687bf0fd62a68e82b69e1aece7721ad75ae9fede2d37223a3fa11f770f41bcd2d426e5aa9b2b8f1bc1e62eac44821c6e1a215114e +SHA512 (givaro-4.1.1.tar.gz) = baaf139f42176838c541143a5b69acf47a8f31c17020a85cf413ce18ade2c3048e009d15c2acf4d71041c0776cd42f5fedb1c183ce1cc0f85cb8672ceac00ee7 SHA512 (glpk-4.59.tar.gz) = ca05bd085880143acf4a440cf7efd2392d4dde89bed53a0e5726526cb210eee004bfcd434aeb8ca8abb1dc89ff93e72054489911e5e2c843e0ed631d50c55f56 SHA512 (gtest-1.10.0.tar.gz) = bd52abe938c3722adc2347afad52ea3a17ecc76730d8d16b065e165bc7477d762bce0997a427131866a89f1001e3f3315198204ffa5d643a9355f1f4d0d7b1a9 SHA512 (lapack-3.6.0.tgz) = 0975c721abe38ef46cda2ba446060428e2f576ec4558cc0205ca6af2af2bd8f7f4c31fd0c90d77a92719a73e1942fade19b4c17e6fe2da29d54ad1adccf5a6b2 SHA512 (libfplll-5.2.0.tar.gz) = 67d1a8deb92d3f9245983b09b7593b19c5d43c8fe77cfea893ea9dfb744bcb77b7239d73e4f619450cc6960f4c48fb1c6ba46268208b0f31f855cf1af6bfaa29 +SHA512 (linbox-1.6.3.tar.gz) = 7585f51b46b65a90328b4ff82f7c74eb59510c912a0bb0ce49263f4c7c1e777c0f9961e4672fa36be6fb84035a019b8e212615c363fd62d632e37c327d6ed3c0 SHA512 (lrslib-062.tar.gz) = 78fa6d470b2dd9cb06d1d15023debd8fafc27ed4df93cd90ef746071755f6b1fe9ee2c6a24659030b9a8851bd3ee3a699407586d320f3760c3d8a3a1c79d7116 -SHA512 (mathicgb-1.0.tar.gz) = de4917f88771e17f0f3446ac4254a142f179bc87cb5596c18c30b4547ff0c1131694a18247d0a6f91cbe39d91590d0dedebd74e6634c3aad344935722c037afc -SHA512 (mpfr-4.0.2.tar.xz) = d583555d08863bf36c89b289ae26bae353d9a31f08ee3894520992d2c26e5683c4c9c193d7ad139632f71c0a476d85ea76182702a98bf08dde7b6f65a54f8b88 -SHA512 (mpsolve-3.1.8.tar.gz) = 843ab1e2719600740e95a6f5e740bb6731c7b74039a2d7ccabff680fd455e5a350e0709a3261b551d80da76b49448b9ea9ac480e3a07c03a35576c4eb6746f9e +SHA512 (M2-emacs-7460c44.tar.gz) = 295e78238300dbefaa82ac0ea5b7d3eb538e2ec5677dd7f0588ee89c515ab29de899a0d1aa11b35f9d5c1e883e6f53059042662579740d43fc980e595100d11c +SHA512 (mathic-1.0.tar.gz) = 3bf767f77cec8aed0267752f8328d0599b2f4d31c3e4cffea69d9e9aa26a163d6a38e52e5b371e2ffc391f954003008cf734a75440b538d7ae4107ee1dd95f90 +SHA512 (mathicgb-1.0.tar.gz) = b7fdcbf20dc0bfaa3251bd681f4a61d5bbb16f62f4a577a902ad9bf176c359ad8ab10dd20b6ef06040c9955e149d8e022ce98c15531a6dd339876fa3a187ea68 +SHA512 (memtailor-1.0.tar.gz) = f3f185200b9f9cd381e9b920f0d6feb4bc721c5235a38b0d68515184430ca2fcb7d1c87762e6489d735d4791bd8cb63eb8bf1400b86e439188df8d9741dea943 +SHA512 (mpfr-4.1.0.tar.xz) = 1bd1c349741a6529dfa53af4f0da8d49254b164ece8a46928cdb13a99460285622d57fe6f68cef19c6727b3f9daa25ddb3d7d65c201c8f387e421c7f7bee6273 +SHA512 (mpsolve-3.2.1.tar.gz) = 8f0cb1be303767bf5a68c150df01c98f7f5e17bfaee685ea4cb9300c0dbf740069c774d647f141a4a1eb46fa54f23d9e75a800ce195cd522527c72e3c6aeed0f SHA512 (normaliz-3.7.2.tar.gz) = 044a1b5c7e877cdfceedbe6b283b982b66e58f0cc5b0ccf6a63a293044d1348290fde92531b4c4a0a58f5263bb7696a2511b5a1dff94222c9e56a2fe3fccb69b SHA512 (TOPCOM-0.17.8.tar.gz) = 8611e8bd36eda00646fb40794435f23e6af81ecbee93c40e8fe5f73905e673e6244cb0f8cc1fe5c29050e40c7d53a44c615c60cbbecc8452b3c85f1d8a816d7a From 94c421004b252bbd3f28b120630c0199004bb889 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Thu, 15 Oct 2020 07:05:47 -0600 Subject: [PATCH 14/70] Add missing #includes for gcc-11 --- Macaulay2-gcc11.patch | 24 ++++++++++++++++++++++++ Macaulay2.spec | 8 +++++++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 Macaulay2-gcc11.patch diff --git a/Macaulay2-gcc11.patch b/Macaulay2-gcc11.patch new file mode 100644 index 0000000..4aecfb6 --- /dev/null +++ b/Macaulay2-gcc11.patch @@ -0,0 +1,24 @@ +diff --git a/M2/submodules/mathicgb/src/mathicgb/RawVector.hpp b/M2/submodules/mathicgb/src/mathicgb/RawVector.hpp +index 10ea2d5..fbdbd27 100644 +--- M2/submodules/mathicgb/src/mathicgb/RawVector.hpp ++++ M2/submodules/mathicgb/src/mathicgb/RawVector.hpp +@@ -3,6 +3,7 @@ + #ifndef MATHICGB_RAW_VECTOR_GUARD + #define MATHICGB_RAW_VECTOR_GUARD + ++#include + #include + #include + #include +diff --git a/M2/submodules/mathicgb/src/mathicgb/SparseMatrix.cpp b/M2/submodules/mathicgb/src/mathicgb/SparseMatrix.cpp +index 7d41d47..dd15705 100644 +--- M2/submodules/mathicgb/src/mathicgb/SparseMatrix.cpp ++++ M2/submodules/mathicgb/src/mathicgb/SparseMatrix.cpp +@@ -1,6 +1,7 @@ + // MathicGB copyright 2012 all rights reserved. MathicGB comes with ABSOLUTELY + // NO WARRANTY and is licensed as GPL v2.0 or later - see LICENSE.txt. + #include "stdinc.h" ++#include + #include "SparseMatrix.hpp" + + #include "Poly.hpp" diff --git a/Macaulay2.spec b/Macaulay2.spec index b28494a..9da014a 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -59,7 +59,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 Version: 1.16 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 or GPLv3 URL: http://macaulay2.com/ @@ -165,6 +165,8 @@ Patch6: %{name}-1.12-configure.patch Patch7: %{name}-1.16-format.patch # Fix "error: in conversion to html, unknown TeX control sequence(s): \rightarrow" Patch8: %{name}-1.16-rightarrow.patch +# Fix minor errors found when building with gcc-11 +Patch9: %{name}-gcc11.patch BuildRequires: 4ti2 BuildRequires: autoconf @@ -355,6 +357,7 @@ ln -s %{_datadir}/factory \ %patch6 -p1 -b .configure %patch7 -p1 -b .format %patch8 -p1 -b .rightarrow +%patch9 -p1 -b .gcc11 # repeatable builds: inject a node name sed -i 's,`uname -n`,build.fedoraproject.org,' configure.ac @@ -515,6 +518,9 @@ time make -k check -C BUILD/%{_target_platform} Verbose=true ||: %changelog +* Thu Oct 15 2020 Jeff Law - 1.16-2 +- Add missing #includes for gcc-11 + * Mon Aug 31 2020 Jerry James - 1.16-1 - Version 1.16 - Drop upstreamed patch: -xdg_open From 77c821002fcecce8693fb03503fb0b14b4058e93 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Wed, 11 Nov 2020 11:21:16 -0700 Subject: [PATCH 15/70] Explicitly BR make. Drop unused pari dependency. --- Macaulay2.spec | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index 9da014a..40c64c5 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -224,13 +224,13 @@ BuildRequires: lrslib-devel BuildRequires: lrslib-utils BuildRequires: m4ri-devel BuildRequires: m4rie-devel +BuildRequires: make BuildRequires: mariadb-devel BuildRequires: mpsolve-devel BuildRequires: nauty BuildRequires: normaliz BuildRequires: ntl-devel BuildRequires: %{blaslib}-devel -BuildRequires: pari-devel BuildRequires: pkgconfig(bdw-gc) >= 7.6.2 BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(ncurses) @@ -396,18 +396,9 @@ autoreconf -fi . ## configure macro currently broken, due to some odd prefix-checks. probably fixable -- Rex mkdir -p BUILD/%{_target_platform} pushd BUILD/%{_target_platform} -# On ppc64le with the compiler in strict mode, the pari declaration of -# vec_insert() is deemed to ambiguate the declaration of the AltiVec function -# __builtin_vec_insert(). We add -fpermissive to downgrade the error to a -# warning, but we should find a better fix. -%ifarch ppc64le -cxxflags="%{optflags} -fsigned-char -fpermissive" -%else -cxxflags="%{optflags} -fsigned-char" -%endif CPPFLAGS="-I%{_includedir}/cddlib -I%{_includedir}/frobby" \ CFLAGS="%{optflags} -fsigned-char" \ -CXXFLAGS="$cxxflags" \ +CXXFLAGS="%{optflags} -fsigned-char" \ LIBS="-l%{blaslib}" \ ../../configure \ --build=%{_build} \ @@ -452,7 +443,7 @@ find BUILD/%{_target_platform}/ -name *.errors -execdir echo {} \; -execdir cat %install -make install -C BUILD/%{_target_platform} DESTDIR=%{buildroot} IgnoreExampleErrors=true +%make_install -C BUILD/%{_target_platform} IgnoreExampleErrors=true # link, don't copy, the binaries mbindir=%{buildroot}%{_libexecdir}/Macaulay2/bin From 808cc8ca97e96a677dafa5691129b373e4e7c45d Mon Sep 17 00:00:00 2001 From: Jerry James Date: Sat, 16 Jan 2021 09:28:39 -0700 Subject: [PATCH 16/70] Version 1.17 - Drop upstreamed patches: -nauty-paths, -format - Merge -gcc11 patch into mathicgb-1.0.patch --- Macaulay2-1.11-nauty-paths.patch | 46 ------------ Macaulay2-1.16-default_make_targets.patch | 11 --- Macaulay2-1.16-format.patch | 11 --- ...re.patch => Macaulay2-1.17-configure.patch | 8 +- Macaulay2-1.17-default_make_targets.patch | 11 +++ Macaulay2-gcc11.patch | 24 ------ Macaulay2.spec | 73 ++++++++---------- factory-4.1.1.patch | 74 ------------------- factory-4.1.3.patch | 72 ++++++++++++++++++ mathicgb-1.0.patch | 24 +++++- sources | 14 ++-- 11 files changed, 147 insertions(+), 221 deletions(-) delete mode 100644 Macaulay2-1.11-nauty-paths.patch delete mode 100644 Macaulay2-1.16-default_make_targets.patch delete mode 100644 Macaulay2-1.16-format.patch rename Macaulay2-1.12-configure.patch => Macaulay2-1.17-configure.patch (55%) create mode 100644 Macaulay2-1.17-default_make_targets.patch delete mode 100644 Macaulay2-gcc11.patch delete mode 100644 factory-4.1.1.patch create mode 100644 factory-4.1.3.patch diff --git a/Macaulay2-1.11-nauty-paths.patch b/Macaulay2-1.11-nauty-paths.patch deleted file mode 100644 index c270fa5..0000000 --- a/Macaulay2-1.11-nauty-paths.patch +++ /dev/null @@ -1,46 +0,0 @@ ---- M2/Macaulay2/packages/NautyGraphs.m2.orig 2016-08-15 12:38:31.000000000 -0600 -+++ M2/Macaulay2/packages/NautyGraphs.m2 2017-02-27 21:49:22.976044001 -0700 -@@ -30,9 +30,9 @@ newPackage select(( - ------------------- - - -- Check the ~/.Macaulay2/init-NautyGraphs.m2 file for the absolute path. ---- If it's not there, then use the M2-Programs directory. -+-- If it's not there, then use the system binary directory. - nauty'path = (options NautyGraphs).Configuration#"path"; --if nauty'path == "" then nauty'path = prefixDirectory | currentLayout#"programs"; -+if nauty'path == "" then nauty'path = "/usr/bin/"; - - ------------------- - -- Exports -@@ -420,7 +420,7 @@ callNauty (String, List) := List => opts - scan(graphToString \ dataList, d -> o << d << endl); - close o; - -- try to harvest the lines -- r := lines try get openIn ("!" | nauty'path | cmdStr | " <" | infn | " 2>" | erfn) -+ r := lines try get openIn ("!" | nauty'path | "nauty-" | cmdStr | " <" | infn | " 2>" | erfn) - else ( - -- nauty errored, harvest the error - e := last separate(":", first lines get openIn erfn); ---- M2/Macaulay2/packages/Nauty.m2.orig 2016-08-15 12:38:31.000000000 -0600 -+++ M2/Macaulay2/packages/Nauty.m2 2017-02-27 21:49:22.977043998 -0700 -@@ -37,9 +37,9 @@ newPackage select(( - ------------------- - - -- Check the ~/.Macaulay2/init-Nauty.m2 file for the absolute path. ---- If it's not there, then use the M2-Programs directory. -+-- If it's not there, then use the system binary directory. - nauty'path = (options Nauty).Configuration#"path"; --if nauty'path == "" then nauty'path = prefixDirectory | currentLayout#"programs"; -+if nauty'path == "" then nauty'path = "/usr/bin/"; - - ------------------- - -- Exports -@@ -472,7 +472,7 @@ callNauty (String, List) := List => opts - scan(graphToString \ dataList, d -> o << d << endl); - close o; - -- try to harvest the lines -- r := lines try get openIn ("!" | nauty'path | cmdStr | " <" | infn | " 2>" | erfn) -+ r := lines try get openIn ("!" | nauty'path | "nauty-" | cmdStr | " <" | infn | " 2>" | erfn) - else ( - -- nauty errored, harvest the error - e := last separate(":", first lines get openIn erfn); diff --git a/Macaulay2-1.16-default_make_targets.patch b/Macaulay2-1.16-default_make_targets.patch deleted file mode 100644 index 1e77bcf..0000000 --- a/Macaulay2-1.16-default_make_targets.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- M2/Macaulay2/Makefile.in.orig 2020-07-12 19:17:33.241211749 -0600 -+++ M2/Macaulay2/Makefile.in 2020-07-12 19:18:07.133195781 -0600 -@@ -3,7 +3,7 @@ - VPATH = @srcdir@ - include ../include/config.Makefile - all: @pre_docdir@/COPYING-GPL-2 @pre_docdir@/COPYING-GPL-3 @pre_docdir@/README @pre_docdir@/LAYOUT --SUBDIRS = util regex c d e system bin m2 man packages editors html-check-links tests -+SUBDIRS = util regex c d e system bin m2 man packages editors - - define do-in-subdirs - $(foreach d,$(SUBDIRS), diff --git a/Macaulay2-1.16-format.patch b/Macaulay2-1.16-format.patch deleted file mode 100644 index 2ffd3f5..0000000 --- a/Macaulay2-1.16-format.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- M2/Macaulay2/e/mem.cpp.orig 2020-07-11 05:04:29.000000000 -0600 -+++ M2/Macaulay2/e/mem.cpp 2020-07-12 19:26:39.391982818 -0600 -@@ -71,7 +71,7 @@ void stash::text_out(buffer &o) const - { - char s[200]; - sprintf(s, -- "%16s %9dk %9dk %10zd %10lu %10lu %10lu %10lu%s", -+ "%16s %9dk %9dk %10zu %10zu %10zu %10zu %10zu%s", - name, - static_cast((element_size * highwater + 1023) / 1024), - static_cast((element_size * n_inuse + 1023) / 1024), diff --git a/Macaulay2-1.12-configure.patch b/Macaulay2-1.17-configure.patch similarity index 55% rename from Macaulay2-1.12-configure.patch rename to Macaulay2-1.17-configure.patch index 58f9764..8086b88 100644 --- a/Macaulay2-1.12-configure.patch +++ b/Macaulay2-1.17-configure.patch @@ -1,17 +1,15 @@ ---- M2/configure.ac.orig 2018-08-06 14:16:21.725371828 -0600 -+++ M2/configure.ac 2018-08-06 14:22:27.632902514 -0600 -@@ -266,10 +266,10 @@ AC_MSG_NOTICE([checking for C compiler f +--- M2/configure.ac.orig 2021-01-12 14:20:55.509886490 -0700 ++++ M2/configure.ac 2021-01-12 14:21:55.866785423 -0700 +@@ -252,9 +252,9 @@ AC_MSG_NOTICE([checking for C compiler f dnl always compile with "-g", so we can debug even optimized versions if test "$GCC" = yes -then CFLAGS="$CFLAGS -g3" - CXXFLAGS="$CXXFLAGS -g3" - LDFLAGS="$LDFLAGS -g3" -- LDFLAGS_FOR_BUILD="$LDFLAGS_FOR_BUILD -g3" +then CFLAGS="$CFLAGS -g" + CXXFLAGS="$CXXFLAGS -g" + LDFLAGS="$LDFLAGS -g" -+ LDFLAGS_FOR_BUILD="$LDFLAGS_FOR_BUILD -g" else CFLAGS="$CFLAGS -g" CXXFLAGS="$CXXFLAGS -g" LDFLAGS="$LDFLAGS -g" diff --git a/Macaulay2-1.17-default_make_targets.patch b/Macaulay2-1.17-default_make_targets.patch new file mode 100644 index 0000000..96be906 --- /dev/null +++ b/Macaulay2-1.17-default_make_targets.patch @@ -0,0 +1,11 @@ +--- M2/Macaulay2/Makefile.in.orig 2021-01-12 14:18:59.570080654 -0700 ++++ M2/Macaulay2/Makefile.in 2021-01-12 14:19:19.802046768 -0700 +@@ -3,7 +3,7 @@ + VPATH = @srcdir@ + include ../include/config.Makefile + all: @pre_docdir@/COPYING-GPL-2 @pre_docdir@/COPYING-GPL-3 @pre_docdir@/README @pre_docdir@/LAYOUT +-SUBDIRS = util c d e system bin m2 man packages editors html-check-links tests ++SUBDIRS = util c d e system bin m2 man packages editors + + define do-in-subdirs + $(foreach d,$(SUBDIRS), diff --git a/Macaulay2-gcc11.patch b/Macaulay2-gcc11.patch deleted file mode 100644 index 4aecfb6..0000000 --- a/Macaulay2-gcc11.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/M2/submodules/mathicgb/src/mathicgb/RawVector.hpp b/M2/submodules/mathicgb/src/mathicgb/RawVector.hpp -index 10ea2d5..fbdbd27 100644 ---- M2/submodules/mathicgb/src/mathicgb/RawVector.hpp -+++ M2/submodules/mathicgb/src/mathicgb/RawVector.hpp -@@ -3,6 +3,7 @@ - #ifndef MATHICGB_RAW_VECTOR_GUARD - #define MATHICGB_RAW_VECTOR_GUARD - -+#include - #include - #include - #include -diff --git a/M2/submodules/mathicgb/src/mathicgb/SparseMatrix.cpp b/M2/submodules/mathicgb/src/mathicgb/SparseMatrix.cpp -index 7d41d47..dd15705 100644 ---- M2/submodules/mathicgb/src/mathicgb/SparseMatrix.cpp -+++ M2/submodules/mathicgb/src/mathicgb/SparseMatrix.cpp -@@ -1,6 +1,7 @@ - // MathicGB copyright 2012 all rights reserved. MathicGB comes with ABSOLUTELY - // NO WARRANTY and is licensed as GPL v2.0 or later - see LICENSE.txt. - #include "stdinc.h" -+#include - #include "SparseMatrix.hpp" - - #include "Poly.hpp" diff --git a/Macaulay2.spec b/Macaulay2.spec index 40c64c5..077da64 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -21,14 +21,9 @@ # We have to bundle the linbox package. It has global constructors that cause # the same problem as libfplll. -# Upstream wants us to build the final commit in a release branch. We wait -# for a release announcement, then pull from git. The tarballs in the git repo -# are for upstream's use, not for distributions to build. -%global commit 94c4b7db5dcafeaf2b97315a2bed6ac8ba16ee6b -%global shortcommit %(cut -b -7 <<< %{commit}) %global m2url https://github.com/Macaulay2/M2 -%global emacscommit 7460c448d40571866e8290ac862abbc28c1b5b37 +%global emacscommit d1809568339948182cb967f5d54884d5e7213dca %global emacsurl https://github.com/Macaulay2/M2-emacs %global emacsshort %(cut -b -7 <<< %{emacscommit}) @@ -58,15 +53,15 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 -Version: 1.16 -Release: 2%{?dist} +Version: 1.17 +Release: 1%{?dist} License: GPLv2 or GPLv3 URL: http://macaulay2.com/ %if 0%{?snap:1} Source0: %{name}-%{version}-%{snap}.tar.xz %else -Source0: %{m2url}/tarball/%{commit}/%{name}-%{version}.tar.gz +Source0: %{m2url}/archive/release-%{version}/%{name}-%{version}.tar.gz %endif Source1: %{emacsurl}/tarball/%{emacscommit}/M2-emacs-%{emacsshort}.tar.gz @@ -93,13 +88,13 @@ Source102: http://www.flintlib.org/flint-%{flintver}.tar.gz Provides: bundled(flint) = %{flintver} # FACTORY is bundled because it must be built with special options -%global factoryver 4.1.1 +%global factoryver 4.1.3 Source103: http://faculty.math.illinois.edu/Macaulay2/Downloads/OtherSourceCode/factory-%{factoryver}.tar.gz Provides: bundled(factory) = %{factoryver} # MATHICGB is bundled because it must be built with different threading options %global mathicgbver 1.0 -%global mathicgbcommit 0d70da731a84008143a00cf1effd978dc8607879 +%global mathicgbcommit 4d23c24302c2395efbbeef9ea1fd52e4f0f56f65 Source104: https://github.com/Macaulay2/mathicgb/tarball/%{mathicgbcommit}/mathicgb-%{mathicgbver}.tar.gz Provides: bundled(mathicgb) = %{mathicgbver} @@ -109,33 +104,33 @@ Source105: https://faculty.math.illinois.edu/Macaulay2/Downloads/OtherSourceCode # MEMTAILOR is bundled because it causes garbage collector crashes otherwise %global memtailorver 1.0 -%global memtailorcommit 1d13f96bc7d84b7ac401e6b8c936fad26f08786c +%global memtailorcommit 777c5d2d341ff742850b86e2fb29d24007ac9bae Source106: https://github.com/Macaulay2/memtailor/tarball/%{memtailorcommit}/memtailor-%{memtailorver}.tar.gz Provides: bundled(memtailor) = %{memtailorver} # MATHIC is bundled because it causes garbage collector crashes otherwise %global mathicver 1.0 -%global mathiccommit 44095b846a83c05cbff6f3e8765070e5cda40e67 +%global mathiccommit cc52f4685b1e1f1af084d22cfb730f62e34c2dfc Source107: https://github.com/Macaulay2/mathic/tarball/%{mathiccommit}/mathic-%{mathicver}.tar.gz Provides: bundled(mathic) = %{mathicver} # LINBOX is bundled because it introduces static global objects %global linboxver 1.6.3 -Source108: https://github.com/linbox-team/linbox/archive/v%{linboxver}}/linbox-%{linboxver}.tar.gz +Source108: https://github.com/linbox-team/linbox/releases/download/v%{linboxver}/linbox-%{linboxver}.tar.gz Provides: bundled(linbox) = %{linboxver} ## PATCHES FOR BUNDLED code # Work around an ambiguous overload on 32-bit platforms Source200: linbox-1.6.3.patch # Fix factory build failure. REPLACES the upstream patch. -Source201: factory-4.1.1.patch -# Fix mathicgb build on big endian machines. +Source201: factory-4.1.3.patch +# Fix mathicgb build on big endian machines and with gcc 11 Source202: mathicgb-1.0.patch ## FAKE library tarballs that convince Macaulay2 to use the system versions Source300: frobby_v0.9.0.tar.gz Source301: cddlib-094h.tar.gz -Source302: lapack-3.6.0.tgz +Source302: lapack-3.9.0.tgz Source303: 4ti2-1.6.9.tar.gz Source304: libfplll-5.2.0.tar.gz Source305: gfan0.6.2.tar.gz @@ -151,22 +146,16 @@ Source312: mpsolve-3.2.1.tar.gz Patch0: %{name}-1.15-optflags.patch # give the build a little more time and space than upstream permits Patch1: %{name}-1.16-ulimit.patch -# fix paths to nauty binaries -Patch2: %{name}-1.11-nauty-paths.patch # drop 'tests' from default make target -Patch3: %{name}-1.16-default_make_targets.patch +Patch2: %{name}-1.17-default_make_targets.patch # disable check for gftables -Patch4: %{name}-1.16-no_gftables.patch +Patch3: %{name}-1.16-no_gftables.patch # adapt to libfplll 5.2.1 -Patch5: %{name}-1.15-fplll.patch +Patch4: %{name}-1.15-fplll.patch # do not override the debug level -Patch6: %{name}-1.12-configure.patch -# fix some -Wformat warnings -Patch7: %{name}-1.16-format.patch +Patch5: %{name}-1.17-configure.patch # Fix "error: in conversion to html, unknown TeX control sequence(s): \rightarrow" -Patch8: %{name}-1.16-rightarrow.patch -# Fix minor errors found when building with gcc-11 -Patch9: %{name}-gcc11.patch +Patch6: %{name}-1.16-rightarrow.patch BuildRequires: 4ti2 BuildRequires: autoconf @@ -299,8 +288,8 @@ BuildArch: noarch %prep -%setup -q -n %{name}-M2-%{shortcommit}/M2 -%setup -q -n %{name}-M2-%{shortcommit}/M2 -T -D -a 10 +%setup -q -n M2-release-%{version}/M2 +%setup -q -n M2-release-%{version}/M2 -T -D -a 10 tar -C Macaulay2/editors/emacs --strip-components=1 -xzf %{SOURCE1} install -p -m755 %{SOURCE20} ./etags @@ -346,18 +335,15 @@ tar -C submodules/givaro --strip-components=1 -xzf %{SOURCE306} %patch0 -p1 -b .optflags %patch1 -p1 -b .ulimit -%patch2 -p1 -b .nauty -%patch3 -p1 -b .default_make_targets -%patch4 -p1 -b .no_gftables +%patch2 -p1 -b .default_make_targets +%patch3 -p1 -b .no_gftables # factory-gftables symlink mkdir -p BUILD/%{_target_platform}/usr-dist/common/share/Macaulay2/Core ln -s %{_datadir}/factory \ BUILD/%{_target_platform}/usr-dist/common/share/Macaulay2/Core/factory -%patch5 -p1 -b .fplll -%patch6 -p1 -b .configure -%patch7 -p1 -b .format -%patch8 -p1 -b .rightarrow -%patch9 -p1 -b .gcc11 +%patch4 -p1 -b .fplll +%patch5 -p1 -b .configure +%patch6 -p1 -b .rightarrow # repeatable builds: inject a node name sed -i 's,`uname -n`,build.fedoraproject.org,' configure.ac @@ -484,9 +470,9 @@ rm -fr %{buildroot}/builddir %check -CFLAGS="%{optflags}" \ -CXXFLAGS="%{optflags}" \ -LDFLAGS="$RPM_LD_FLAGS" \ +CFLAGS="%{build_cflags}" \ +CXXFLAGS="%{build_cxxflags}" \ +LDFLAGS="%{build_ldflags}" \ time make -k check -C BUILD/%{_target_platform} Verbose=true ||: @@ -509,6 +495,11 @@ time make -k check -C BUILD/%{_target_platform} Verbose=true ||: %changelog +* Sat Jan 16 2021 Jerry James - 1.17-1 +- Version 1.17 +- Drop upstreamed patches: -nauty-paths, -format +- Merge -gcc11 patch into mathicgb-1.0.patch + * Thu Oct 15 2020 Jeff Law - 1.16-2 - Add missing #includes for gcc-11 diff --git a/factory-4.1.1.patch b/factory-4.1.1.patch deleted file mode 100644 index 4438666..0000000 --- a/factory-4.1.1.patch +++ /dev/null @@ -1,74 +0,0 @@ ---- m4/flags.m4.orig 2018-02-15 07:02:18.000000000 -0700 -+++ m4/flags.m4 2020-07-12 20:46:53.024384864 -0600 -@@ -122,7 +122,7 @@ AC_DEFUN([SING_CHECK_SET_ARGS], [ - ## for clang: -Wunneeded-internal-declaration - - if test "x${ENABLE_OPTIMIZATION}" != xno; then -- OPTFLAGS="-g0 -O3 -Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -fno-enforce-eh-specs -fconserve-space -funroll-loops -fno-delete-null-pointer-checks" -+ OPTFLAGS="-Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -fno-enforce-eh-specs -fconserve-space -funroll-loops -fno-delete-null-pointer-checks" - # -O3 - crashes gcc???!!! - # -fpermissive - AC_LANG_PUSH([C]) ---- m4/flint-check.m4.orig 2018-02-15 07:02:18.000000000 -0700 -+++ m4/flint-check.m4 2020-07-12 20:46:08.072325817 -0600 -@@ -69,7 +69,7 @@ for FLINT_HOME in ${FLINT_HOME_PATH} - [ - AC_TRY_RUN( - [#include -- int main () { if ((int) version[0] < 2) return -1; else return 0; } -+ int main () { if (__FLINT_VERSION < 2) return -1; else return 0; } - ],[ - flint_found="yes" - break ---- factory-4.1.1/cf_factory.h.orig 2017-12-06 10:37:14.000000000 -0700 -+++ factory-4.1.1/cf_factory.h 2018-02-17 14:34:52.000000000 -0700 -@@ -15,7 +15,7 @@ - #include "variable.h" - - #include "factory/cf_gmp.h" --#include "factory/cf_assert.h" -+#include "cf_assert.h" - - class InternalCF; - class CanonicalForm; ---- factory-4.1.1/cf_switches.cc.orig 2017-12-06 10:37:11.000000000 -0700 -+++ factory-4.1.1/cf_switches.cc 2018-06-26 09:07:29.000000000 -0600 -@@ -31,6 +31,7 @@ CFSwitches::CFSwitches () - // and set the default (recommended) On-values: - #ifdef HAVE_NTL - On(SW_USE_CHINREM_GCD); -+ On(SW_USE_EZGCD_P); // provided to me by Hans Schoenemann - //Off(SW_USE_NTL_SORT); - #endif - On(SW_USE_EZGCD); ---- factory-4.1.1/configure.orig 2018-02-09 07:29:54.000000000 -0700 -+++ factory-4.1.1/configure 2020-07-12 20:19:22.755415850 -0600 -@@ -5827,7 +5827,7 @@ done - ## for clang: -Wunneeded-internal-declaration - - if test "x${ENABLE_OPTIMIZATION}" != xno; then -- OPTFLAGS="-g0 -O3 -Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -fno-enforce-eh-specs -fconserve-space -funroll-loops -fno-delete-null-pointer-checks" -+ OPTFLAGS="-Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -fno-enforce-eh-specs -fconserve-space -funroll-loops -fno-delete-null-pointer-checks" - # -O3 - crashes gcc???!!! - # -fpermissive - ac_ext=c -@@ -22481,7 +22481,7 @@ else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - #include -- int main () { if ((int) version[0] < 2) return -1; else return 0; } -+ int main () { if (__FLINT_VERSION < 2) return -1; else return 0; } - - _ACEOF - if ac_fn_c_try_run "$LINENO"; then : ---- factory-4.1.1/ftmpl_inst.cc.orig 2017-12-06 10:37:12.000000000 -0700 -+++ factory-4.1.1/ftmpl_inst.cc 2018-05-15 12:28:00.560409016 -0600 -@@ -73,7 +73,7 @@ template List Difference ( con - // NTL 6 - #ifdef HAVE_NTL - #include --#if NTL_MAJOR_VERSION == 6 -+#if NTL_MAJOR_VERSION >= 6 - - #include - #include diff --git a/factory-4.1.3.patch b/factory-4.1.3.patch new file mode 100644 index 0000000..71f2cf4 --- /dev/null +++ b/factory-4.1.3.patch @@ -0,0 +1,72 @@ +--- factory-4.1.3/ftmpl_inst.cc.orig 2019-04-10 10:20:16.000000000 -0600 ++++ factory-4.1.3/ftmpl_inst.cc 2021-01-12 13:57:49.211563226 -0700 +@@ -73,7 +73,7 @@ template List Difference ( con + // NTL 6 + #ifdef HAVE_NTL + #include +-#if NTL_MAJOR_VERSION == 6 ++#if NTL_MAJOR_VERSION >= 6 + + #include + #include +--- factory-4.1.3/m4/flags.m4.orig 2020-05-14 08:01:02.000000000 -0600 ++++ factory-4.1.3/m4/flags.m4 2021-01-12 13:55:01.715902074 -0700 +@@ -122,7 +122,7 @@ AC_DEFUN([SING_CHECK_SET_ARGS], [ + ## for clang: -Wunneeded-internal-declaration + + if test "x${ENABLE_OPTIMIZATION}" != xno; then +- OPTFLAGS="-g0 -O3 -Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -fno-enforce-eh-specs -fconserve-space -funroll-loops -fno-delete-null-pointer-checks" ++ OPTFLAGS="-Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -fno-enforce-eh-specs -fconserve-space -funroll-loops -fno-delete-null-pointer-checks" + # -O3 - crashes gcc???!!! + # -fpermissive + AC_LANG_PUSH([C]) +--- factory-4.1.3/m4/flint-check.m4.orig 2020-05-14 08:01:02.000000000 -0600 ++++ factory-4.1.3/m4/flint-check.m4 2021-01-12 13:54:28.179969923 -0700 +@@ -44,7 +44,7 @@ if test "$FLINT_HOME_PATH" = "$DEFAULT_C + + # we suppose that mpfr and mpir to be in the same place or available by default + CFLAGS="${BACKUP_CFLAGS} ${GMP_CPPFLAGS}" +- LIBS="${FLINT_LIBS} ${GMP_LIBS} ${BACKUPLIBS}" ++ LIBS="${FLINT_LIBS} ${GMP_LIBS} ${BACKUP_LIBS}" + + AC_CHECK_HEADER([flint/fmpz.h], + [AC_CHECK_LIB(flint,fmpz_init, +@@ -66,7 +66,7 @@ if test "x$flint_found" = "xno" ; then + + # we suppose that mpfr and mpir to be in the same place or available by default + CFLAGS="${BACKUP_CFLAGS} ${FLINT_CFLAGS} ${GMP_CPPFLAGS}" +- LIBS="${FLINT_LIBS} ${GMP_LIBS} ${BACKUPLIBS}" ++ LIBS="${FLINT_LIBS} ${GMP_LIBS} ${BACKUP_LIBS}" + + AC_CHECK_LIB(flint,fmpz_init, + [flint_found="yes"], +--- factory-4.1.3/configure.orig 2020-05-14 08:16:23.000000000 -0600 ++++ factory-4.1.3/configure 2021-01-12 13:59:22.956373563 -0700 +@@ -5811,7 +5811,7 @@ done + ## for clang: -Wunneeded-internal-declaration + + if test "x${ENABLE_OPTIMIZATION}" != xno; then +- OPTFLAGS="-g0 -O3 -Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -fno-enforce-eh-specs -fconserve-space -funroll-loops -fno-delete-null-pointer-checks" ++ OPTFLAGS="-Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -fno-enforce-eh-specs -fconserve-space -funroll-loops -fno-delete-null-pointer-checks" + # -O3 - crashes gcc???!!! + # -fpermissive + ac_ext=c +@@ -22401,7 +22401,7 @@ if test "$FLINT_HOME_PATH" = "$DEFAULT_C + + # we suppose that mpfr and mpir to be in the same place or available by default + CFLAGS="${BACKUP_CFLAGS} ${GMP_CPPFLAGS}" +- LIBS="${FLINT_LIBS} ${GMP_LIBS} ${BACKUPLIBS}" ++ LIBS="${FLINT_LIBS} ${GMP_LIBS} ${BACKUP_LIBS}" + + ac_fn_c_check_header_mongrel "$LINENO" "flint/fmpz.h" "ac_cv_header_flint_fmpz_h" "$ac_includes_default" + if test "x$ac_cv_header_flint_fmpz_h" = xyes; then : +@@ -22460,7 +22460,7 @@ if test "x$flint_found" = "xno" ; then + + # we suppose that mpfr and mpir to be in the same place or available by default + CFLAGS="${BACKUP_CFLAGS} ${FLINT_CFLAGS} ${GMP_CPPFLAGS}" +- LIBS="${FLINT_LIBS} ${GMP_LIBS} ${BACKUPLIBS}" ++ LIBS="${FLINT_LIBS} ${GMP_LIBS} ${BACKUP_LIBS}" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fmpz_init in -lflint" >&5 + $as_echo_n "checking for fmpz_init in -lflint... " >&6; } + diff --git a/mathicgb-1.0.patch b/mathicgb-1.0.patch index bcadb6a..e9c0c14 100644 --- a/mathicgb-1.0.patch +++ b/mathicgb-1.0.patch @@ -1,5 +1,5 @@ ---- src/mathicgb/MonoMonoid.hpp.orig 2017-06-06 10:08:53.000000000 -0600 -+++ src/mathicgb/MonoMonoid.hpp 2018-10-06 16:57:04.776068625 -0600 +--- src/mathicgb/MonoMonoid.hpp.orig 2021-01-09 10:32:37.000000000 -0700 ++++ src/mathicgb/MonoMonoid.hpp 2021-01-12 14:25:20.021443559 -0700 @@ -582,6 +582,7 @@ public: MATHICGB_ASSERT(i == varCount() / 2 || access(a, i*2+1) >= 0); @@ -40,3 +40,23 @@ orOfXor |= (A1B ^ (A1 + B)) | (A2B ^ (A2 + B)); } MATHICGB_ASSERT +--- src/mathicgb/RawVector.hpp.orig 2021-01-09 10:32:37.000000000 -0700 ++++ src/mathicgb/RawVector.hpp 2021-01-12 14:26:02.384372562 -0700 +@@ -3,6 +3,7 @@ + #ifndef MATHICGB_RAW_VECTOR_GUARD + #define MATHICGB_RAW_VECTOR_GUARD + ++#include + #include + #include + #include +--- src/mathicgb/SparseMatrix.cpp.orig 2021-01-09 10:32:37.000000000 -0700 ++++ src/mathicgb/SparseMatrix.cpp 2021-01-12 14:26:30.569325348 -0700 +@@ -1,6 +1,7 @@ + // MathicGB copyright 2012 all rights reserved. MathicGB comes with ABSOLUTELY + // NO WARRANTY and is licensed as GPL v2.0 or later - see LICENSE.txt. + #include "stdinc.h" ++#include + #include "SparseMatrix.hpp" + + #include "Poly.hpp" diff --git a/sources b/sources index dfff0b4..8f73cc5 100644 --- a/sources +++ b/sources @@ -1,24 +1,24 @@ SHA512 (Macaulay2-icons.tar.xz) = 069aa0ad70a0253583b00091c094da9b79d2a2f0f2d38aa97f543081f5df5fd3b5a9e1463febd6947c3151cf01844133174c7372f57e158c2d3faba6baed5d1d -SHA512 (Macaulay2-1.16.tar.gz) = 3e69e2dc407af9bc6b4f7db2046788e509effb543286a98406655828ab1c462cb406abe350f91ba5d204934fa3f5d04f82d454cd441dce428f8d02ded68f2372 +SHA512 (Macaulay2-1.17.tar.gz) = de6d903fcf85fe51757d3fad31b59d4346072e04da889ad54128e0c4dd8485e62721a8888b9015fc1e7af07d1bb529b55e763216095b816b5b37ab5bd18cf127 SHA512 (4ti2-1.6.9.tar.gz) = f02b61ba04d7512e86d9574574669ec764d053fc5d01744dc6b521518d4165b41355ae12344923f1549b323406130c6562a4d9272b1b88de2ecc2c20d3d892d5 SHA512 (cddlib-094h.tar.gz) = 94a3ef03fd86ece7e61e4f9bec283862594b05a6faca76897e33ad15762527c885cee5439bb8a5d337a608ceb17baff24910da326071a3107df17a0c07f5e774 SHA512 (cohomCalg-0.32.tar.gz) = b76d8de00b13a8fe8881222178247c5e99c15075c46290830f6c3afffb9dfc18af0d57f738ac5a0d7c00044db81b4465d1e0563c95f7f656a2440be5765c6818 SHA512 (Csdp-6.2.0.tgz) = 6f6c44abcb7b0e277f5a42a1e31acbd41c8fbdce0c1641982a48199fe1d922b28d86433d1a98ac71ae521bea04188a830c441db1e9d8eebf174debf501430e82 -SHA512 (factory-4.1.1.tar.gz) = f08d74cb860145c07b9f1cc0a3fe44cb6fb2fc158a9b992f0db55eeef9e93d280cf66a5c8822236389e54b8084d2a37c174b32864e4dc12b8ee3c4760e9fe2bf +SHA512 (factory-4.1.3.tar.gz) = 38e75556bcf8c9f4610dd5322d20b339d1c5ad9a6400f20d1bce5317bc4f3fdb97e33294088ea7b80e9bda1c482dd1e5327ec408d9f1dadf3c28c2b928519053 SHA512 (flint-2.6.3.tar.gz) = 8e71570364c789b1d4eaaa5f5adf10212cab47bf1a9f45c333211035ed021a86bb7b1de1feec51e83b2e113e8168853e370f127d2d2b1e941a12aec71fe8ae9e SHA512 (frobby_v0.9.0.tar.gz) = bc96ff20ec334932b5eaa8a3d15d0e36eab41eb85e8b74dbdc374dcaafc9873e44a8af16f6caae649aeea17cd6284caf244d4d345689ad43288f199c591a68a6 SHA512 (gfan0.6.2.tar.gz) = 08a9cc543967771af959a506b79db5b55e0e4942e4170dad8691db35ef7d381d878e1ea6534a3cacc0f5d30ec31564ec94cc20b46792d06f18a3a8a3c0aac91d SHA512 (givaro-4.1.1.tar.gz) = baaf139f42176838c541143a5b69acf47a8f31c17020a85cf413ce18ade2c3048e009d15c2acf4d71041c0776cd42f5fedb1c183ce1cc0f85cb8672ceac00ee7 SHA512 (glpk-4.59.tar.gz) = ca05bd085880143acf4a440cf7efd2392d4dde89bed53a0e5726526cb210eee004bfcd434aeb8ca8abb1dc89ff93e72054489911e5e2c843e0ed631d50c55f56 SHA512 (gtest-1.10.0.tar.gz) = bd52abe938c3722adc2347afad52ea3a17ecc76730d8d16b065e165bc7477d762bce0997a427131866a89f1001e3f3315198204ffa5d643a9355f1f4d0d7b1a9 -SHA512 (lapack-3.6.0.tgz) = 0975c721abe38ef46cda2ba446060428e2f576ec4558cc0205ca6af2af2bd8f7f4c31fd0c90d77a92719a73e1942fade19b4c17e6fe2da29d54ad1adccf5a6b2 +SHA512 (lapack-3.9.0.tgz) = afa4eb05f2b1dc2f9588ec58bd32f90b78c01185f328e71f2baf6adec6622f557c332f09e7eb46f71e5e3f2e852f25a640bde2bf9f4be7205cecf01cb07b6bc8 SHA512 (libfplll-5.2.0.tar.gz) = 67d1a8deb92d3f9245983b09b7593b19c5d43c8fe77cfea893ea9dfb744bcb77b7239d73e4f619450cc6960f4c48fb1c6ba46268208b0f31f855cf1af6bfaa29 SHA512 (linbox-1.6.3.tar.gz) = 7585f51b46b65a90328b4ff82f7c74eb59510c912a0bb0ce49263f4c7c1e777c0f9961e4672fa36be6fb84035a019b8e212615c363fd62d632e37c327d6ed3c0 SHA512 (lrslib-062.tar.gz) = 78fa6d470b2dd9cb06d1d15023debd8fafc27ed4df93cd90ef746071755f6b1fe9ee2c6a24659030b9a8851bd3ee3a699407586d320f3760c3d8a3a1c79d7116 -SHA512 (M2-emacs-7460c44.tar.gz) = 295e78238300dbefaa82ac0ea5b7d3eb538e2ec5677dd7f0588ee89c515ab29de899a0d1aa11b35f9d5c1e883e6f53059042662579740d43fc980e595100d11c -SHA512 (mathic-1.0.tar.gz) = 3bf767f77cec8aed0267752f8328d0599b2f4d31c3e4cffea69d9e9aa26a163d6a38e52e5b371e2ffc391f954003008cf734a75440b538d7ae4107ee1dd95f90 -SHA512 (mathicgb-1.0.tar.gz) = b7fdcbf20dc0bfaa3251bd681f4a61d5bbb16f62f4a577a902ad9bf176c359ad8ab10dd20b6ef06040c9955e149d8e022ce98c15531a6dd339876fa3a187ea68 -SHA512 (memtailor-1.0.tar.gz) = f3f185200b9f9cd381e9b920f0d6feb4bc721c5235a38b0d68515184430ca2fcb7d1c87762e6489d735d4791bd8cb63eb8bf1400b86e439188df8d9741dea943 +SHA512 (M2-emacs-d180956.tar.gz) = e50a2c739624bb4bd3ccf295f7b392edf3531f7f4d73026d9efbc11200ce4b7477b572805577ce0b1b8af115e2467989b9d31b9750a6a13c6a770bacaaa68929 +SHA512 (mathic-1.0.tar.gz) = dd675985fc2a5c7efab3ec6492e4b4e4d7273f4d88bdee6d9dc19174d3e319baa5fd94994563efe46c7ed7685e253c173606efdfb2a66af2d1db35e6265d473d +SHA512 (mathicgb-1.0.tar.gz) = 09db7dd226b4a50fea5dbcf175d1da2136541b33ae098ed540735315a4eb33be2ca62d7c996b0d86470d1cad9d93261fd211635f84292ecbf7da04c83f4950f2 +SHA512 (memtailor-1.0.tar.gz) = 3d93cad8a8e62c4f4b8bd074019f44d2fd8b35cf7e50ccafea85fe15aaeb3af0b175bcd7ed055ee3d789ad557fdb83382e4b66826e7fb849521ff375f25fd16f SHA512 (mpfr-4.1.0.tar.xz) = 1bd1c349741a6529dfa53af4f0da8d49254b164ece8a46928cdb13a99460285622d57fe6f68cef19c6727b3f9daa25ddb3d7d65c201c8f387e421c7f7bee6273 SHA512 (mpsolve-3.2.1.tar.gz) = 8f0cb1be303767bf5a68c150df01c98f7f5e17bfaee685ea4cb9300c0dbf740069c774d647f141a4a1eb46fa54f23d9e75a800ce195cd522527c72e3c6aeed0f SHA512 (normaliz-3.7.2.tar.gz) = 044a1b5c7e877cdfceedbe6b283b982b66e58f0cc5b0ccf6a63a293044d1348290fde92531b4c4a0a58f5263bb7696a2511b5a1dff94222c9e56a2fe3fccb69b From 73e779d851d5993edf42d00ec4f0849ca64d28a7 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 25 Jan 2021 22:30:24 +0000 Subject: [PATCH 17/70] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- Macaulay2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index 077da64..9be5b65 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -54,7 +54,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 Version: 1.17 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 or GPLv3 URL: http://macaulay2.com/ @@ -495,6 +495,9 @@ time make -k check -C BUILD/%{_target_platform} Verbose=true ||: %changelog +* Mon Jan 25 2021 Fedora Release Engineering - 1.17-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Sat Jan 16 2021 Jerry James - 1.17-1 - Version 1.17 - Drop upstreamed patches: -nauty-paths, -format From dae8e82f0e28fb503196164a733530c3c2bd943c Mon Sep 17 00:00:00 2001 From: Jerry James Date: Thu, 18 Feb 2021 10:21:33 -0700 Subject: [PATCH 18/70] Reduce optimization level on s390x to work around FTBFS. - Install metainfo. - Add -mathic patch to silence GCC warnings. - Add -lto patch to silence LTO warnings. --- Macaulay2-1.16-ulimit.patch | 32 +++---- Macaulay2-1.17-lto.patch | 48 ++++++++++ Macaulay2.metainfo.xml | 35 ++++++++ Macaulay2.spec | 40 +++++++-- mathic-1.0.patch | 95 ++++++++++++++++++++ mathicgb-1.0.patch | 170 +++++++++++++++++++++++++++++++++++- 6 files changed, 397 insertions(+), 23 deletions(-) create mode 100644 Macaulay2-1.17-lto.patch create mode 100644 Macaulay2.metainfo.xml create mode 100644 mathic-1.0.patch diff --git a/Macaulay2-1.16-ulimit.patch b/Macaulay2-1.16-ulimit.patch index 96065a5..aa13e8b 100644 --- a/Macaulay2-1.16-ulimit.patch +++ b/Macaulay2-1.16-ulimit.patch @@ -1,5 +1,5 @@ ---- M2/GNUmakefile.in.orig 2020-07-11 05:04:29.000000000 -0600 -+++ M2/GNUmakefile.in 2020-07-12 19:24:55.838024149 -0600 +--- M2/GNUmakefile.in.orig 2021-01-08 08:30:25.000000000 -0700 ++++ M2/GNUmakefile.in 2021-02-15 15:47:32.292569472 -0700 @@ -136,7 +136,7 @@ build-in-$1: submodules/$1/Makefile $(MAKE) -C submodules/$1 all check-in-$1: run-configure-in-$1 @@ -9,8 +9,8 @@ endif install-in-$1: build-in-$1; + $(MAKE) -C submodules/$1 install ---- M2/libraries/Makefile.library.in.orig 2020-07-11 05:04:29.000000000 -0600 -+++ M2/libraries/Makefile.library.in 2020-07-12 19:20:23.705132772 -0600 +--- M2/libraries/Makefile.library.in.orig 2021-01-08 08:30:25.000000000 -0700 ++++ M2/libraries/Makefile.library.in 2021-02-15 15:48:02.429394066 -0700 @@ -238,10 +238,10 @@ distclean: package-distclean clean::; rm -rf .patched* .untarred* $(LIBNAME)* .checked* .compiled* .configured* .installed* .untarred2* diffs tmp $(UNTARDIR) $(OLDUNTARDIR) distclean: clean ; rm -rf Makefile @@ -26,8 +26,8 @@ LIMIT := : ifeq (@ULIMIT_T@,yes) LIMIT += ; ulimit -t $(TLIMIT) ---- M2/Macaulay2/m2/basictests/Makefile.in.orig 2020-07-11 05:04:29.000000000 -0600 -+++ M2/Macaulay2/m2/basictests/Makefile.in 2020-07-12 19:23:46.653051760 -0600 +--- M2/Macaulay2/m2/basictests/Makefile.in.orig 2021-01-08 08:30:25.000000000 -0700 ++++ M2/Macaulay2/m2/basictests/Makefile.in 2021-02-15 15:47:13.769677288 -0700 @@ -22,17 +22,17 @@ $(TESTRESULTS) : @pre_exec_prefix@/bin/M ARGS := --silent -q --stop --no-setup -e 'srcdir = "@srcdir@/"' @@ -53,8 +53,8 @@ LIMIT := ifeq (@ULIMIT_T@,yes) ---- M2/Macaulay2/m2/run.m2.orig 2020-07-11 05:04:29.000000000 -0600 -+++ M2/Macaulay2/m2/run.m2 2020-07-12 19:22:43.157077109 -0600 +--- M2/Macaulay2/m2/run.m2.orig 2021-01-08 08:30:25.000000000 -0700 ++++ M2/Macaulay2/m2/run.m2 2021-02-15 15:47:13.770677282 -0700 @@ -7,7 +7,7 @@ utest := opt -> ( cmd := "ulimit " | opt | "; "; @@ -64,8 +64,8 @@ M2statusRegexp := "^--status:" statusLines := file -> select(lines file, s -> match(M2statusRegexp,s)) ---- M2/Macaulay2/tests/ComputationsBook/Makefile.chapter.in.orig 2020-07-11 05:04:29.000000000 -0600 -+++ M2/Macaulay2/tests/ComputationsBook/Makefile.chapter.in 2020-07-12 19:20:27.318131329 -0600 +--- M2/Macaulay2/tests/ComputationsBook/Makefile.chapter.in.orig 2021-01-08 08:30:25.000000000 -0700 ++++ M2/Macaulay2/tests/ComputationsBook/Makefile.chapter.in 2021-02-15 15:47:13.770677282 -0700 @@ -15,16 +15,16 @@ diff: LIMIT := @@ -83,12 +83,12 @@ endif ifeq (@ULIMIT_S@,yes) -LIMIT += ulimit -s 8192 ; -+LIMIT += ulimit -s 16834 ; ++LIMIT += ulimit -s 16384 ; endif ---- M2/Macaulay2/tests/Makefile.test.in.orig 2020-07-11 05:04:29.000000000 -0600 -+++ M2/Macaulay2/tests/Makefile.test.in 2020-07-12 19:20:27.319131328 -0600 +--- M2/Macaulay2/tests/Makefile.test.in.orig 2021-01-08 08:30:25.000000000 -0700 ++++ M2/Macaulay2/tests/Makefile.test.in 2021-02-15 15:49:32.468869998 -0700 @@ -6,18 +6,18 @@ DEFERRED ?= no DOTS ?= ../.. @@ -97,15 +97,17 @@ +TLIMIT ?= 180 # one test doesn't work with only 150MB RAM, ext-total.m2, on a 64 bit intel machine: -MLIMIT ?= 800000 +-VLIMIT ?= 2000000 +MLIMIT ?= 1600000 - VLIMIT ?= 2000000 ++VLIMIT ?= 4000000 else # give the debug version more time and space -TLIMIT ?= 140 -MLIMIT ?= 1200000 +-VLIMIT ?= 2000000 +TLIMIT ?= 280 +MLIMIT ?= 2400000 - VLIMIT ?= 2000000 ++VLIMIT ?= 4000000 endif # make the stack limit always the same as it would be under MacOS -SLIMIT ?= 8192 diff --git a/Macaulay2-1.17-lto.patch b/Macaulay2-1.17-lto.patch new file mode 100644 index 0000000..07a07f6 --- /dev/null +++ b/Macaulay2-1.17-lto.patch @@ -0,0 +1,48 @@ +--- M2/Macaulay2/c/compat.h.orig 2021-01-08 08:30:25.000000000 -0700 ++++ M2/Macaulay2/c/compat.h 2021-02-15 12:16:12.570716693 -0700 +@@ -1,7 +1,7 @@ + /* Copyright 1993 by Daniel R. Grayson */ + + #ifndef __cplusplus +-typedef char bool; ++typedef _Bool bool; + #endif + + extern char posfmt[]; +--- M2/Macaulay2/d/boost-regex.cpp.orig 2021-01-08 08:30:25.000000000 -0700 ++++ M2/Macaulay2/d/boost-regex.cpp 2021-01-29 09:45:58.311601390 -0700 +@@ -48,8 +48,8 @@ extern "C" { + /* returns an array of pairs (s, r), indicating starting point + * and length of the first match and its capture groups */ + M2_arrayint regex_search(const M2_string pattern, +- const size_t start, +- const size_t range, ++ const int start, ++ const int range, + const M2_string text, + int regex_flags, + int match_flags) +--- M2/Macaulay2/d/types.h.orig 2021-01-08 08:30:25.000000000 -0700 ++++ M2/Macaulay2/d/types.h 2021-02-15 12:15:52.755753702 -0700 +@@ -37,6 +37,10 @@ + # define LONGJUMP(env) longjmp(env, 1) + #endif + ++#ifdef __cplusplus ++extern "C" { ++#endif ++ + struct ArgCell + { + int argc, envc; +@@ -50,6 +54,10 @@ struct JumpCell + bool is_set; + }; + ++#ifdef __cplusplus ++} ++#endif ++ + #ifdef HAVE_UNISTD_H + #include + #endif diff --git a/Macaulay2.metainfo.xml b/Macaulay2.metainfo.xml new file mode 100644 index 0000000..5d7bd15 --- /dev/null +++ b/Macaulay2.metainfo.xml @@ -0,0 +1,35 @@ + + + Macaulay2 + CC0-1.0 + GPL-2.0 or GPL-3.0 + Macaulay2 + System for algebraic geometry and commutative algebra + +

+ Macaulay 2 is a software system devoted to supporting research in + algebraic geometry and commutative algebra written by Daniel R. Grayson + and Michael E. Stillman. +

+
+ Macaulay2.desktop + + + https://faculty.math.illinois.edu/Macaulay2/Screenshots/texmacs.png + Macaulay2 with TeXmacs + + + https://faculty.math.illinois.edu/Macaulay2/Screenshots/emacs-M2-c.png + Macaulay2 with Emacs + + + loganjerry@gmail.com + http://macaulay2.com/ + https://github.com/Macaulay2/M2/issues + https://groups.google.com/g/macaulay2 + + + M2 + M2-binary + +
diff --git a/Macaulay2.spec b/Macaulay2.spec index 9be5b65..94b869e 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -69,6 +69,7 @@ Source1: %{emacsurl}/tarball/%{emacscommit}/M2-emacs-%{emacsshort}.tar.gz # the tar file for details on how these icons were created. Source10: Macaulay2-icons.tar.xz Source11: Macaulay2.desktop +Source12: Macaulay2.metainfo.xml Source20: etags.sh ## BUNDLED code @@ -126,6 +127,8 @@ Source200: linbox-1.6.3.patch Source201: factory-4.1.3.patch # Fix mathicgb build on big endian machines and with gcc 11 Source202: mathicgb-1.0.patch +# Silence GCC warnings about mathic code +Source203: mathic-1.0.patch ## FAKE library tarballs that convince Macaulay2 to use the system versions Source300: frobby_v0.9.0.tar.gz @@ -156,6 +159,8 @@ Patch4: %{name}-1.15-fplll.patch Patch5: %{name}-1.17-configure.patch # Fix "error: in conversion to html, unknown TeX control sequence(s): \rightarrow" Patch6: %{name}-1.16-rightarrow.patch +# Fix LTO warnings about mismatched declarations and definitions +Patch7: %{name}-1.17-lto.patch BuildRequires: 4ti2 BuildRequires: autoconf @@ -199,6 +204,7 @@ BuildRequires: mpir-devel BuildRequires: gtest-devel BuildRequires: iml-devel BuildRequires: info +BuildRequires: libappstream-glib BuildRequires: libgfan-devel BuildRequires: libtool BuildRequires: libatomic_ops-devel @@ -312,6 +318,7 @@ tar -C submodules/mathicgb -xf %{SOURCE104} --strip-components=1 patch -d submodules/mathicgb -p0 < %{SOURCE202} tar -C submodules/memtailor -xf %{SOURCE106} --strip-components=1 tar -C submodules/mathic -xf %{SOURCE107} --strip-components=1 +patch -d submodules/mathic -p0 < %{SOURCE203} ## patches for bundled code sed -e 's,--with-blas,&=%{_includedir}/%{blaslib} --with-ntl,' \ @@ -344,6 +351,7 @@ ln -s %{_datadir}/factory \ %patch4 -p1 -b .fplll %patch5 -p1 -b .configure %patch6 -p1 -b .rightarrow +%patch7 -p1 -b .lto # repeatable builds: inject a node name sed -i 's,`uname -n`,build.fedoraproject.org,' configure.ac @@ -372,19 +380,25 @@ autoreconf -fi . %build -# This package has a configure test which compiles code and expects it to -# behave in a very specific way (__builtin_return_address). LTO changs the -# behavior and the configure test does not know how to handle it. -# Until the configure script is fixed this seems like the best thing to do -# Disable LTO +%ifarch s390x +# For as yet unknown reasons, when this package is built with optimization +# level -O2 on s390x, the mathicgb code accesses out-of-bounds array elements. +# In addition, valgrind shows accesses to uninitialized elements of arrays +# that should not have any uninitialized elements. The code eventually +# segfaults. When built with -O1 and LTO, the linker segfaults. Until we can +# diagnose and fix these issues, we build with -O1 and without LTO on s390x. %define _lto_cflags %{nil} +optflags=$(sed 's/-O2/-O/g' <<< "%{optflags}") +%else +optflags="%{optflags}" +%endif ## configure macro currently broken, due to some odd prefix-checks. probably fixable -- Rex mkdir -p BUILD/%{_target_platform} pushd BUILD/%{_target_platform} CPPFLAGS="-I%{_includedir}/cddlib -I%{_includedir}/frobby" \ -CFLAGS="%{optflags} -fsigned-char" \ -CXXFLAGS="%{optflags} -fsigned-char" \ +CFLAGS="${optflags} -fsigned-char" \ +CXXFLAGS="${optflags} -fsigned-char" \ LIBS="-l%{blaslib}" \ ../../configure \ --build=%{_build} \ @@ -454,6 +468,11 @@ desktop-file-install --vendor="" \ --dir=%{buildroot}%{_datadir}/applications \ %{SOURCE11} +mkdir -p %{buildroot}%{_metainfodir} +install -pm 644 %{SOURCE12} %{buildroot}%{_metainfodir}/%{name}.metainfo.xml +appstream-util validate-relax --nonet \ + %{buildroot}%{_metainfodir}/%{name}.metainfo.xml + # Byte compile the Emacs files, and move the documentation pushd %{buildroot}%{_emacs_sitelispdir}/%{name} mv M2-emacs* %{buildroot}%{_pkgdocdir} @@ -488,6 +507,7 @@ time make -k check -C BUILD/%{_target_platform} Verbose=true ||: %{_datadir}/Macaulay2/ %{_datadir}/applications/*Macaulay2.desktop %{_datadir}/icons/hicolor/*/*/* +%{_metainfodir}/%{name}.metainfo.xml %{_docdir}/Macaulay2/ %{_infodir}/*.info* %{_mandir}/man1/* @@ -495,6 +515,12 @@ time make -k check -C BUILD/%{_target_platform} Verbose=true ||: %changelog +* Thu Feb 18 2021 Jerry James - 1.17-2 +- Reduce optimization level on s390x to work around FTBFS +- Install metainfo +- Add -mathic patch to silence GCC warnings +- Add -lto patch to silence LTO warnings + * Mon Jan 25 2021 Fedora Release Engineering - 1.17-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild diff --git a/mathic-1.0.patch b/mathic-1.0.patch new file mode 100644 index 0000000..e479efc --- /dev/null +++ b/mathic-1.0.patch @@ -0,0 +1,95 @@ +--- src/mathic/ColumnPrinter.cpp.orig 2020-07-09 10:51:54.000000000 -0600 ++++ src/mathic/ColumnPrinter.cpp 2021-02-12 09:12:52.257016443 -0700 +@@ -193,7 +193,7 @@ namespace mathic { + MATHIC_ASSERT(maxSize == std::string("100.0%").size()); + const auto size = str.size(); + if (size > maxSize) +- return std::move(str); ++ return str; + return std::string(maxSize - str.size(), ' ') + std::move(str); + } + +--- src/mathic/error.cpp.orig 2020-07-09 10:51:54.000000000 -0600 ++++ src/mathic/error.cpp 2021-02-12 09:12:33.688040243 -0700 +@@ -2,15 +2,15 @@ + #include + + namespace mathic { +- void reportError(const std::string& errorMsg) { ++ void reportError [[noreturn]] (const std::string& errorMsg) { + throw MathicException("ERROR: " + errorMsg); + } + +- void reportInternalError(const std::string& errorMsg) { ++ void reportInternalError [[noreturn]] (const std::string& errorMsg) { + throw InternalMathicException("INTERNAL ERROR: " + errorMsg); + } + +- void reportInternalError ++ void reportInternalError [[noreturn]] + (const std::string& errorMsg, const char* file, unsigned int lineNumber) { + + std::ostringstream err; +--- src/mathic/error.h.orig 2020-07-09 10:51:54.000000000 -0600 ++++ src/mathic/error.h 2021-02-12 09:12:33.689040242 -0700 +@@ -18,26 +18,19 @@ namespace mathic { + InternalMathicException(const std::string& str): logic_error(str) {} + }; + +- // The do {...} while (0) is to collect everything into a single +- // statement that still requires a semicolon after it. The throw is to +- // prevent spurious compiler warnings about a missing return +- // statement. + #define MATHIC_INTERNAL_ERROR(msg) \ +- do { \ +- reportInternalError(msg, __FILE__, __LINE__); \ +- throw; \ +- } while (false) ++ reportInternalError(msg, __FILE__, __LINE__) + #define INTERNAL_ERROR_UNIMPLEMENTED() \ + INTERNAL_ERROR("Called function that has not been implemented.") + + // These methods throw exceptions. +- void reportError(const std::string& errorMsg); +- void reportInternalError(const std::string& errorMsg); +- void reportInternalError ++ void reportError [[noreturn]] (const std::string& errorMsg); ++ void reportInternalError [[noreturn]] (const std::string& errorMsg); ++ void reportInternalError [[noreturn]] + (const std::string& errorMsg, const char* file, unsigned int lineNumber); + + template +- void throwError(const std::string& errorMsg) { ++ void throwError [[noreturn]] (const std::string& errorMsg) { + throw Exception("ERROR: " + errorMsg + '\n'); + } + +--- src/mathic/PairQueue.h.orig 2020-07-09 10:51:54.000000000 -0600 ++++ src/mathic/PairQueue.h 2021-02-12 15:20:39.649741958 -0700 +@@ -149,7 +149,7 @@ namespace mathic { + template + class SupportRetirement { + public: +- void addNextIndex() {mRetired.push_back(false);} ++ void addNextIndex() {mRetired.push_back('\0');} + void undoAdd() { + MATHIC_ASSERT(!mRetired.empty()); + mRetired.pop_back(); +@@ -157,15 +157,12 @@ namespace mathic { + + void retireIndex(size_t index) { + MATHIC_ASSERT(index < mRetired.size()); +- mRetired[index] = true; ++ mRetired[index] = '\1'; + } + + bool retired(size_t index) const { + MATHIC_ASSERT(index < mRetired.size()); +- // if we just cast to bool here the compiler has to ensure that the +- // value is not something other than 0 or 1. By reinterpreting the +- // reference as a bool we free the compiler from this obligation. +- return reinterpret_cast(mRetired[index]); ++ return mRetired[index] != '\0'; + } + + private: diff --git a/mathicgb-1.0.patch b/mathicgb-1.0.patch index e9c0c14..7baf96c 100644 --- a/mathicgb-1.0.patch +++ b/mathicgb-1.0.patch @@ -1,5 +1,121 @@ +--- src/mathicgb/F4MatrixBuilder.cpp.orig 2021-01-09 10:32:37.000000000 -0700 ++++ src/mathicgb/F4MatrixBuilder.cpp 2021-02-12 09:09:35.256270557 -0700 +@@ -146,7 +146,7 @@ void F4MatrixBuilder::buildMatrixAndClea + *monoid().alloc().release(), + *monoid().alloc().release() + }; +- return std::move(data); ++ return data; + }); + + mgb::mtbb::parallel_do(mTodo.begin(), mTodo.end(), +--- src/mathicgb/F4MatrixProjection.cpp.orig 2021-01-09 10:32:37.000000000 -0700 ++++ src/mathicgb/F4MatrixProjection.cpp 2021-02-12 09:09:35.257270555 -0700 +@@ -275,7 +275,7 @@ done:; + qm.bottomLeft = bottom.moveLeft(); + qm.bottomRight = bottom.moveRight(); + +- return std::move(qm); ++ return qm; + } + + namespace { +@@ -352,7 +352,7 @@ QuadMatrix F4MatrixProjection::makeAndCl + qm.bottomRight = std::move(right.second); + qm.leftColumnMonomials = std::move(mLeftMonomials); + qm.rightColumnMonomials = std::move(mRightMonomials); +- return std::move(qm); ++ return qm; + } + + MATHICGB_NAMESPACE_END +--- src/mathicgb/F4MatrixReducer.cpp.orig 2021-01-09 10:32:37.000000000 -0700 ++++ src/mathicgb/F4MatrixReducer.cpp 2021-02-12 09:09:35.258270554 -0700 +@@ -314,7 +314,7 @@ namespace { + if (!zero) + reduced.rowDone(); + }}); +- return std::move(reduced); ++ return reduced; + } + + SparseMatrix reduceToEchelonFormSparse( +@@ -392,7 +392,7 @@ namespace { + pivotRowOfCol[pivotCol] = reduced.rowCount(); + rowToReduce.appendTo(reduced); + } +- return std::move(reduced); ++ return reduced; + } + + SparseMatrix reduceToEchelonForm( +@@ -546,7 +546,7 @@ namespace { + for (size_t row = 0; row < rowCount; ++row) + if (!dense[row].empty()) + dense[row].appendTo(reduced); +- return std::move(reduced); ++ return reduced; + } + } + +@@ -686,7 +686,7 @@ SparseMatrix reduceToEchelonFormShrawan( + if (!rowIsZero) + reduced.rowDone(); + } +- return std::move(reduced); ++ return reduced; + } + + SparseMatrix reduceToEchelonFormShrawanDelayedModulus( +@@ -723,7 +723,7 @@ SparseMatrix reduceToEchelonFormShrawanD + if (!rowIsZero) + reduced.rowDone(); + } +- return std::move(reduced); ++ return reduced; + } + + SparseMatrix F4MatrixReducer::reduceToBottomRight(const QuadMatrix& matrix) { +--- src/mathicgb/MathicIO.hpp.orig 2021-01-09 10:32:37.000000000 -0700 ++++ src/mathicgb/MathicIO.hpp 2021-02-12 09:09:35.258270554 -0700 +@@ -300,7 +300,7 @@ auto MathicIO::readOrder( + componentsAscendingDesired, + schreyering + ); +- return std::move(order); ++ return order; + } + + template +@@ -355,7 +355,7 @@ Basis MathicIO::readBasis( + *p = p->polyWithTermsDescending(); + basis.insert(std::move(p)); + } +- return std::move(basis); ++ return basis; + } + + template +@@ -391,7 +391,7 @@ Poly MathicIO::readPolyDoNotOrder + + // also skips whitespace + if (in.match('0') || in.match("+0") || in.match("-0")) +- return std::move(p); ++ return p; + MATHICGB_ASSERT(!in.peekWhite()); + + auto mono = ring.monoid().alloc(); +@@ -402,7 +402,7 @@ Poly MathicIO::readPolyDoNotOrder + readTerm(ring, readComponent, coef, mono, in); + p.append(coef.value(), *mono); + } while (!in.peekWhite() && !in.matchEOF()); +- return std::move(p); ++ return p; + } + + template --- src/mathicgb/MonoMonoid.hpp.orig 2021-01-09 10:32:37.000000000 -0700 -+++ src/mathicgb/MonoMonoid.hpp 2021-01-12 14:25:20.021443559 -0700 ++++ src/mathicgb/MonoMonoid.hpp 2021-02-15 13:14:11.464204458 -0700 @@ -582,6 +582,7 @@ public: MATHICGB_ASSERT(i == varCount() / 2 || access(a, i*2+1) >= 0); @@ -40,6 +156,47 @@ orOfXor |= (A1B ^ (A1 + B)) | (A2B ^ (A2 + B)); } MATHICGB_ASSERT +--- src/mathicgb/MonoProcessor.hpp.orig 2021-01-09 10:32:37.000000000 -0700 ++++ src/mathicgb/MonoProcessor.hpp 2021-02-12 14:47:07.794824672 -0700 +@@ -121,7 +121,6 @@ private: + return *mSchreyerMultipliers[component]; + } + +- bool mOrderFromLeft; + bool mComponentsAscendingDesired; + Component mComponentCount; + bool mSchreyering; +--- src/mathicgb/QuadMatrixBuilder.cpp.orig 2021-01-09 10:32:37.000000000 -0700 ++++ src/mathicgb/QuadMatrixBuilder.cpp 2021-02-12 09:09:35.258270554 -0700 +@@ -130,7 +130,7 @@ QuadMatrix QuadMatrixBuilder::buildMatri + mBottomRight.clear(); + + MATHICGB_ASSERT(out.debugAssertValid()); +- return std::move(out); ++ return out; + } + + MATHICGB_NAMESPACE_END +--- src/mathicgb/QuadMatrix.cpp.orig 2021-01-09 10:32:37.000000000 -0700 ++++ src/mathicgb/QuadMatrix.cpp 2021-02-12 09:09:35.258270554 -0700 +@@ -247,7 +247,7 @@ QuadMatrix QuadMatrix::toCanonical() con + matrix.leftColumnMonomials = leftColumnMonomials; + matrix.rightColumnMonomials = rightColumnMonomials; + +- return std::move(matrix); ++ return matrix; + } + + std::ostream& operator<<(std::ostream& out, const QuadMatrix& qm) { +@@ -310,7 +310,7 @@ namespace { + permutation[columns[col].second] = col; + } + +- return std::move(permutation); ++ return permutation; + } + } + --- src/mathicgb/RawVector.hpp.orig 2021-01-09 10:32:37.000000000 -0700 +++ src/mathicgb/RawVector.hpp 2021-01-12 14:26:02.384372562 -0700 @@ -3,6 +3,7 @@ @@ -60,3 +217,14 @@ #include "SparseMatrix.hpp" #include "Poly.hpp" +--- src/mathicgb/TypicalReducer.cpp.orig 2021-01-09 10:32:37.000000000 -0700 ++++ src/mathicgb/TypicalReducer.cpp 2021-02-12 09:09:35.258270554 -0700 +@@ -133,7 +133,7 @@ std::unique_ptr TypicalReducer::cl + ring.freeMonomial(lcm); + ring.freeMonomial(multiple1); + ring.freeMonomial(multiple2); +- return std::move(reduced); ++ return reduced; + } + + void TypicalReducer::classicReduceSPolySet From a2616121398c2a324a5e30b873a65a9b9ec46e85 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Fri, 18 Jun 2021 08:53:16 -0600 Subject: [PATCH 19/70] Version 1.18. --- Macaulay2-1.16-ulimit.patch | 11 - Macaulay2-1.17-lto.patch | 48 - Macaulay2-1.18-lto.patch | 35 + ....patch => Macaulay2-1.18-no_gftables.patch | 8 +- Macaulay2.spec | 91 +- mpfr-4.1.0.patch | 1747 +++++++++++++++++ sources | 12 +- 7 files changed, 1834 insertions(+), 118 deletions(-) delete mode 100644 Macaulay2-1.17-lto.patch create mode 100644 Macaulay2-1.18-lto.patch rename Macaulay2-1.16-no_gftables.patch => Macaulay2-1.18-no_gftables.patch (59%) create mode 100644 mpfr-4.1.0.patch diff --git a/Macaulay2-1.16-ulimit.patch b/Macaulay2-1.16-ulimit.patch index aa13e8b..2da04af 100644 --- a/Macaulay2-1.16-ulimit.patch +++ b/Macaulay2-1.16-ulimit.patch @@ -53,17 +53,6 @@ LIMIT := ifeq (@ULIMIT_T@,yes) ---- M2/Macaulay2/m2/run.m2.orig 2021-01-08 08:30:25.000000000 -0700 -+++ M2/Macaulay2/m2/run.m2 2021-02-15 15:47:13.770677282 -0700 -@@ -7,7 +7,7 @@ - utest := opt -> ( - cmd := "ulimit " | opt | "; "; - if chkrun("2>/dev/null >/dev/null "|cmd) == 0 then cmd else "") --ulimit := utest "-c unlimited" | utest "-t 700" | utest "-m 850000" | utest "-s 8192" | utest "-n 512" -+ulimit := utest "-c unlimited" | utest "-t 1400" | utest "-m 1700000" | utest "-s 16384" | utest "-n 512" - - M2statusRegexp := "^--status:" - statusLines := file -> select(lines file, s -> match(M2statusRegexp,s)) --- M2/Macaulay2/tests/ComputationsBook/Makefile.chapter.in.orig 2021-01-08 08:30:25.000000000 -0700 +++ M2/Macaulay2/tests/ComputationsBook/Makefile.chapter.in 2021-02-15 15:47:13.770677282 -0700 @@ -15,16 +15,16 @@ diff: diff --git a/Macaulay2-1.17-lto.patch b/Macaulay2-1.17-lto.patch deleted file mode 100644 index 07a07f6..0000000 --- a/Macaulay2-1.17-lto.patch +++ /dev/null @@ -1,48 +0,0 @@ ---- M2/Macaulay2/c/compat.h.orig 2021-01-08 08:30:25.000000000 -0700 -+++ M2/Macaulay2/c/compat.h 2021-02-15 12:16:12.570716693 -0700 -@@ -1,7 +1,7 @@ - /* Copyright 1993 by Daniel R. Grayson */ - - #ifndef __cplusplus --typedef char bool; -+typedef _Bool bool; - #endif - - extern char posfmt[]; ---- M2/Macaulay2/d/boost-regex.cpp.orig 2021-01-08 08:30:25.000000000 -0700 -+++ M2/Macaulay2/d/boost-regex.cpp 2021-01-29 09:45:58.311601390 -0700 -@@ -48,8 +48,8 @@ extern "C" { - /* returns an array of pairs (s, r), indicating starting point - * and length of the first match and its capture groups */ - M2_arrayint regex_search(const M2_string pattern, -- const size_t start, -- const size_t range, -+ const int start, -+ const int range, - const M2_string text, - int regex_flags, - int match_flags) ---- M2/Macaulay2/d/types.h.orig 2021-01-08 08:30:25.000000000 -0700 -+++ M2/Macaulay2/d/types.h 2021-02-15 12:15:52.755753702 -0700 -@@ -37,6 +37,10 @@ - # define LONGJUMP(env) longjmp(env, 1) - #endif - -+#ifdef __cplusplus -+extern "C" { -+#endif -+ - struct ArgCell - { - int argc, envc; -@@ -50,6 +54,10 @@ struct JumpCell - bool is_set; - }; - -+#ifdef __cplusplus -+} -+#endif -+ - #ifdef HAVE_UNISTD_H - #include - #endif diff --git a/Macaulay2-1.18-lto.patch b/Macaulay2-1.18-lto.patch new file mode 100644 index 0000000..becd01c --- /dev/null +++ b/Macaulay2-1.18-lto.patch @@ -0,0 +1,35 @@ +--- M2/Macaulay2/c/compat.h.orig 2021-06-13 14:30:17.341325747 -0600 ++++ M2/Macaulay2/c/compat.h 2021-06-14 06:52:52.648631798 -0600 +@@ -2,7 +2,7 @@ + + #ifndef __cplusplus + #undef bool +-typedef char bool; ++typedef _Bool bool; + #endif + + extern char posfmt[]; +--- M2/Macaulay2/d/types.h.orig 2021-06-04 17:33:04.000000000 -0600 ++++ M2/Macaulay2/d/types.h 2021-06-13 14:30:27.804335244 -0600 +@@ -37,6 +37,10 @@ + # define LONGJUMP(env) longjmp(env, 1) + #endif + ++#ifdef __cplusplus ++extern "C" { ++#endif ++ + struct ArgCell + { + int argc, envc; +@@ -50,6 +54,10 @@ struct JumpCell + bool is_set; + }; + ++#ifdef __cplusplus ++} ++#endif ++ + #ifdef HAVE_UNISTD_H + #include + #endif diff --git a/Macaulay2-1.16-no_gftables.patch b/Macaulay2-1.18-no_gftables.patch similarity index 59% rename from Macaulay2-1.16-no_gftables.patch rename to Macaulay2-1.18-no_gftables.patch index e491a6e..17ebc01 100644 --- a/Macaulay2-1.16-no_gftables.patch +++ b/Macaulay2-1.18-no_gftables.patch @@ -1,7 +1,7 @@ ---- M2/configure.ac.orig 2020-07-12 19:15:12.986277846 -0600 -+++ M2/configure.ac 2020-07-12 19:19:00.202170774 -0600 -@@ -673,7 +673,7 @@ AC_SUBST(BUILTLIBS) - AC_SUBST(LIBLIST, " atomic_ops gc gdbm gmp mpir mpfr readline ntl flint factory lapack mpsolve frobby glpk cddlib fplll linbox gtest ") +--- M2/configure.ac.orig 2021-06-13 14:28:15.330215045 -0600 ++++ M2/configure.ac 2021-06-13 14:28:49.449246006 -0600 +@@ -667,7 +667,7 @@ AC_SUBST(BUILTLIBS) + AC_SUBST(LIBLIST, " atomic_ops gc gdbm gmp mpir mpfr mpfi readline ntl flint factory lapack mpsolve frobby glpk cddlib fplll linbox gtest ") # The list LIBLIST is the list of libraries that might be used and linked into M2. -AC_SUBST(PROGLIST, "4ti2 gfan normaliz csdp nauty cddplus lrslib gftables topcom cohomcalg") diff --git a/Macaulay2.spec b/Macaulay2.spec index 94b869e..21af2b1 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -23,7 +23,7 @@ %global m2url https://github.com/Macaulay2/M2 -%global emacscommit d1809568339948182cb967f5d54884d5e7213dca +%global emacscommit 01af405c5c92f90e4009ff580a1b1dcefe43a714 %global emacsurl https://github.com/Macaulay2/M2-emacs %global emacsshort %(cut -b -7 <<< %{emacscommit}) @@ -45,16 +45,10 @@ # The examples contain some python files which should not be byte compiled %global _python_bytecompile_extra 0 -%if 0%{?fedora} >= 33 -%global blaslib flexiblas -%else -%global blaslib openblas -%endif - Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 -Version: 1.17 -Release: 2%{?dist} +Version: 1.18 +Release: 1%{?dist} License: GPLv2 or GPLv3 URL: http://macaulay2.com/ @@ -84,12 +78,12 @@ Source101: http://www.mpfr.org/mpfr-%{mpfrver}/mpfr-%{mpfrver}.tar.xz Provides: bundled(mpfr) = %{mpfrver} # FLINT is bundled because it must be linked with the specially-built MPFR -%global flintver 2.6.3 +%global flintver 2.7.1 Source102: http://www.flintlib.org/flint-%{flintver}.tar.gz Provides: bundled(flint) = %{flintver} # FACTORY is bundled because it must be built with special options -%global factoryver 4.1.3 +%global factoryver 4.2.0 Source103: http://faculty.math.illinois.edu/Macaulay2/Downloads/OtherSourceCode/factory-%{factoryver}.tar.gz Provides: bundled(factory) = %{factoryver} @@ -123,8 +117,8 @@ Provides: bundled(linbox) = %{linboxver} ## PATCHES FOR BUNDLED code # Work around an ambiguous overload on 32-bit platforms Source200: linbox-1.6.3.patch -# Fix factory build failure. REPLACES the upstream patch. -Source201: factory-4.1.3.patch +# MPFR bug fixes from mpfr upstream. +Source201: mpfr-4.1.0.patch # Fix mathicgb build on big endian machines and with gcc 11 Source202: mathicgb-1.0.patch # Silence GCC warnings about mathic code @@ -132,13 +126,13 @@ Source203: mathic-1.0.patch ## FAKE library tarballs that convince Macaulay2 to use the system versions Source300: frobby_v0.9.0.tar.gz -Source301: cddlib-094h.tar.gz +Source301: cddlib-094m.tar.gz Source302: lapack-3.9.0.tgz Source303: 4ti2-1.6.9.tar.gz Source304: libfplll-5.2.0.tar.gz Source305: gfan0.6.2.tar.gz Source306: givaro-4.1.1.tar.gz -Source307: lrslib-062.tar.gz +Source307: lrslib-071a.tar.gz Source308: TOPCOM-0.17.8.tar.gz Source309: cohomCalg-0.32.tar.gz Source310: glpk-4.59.tar.gz @@ -152,7 +146,7 @@ Patch1: %{name}-1.16-ulimit.patch # drop 'tests' from default make target Patch2: %{name}-1.17-default_make_targets.patch # disable check for gftables -Patch3: %{name}-1.16-no_gftables.patch +Patch3: %{name}-1.18-no_gftables.patch # adapt to libfplll 5.2.1 Patch4: %{name}-1.15-fplll.patch # do not override the debug level @@ -160,7 +154,7 @@ Patch5: %{name}-1.17-configure.patch # Fix "error: in conversion to html, unknown TeX control sequence(s): \rightarrow" Patch6: %{name}-1.16-rightarrow.patch # Fix LTO warnings about mismatched declarations and definitions -Patch7: %{name}-1.17-lto.patch +Patch7: %{name}-1.18-lto.patch BuildRequires: 4ti2 BuildRequires: autoconf @@ -169,9 +163,6 @@ BuildRequires: bison BuildRequires: boost-devel BuildRequires: cddlib-devel BuildRequires: chrpath -%if ! 0%{?system_normaliz} -BuildRequires: cmake -%endif BuildRequires: cohomCalg BuildRequires: csdp-tools BuildRequires: desktop-file-utils @@ -180,12 +171,14 @@ BuildRequires: doxygen-latex %else BuildRequires: doxygen %endif +BuildRequires: eigen3-static # etags BuildRequires: emacs BuildRequires: expat-devel BuildRequires: factory-gftables BuildRequires: fflas-ffpack-devel BuildRequires: flex +BuildRequires: flexiblas-devel BuildRequires: gawk BuildRequires: gcc-c++ BuildRequires: gcc-gfortran @@ -211,9 +204,7 @@ BuildRequires: libatomic_ops-devel BuildRequires: libfplll-static BuildRequires: libfrobby-devel BuildRequires: libnauty-devel -%if 0%{?system_normaliz} BuildRequires: libnormaliz-devel >= 3.6.3 -%endif BuildRequires: libtool BuildRequires: lrslib-devel BuildRequires: lrslib-utils @@ -221,18 +212,20 @@ BuildRequires: m4ri-devel BuildRequires: m4rie-devel BuildRequires: make BuildRequires: mariadb-devel +BuildRequires: mpfi-devel BuildRequires: mpsolve-devel BuildRequires: nauty BuildRequires: normaliz BuildRequires: ntl-devel -BuildRequires: %{blaslib}-devel BuildRequires: pkgconfig(bdw-gc) >= 7.6.2 BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(ncurses) BuildRequires: polymake -BuildRequires: python3 +BuildRequires: python3-devel BuildRequires: qd-devel BuildRequires: readline-devel +BuildRequires: tbb-devel +BuildRequires: texinfo BuildRequires: time BuildRequires: tinyxml2-devel BuildRequires: TOPCOM @@ -248,8 +241,12 @@ Requires: gfan Requires: hicolor-icon-theme Requires: lrslib-utils Requires: nauty +Requires: normaliz Requires: TOPCOM +# M2-help +Requires: xdg-utils + Recommends: mathicgb %if 0%{?common} @@ -265,13 +262,6 @@ Provides: Macaulay2-emacs = %{version}-%{release} Provides: macaulay2 = %{version}-%{release} -# M2-help -Requires: xdg-utils - -%if 0%{?system_normaliz} -Requires: normaliz -%endif - # Macaulay2 no longer builds successfully on 32-bit platforms # https://bugzilla.redhat.com/show_bug.cgi?id=1874318 ExcludeArch: %{ix86} %{arm} @@ -302,11 +292,6 @@ install -p -m755 %{SOURCE20} ./etags ## bundled code install -p -m644 %{SOURCE100} BUILD/tarfiles/ -%if ! 0%{?system_normaliz} -sed -e '/PROGRAMS =/aPATCHFILE = @abs_srcdir@/patch-$(VERSION)' \ - -e '/PRECONFIGURE/d' \ - -i libraries/normaliz/Makefile.in -%endif install -p -m644 %{SOURCE101} %{SOURCE102} %{SOURCE103} %{SOURCE105} \ %{SOURCE108} BUILD/tarfiles/ sed -i 's/\(VERSION = \).*/\1%{mpfrver}/' libraries/mpfr/Makefile.in @@ -321,11 +306,13 @@ tar -C submodules/mathic -xf %{SOURCE107} --strip-components=1 patch -d submodules/mathic -p0 < %{SOURCE203} ## patches for bundled code -sed -e 's,--with-blas,&=%{_includedir}/%{blaslib} --with-ntl,' \ +sed -e 's,--with-blas,&=%{_includedir}/flexiblas --with-ntl,' \ -e 's,2\.6\.0,%{flintver},' \ -i libraries/flint/Makefile.in cp -p %{SOURCE200} libraries/linbox/patch-%{linboxver} -cp -p %{SOURCE201} libraries/factory/patch-%{factoryver} +sed -e '/^TARFILE =/iPATCHFILE = @abs_srcdir@/patch-$(VERSION)' \ + -i libraries/mpfr/Makefile.in +cp -p %{SOURCE201} libraries/mpfr/patch-%{mpfrver} ## fake library tarballs install -p -m644 %{SOURCE300} %{SOURCE301} %{SOURCE302} %{SOURCE303} \ @@ -362,16 +349,15 @@ if [ "$HOME" = "/builddir" ]; then fi # Use, but don't build, cddlib, fflas-ffpack, and gc. Use the static versions -# of libfplll and givaro. Do not invoke git on a nonrepository. Link with -# blaslib instead of the reference blas and lapack. Fix typos. -sed -e 's/^BUILD_cddlib=yes/BUILD_cddlib=no/' \ - -e 's/^BUILD_gc=yes/BUILD_gc=no/' \ +# of libfplll and givaro. Link with flexiblas instead of the reference blas +# and lapack. Fix typos. +sed -e 's/BUILD_cddlib=yes/BUILD_cddlib=no/' \ + -e 's/BUILD_gc=yes/BUILD_gc=no/' \ -e 's/BUILD_fflas_ffpack=yes/BUILD_fflas_ffpack=no/' \ - -e 's/^\(GIT_DESCRIPTION=\).*/\1"unknown"/' \ -e 's,-lfplll,%{_libdir}/libfplll.a -lqd,' \ -e 's,`\$PKG_CONFIG --libs givaro`,%{_libdir}/libgivaro.a,' \ -e 's,-lgivaro,%{_libdir}/libgivaro.a,' \ - -e 's,-llapack -lrefblas,-l%{blaslib},' \ + -e 's,-llapack -lrefblas,-lflexiblas,' \ -e 's,\$added_fclibs != yes,"$added_fclibs" != yes,' \ -i configure.ac @@ -399,7 +385,7 @@ pushd BUILD/%{_target_platform} CPPFLAGS="-I%{_includedir}/cddlib -I%{_includedir}/frobby" \ CFLAGS="${optflags} -fsigned-char" \ CXXFLAGS="${optflags} -fsigned-char" \ -LIBS="-l%{blaslib}" \ +LIBS="-lflexiblas" \ ../../configure \ --build=%{_build} \ --host=%{_host} \ @@ -420,7 +406,7 @@ LIBS="-l%{blaslib}" \ --enable-build-libraries="mpfr flint factory lapack fplll givaro linbox gtest" # The list of libraries and submodules above should include only those that: # 1. We bundle (mpfr, flint, factory, and linbox) - # 2. We sneakily substitute one library for another (lapack -> blaslib) + # 2. We sneakily substitute one library for another (lapack -> flexiblas) # 3. Have to be linked with the static library (fplll and givaro) popd @@ -474,7 +460,7 @@ appstream-util validate-relax --nonet \ %{buildroot}%{_metainfodir}/%{name}.metainfo.xml # Byte compile the Emacs files, and move the documentation -pushd %{buildroot}%{_emacs_sitelispdir}/%{name} +pushd %{buildroot}%{_emacs_sitelispdir}/macaulay2 mv M2-emacs* %{buildroot}%{_pkgdocdir} mv README.md %{buildroot}%{_pkgdocdir}/README-emacs.md %{_emacs_bytecompile} *.el @@ -492,7 +478,11 @@ rm -fr %{buildroot}/builddir CFLAGS="%{build_cflags}" \ CXXFLAGS="%{build_cxxflags}" \ LDFLAGS="%{build_ldflags}" \ -time make -k check -C BUILD/%{_target_platform} Verbose=true ||: + +# The test suite has grown to the point where it takes many hours to run. +# Just run the most basic tests. +make check -C BUILD/%{_target_platform}/Macaulay2/e +make check -C BUILD/%{_target_platform}/Macaulay2/bin %files @@ -511,10 +501,13 @@ time make -k check -C BUILD/%{_target_platform} Verbose=true ||: %{_docdir}/Macaulay2/ %{_infodir}/*.info* %{_mandir}/man1/* -%{_emacs_sitelispdir}/%{name}/ +%{_emacs_sitelispdir}/macaulay2/ %changelog +* Thu Jun 17 2021 Jerry James - 1.18-1 +- Version 1.18 + * Thu Feb 18 2021 Jerry James - 1.17-2 - Reduce optimization level on s390x to work around FTBFS - Install metainfo diff --git a/mpfr-4.1.0.patch b/mpfr-4.1.0.patch new file mode 100644 index 0000000..30775a5 --- /dev/null +++ b/mpfr-4.1.0.patch @@ -0,0 +1,1747 @@ +--- mpfr-4.1.0/PATCHES.orig 2021-02-11 12:40:40.079363480 +0000 ++++ mpfr-4.1.0/PATCHES 2021-02-11 12:40:40.119363040 +0000 +@@ -0,0 +1 @@ ++decimal128-conv +--- mpfr-4.1.0/VERSION.orig 2020-07-10 11:52:33.000000000 +0000 ++++ mpfr-4.1.0/VERSION 2021-02-11 12:40:40.119363040 +0000 +@@ -1 +1 @@ +-4.1.0 ++4.1.0-p1 +--- mpfr-4.1.0/src/get_d128.c.orig 2020-04-08 22:39:35.000000000 +0000 ++++ mpfr-4.1.0/src/get_d128.c 2021-02-11 12:40:40.103363216 +0000 +@@ -40,22 +40,21 @@ + static _Decimal128 + get_decimal128_nan (void) + { +- return (_Decimal128) MPFR_DBL_NAN; ++ return 0.0dl / 0.0dl; + } + + /* construct the decimal128 Inf with given sign */ + static _Decimal128 + get_decimal128_inf (int negative) + { +- return (_Decimal128) (negative ? MPFR_DBL_INFM : MPFR_DBL_INFP); ++ return negative ? - 1.0dl / 0.0dl : 1.0dl / 0.0dl; + } + + /* construct the decimal128 zero with given sign */ + static _Decimal128 + get_decimal128_zero (int negative) + { +- _Decimal128 zero = 0; +- return (_Decimal128) (negative ? -zero : zero); ++ return negative ? - 0.0dl : 0.0dl; + } + + /* construct the decimal128 smallest non-zero with given sign: +--- mpfr-4.1.0/src/mpfr.h.orig 2020-07-10 11:52:33.000000000 +0000 ++++ mpfr-4.1.0/src/mpfr.h 2021-02-11 12:40:40.115363084 +0000 +@@ -27,7 +27,7 @@ + #define MPFR_VERSION_MAJOR 4 + #define MPFR_VERSION_MINOR 1 + #define MPFR_VERSION_PATCHLEVEL 0 +-#define MPFR_VERSION_STRING "4.1.0" ++#define MPFR_VERSION_STRING "4.1.0-p1" + + /* User macros: + MPFR_USE_FILE: Define it to make MPFR define functions dealing +--- mpfr-4.1.0/src/version.c.orig 2020-07-10 11:52:33.000000000 +0000 ++++ mpfr-4.1.0/src/version.c 2021-02-11 12:40:40.119363040 +0000 +@@ -25,5 +25,5 @@ + const char * + mpfr_get_version (void) + { +- return "4.1.0"; ++ return "4.1.0-p1"; + } +--- mpfr-4.1.0/PATCHES.orig 2021-02-11 12:43:51.761257868 +0000 ++++ mpfr-4.1.0/PATCHES 2021-02-11 12:43:51.801257430 +0000 +@@ -0,0 +1 @@ ++random_deviate +--- mpfr-4.1.0/VERSION.orig 2021-02-11 12:40:40.119363040 +0000 ++++ mpfr-4.1.0/VERSION 2021-02-11 12:43:51.801257430 +0000 +@@ -1 +1 @@ +-4.1.0-p1 ++4.1.0-p2 +--- mpfr-4.1.0/src/mpfr.h.orig 2021-02-11 12:40:40.115363084 +0000 ++++ mpfr-4.1.0/src/mpfr.h 2021-02-11 12:43:51.801257430 +0000 +@@ -27,7 +27,7 @@ + #define MPFR_VERSION_MAJOR 4 + #define MPFR_VERSION_MINOR 1 + #define MPFR_VERSION_PATCHLEVEL 0 +-#define MPFR_VERSION_STRING "4.1.0-p1" ++#define MPFR_VERSION_STRING "4.1.0-p2" + + /* User macros: + MPFR_USE_FILE: Define it to make MPFR define functions dealing +--- mpfr-4.1.0/src/random_deviate.c.orig 2020-01-08 18:11:13.000000000 +0000 ++++ mpfr-4.1.0/src/random_deviate.c 2021-02-11 12:43:51.789257562 +0000 +@@ -289,6 +289,7 @@ + mpfr_random_size_t p = mpfr_get_prec (z); /* Number of bits in result */ + mpz_t t; + int inex; ++ mpfr_exp_t negxe; + + if (n == 0) + { +@@ -370,14 +371,22 @@ + mpz_setbit (t, 0); /* Set the trailing bit so result is always inexact */ + if (neg) + mpz_neg (t, t); +- /* Is -x->e representable as a mpfr_exp_t? */ +- MPFR_ASSERTN (x->e <= (mpfr_uexp_t)(-1) >> 1); ++ /* Portable version of the negation of x->e, with a check of overflow. */ ++ if (MPFR_UNLIKELY (x->e > MPFR_EXP_MAX)) ++ { ++ /* Overflow, except when x->e = MPFR_EXP_MAX + 1 = - MPFR_EXP_MIN. */ ++ MPFR_ASSERTN (MPFR_EXP_MIN + MPFR_EXP_MAX == -1 && ++ x->e == (mpfr_random_size_t) MPFR_EXP_MAX + 1); ++ negxe = MPFR_EXP_MIN; ++ } ++ else ++ negxe = - (mpfr_exp_t) x->e; + /* + * Let mpfr_set_z_2exp do all the work of rounding to the requested + * precision, setting overflow/underflow flags, and returning the right + * inexact value. + */ +- inex = mpfr_set_z_2exp (z, t, -x->e, rnd); ++ inex = mpfr_set_z_2exp (z, t, negxe, rnd); + mpz_clear (t); + return inex; + } +--- mpfr-4.1.0/src/version.c.orig 2021-02-11 12:40:40.119363040 +0000 ++++ mpfr-4.1.0/src/version.c 2021-02-11 12:43:51.801257430 +0000 +@@ -25,5 +25,5 @@ + const char * + mpfr_get_version (void) + { +- return "4.1.0-p1"; ++ return "4.1.0-p2"; + } +--- mpfr-4.1.0/PATCHES.orig 2021-02-11 12:46:49.075316772 +0000 ++++ mpfr-4.1.0/PATCHES 2021-02-11 12:46:49.115316335 +0000 +@@ -0,0 +1 @@ ++set_z_2exp-overflow +--- mpfr-4.1.0/VERSION.orig 2021-02-11 12:43:51.801257430 +0000 ++++ mpfr-4.1.0/VERSION 2021-02-11 12:46:49.115316335 +0000 +@@ -1 +1 @@ +-4.1.0-p2 ++4.1.0-p3 +--- mpfr-4.1.0/src/mpfr.h.orig 2021-02-11 12:43:51.801257430 +0000 ++++ mpfr-4.1.0/src/mpfr.h 2021-02-11 12:46:49.115316335 +0000 +@@ -27,7 +27,7 @@ + #define MPFR_VERSION_MAJOR 4 + #define MPFR_VERSION_MINOR 1 + #define MPFR_VERSION_PATCHLEVEL 0 +-#define MPFR_VERSION_STRING "4.1.0-p2" ++#define MPFR_VERSION_STRING "4.1.0-p3" + + /* User macros: + MPFR_USE_FILE: Define it to make MPFR define functions dealing +--- mpfr-4.1.0/src/set_z_exp.c.orig 2020-01-08 18:11:13.000000000 +0000 ++++ mpfr-4.1.0/src/set_z_exp.c 2021-02-11 12:46:49.103316466 +0000 +@@ -28,10 +28,11 @@ + int + mpfr_set_z_2exp (mpfr_ptr f, mpz_srcptr z, mpfr_exp_t e, mpfr_rnd_t rnd_mode) + { +- mp_size_t fn, zn, dif, en; ++ mp_size_t fn, zn, dif; + int k, sign_z, inex; + mp_limb_t *fp, *zp; +- mpfr_exp_t exp; ++ mpfr_exp_t exp, nmax; ++ mpfr_uexp_t uexp; + + sign_z = mpz_sgn (z); + if (MPFR_UNLIKELY (sign_z == 0)) /* ignore the exponent for 0 */ +@@ -43,10 +44,15 @@ + MPFR_ASSERTD (sign_z == MPFR_SIGN_POS || sign_z == MPFR_SIGN_NEG); + + zn = ABSIZ(z); /* limb size of z */ +- /* compute en = floor(e/GMP_NUMB_BITS) */ +- en = (e >= 0) ? e / GMP_NUMB_BITS : (e + 1) / GMP_NUMB_BITS - 1; + MPFR_ASSERTD (zn >= 1); +- if (MPFR_UNLIKELY (zn + en > MPFR_EMAX_MAX / GMP_NUMB_BITS + 1)) ++ nmax = MPFR_EMAX_MAX / GMP_NUMB_BITS + 1; ++ /* Detect early overflow with zn + en > nmax, ++ where en = floor(e / GMP_NUMB_BITS). ++ This is checked without an integer overflow (even assuming some ++ future version of GMP, where limitations may be removed). */ ++ if (MPFR_UNLIKELY (e >= 0 ? ++ zn > nmax - e / GMP_NUMB_BITS : ++ zn + (e + 1) / GMP_NUMB_BITS - 1 > nmax)) + return mpfr_overflow (f, rnd_mode, sign_z); + /* because zn + en >= MPFR_EMAX_MAX / GMP_NUMB_BITS + 2 + implies (zn + en) * GMP_NUMB_BITS >= MPFR_EMAX_MAX + GMP_NUMB_BITS + 1 +@@ -64,8 +70,21 @@ + and exp = zn * GMP_NUMB_BITS + e - k + <= (zn + en) * GMP_NUMB_BITS - k + GMP_NUMB_BITS - 1 + <= MPFR_EMAX_MAX + 2 * GMP_NUMB_BITS - 1 */ +- exp = (mpfr_prec_t) zn * GMP_NUMB_BITS + e - k; ++ /* We need to compute exp = zn * GMP_NUMB_BITS + e - k with well-defined ++ operations (no integer overflows / no implementation-defined results). ++ The mathematical result of zn * GMP_NUMB_BITS may be larger than ++ the largest value of mpfr_exp_t while exp could still be less than ++ __gmpfr_emax. Thanks to early overflow detection, we can compute the ++ result in modular arithmetic, using mpfr_uexp_t, and convert it to ++ mpfr_exp_t. */ ++ uexp = (mpfr_uexp_t) zn * GMP_NUMB_BITS + (mpfr_uexp_t) e - k; ++ ++ /* Convert to signed in a portable way (see doc/README.dev). ++ On most platforms, this can be optimized to identity (no-op). */ ++ exp = uexp > MPFR_EXP_MAX ? -1 - (mpfr_exp_t) ~uexp : (mpfr_exp_t) uexp; ++ + /* The exponent will be exp or exp + 1 (due to rounding) */ ++ + if (MPFR_UNLIKELY (exp > __gmpfr_emax)) + return mpfr_overflow (f, rnd_mode, sign_z); + if (MPFR_UNLIKELY (exp + 1 < __gmpfr_emin)) +--- mpfr-4.1.0/src/version.c.orig 2021-02-11 12:43:51.801257430 +0000 ++++ mpfr-4.1.0/src/version.c 2021-02-11 12:46:49.115316335 +0000 +@@ -25,5 +25,5 @@ + const char * + mpfr_get_version (void) + { +- return "4.1.0-p2"; ++ return "4.1.0-p3"; + } +--- mpfr-4.1.0/tests/tset_z_exp.c.orig 2020-01-08 18:11:13.000000000 +0000 ++++ mpfr-4.1.0/tests/tset_z_exp.c 2021-02-11 12:46:49.103316466 +0000 +@@ -97,49 +97,149 @@ + mpfr_get_si is a rather indirect test of a low level routine. */ + + static void +-check (long i, mpfr_rnd_t rnd) ++check (long i, mpfr_rnd_t rnd, int reduced) + { +- mpfr_t f; ++ mpfr_t f1, f2, f3; + mpz_t z; +- mpfr_exp_t e; ++ mpfr_exp_t e, old_emin, old_emax; + int inex; ++ mpfr_flags_t flags; ++ ++ old_emin = mpfr_get_emin (); ++ old_emax = mpfr_get_emax (); + + /* using CHAR_BIT * sizeof(long) bits of precision ensures that + mpfr_set_z_2exp is exact below */ +- mpfr_init2 (f, CHAR_BIT * sizeof(long)); ++ mpfr_inits2 (CHAR_BIT * sizeof(long), f1, f2, f3, (mpfr_ptr) 0); + mpz_init (z); + mpz_set_ui (z, i); + /* the following loop ensures that no overflow occurs */ + do + e = randexp (); + while (e > mpfr_get_emax () - CHAR_BIT * sizeof(long)); +- inex = mpfr_set_z_2exp (f, z, e, rnd); +- if (inex != 0) ++ ++ mpfr_clear_flags (); ++ inex = mpfr_set_z_2exp (f1, z, e, rnd); ++ flags = __gmpfr_flags; ++ ++ if (inex != 0 || flags != 0 || ++ (mpfr_div_2si (f2, f1, e, rnd), mpfr_get_si (f2, MPFR_RNDZ) != i)) + { +- printf ("Error in mpfr_set_z_2exp for i=%ld, e=%ld," +- " wrong ternary value\n", i, (long) e); +- printf ("expected 0, got %d\n", inex); ++ printf ("Error in mpfr_set_z_2exp for i=%ld e=%" MPFR_EXP_FSPEC ++ "d rnd_mode=%d\n", i, (mpfr_eexp_t) e, rnd); ++ mpfr_set_si_2exp (f2, i, e, MPFR_RNDN); ++ printf ("expected "); mpfr_dump (f2); ++ printf ("with inex = %d and flags =", 0); ++ flags_out (0); ++ printf ("got "); mpfr_dump (f1); ++ printf ("with inex = %d and flags =", inex); ++ flags_out (flags); + exit (1); + } +- mpfr_div_2si (f, f, e, rnd); +- if (mpfr_get_si (f, MPFR_RNDZ) != i) ++ ++ if (reduced) + { +- printf ("Error in mpfr_set_z_2exp for i=%ld e=", i); +- if (e < LONG_MIN) +- printf ("( LONG_MAX) +- printf ("(>LONG_MAX)"); +- else +- printf ("%ld", (long) e); +- printf (" rnd_mode=%d\n", rnd); +- printf ("expected %ld\n", i); +- printf ("got "); mpfr_dump (f); +- exit (1); ++ mpfr_exp_t ef, emin, emax; ++ int inex2, inex3; ++ mpfr_flags_t flags2, flags3; ++ ++ ef = i == 0 ? 0 : mpfr_get_exp (f1); ++ for (emin = ef - 2; emin <= ef + 2; emin++) ++ for (emax = emin; emax <= ef + 2; emax++) ++ { ++ inex3 = mpfr_set (f3, f1, rnd); ++ MPFR_ASSERTN (inex3 == 0); ++ mpfr_set_emin (emin); ++ mpfr_set_emax (emax); ++ mpfr_clear_flags (); ++ inex2 = mpfr_set_z_2exp (f2, z, e, rnd); ++ flags2 = __gmpfr_flags; ++ mpfr_clear_flags (); ++ inex3 = mpfr_check_range (f3, 0, rnd); ++ flags3 = __gmpfr_flags; ++ if (!(mpfr_equal_p (f2, f3) && ++ SAME_SIGN (inex2, inex3) && ++ flags2 == flags3)) ++ { ++ printf ("Error in mpfr_set_z_2exp for i=%ld e=%" ++ MPFR_EXP_FSPEC "d rnd_mode=%d\nand emin=%" ++ MPFR_EXP_FSPEC "d emax=%" MPFR_EXP_FSPEC ++ "d\n", i, (mpfr_eexp_t) e, rnd, ++ (mpfr_eexp_t) emin, (mpfr_eexp_t) emax); ++ printf ("expected "); mpfr_dump (f3); ++ printf ("with inex = %d and flags =", inex3); ++ flags_out (flags3); ++ printf ("got "); mpfr_dump (f2); ++ printf ("with inex = %d and flags =", inex2); ++ flags_out (flags2); ++ exit (1); ++ } ++ } ++ mpfr_set_emin (old_emin); ++ mpfr_set_emax (old_emax); + } +- mpfr_clear (f); ++ ++ mpfr_clears (f1, f2, f3, (mpfr_ptr) 0); + mpz_clear (z); + } + ++static void ++check_huge (void) ++{ ++ if (getenv ("MPFR_CHECK_LARGEMEM") != NULL) ++ { ++ mpfr_t x; ++ mpz_t z; ++ long e; ++ ++ /* Increase tests_memory_limit to the maximum in order to avoid ++ an obvious failure due to insufficient memory. */ ++ tests_memory_limit = (size_t) -1; /* no memory limit */ ++ ++ mpfr_init2 (x, 32); ++ ++ /* In r14140, with a 32-bit ABI (GCC's -m32): ++ - With UBsan (-fsanitize=undefined -fno-sanitize-recover), ++ this fails with: ++ set_z_2exp.c:71:26: runtime error: signed integer overflow: ++ 67108864 * 32 cannot be represented in type 'long int' ++ - With -D_MPFR_EXP_FORMAT=4, this fails with: ++ Expected 0.10001000000000000000000000000000E5 ++ Got 0 ++ */ ++ mpz_init_set_ui (z, 17); ++ e = 0x7ffffff0; ++ mpz_mul_2exp (z, z, e); ++ mpz_add_ui (z, z, 1); ++ mpfr_set_z_2exp (x, z, -e, MPFR_RNDN); ++ if (mpfr_cmp_ui0 (x, 17) != 0) ++ { ++ printf ("Error 1 in check_huge\n"); ++ printf ("Expected 0.10001000000000000000000000000000E5\n"); ++ printf ("Got "); ++ mpfr_dump (x); ++ exit (1); ++ } ++ mpz_clear (z); ++ ++ mpz_init_set_ui (z, 17); ++ mpz_mul_2exp (z, z, 0xffffffb0); ++ mpz_add_ui (z, z, 1); ++ mpfr_set_z_2exp (x, z, -1, MPFR_RNDN); ++ if (! MPFR_IS_INF (x) || MPFR_IS_NEG (x)) ++ { ++ printf ("Error 2 in check_huge\n"); ++ printf ("Expected @Inf@\n"); ++ printf ("Got "); ++ mpfr_dump (x); ++ exit (1); ++ } ++ mpz_clear (z); ++ ++ mpfr_clear (x); ++ } ++} ++ + int + main (int argc, char *argv[]) + { +@@ -147,11 +247,13 @@ + + tests_start_mpfr (); + +- check (0, MPFR_RNDN); ++ check (0, MPFR_RNDN, 0); + for (j = 0; j < 200000; j++) +- check (randlimb () & LONG_MAX, RND_RAND ()); ++ check (randlimb () & LONG_MAX, RND_RAND (), j < 200); + check0 (); + ++ check_huge (); ++ + tests_end_mpfr (); + + return 0; +--- mpfr-4.1.0/PATCHES.orig 2021-02-11 12:48:27.322243271 +0000 ++++ mpfr-4.1.0/PATCHES 2021-02-11 12:48:27.370242746 +0000 +@@ -0,0 +1 @@ ++prototypes +--- mpfr-4.1.0/VERSION.orig 2021-02-11 12:46:49.115316335 +0000 ++++ mpfr-4.1.0/VERSION 2021-02-11 12:48:27.370242746 +0000 +@@ -1 +1 @@ +-4.1.0-p3 ++4.1.0-p4 +--- mpfr-4.1.0/src/atan.c.orig 2020-04-22 15:27:07.000000000 +0000 ++++ mpfr-4.1.0/src/atan.c 2021-02-11 12:48:27.354242922 +0000 +@@ -56,7 +56,7 @@ + }; + + static void +-set_table (mpfr_t y, const mp_limb_t x[3]) ++set_table (mpfr_ptr y, const mp_limb_t x[3]) + { + mpfr_prec_t p = MPFR_PREC(y); + mp_size_t n = MPFR_PREC2LIMBS(p); +--- mpfr-4.1.0/src/const_euler.c.orig 2020-01-08 18:11:13.000000000 +0000 ++++ mpfr-4.1.0/src/const_euler.c 2021-02-11 12:48:27.354242922 +0000 +@@ -181,7 +181,7 @@ + } + + int +-mpfr_const_euler_internal (mpfr_t x, mpfr_rnd_t rnd) ++mpfr_const_euler_internal (mpfr_ptr x, mpfr_rnd_t rnd) + { + mpfr_const_euler_bs_t sum; + mpz_t t, u, v; +--- mpfr-4.1.0/src/eint.c.orig 2020-03-09 15:31:45.000000000 +0000 ++++ mpfr-4.1.0/src/eint.c 2021-02-11 12:48:27.354242922 +0000 +@@ -36,7 +36,7 @@ + Return PREC(y) when the truncated series does not converge. + */ + static mpfr_exp_t +-mpfr_eint_aux (mpfr_t y, mpfr_srcptr x) ++mpfr_eint_aux (mpfr_ptr y, mpfr_srcptr x) + { + mpfr_t eps; /* dynamic (absolute) error bound on t */ + mpfr_t erru, errs; +--- mpfr-4.1.0/src/erandom.c.orig 2020-01-08 18:11:13.000000000 +0000 ++++ mpfr-4.1.0/src/erandom.c 2021-02-11 12:48:27.354242922 +0000 +@@ -80,7 +80,7 @@ + + /* return an exponential random deviate with mean 1 as a MPFR */ + int +-mpfr_erandom (mpfr_t z, gmp_randstate_t r, mpfr_rnd_t rnd) ++mpfr_erandom (mpfr_ptr z, gmp_randstate_t r, mpfr_rnd_t rnd) + { + mpfr_random_deviate_t x, p, q; + int inex; +--- mpfr-4.1.0/src/fpif.c.orig 2020-01-08 18:11:13.000000000 +0000 ++++ mpfr-4.1.0/src/fpif.c 2021-02-11 12:48:27.354242922 +0000 +@@ -291,7 +291,8 @@ + * until one has integer types larger than 128 bits). + */ + static unsigned char* +-mpfr_fpif_store_exponent (unsigned char *buffer, size_t *buffer_size, mpfr_t x) ++mpfr_fpif_store_exponent (unsigned char *buffer, size_t *buffer_size, ++ mpfr_ptr x) + { + unsigned char *result; + mpfr_uexp_t uexp; +@@ -372,7 +373,7 @@ + * than 128 bits). + */ + static int +-mpfr_fpif_read_exponent_from_file (mpfr_t x, FILE * fh) ++mpfr_fpif_read_exponent_from_file (mpfr_ptr x, FILE * fh) + { + mpfr_exp_t exponent; + mpfr_uexp_t uexp; +@@ -456,7 +457,7 @@ + * format + */ + static unsigned char* +-mpfr_fpif_store_limbs (unsigned char *buffer, size_t *buffer_size, mpfr_t x) ++mpfr_fpif_store_limbs (unsigned char *buffer, size_t *buffer_size, mpfr_ptr x) + { + unsigned char *result; + mpfr_prec_t precision; +@@ -492,7 +493,7 @@ + * Assume buffer is not NULL. + */ + static void +-mpfr_fpif_read_limbs (mpfr_t x, unsigned char *buffer, size_t nb_byte) ++mpfr_fpif_read_limbs (mpfr_ptr x, unsigned char *buffer, size_t nb_byte) + { + size_t mp_bytes_per_limb; + size_t nb_partial_byte; +@@ -522,7 +523,7 @@ + * return 0 if successful + */ + int +-mpfr_fpif_export (FILE *fh, mpfr_t x) ++mpfr_fpif_export (FILE *fh, mpfr_ptr x) + { + int status; + unsigned char *buf; +@@ -582,7 +583,7 @@ + * Return 0 if the import was successful. + */ + int +-mpfr_fpif_import (mpfr_t x, FILE *fh) ++mpfr_fpif_import (mpfr_ptr x, FILE *fh) + { + int status; + mpfr_prec_t precision; +--- mpfr-4.1.0/src/li2.c.orig 2020-01-08 18:11:13.000000000 +0000 ++++ mpfr-4.1.0/src/li2.c 2021-02-11 12:48:27.354242922 +0000 +@@ -31,7 +31,7 @@ + for determinating the relative error. + */ + static int +-li2_series (mpfr_t sum, mpfr_srcptr z, mpfr_rnd_t rnd_mode) ++li2_series (mpfr_ptr sum, mpfr_srcptr z, mpfr_rnd_t rnd_mode) + { + int i; + mpfr_t s, u, v, w; +--- mpfr-4.1.0/src/lngamma.c.orig 2020-01-08 18:11:13.000000000 +0000 ++++ mpfr-4.1.0/src/lngamma.c 2021-02-11 12:48:27.354242922 +0000 +@@ -31,7 +31,7 @@ + precision should be >= 4. + */ + static void +-mpfr_gamma_alpha (mpfr_t s, mpfr_prec_t p) ++mpfr_gamma_alpha (mpfr_ptr s, mpfr_prec_t p) + { + MPFR_LOG_FUNC + (("p=%Pu", p), +--- mpfr-4.1.0/src/mpfr-impl.h.orig 2020-06-10 21:50:12.000000000 +0000 ++++ mpfr-4.1.0/src/mpfr-impl.h 2021-02-11 12:48:27.354242922 +0000 +@@ -2474,7 +2474,8 @@ + __MPFR_DECLSPEC mpz_srcptr mpfr_bernoulli_cache (unsigned long); + __MPFR_DECLSPEC void mpfr_bernoulli_freecache (void); + +-__MPFR_DECLSPEC int mpfr_sincos_fast (mpfr_t, mpfr_t, mpfr_srcptr, mpfr_rnd_t); ++__MPFR_DECLSPEC int mpfr_sincos_fast (mpfr_ptr, mpfr_ptr, mpfr_srcptr, ++ mpfr_rnd_t); + + __MPFR_DECLSPEC double mpfr_scale2 (double, int); + +@@ -2485,7 +2486,7 @@ + mpfr_prec_t); + + __MPFR_DECLSPEC void mpfr_mpz_init (mpz_ptr); +-__MPFR_DECLSPEC void mpfr_mpz_init2 (mpz_t, mp_bitcnt_t); ++__MPFR_DECLSPEC void mpfr_mpz_init2 (mpz_ptr, mp_bitcnt_t); + __MPFR_DECLSPEC void mpfr_mpz_clear (mpz_ptr); + + __MPFR_DECLSPEC int mpfr_odd_p (mpfr_srcptr); +--- mpfr-4.1.0/src/mpfr.h.orig 2021-02-11 12:46:49.115316335 +0000 ++++ mpfr-4.1.0/src/mpfr.h 2021-02-11 12:48:27.366242791 +0000 +@@ -27,7 +27,7 @@ + #define MPFR_VERSION_MAJOR 4 + #define MPFR_VERSION_MINOR 1 + #define MPFR_VERSION_PATCHLEVEL 0 +-#define MPFR_VERSION_STRING "4.1.0-p3" ++#define MPFR_VERSION_STRING "4.1.0-p4" + + /* User macros: + MPFR_USE_FILE: Define it to make MPFR define functions dealing +@@ -781,8 +781,8 @@ + __MPFR_DECLSPEC int mpfr_strtofr (mpfr_ptr, const char *, char **, int, + mpfr_rnd_t); + +-__MPFR_DECLSPEC void mpfr_round_nearest_away_begin (mpfr_t); +-__MPFR_DECLSPEC int mpfr_round_nearest_away_end (mpfr_t, int); ++__MPFR_DECLSPEC void mpfr_round_nearest_away_begin (mpfr_ptr); ++__MPFR_DECLSPEC int mpfr_round_nearest_away_end (mpfr_ptr, int); + + __MPFR_DECLSPEC size_t mpfr_custom_get_size (mpfr_prec_t); + __MPFR_DECLSPEC void mpfr_custom_init (void *, mpfr_prec_t); +@@ -1080,10 +1080,12 @@ + #define mpfr_set_uj_2exp __gmpfr_set_uj_2exp + #define mpfr_get_sj __gmpfr_mpfr_get_sj + #define mpfr_get_uj __gmpfr_mpfr_get_uj +-__MPFR_DECLSPEC int mpfr_set_sj (mpfr_t, intmax_t, mpfr_rnd_t); +-__MPFR_DECLSPEC int mpfr_set_sj_2exp (mpfr_t, intmax_t, intmax_t, mpfr_rnd_t); +-__MPFR_DECLSPEC int mpfr_set_uj (mpfr_t, uintmax_t, mpfr_rnd_t); +-__MPFR_DECLSPEC int mpfr_set_uj_2exp (mpfr_t, uintmax_t, intmax_t, mpfr_rnd_t); ++__MPFR_DECLSPEC int mpfr_set_sj (mpfr_ptr, intmax_t, mpfr_rnd_t); ++__MPFR_DECLSPEC int mpfr_set_sj_2exp (mpfr_ptr, intmax_t, intmax_t, ++ mpfr_rnd_t); ++__MPFR_DECLSPEC int mpfr_set_uj (mpfr_ptr, uintmax_t, mpfr_rnd_t); ++__MPFR_DECLSPEC int mpfr_set_uj_2exp (mpfr_ptr, uintmax_t, intmax_t, ++ mpfr_rnd_t); + __MPFR_DECLSPEC intmax_t mpfr_get_sj (mpfr_srcptr, mpfr_rnd_t); + __MPFR_DECLSPEC uintmax_t mpfr_get_uj (mpfr_srcptr, mpfr_rnd_t); + +--- mpfr-4.1.0/src/nrandom.c.orig 2020-01-08 18:11:13.000000000 +0000 ++++ mpfr-4.1.0/src/nrandom.c 2021-02-11 12:48:27.354242922 +0000 +@@ -155,7 +155,7 @@ + + /* return a normal random deviate with mean 0 and variance 1 as a MPFR */ + int +-mpfr_nrandom (mpfr_t z, gmp_randstate_t r, mpfr_rnd_t rnd) ++mpfr_nrandom (mpfr_ptr z, gmp_randstate_t r, mpfr_rnd_t rnd) + { + mpfr_random_deviate_t x, p, q; + int inex; +--- mpfr-4.1.0/src/pool.c.orig 2020-01-08 18:11:13.000000000 +0000 ++++ mpfr-4.1.0/src/pool.c 2021-02-11 12:48:27.354242922 +0000 +@@ -35,7 +35,7 @@ + static MPFR_THREAD_ATTR __mpz_struct mpz_tab[MPFR_POOL_NENTRIES]; + + MPFR_HOT_FUNCTION_ATTR void +-mpfr_mpz_init (mpz_t z) ++mpfr_mpz_init (mpz_ptr z) + { + if (MPFR_LIKELY (n_alloc > 0)) + { +@@ -54,7 +54,7 @@ + } + + MPFR_HOT_FUNCTION_ATTR void +-mpfr_mpz_init2 (mpz_t z, mp_bitcnt_t n) ++mpfr_mpz_init2 (mpz_ptr z, mp_bitcnt_t n) + { + /* The condition on n is used below as the argument n will be ignored if + the mpz_t is obtained from the MPFR stack of previously used mpz_t. +@@ -82,7 +82,7 @@ + + + MPFR_HOT_FUNCTION_ATTR void +-mpfr_mpz_clear (mpz_t z) ++mpfr_mpz_clear (mpz_ptr z) + { + /* We only put objects with at most MPFR_POOL_MAX_SIZE in the mpz_t pool, + to avoid it takes too much memory (and anyway the speedup is mainly +--- mpfr-4.1.0/src/random_deviate.c.orig 2021-02-11 12:43:51.789257562 +0000 ++++ mpfr-4.1.0/src/random_deviate.c 2021-02-11 12:48:27.354242922 +0000 +@@ -64,7 +64,7 @@ + + /* allocate and set to (0,1) */ + void +-mpfr_random_deviate_init (mpfr_random_deviate_t x) ++mpfr_random_deviate_init (mpfr_random_deviate_ptr x) + { + mpz_init (x->f); + x->e = 0; +@@ -72,21 +72,22 @@ + + /* reset to (0,1) */ + void +-mpfr_random_deviate_reset (mpfr_random_deviate_t x) ++mpfr_random_deviate_reset (mpfr_random_deviate_ptr x) + { + x->e = 0; + } + + /* deallocate */ + void +-mpfr_random_deviate_clear (mpfr_random_deviate_t x) ++mpfr_random_deviate_clear (mpfr_random_deviate_ptr x) + { + mpz_clear (x->f); + } + + /* swap two random deviates */ + void +-mpfr_random_deviate_swap (mpfr_random_deviate_t x, mpfr_random_deviate_t y) ++mpfr_random_deviate_swap (mpfr_random_deviate_ptr x, ++ mpfr_random_deviate_ptr y) + { + mpfr_random_size_t s; + unsigned long t; +@@ -107,7 +108,7 @@ + + /* ensure x has at least k bits */ + static void +-random_deviate_generate (mpfr_random_deviate_t x, mpfr_random_size_t k, ++random_deviate_generate (mpfr_random_deviate_ptr x, mpfr_random_size_t k, + gmp_randstate_t r, mpz_t t) + { + /* Various compile time checks on mpfr_random_deviate_t */ +@@ -223,7 +224,7 @@ + + /* return position of leading bit, counting from 1 */ + static mpfr_random_size_t +-random_deviate_leading_bit (mpfr_random_deviate_t x, gmp_randstate_t r) ++random_deviate_leading_bit (mpfr_random_deviate_ptr x, gmp_randstate_t r) + { + mpfr_random_size_t l; + random_deviate_generate (x, W, r, 0); +@@ -243,7 +244,7 @@ + + /* return kth bit of fraction, representing 2^-k */ + int +-mpfr_random_deviate_tstbit (mpfr_random_deviate_t x, mpfr_random_size_t k, ++mpfr_random_deviate_tstbit (mpfr_random_deviate_ptr x, mpfr_random_size_t k, + gmp_randstate_t r) + { + if (k == 0) +@@ -256,7 +257,8 @@ + + /* compare two random deviates, x < y */ + int +-mpfr_random_deviate_less (mpfr_random_deviate_t x, mpfr_random_deviate_t y, ++mpfr_random_deviate_less (mpfr_random_deviate_ptr x, ++ mpfr_random_deviate_ptr y, + gmp_randstate_t r) + { + mpfr_random_size_t k = 1; +@@ -280,7 +282,7 @@ + /* set mpfr_t z = (neg ? -1 : 1) * (n + x) */ + int + mpfr_random_deviate_value (int neg, unsigned long n, +- mpfr_random_deviate_t x, mpfr_t z, ++ mpfr_random_deviate_ptr x, mpfr_ptr z, + gmp_randstate_t r, mpfr_rnd_t rnd) + { + /* r is used to add as many bits as necessary to match the precision of z */ +--- mpfr-4.1.0/src/random_deviate.h.orig 2020-01-08 18:11:13.000000000 +0000 ++++ mpfr-4.1.0/src/random_deviate.h 2021-02-11 12:48:27.354242922 +0000 +@@ -76,7 +76,7 @@ + /* set mpfr_t z = (neg ? -1 : 1) * (n + x) */ + __MPFR_DECLSPEC int + mpfr_random_deviate_value (int, unsigned long, +- mpfr_random_deviate_ptr, mpfr_t, ++ mpfr_random_deviate_ptr, mpfr_ptr, + gmp_randstate_t, mpfr_rnd_t); + + #if defined(__cplusplus) +--- mpfr-4.1.0/src/rndna.c.orig 2020-01-08 18:11:13.000000000 +0000 ++++ mpfr-4.1.0/src/rndna.c 2021-02-11 12:48:27.354242922 +0000 +@@ -61,7 +61,7 @@ + and prepares rop to give it one more bit of precision + and to save its old value within it. */ + void +-mpfr_round_nearest_away_begin (mpfr_t rop) ++mpfr_round_nearest_away_begin (mpfr_ptr rop) + { + mpfr_t tmp; + mp_size_t xsize; +@@ -129,7 +129,7 @@ + copying it back the result of the applied function + and performing additional roundings. */ + int +-mpfr_round_nearest_away_end (mpfr_t rop, int inex) ++mpfr_round_nearest_away_end (mpfr_ptr rop, int inex) + { + mpfr_t tmp; + mp_size_t xsize; +--- mpfr-4.1.0/src/set_sj.c.orig 2020-06-01 10:39:52.000000000 +0000 ++++ mpfr-4.1.0/src/set_sj.c 2021-02-11 12:48:27.354242922 +0000 +@@ -26,13 +26,13 @@ + #ifdef _MPFR_H_HAVE_INTMAX_T + + int +-mpfr_set_sj (mpfr_t x, intmax_t j, mpfr_rnd_t rnd) ++mpfr_set_sj (mpfr_ptr x, intmax_t j, mpfr_rnd_t rnd) + { + return mpfr_set_sj_2exp (x, j, 0, rnd); + } + + int +-mpfr_set_sj_2exp (mpfr_t x, intmax_t j, intmax_t e, mpfr_rnd_t rnd) ++mpfr_set_sj_2exp (mpfr_ptr x, intmax_t j, intmax_t e, mpfr_rnd_t rnd) + { + if (j >= 0) + return mpfr_set_uj_2exp (x, j, e, rnd); +--- mpfr-4.1.0/src/set_str.c.orig 2020-01-08 18:11:13.000000000 +0000 ++++ mpfr-4.1.0/src/set_str.c 2021-02-11 12:48:27.354242922 +0000 +@@ -23,7 +23,7 @@ + #include "mpfr-impl.h" + + int +-mpfr_set_str (mpfr_t x, const char *str, int base, mpfr_rnd_t rnd) ++mpfr_set_str (mpfr_ptr x, const char *str, int base, mpfr_rnd_t rnd) + { + char *p; + +--- mpfr-4.1.0/src/set_uj.c.orig 2020-06-01 10:39:52.000000000 +0000 ++++ mpfr-4.1.0/src/set_uj.c 2021-02-11 12:48:27.354242922 +0000 +@@ -29,13 +29,13 @@ + #define uintmaxpml (sizeof(uintmax_t) / sizeof(mp_limb_t)) + + int +-mpfr_set_uj (mpfr_t x, uintmax_t j, mpfr_rnd_t rnd) ++mpfr_set_uj (mpfr_ptr x, uintmax_t j, mpfr_rnd_t rnd) + { + return mpfr_set_uj_2exp (x, j, 0, rnd); + } + + int +-mpfr_set_uj_2exp (mpfr_t x, uintmax_t j, intmax_t e, mpfr_rnd_t rnd) ++mpfr_set_uj_2exp (mpfr_ptr x, uintmax_t j, intmax_t e, mpfr_rnd_t rnd) + { + int cnt, inex; + mp_size_t i, k; +--- mpfr-4.1.0/src/sin_cos.c.orig 2020-01-08 18:11:13.000000000 +0000 ++++ mpfr-4.1.0/src/sin_cos.c 2021-02-11 12:48:27.354242922 +0000 +@@ -463,7 +463,7 @@ + Return err such that the relative error is bounded by 2^err ulps. + */ + static int +-sincos_aux (mpfr_t s, mpfr_t c, mpfr_srcptr x, mpfr_rnd_t rnd_mode) ++sincos_aux (mpfr_ptr s, mpfr_ptr c, mpfr_srcptr x, mpfr_rnd_t rnd_mode) + { + mpfr_prec_t prec_s, sh; + mpz_t Q, S, C, Q2, S2, C2, y; +@@ -577,7 +577,7 @@ + Assumes s differs from c. + */ + int +-mpfr_sincos_fast (mpfr_t s, mpfr_t c, mpfr_srcptr x, mpfr_rnd_t rnd) ++mpfr_sincos_fast (mpfr_ptr s, mpfr_ptr c, mpfr_srcptr x, mpfr_rnd_t rnd) + { + int inexs, inexc; + mpfr_t x_red, ts, tc; +--- mpfr-4.1.0/src/strtofr.c.orig 2020-01-08 18:11:13.000000000 +0000 ++++ mpfr-4.1.0/src/strtofr.c 2021-02-11 12:48:27.354242922 +0000 +@@ -226,7 +226,7 @@ + BUT if it returns 0 (NAN or INF), the ternary value is also '0' + (ie NAN and INF are exact) */ + static int +-parse_string (mpfr_t x, struct parsed_string *pstr, ++parse_string (mpfr_ptr x, struct parsed_string *pstr, + const char **string, int base) + { + const char *str = *string; +@@ -451,7 +451,7 @@ + and the precision of x. + Returns the ternary value. */ + static int +-parsed_string_to_mpfr (mpfr_t x, struct parsed_string *pstr, mpfr_rnd_t rnd) ++parsed_string_to_mpfr (mpfr_ptr x, struct parsed_string *pstr, mpfr_rnd_t rnd) + { + mpfr_prec_t precx, prec, ysize_bits, pstr_size; + mpfr_exp_t exp; +@@ -934,7 +934,7 @@ + } + + int +-mpfr_strtofr (mpfr_t x, const char *string, char **end, int base, ++mpfr_strtofr (mpfr_ptr x, const char *string, char **end, int base, + mpfr_rnd_t rnd) + { + int res; +--- mpfr-4.1.0/src/vasprintf.c.orig 2020-06-01 10:39:52.000000000 +0000 ++++ mpfr-4.1.0/src/vasprintf.c 2021-02-11 12:48:27.354242922 +0000 +@@ -963,7 +963,7 @@ + #define NDIGITS 8 + + MPFR_RETURNS_NONNULL static char * +-mpfr_get_str_wrapper (mpfr_exp_t *exp, int base, size_t n, const mpfr_t op, ++mpfr_get_str_wrapper (mpfr_exp_t *exp, int base, size_t n, mpfr_srcptr op, + const struct printf_spec spec) + { + size_t ndigits; +--- mpfr-4.1.0/src/version.c.orig 2021-02-11 12:46:49.115316335 +0000 ++++ mpfr-4.1.0/src/version.c 2021-02-11 12:48:27.370242746 +0000 +@@ -25,5 +25,5 @@ + const char * + mpfr_get_version (void) + { +- return "4.1.0-p3"; ++ return "4.1.0-p4"; + } +--- mpfr-4.1.0/src/zeta.c.orig 2020-01-08 18:11:13.000000000 +0000 ++++ mpfr-4.1.0/src/zeta.c 2021-02-11 12:48:27.354242922 +0000 +@@ -35,7 +35,7 @@ + sum(tc[i]*product((s+2j)*(s+2j-1)/n^2,j=1..i-1), i=1..p)*s*n^(-s-1) + */ + static void +-mpfr_zeta_part_b (mpfr_t b, mpfr_srcptr s, int n, int p, mpfr_t *tc) ++mpfr_zeta_part_b (mpfr_ptr b, mpfr_srcptr s, int n, int p, mpfr_t *tc) + { + mpfr_t s1, d, u; + unsigned long n2; +@@ -130,7 +130,7 @@ + n - an integer + Output: sum - a floating-point number approximating sum(1/i^s, i=1..n-1) */ + static void +-mpfr_zeta_part_a (mpfr_t sum, mpfr_srcptr s, int n) ++mpfr_zeta_part_a (mpfr_ptr sum, mpfr_srcptr s, int n) + { + mpfr_t u, s1; + int i; +@@ -158,7 +158,7 @@ + Output: z - Zeta(s) rounded to the precision of z with direction rnd_mode + */ + static int +-mpfr_zeta_pos (mpfr_t z, mpfr_srcptr s, mpfr_rnd_t rnd_mode) ++mpfr_zeta_pos (mpfr_ptr z, mpfr_srcptr s, mpfr_rnd_t rnd_mode) + { + mpfr_t b, c, z_pre, f, s1; + double beta, sd, dnep; +@@ -356,8 +356,8 @@ + At input, p is Pi rounded down. + The comments in the code are for rnd = RNDD. */ + static void +-mpfr_reflection_overflow (mpfr_t z, mpfr_t s1, const mpfr_t s, mpfr_t y, +- mpfr_t p, mpfr_rnd_t rnd) ++mpfr_reflection_overflow (mpfr_ptr z, mpfr_ptr s1, mpfr_srcptr s, mpfr_ptr y, ++ mpfr_ptr p, mpfr_rnd_t rnd) + { + mpz_t sint; + +@@ -432,7 +432,7 @@ + } + + int +-mpfr_zeta (mpfr_t z, mpfr_srcptr s, mpfr_rnd_t rnd_mode) ++mpfr_zeta (mpfr_ptr z, mpfr_srcptr s, mpfr_rnd_t rnd_mode) + { + mpfr_t z_pre, s1, y, p; + long add; +--- mpfr-4.1.0/tests/tcmp2.c.orig 2020-01-08 18:11:13.000000000 +0000 ++++ mpfr-4.1.0/tests/tcmp2.c 2021-02-11 12:48:27.350242965 +0000 +@@ -24,7 +24,7 @@ + + /* set bit n of x to b, where bit 0 is the most significant one */ + static void +-set_bit (mpfr_t x, unsigned int n, int b) ++set_bit (mpfr_ptr x, unsigned int n, int b) + { + unsigned l; + mp_size_t xn; +--- mpfr-4.1.0/tests/tdiv.c.orig 2020-01-08 18:11:13.000000000 +0000 ++++ mpfr-4.1.0/tests/tdiv.c 2021-02-11 12:48:27.350242965 +0000 +@@ -369,7 +369,7 @@ + /* given y = o(x/u), x, u, find the inexact flag by + multiplying y by u */ + static int +-get_inexact (mpfr_t y, mpfr_t x, mpfr_t u) ++get_inexact (mpfr_ptr y, mpfr_ptr x, mpfr_ptr u) + { + mpfr_t xx; + int inex; +--- mpfr-4.1.0/tests/teq.c.orig 2020-01-08 18:11:13.000000000 +0000 ++++ mpfr-4.1.0/tests/teq.c 2021-02-11 12:48:27.350242965 +0000 +@@ -23,7 +23,7 @@ + #include "mpfr-test.h" + + static void +-teq (mpfr_t x) ++teq (mpfr_ptr x) + { + mpfr_t y; + unsigned long k, px, mx; +--- mpfr-4.1.0/tests/terandom_chisq.c.orig 2020-01-08 18:11:13.000000000 +0000 ++++ mpfr-4.1.0/tests/terandom_chisq.c 2021-02-11 12:48:27.350242965 +0000 +@@ -26,7 +26,7 @@ + * exponential distribution. We only take differences of this function so the + * offset doesn't matter; here Phi(0) = 0. */ + static void +-exponential_cumulative (mpfr_t z, mpfr_t x, mpfr_rnd_t rnd) ++exponential_cumulative (mpfr_ptr z, mpfr_ptr x, mpfr_rnd_t rnd) + { + mpfr_neg (z, x, rnd); + mpfr_expm1 (z, z, rnd); +@@ -43,7 +43,7 @@ + * TAOCP, Vol 2, 3.3.1, Table 1. It more accurate than the similar formula, + * DLMF 8.11.10. */ + static void +-chisq_prob (mpfr_t q, long nu, mpfr_t chisqp) ++chisq_prob (mpfr_ptr q, long nu, mpfr_ptr chisqp) + { + mpfr_t t; + mpfr_rnd_t rnd; +@@ -170,7 +170,7 @@ + * this function. low precision means prec = 2, 3, or 4. High values of + * precision will result in integer overflow. */ + static long +-sequential (mpfr_t x) ++sequential (mpfr_ptr x) + { + long expt, prec; + +--- mpfr-4.1.0/tests/tfmma.c.orig 2020-03-24 13:47:38.000000000 +0000 ++++ mpfr-4.1.0/tests/tfmma.c 2021-02-11 12:48:27.350242965 +0000 +@@ -24,7 +24,7 @@ + + /* check both mpfr_fmma and mpfr_fmms */ + static void +-random_test (mpfr_t a, mpfr_t b, mpfr_t c, mpfr_t d, mpfr_rnd_t rnd) ++random_test (mpfr_ptr a, mpfr_ptr b, mpfr_ptr c, mpfr_ptr d, mpfr_rnd_t rnd) + { + mpfr_t ref, res, ab, cd; + int inex_ref, inex_res; +--- mpfr-4.1.0/tests/tfmod.c.orig 2020-01-08 18:11:13.000000000 +0000 ++++ mpfr-4.1.0/tests/tfmod.c 2021-02-11 12:48:27.350242965 +0000 +@@ -62,8 +62,8 @@ + } + + static void +-test_failed (mpfr_t erem, mpfr_t grem, int eret, int gret, mpfr_t x, mpfr_t y, +- mpfr_rnd_t rnd) ++test_failed (mpfr_ptr erem, mpfr_ptr grem, int eret, int gret, ++ mpfr_ptr x, mpfr_ptr y, mpfr_rnd_t rnd) + { + printf ("error: mpfr_fmod (r, x, y, rnd)\n x = "); + mpfr_out_str (stdout, 10, 0, x, MPFR_RNDD); +@@ -83,7 +83,7 @@ + } + + static void +-check (mpfr_t r0, mpfr_t x, mpfr_t y, mpfr_rnd_t rnd) ++check (mpfr_ptr r0, mpfr_ptr x, mpfr_ptr y, mpfr_rnd_t rnd) + { + int inex0, inex1; + mpfr_t r1; +--- mpfr-4.1.0/tests/tfprintf.c.orig 2020-06-01 10:39:52.000000000 +0000 ++++ mpfr-4.1.0/tests/tfprintf.c 2021-02-11 12:48:27.350242965 +0000 +@@ -65,7 +65,7 @@ + const int prec_max_printf = 5000; + + static void +-check (FILE *fout, const char *fmt, mpfr_t x) ++check (FILE *fout, const char *fmt, mpfr_ptr x) + { + if (mpfr_fprintf (fout, fmt, x) == -1) + { +--- mpfr-4.1.0/tests/tgamma.c.orig 2020-06-01 00:15:37.000000000 +0000 ++++ mpfr-4.1.0/tests/tgamma.c 2021-02-11 12:48:27.350242965 +0000 +@@ -890,7 +890,7 @@ + computing with a working precision p2. Assume that x is not an + integer <= 2. */ + static void +-exp_lgamma (mpfr_t x, mpfr_prec_t p1, mpfr_prec_t p2) ++exp_lgamma (mpfr_ptr x, mpfr_prec_t p1, mpfr_prec_t p2) + { + mpfr_t yd, yu, zd, zu; + int inexd, inexu, sign; +--- mpfr-4.1.0/tests/tnrandom_chisq.c.orig 2020-01-08 18:11:13.000000000 +0000 ++++ mpfr-4.1.0/tests/tnrandom_chisq.c 2021-02-11 12:48:27.350242965 +0000 +@@ -26,7 +26,7 @@ + * for the normal distribution. We only take differences of this function so + * the offset doesn't matter; here Phi(0) = 0. */ + static void +-normal_cumulative (mpfr_t z, mpfr_t x, mpfr_rnd_t rnd) ++normal_cumulative (mpfr_ptr z, mpfr_ptr x, mpfr_rnd_t rnd) + { + mpfr_sqrt_ui (z, 2, rnd); + mpfr_div (z, x, z, rnd); +@@ -44,7 +44,7 @@ + * TAOCP, Vol 2, 3.3.1, Table 1. It more accurate than the similar formula, + * DLMF 8.11.10. */ + static void +-chisq_prob (mpfr_t q, long nu, mpfr_t chisqp) ++chisq_prob (mpfr_ptr q, long nu, mpfr_ptr chisqp) + { + mpfr_t t; + mpfr_rnd_t rnd; +@@ -166,7 +166,7 @@ + * this function. low precision means prec = 2, 3, or 4. High values of + * precision will result in integer overflow. */ + static long +-sequential (mpfr_t x) ++sequential (mpfr_ptr x) + { + long expt, prec; + +--- mpfr-4.1.0/tests/tprintf.c.orig 2020-06-01 10:39:52.000000000 +0000 ++++ mpfr-4.1.0/tests/tprintf.c 2021-02-11 12:48:27.350242965 +0000 +@@ -74,7 +74,7 @@ + int stdout_redirect; + + static void +-check (const char *fmt, mpfr_t x) ++check (const char *fmt, mpfr_ptr x) + { + if (mpfr_printf (fmt, x) == -1) + { +--- mpfr-4.1.0/tests/trint.c.orig 2020-02-12 13:04:50.000000000 +0000 ++++ mpfr-4.1.0/tests/trint.c 2021-02-11 12:48:27.350242965 +0000 +@@ -367,7 +367,7 @@ + #endif + + static void +-err (const char *str, mp_size_t s, mpfr_t x, mpfr_t y, mpfr_prec_t p, ++err (const char *str, mp_size_t s, mpfr_ptr x, mpfr_ptr y, mpfr_prec_t p, + mpfr_rnd_t r, int trint, int inexact) + { + printf ("Error: %s\ns = %u, p = %u, r = %s, trint = %d, inexact = %d\nx = ", +--- mpfr-4.1.0/tests/tsinh_cosh.c.orig 2020-01-08 18:11:13.000000000 +0000 ++++ mpfr-4.1.0/tests/tsinh_cosh.c 2021-02-11 12:48:27.350242965 +0000 +@@ -23,7 +23,7 @@ + #include "mpfr-test.h" + + static void +-failed (mpfr_t x, mpfr_t esh, mpfr_t gsh, mpfr_t ech, mpfr_t gch) ++failed (mpfr_ptr x, mpfr_ptr esh, mpfr_ptr gsh, mpfr_ptr ech, mpfr_ptr gch) + { + printf ("error : mpfr_sinh_cosh (x) x = "); + mpfr_out_str (stdout, 10, 0, x, MPFR_RNDD); +@@ -43,7 +43,7 @@ + + /* check against sinh, cosh */ + static void +-check (mpfr_t x, mpfr_rnd_t rnd) ++check (mpfr_ptr x, mpfr_rnd_t rnd) + { + mpfr_t s, c, sx, cx; + int isc, is, ic; +--- mpfr-4.1.0/tests/tsqr.c.orig 2020-01-08 18:11:13.000000000 +0000 ++++ mpfr-4.1.0/tests/tsqr.c 2021-02-11 12:48:27.350242965 +0000 +@@ -33,7 +33,7 @@ + + static void + error1 (mpfr_rnd_t rnd, mpfr_prec_t prec, +- mpfr_t in, mpfr_t outmul, mpfr_t outsqr) ++ mpfr_t in, mpfr_ptr outmul, mpfr_ptr outsqr) + { + printf("ERROR: for %s and prec=%lu\nINPUT=", mpfr_print_rnd_mode(rnd), + (unsigned long) prec); +@@ -44,7 +44,7 @@ + } + + static void +-error2 (mpfr_rnd_t rnd, mpfr_prec_t prec, mpfr_t in, mpfr_t out, ++error2 (mpfr_rnd_t rnd, mpfr_prec_t prec, mpfr_ptr in, mpfr_ptr out, + int inexactmul, int inexactsqr) + { + printf("ERROR: for %s and prec=%lu\nINPUT=", mpfr_print_rnd_mode(rnd), +--- mpfr-4.1.0/tests/tsum.c.orig 2020-01-08 18:11:13.000000000 +0000 ++++ mpfr-4.1.0/tests/tsum.c 2021-02-11 12:48:27.350242965 +0000 +@@ -59,7 +59,7 @@ + } + + static void +-get_exact_sum (mpfr_t sum, mpfr_t *tab, int n) ++get_exact_sum (mpfr_ptr sum, mpfr_t *tab, int n) + { + int i; + +@@ -1198,7 +1198,7 @@ + } + + static int +-mpfr_sum_naive (mpfr_t s, mpfr_t *x, int n, mpfr_rnd_t rnd) ++mpfr_sum_naive (mpfr_ptr s, mpfr_t *x, int n, mpfr_rnd_t rnd) + { + int ret, i; + switch (n) +--- mpfr-4.1.0/PATCHES.orig 2021-02-11 12:50:22.384987438 +0000 ++++ mpfr-4.1.0/PATCHES 2021-02-11 12:50:22.424987002 +0000 +@@ -0,0 +1 @@ ++digamma-hugemem +--- mpfr-4.1.0/VERSION.orig 2021-02-11 12:48:27.370242746 +0000 ++++ mpfr-4.1.0/VERSION 2021-02-11 12:50:22.424987002 +0000 +@@ -1 +1 @@ +-4.1.0-p4 ++4.1.0-p5 +--- mpfr-4.1.0/src/digamma.c.orig 2020-06-18 17:17:18.000000000 +0000 ++++ mpfr-4.1.0/src/digamma.c 2021-02-11 12:50:22.412987133 +0000 +@@ -214,19 +214,27 @@ + (("x[%Pu]=%.*Rg rnd=%d", mpfr_get_prec(x), mpfr_log_prec, x, rnd_mode), + ("y[%Pu]=%.*Rg inexact=%d", mpfr_get_prec(y), mpfr_log_prec, y, inex)); + +- /* compute a precision q such that x+1 is exact */ +- if (MPFR_PREC(x) < MPFR_GET_EXP(x)) +- q = MPFR_EXP(x); +- else +- q = MPFR_PREC(x) + 1; +- +- /* for very large x, use |digamma(x) - log(x)| < 1/x < 2^(1-EXP(x)) */ +- if (MPFR_PREC(y) + 10 < MPFR_EXP(x)) ++ /* For very large x, use |digamma(x) - log(x)| < 1/x < 2^(1-EXP(x)). ++ However, for a fixed value of GUARD, MPFR_CAN_ROUND() might fail ++ with probability 1/2^GUARD, in which case the default code will ++ fail since it requires x+1 to be exact, thus a huge precision if ++ x is huge. There are two workarounds: ++ * either perform a Ziv's loop, by increasing GUARD at each step. ++ However, this might fail if x is moderately large, in which case ++ more terms of the asymptotic expansion would be needed. ++ * implement a full asymptotic expansion (with Ziv's loop). */ ++#define GUARD 30 ++ if (MPFR_PREC(y) + GUARD < MPFR_EXP(x)) + { + /* this ensures EXP(x) >= 3, thus x >= 4, thus log(x) > 1 */ +- mpfr_init2 (t, MPFR_PREC(y) + 10); +- mpfr_log (t, x, MPFR_RNDZ); +- if (MPFR_CAN_ROUND (t, MPFR_PREC(y) + 10, MPFR_PREC(y), rnd_mode)) ++ mpfr_init2 (t, MPFR_PREC(y) + GUARD); ++ mpfr_log (t, x, MPFR_RNDN); ++ /* |t - digamma(x)| <= 1/2*ulp(t) + |digamma(x) - log(x)| ++ <= 1/2*ulp(t) + 2^(1-EXP(x)) ++ <= 1/2*ulp(t) + 2^(-PREC(y)-GUARD) ++ <= ulp(t) ++ since |t| >= 1 thus ulp(t) >= 2^(1-PREC(y)-GUARD) */ ++ if (MPFR_CAN_ROUND (t, MPFR_PREC(y) + GUARD, MPFR_PREC(y), rnd_mode)) + { + inex = mpfr_set (y, t, rnd_mode); + mpfr_clear (t); +@@ -235,6 +243,21 @@ + mpfr_clear (t); + } + ++ /* compute a precision q such that x+1 is exact */ ++ if (MPFR_PREC(x) < MPFR_GET_EXP(x)) ++ { ++ /* The goal of the first assertion is to let the compiler ignore ++ the second one when MPFR_EMAX_MAX <= MPFR_PREC_MAX. */ ++ MPFR_ASSERTD (MPFR_EXP(x) <= MPFR_EMAX_MAX); ++ MPFR_ASSERTN (MPFR_EXP(x) <= MPFR_PREC_MAX); ++ q = MPFR_EXP(x); ++ } ++ else ++ q = MPFR_PREC(x) + 1; ++ ++ /* FIXME: q can be much too large, e.g. equal to the maximum exponent! */ ++ MPFR_LOG_MSG (("q=%Pu\n", q)); ++ + mpfr_init2 (x_plus_j, q); + + mpfr_init2 (t, p); +--- mpfr-4.1.0/src/mpfr.h.orig 2021-02-11 12:48:27.366242791 +0000 ++++ mpfr-4.1.0/src/mpfr.h 2021-02-11 12:50:22.424987002 +0000 +@@ -27,7 +27,7 @@ + #define MPFR_VERSION_MAJOR 4 + #define MPFR_VERSION_MINOR 1 + #define MPFR_VERSION_PATCHLEVEL 0 +-#define MPFR_VERSION_STRING "4.1.0-p4" ++#define MPFR_VERSION_STRING "4.1.0-p5" + + /* User macros: + MPFR_USE_FILE: Define it to make MPFR define functions dealing +--- mpfr-4.1.0/src/version.c.orig 2021-02-11 12:48:27.370242746 +0000 ++++ mpfr-4.1.0/src/version.c 2021-02-11 12:50:22.424987002 +0000 +@@ -25,5 +25,5 @@ + const char * + mpfr_get_version (void) + { +- return "4.1.0-p4"; ++ return "4.1.0-p5"; + } +--- mpfr-4.1.0/tests/tdigamma.c.orig 2020-06-18 17:17:18.000000000 +0000 ++++ mpfr-4.1.0/tests/tdigamma.c 2021-02-11 12:50:22.412987133 +0000 +@@ -49,12 +49,54 @@ + mpfr_clear (y); + } + ++/* With some GMP_CHECK_RANDOMIZE values, test_generic triggers an error ++ tests_addsize(): too much memory (576460752303432776 bytes) ++ Each time on prec = 200, n = 3, xprec = 140. ++ The following test is a more general testcase. ++*/ ++static void ++bug20210206 (void) ++{ ++#define NPREC 4 ++ mpfr_t x, y[NPREC], z; ++ mpfr_exp_t emin, emax; ++ int i, precx, precy[NPREC] = { 200, 400, 520, 1416 }; ++ ++ emin = mpfr_get_emin (); ++ emax = mpfr_get_emax (); ++ set_emin (MPFR_EMIN_MIN); ++ set_emax (MPFR_EMAX_MAX); ++ ++ for (i = 0; i < NPREC; i++) ++ mpfr_init2 (y[i], precy[i]); ++ mpfr_init2 (z, precy[0]); ++ ++ for (precx = MPFR_PREC_MIN; precx < 150; precx++) ++ { ++ mpfr_init2 (x, precx); ++ mpfr_setmax (x, __gmpfr_emax); ++ for (i = 0; i < NPREC; i++) ++ mpfr_digamma (y[i], x, MPFR_RNDA); ++ mpfr_set (z, y[1], MPFR_RNDA); ++ MPFR_ASSERTN (mpfr_equal_p (y[0], z)); ++ mpfr_clear (x); ++ } ++ ++ for (i = 0; i < NPREC; i++) ++ mpfr_clear (y[i]); ++ mpfr_clear (z); ++ ++ set_emin (emin); ++ set_emax (emax); ++} ++ + int + main (int argc, char *argv[]) + { + tests_start_mpfr (); + + special (); ++ bug20210206 (); + + test_generic (MPFR_PREC_MIN, 200, 20); + +--- mpfr-4.1.0/PATCHES.orig 2021-02-11 12:52:52.519350662 +0000 ++++ mpfr-4.1.0/PATCHES 2021-02-11 12:52:52.563350183 +0000 +@@ -0,0 +1 @@ ++digamma-interm-zero +--- mpfr-4.1.0/VERSION.orig 2021-02-11 12:50:22.424987002 +0000 ++++ mpfr-4.1.0/VERSION 2021-02-11 12:52:52.563350183 +0000 +@@ -1 +1 @@ +-4.1.0-p5 ++4.1.0-p6 +--- mpfr-4.1.0/src/digamma.c.orig 2021-02-11 12:50:22.412987133 +0000 ++++ mpfr-4.1.0/src/digamma.c 2021-02-11 12:52:52.547350357 +0000 +@@ -296,21 +296,26 @@ + errt = mpfr_digamma_approx (t, x_plus_j); + expt = MPFR_GET_EXP (t); + mpfr_sub (t, t, u, MPFR_RNDN); +- if (MPFR_GET_EXP (t) < expt) +- errt += expt - MPFR_EXP(t); +- /* Warning: if u is zero (which happens when x_plus_j >= min at the +- beginning of the while loop above), EXP(u) is not defined. +- In this case we have no error from u. */ +- if (MPFR_NOTZERO(u) && MPFR_GET_EXP (t) < MPFR_GET_EXP (u)) +- erru += MPFR_EXP(u) - MPFR_EXP(t); +- if (errt > erru) +- errt = errt + 1; +- else if (errt == erru) +- errt = errt + 2; +- else +- errt = erru + 1; +- if (MPFR_CAN_ROUND (t, p - errt, MPFR_PREC(y), rnd_mode)) +- break; ++ /* Warning! t may be zero (more likely in small precision). Note ++ that in this case, this is an exact zero, not an underflow. */ ++ if (MPFR_NOTZERO(t)) ++ { ++ if (MPFR_GET_EXP (t) < expt) ++ errt += expt - MPFR_EXP(t); ++ /* Warning: if u is zero (which happens when x_plus_j >= min at the ++ beginning of the while loop above), EXP(u) is not defined. ++ In this case we have no error from u. */ ++ if (MPFR_NOTZERO(u) && MPFR_GET_EXP (t) < MPFR_GET_EXP (u)) ++ erru += MPFR_EXP(u) - MPFR_EXP(t); ++ if (errt > erru) ++ errt = errt + 1; ++ else if (errt == erru) ++ errt = errt + 2; ++ else ++ errt = erru + 1; ++ if (MPFR_CAN_ROUND (t, p - errt, MPFR_PREC(y), rnd_mode)) ++ break; ++ } + MPFR_ZIV_NEXT (loop, p); + mpfr_set_prec (t, p); + mpfr_set_prec (u, p); +--- mpfr-4.1.0/src/mpfr.h.orig 2021-02-11 12:50:22.424987002 +0000 ++++ mpfr-4.1.0/src/mpfr.h 2021-02-11 12:52:52.559350226 +0000 +@@ -27,7 +27,7 @@ + #define MPFR_VERSION_MAJOR 4 + #define MPFR_VERSION_MINOR 1 + #define MPFR_VERSION_PATCHLEVEL 0 +-#define MPFR_VERSION_STRING "4.1.0-p5" ++#define MPFR_VERSION_STRING "4.1.0-p6" + + /* User macros: + MPFR_USE_FILE: Define it to make MPFR define functions dealing +--- mpfr-4.1.0/src/version.c.orig 2021-02-11 12:50:22.424987002 +0000 ++++ mpfr-4.1.0/src/version.c 2021-02-11 12:52:52.559350226 +0000 +@@ -25,5 +25,5 @@ + const char * + mpfr_get_version (void) + { +- return "4.1.0-p5"; ++ return "4.1.0-p6"; + } +--- mpfr-4.1.0/tests/tdigamma.c.orig 2021-02-11 12:50:22.412987133 +0000 ++++ mpfr-4.1.0/tests/tdigamma.c 2021-02-11 12:52:52.547350357 +0000 +@@ -90,6 +90,26 @@ + set_emax (emax); + } + ++/* another test that fails with GMP_CHECK_RANDOMIZE=1612741376857003 ++ on revision 14398 */ ++static void ++bug20210208 (void) ++{ ++ mpfr_t x, y; ++ int inex; ++ ++ mpfr_init2 (x, 73); ++ mpfr_init2 (y, 1); ++ mpfr_set_str (x, "1.4613470547060071827450", 10, MPFR_RNDN); ++ mpfr_clear_flags (); ++ inex = mpfr_digamma (y, x, MPFR_RNDU); ++ MPFR_ASSERTN (mpfr_cmp_si_2exp (y, -1, -12) == 0); ++ MPFR_ASSERTN (inex > 0); ++ MPFR_ASSERTN (__gmpfr_flags == MPFR_FLAGS_INEXACT); ++ mpfr_clear (x); ++ mpfr_clear (y); ++} ++ + int + main (int argc, char *argv[]) + { +@@ -97,6 +117,7 @@ + + special (); + bug20210206 (); ++ bug20210208 (); + + test_generic (MPFR_PREC_MIN, 200, 20); + +--- mpfr-4.1.0/PATCHES.orig 2021-02-11 12:53:38.382850990 +0000 ++++ mpfr-4.1.0/PATCHES 2021-02-11 12:53:38.426850512 +0000 +@@ -0,0 +1 @@ ++jn-interm-zero +--- mpfr-4.1.0/VERSION.orig 2021-02-11 12:52:52.563350183 +0000 ++++ mpfr-4.1.0/VERSION 2021-02-11 12:53:38.426850512 +0000 +@@ -1 +1 @@ +-4.1.0-p6 ++4.1.0-p7 +--- mpfr-4.1.0/src/jyn_asympt.c.orig 2020-07-10 10:33:32.000000000 +0000 ++++ mpfr-4.1.0/src/jyn_asympt.c 2021-02-11 12:53:38.410850685 +0000 +@@ -69,6 +69,8 @@ + MPFR_ZIV_INIT (loop, w); + for (;;) + { ++ int ok = 1; ++ + mpfr_set_prec (c, w); + mpfr_init2 (s, w); + mpfr_init2 (P, w); +@@ -92,6 +94,13 @@ + /* now s approximates sin(z)+cos(z), and c approximates sin(z)-cos(z), + with total absolute error bounded by 2^(1-w). */ + ++ /* if s or c is zero, MPFR_GET_EXP will fail below */ ++ if (MPFR_IS_ZERO(s) || MPFR_IS_ZERO(c)) ++ { ++ ok = 0; ++ goto clear; ++ } ++ + /* precompute 1/(8|z|) */ + mpfr_si_div (iz, MPFR_IS_POS(z) ? 1 : -1, z, MPFR_RNDN); /* err <= 1 */ + mpfr_div_2ui (iz, iz, 3, MPFR_RNDN); +@@ -257,6 +266,9 @@ + err = (err >= err2) ? err + 1 : err2 + 1; + /* the absolute error on c is bounded by 2^(err - w) */ + ++ err -= MPFR_GET_EXP (c); ++ ++ clear: + mpfr_clear (s); + mpfr_clear (P); + mpfr_clear (Q); +@@ -266,8 +278,7 @@ + mpfr_clear (err_s); + mpfr_clear (err_u); + +- err -= MPFR_GET_EXP (c); +- if (MPFR_LIKELY (MPFR_CAN_ROUND (c, w - err, MPFR_PREC(res), r))) ++ if (ok && MPFR_LIKELY (MPFR_CAN_ROUND (c, w - err, MPFR_PREC(res), r))) + break; + if (diverge != 0) + { +--- mpfr-4.1.0/src/mpfr.h.orig 2021-02-11 12:52:52.559350226 +0000 ++++ mpfr-4.1.0/src/mpfr.h 2021-02-11 12:53:38.422850555 +0000 +@@ -27,7 +27,7 @@ + #define MPFR_VERSION_MAJOR 4 + #define MPFR_VERSION_MINOR 1 + #define MPFR_VERSION_PATCHLEVEL 0 +-#define MPFR_VERSION_STRING "4.1.0-p6" ++#define MPFR_VERSION_STRING "4.1.0-p7" + + /* User macros: + MPFR_USE_FILE: Define it to make MPFR define functions dealing +--- mpfr-4.1.0/src/version.c.orig 2021-02-11 12:52:52.559350226 +0000 ++++ mpfr-4.1.0/src/version.c 2021-02-11 12:53:38.426850512 +0000 +@@ -25,5 +25,5 @@ + const char * + mpfr_get_version (void) + { +- return "4.1.0-p6"; ++ return "4.1.0-p7"; + } +--- mpfr-4.1.0/tests/tj0.c.orig 2020-01-08 18:11:13.000000000 +0000 ++++ mpfr-4.1.0/tests/tj0.c 2021-02-11 12:53:38.410850685 +0000 +@@ -27,6 +27,25 @@ + #define REDUCE_EMAX 262143 /* otherwise arg. reduction is too expensive */ + #include "tgeneric.c" + ++/* bug found in revision 14399 with GMP_CHECK_RANDOMIZE=1612721106588971 */ ++static void ++bug20210208 (void) ++{ ++ mpfr_t x, y; ++ int inex; ++ ++ mpfr_init2 (x, 79); ++ mpfr_init2 (y, 1); ++ mpfr_set_str (x, "2.552495117262005805960565e+02", 10, MPFR_RNDN); ++ mpfr_clear_flags (); ++ inex = mpfr_j0 (y, x, MPFR_RNDZ); ++ MPFR_ASSERTN (mpfr_cmp_si_2exp (y, -1, -5) == 0); ++ MPFR_ASSERTN (inex > 0); ++ MPFR_ASSERTN (__gmpfr_flags == MPFR_FLAGS_INEXACT); ++ mpfr_clear (x); ++ mpfr_clear (y); ++} ++ + int + main (int argc, char *argv[]) + { +@@ -35,6 +54,8 @@ + + tests_start_mpfr (); + ++ bug20210208 (); ++ + mpfr_init (x); + mpfr_init (y); + +--- mpfr-4.1.0/PATCHES.orig 2021-02-17 17:22:34.594973310 +0000 ++++ mpfr-4.1.0/PATCHES 2021-02-17 17:22:34.702972090 +0000 +@@ -0,0 +1 @@ ++digamma-interm-zero2 +--- mpfr-4.1.0/VERSION.orig 2021-02-11 12:53:38.426850512 +0000 ++++ mpfr-4.1.0/VERSION 2021-02-17 17:22:34.702972090 +0000 +@@ -1 +1 @@ +-4.1.0-p7 ++4.1.0-p8 +--- mpfr-4.1.0/src/digamma.c.orig 2021-02-11 12:52:52.547350357 +0000 ++++ mpfr-4.1.0/src/digamma.c 2021-02-17 17:22:34.690972226 +0000 +@@ -173,16 +173,19 @@ + mpfr_digamma (v, u, MPFR_RNDN); /* error <= 1/2 ulp */ + expv = MPFR_GET_EXP (v); + mpfr_sub (v, v, t, MPFR_RNDN); +- if (MPFR_GET_EXP (v) < MPFR_GET_EXP (t)) +- e1 += MPFR_EXP(t) - MPFR_EXP(v); /* scale error for t wrt new v */ +- /* now take into account the 1/2 ulp error for v */ +- if (expv - MPFR_EXP(v) - 1 > e1) +- e1 = expv - MPFR_EXP(v) - 1; +- else +- e1 ++; +- e1 ++; /* rounding error for mpfr_sub */ +- if (MPFR_CAN_ROUND (v, p - e1, MPFR_PREC(y), rnd_mode)) +- break; ++ if (MPFR_NOTZERO(v)) ++ { ++ if (MPFR_GET_EXP (v) < MPFR_GET_EXP (t)) ++ e1 += MPFR_EXP(t) - MPFR_EXP(v); /* scale error for t wrt new v */ ++ /* now take into account the 1/2 ulp error for v */ ++ if (expv - MPFR_EXP(v) - 1 > e1) ++ e1 = expv - MPFR_EXP(v) - 1; ++ else ++ e1 ++; ++ e1 ++; /* rounding error for mpfr_sub */ ++ if (MPFR_CAN_ROUND (v, p - e1, MPFR_PREC(y), rnd_mode)) ++ break; ++ } + MPFR_ZIV_NEXT (loop, p); + mpfr_set_prec (t, p); + mpfr_set_prec (v, p); +@@ -416,10 +419,8 @@ + } + } + +- if (MPFR_IS_NEG(x)) +- inex = mpfr_digamma_reflection (y, x, rnd_mode); + /* if x < 1/2 we use the reflection formula */ +- else if (MPFR_EXP(x) < 0) ++ if (MPFR_IS_NEG(x) || MPFR_EXP(x) < 0) + inex = mpfr_digamma_reflection (y, x, rnd_mode); + else + inex = mpfr_digamma_positive (y, x, rnd_mode); +--- mpfr-4.1.0/src/mpfr.h.orig 2021-02-11 12:53:38.422850555 +0000 ++++ mpfr-4.1.0/src/mpfr.h 2021-02-17 17:22:34.702972090 +0000 +@@ -27,7 +27,7 @@ + #define MPFR_VERSION_MAJOR 4 + #define MPFR_VERSION_MINOR 1 + #define MPFR_VERSION_PATCHLEVEL 0 +-#define MPFR_VERSION_STRING "4.1.0-p7" ++#define MPFR_VERSION_STRING "4.1.0-p8" + + /* User macros: + MPFR_USE_FILE: Define it to make MPFR define functions dealing +--- mpfr-4.1.0/src/version.c.orig 2021-02-11 12:53:38.426850512 +0000 ++++ mpfr-4.1.0/src/version.c 2021-02-17 17:22:34.702972090 +0000 +@@ -25,5 +25,5 @@ + const char * + mpfr_get_version (void) + { +- return "4.1.0-p7"; ++ return "4.1.0-p8"; + } +--- mpfr-4.1.0/tests/tdigamma.c.orig 2021-02-11 12:52:52.547350357 +0000 ++++ mpfr-4.1.0/tests/tdigamma.c 2021-02-17 17:22:34.690972226 +0000 +@@ -110,6 +110,26 @@ + mpfr_clear (y); + } + ++/* another test that fails with GMP_CHECK_RANDOMIZE=1613197421465830 ++ on revision 14429 */ ++static void ++bug20210215 (void) ++{ ++ mpfr_t x, y; ++ int inex; ++ ++ mpfr_init2 (x, 510); ++ mpfr_init2 (y, 4); ++ mpfr_set_str (x, "-8.2923051438433494998166335341807999322052669984208422481227138906096000469898717007386115912802685588348601663465077353194268894939972221117314512518182580e+35", 10, MPFR_RNDN); ++ mpfr_clear_flags (); ++ inex = mpfr_digamma (y, x, MPFR_RNDU); ++ MPFR_ASSERTN (mpfr_cmp_ui0 (y, 88) == 0); ++ MPFR_ASSERTN (inex > 0); ++ MPFR_ASSERTN (__gmpfr_flags == MPFR_FLAGS_INEXACT); ++ mpfr_clear (x); ++ mpfr_clear (y); ++} ++ + int + main (int argc, char *argv[]) + { +@@ -118,6 +138,7 @@ + special (); + bug20210206 (); + bug20210208 (); ++ bug20210215 (); + + test_generic (MPFR_PREC_MIN, 200, 20); + +--- mpfr-4.1.0/PATCHES.orig 2021-02-17 17:25:46.396981483 +0000 ++++ mpfr-4.1.0/PATCHES 2021-02-17 17:25:46.440981068 +0000 +@@ -0,0 +1 @@ ++jyn_asympt-interm-zero +--- mpfr-4.1.0/VERSION.orig 2021-02-17 17:22:34.702972090 +0000 ++++ mpfr-4.1.0/VERSION 2021-02-17 17:25:46.440981068 +0000 +@@ -1 +1 @@ +-4.1.0-p8 ++4.1.0-p9 +--- mpfr-4.1.0/src/jyn_asympt.c.orig 2021-02-11 12:53:38.410850685 +0000 ++++ mpfr-4.1.0/src/jyn_asympt.c 2021-02-17 17:25:46.424981219 +0000 +@@ -69,7 +69,7 @@ + MPFR_ZIV_INIT (loop, w); + for (;;) + { +- int ok = 1; ++ int ok = 0; + + mpfr_set_prec (c, w); + mpfr_init2 (s, w); +@@ -96,10 +96,7 @@ + + /* if s or c is zero, MPFR_GET_EXP will fail below */ + if (MPFR_IS_ZERO(s) || MPFR_IS_ZERO(c)) +- { +- ok = 0; +- goto clear; +- } ++ goto clear; /* with ok=0 */ + + /* precompute 1/(8|z|) */ + mpfr_si_div (iz, MPFR_IS_POS(z) ? 1 : -1, z, MPFR_RNDN); /* err <= 1 */ +@@ -227,6 +224,9 @@ + mpfr_sub (s, c, s, MPFR_RNDN); + #endif + } ++ if (MPFR_IS_ZERO(s)) ++ goto clear; /* with ok=0 */ ++ ok = 1; + if ((n & 2) != 0) + mpfr_neg (s, s, MPFR_RNDN); + if (MPFR_GET_EXP (s) > err) +--- mpfr-4.1.0/src/mpfr.h.orig 2021-02-17 17:22:34.702972090 +0000 ++++ mpfr-4.1.0/src/mpfr.h 2021-02-17 17:25:46.436981105 +0000 +@@ -27,7 +27,7 @@ + #define MPFR_VERSION_MAJOR 4 + #define MPFR_VERSION_MINOR 1 + #define MPFR_VERSION_PATCHLEVEL 0 +-#define MPFR_VERSION_STRING "4.1.0-p8" ++#define MPFR_VERSION_STRING "4.1.0-p9" + + /* User macros: + MPFR_USE_FILE: Define it to make MPFR define functions dealing +--- mpfr-4.1.0/src/version.c.orig 2021-02-17 17:22:34.702972090 +0000 ++++ mpfr-4.1.0/src/version.c 2021-02-17 17:25:46.440981068 +0000 +@@ -25,5 +25,5 @@ + const char * + mpfr_get_version (void) + { +- return "4.1.0-p8"; ++ return "4.1.0-p9"; + } +--- mpfr-4.1.0/tests/mpfr-test.h.orig 2020-06-29 13:57:32.000000000 +0000 ++++ mpfr-4.1.0/tests/mpfr-test.h 2021-02-17 17:25:46.424981219 +0000 +@@ -191,6 +191,8 @@ + + #define mpfr_cmp0(x,y) (MPFR_ASSERTN (!MPFR_IS_NAN (x) && !MPFR_IS_NAN (y)), mpfr_cmp (x,y)) + #define mpfr_cmp_ui0(x,i) (MPFR_ASSERTN (!MPFR_IS_NAN (x)), mpfr_cmp_ui (x,i)) ++#define mpfr_cmp_si_2exp0(x,i,e) (MPFR_ASSERTN (!MPFR_IS_NAN (x)), \ ++ mpfr_cmp_si_2exp (x,i,e)) + + /* define CHECK_EXTERNAL if you want to check mpfr against another library + with correct rounding. You'll probably have to modify mpfr_print_raw() +--- mpfr-4.1.0/tests/tj1.c.orig 2020-01-08 18:11:13.000000000 +0000 ++++ mpfr-4.1.0/tests/tj1.c 2021-02-17 17:25:46.424981219 +0000 +@@ -55,14 +55,14 @@ + /* since |x| is just above 2^e, |j1(x)| is just above 2^(e-1), + thus y should be 2^(e-1) and the inexact flag should be + of opposite sign of x */ +- MPFR_ASSERTN(mpfr_cmp_si_2exp (y, sign, e - 1) == 0); ++ MPFR_ASSERTN(mpfr_cmp_si_2exp0 (y, sign, e - 1) == 0); + MPFR_ASSERTN(VSIGN (inex) * sign < 0); + } + else + { + /* here |y| should be 0.5*2^emin and the inexact flag should + have the sign of x */ +- MPFR_ASSERTN(mpfr_cmp_si_2exp (y, sign, e) == 0); ++ MPFR_ASSERTN(mpfr_cmp_si_2exp0 (y, sign, e) == 0); + MPFR_ASSERTN(VSIGN (inex) * sign > 0); + } + } +@@ -72,6 +72,26 @@ + mpfr_clear (y); + } + ++/* a test that fails with GMP_CHECK_RANDOMIZE=1613146232984428 ++ on revision 14429 */ ++static void ++bug20210215 (void) ++{ ++ mpfr_t x, y; ++ int inex; ++ ++ mpfr_init2 (x, 221); ++ mpfr_init2 (y, 1); ++ mpfr_set_str (x, "1.6484611511696130037307738844228498447763863563070374544054791168614e+01", 10, MPFR_RNDN); ++ mpfr_clear_flags (); ++ inex = mpfr_j1 (y, x, MPFR_RNDZ); ++ MPFR_ASSERTN (mpfr_cmp_si_2exp0 (y, -1, -9) == 0); ++ MPFR_ASSERTN (inex > 0); ++ MPFR_ASSERTN (__gmpfr_flags == MPFR_FLAGS_INEXACT); ++ mpfr_clear (x); ++ mpfr_clear (y); ++} ++ + int + main (int argc, char *argv[]) + { +@@ -79,6 +99,8 @@ + + tests_start_mpfr (); + ++ bug20210215 (); ++ + test_small (); + + mpfr_init (x); diff --git a/sources b/sources index 8f73cc5..d65ebe7 100644 --- a/sources +++ b/sources @@ -1,11 +1,11 @@ SHA512 (Macaulay2-icons.tar.xz) = 069aa0ad70a0253583b00091c094da9b79d2a2f0f2d38aa97f543081f5df5fd3b5a9e1463febd6947c3151cf01844133174c7372f57e158c2d3faba6baed5d1d -SHA512 (Macaulay2-1.17.tar.gz) = de6d903fcf85fe51757d3fad31b59d4346072e04da889ad54128e0c4dd8485e62721a8888b9015fc1e7af07d1bb529b55e763216095b816b5b37ab5bd18cf127 +SHA512 (Macaulay2-1.18.tar.gz) = 7c5a5c550a206ac11fa8cb5345af16f1244cebd40b0bf4ba8681192b4d579b90136d52d15650052d5fa0efc0f1f356a23e90788d2606d69e1e054d8475ce86db SHA512 (4ti2-1.6.9.tar.gz) = f02b61ba04d7512e86d9574574669ec764d053fc5d01744dc6b521518d4165b41355ae12344923f1549b323406130c6562a4d9272b1b88de2ecc2c20d3d892d5 -SHA512 (cddlib-094h.tar.gz) = 94a3ef03fd86ece7e61e4f9bec283862594b05a6faca76897e33ad15762527c885cee5439bb8a5d337a608ceb17baff24910da326071a3107df17a0c07f5e774 +SHA512 (cddlib-094m.tar.gz) = d140d57391b1c963d68ca2e344fbda723a5077004bace322a18362fdc1fff8b50fdc4b598ca8cdf131158e07afc96c5d9aafd7abde082a9e241701e403310b9f SHA512 (cohomCalg-0.32.tar.gz) = b76d8de00b13a8fe8881222178247c5e99c15075c46290830f6c3afffb9dfc18af0d57f738ac5a0d7c00044db81b4465d1e0563c95f7f656a2440be5765c6818 SHA512 (Csdp-6.2.0.tgz) = 6f6c44abcb7b0e277f5a42a1e31acbd41c8fbdce0c1641982a48199fe1d922b28d86433d1a98ac71ae521bea04188a830c441db1e9d8eebf174debf501430e82 -SHA512 (factory-4.1.3.tar.gz) = 38e75556bcf8c9f4610dd5322d20b339d1c5ad9a6400f20d1bce5317bc4f3fdb97e33294088ea7b80e9bda1c482dd1e5327ec408d9f1dadf3c28c2b928519053 -SHA512 (flint-2.6.3.tar.gz) = 8e71570364c789b1d4eaaa5f5adf10212cab47bf1a9f45c333211035ed021a86bb7b1de1feec51e83b2e113e8168853e370f127d2d2b1e941a12aec71fe8ae9e +SHA512 (factory-4.2.0.tar.gz) = 4da0414c69c531b9b3744b7f2b20524ed11637dd848b8ab929be383143e94ff083165df34ae69ca8f973911969e55e263416dfd0a8038eb847bcdf26e72bd9ad +SHA512 (flint-2.7.1.tar.gz) = abea97228e91089d82a9a44714e719064bef261c45f5f5b24700955bb841cc98a8182e04e6054fcbcaa3bd92f2f95a82bd5d168ec2171af6a58d4f71eb0a479a SHA512 (frobby_v0.9.0.tar.gz) = bc96ff20ec334932b5eaa8a3d15d0e36eab41eb85e8b74dbdc374dcaafc9873e44a8af16f6caae649aeea17cd6284caf244d4d345689ad43288f199c591a68a6 SHA512 (gfan0.6.2.tar.gz) = 08a9cc543967771af959a506b79db5b55e0e4942e4170dad8691db35ef7d381d878e1ea6534a3cacc0f5d30ec31564ec94cc20b46792d06f18a3a8a3c0aac91d SHA512 (givaro-4.1.1.tar.gz) = baaf139f42176838c541143a5b69acf47a8f31c17020a85cf413ce18ade2c3048e009d15c2acf4d71041c0776cd42f5fedb1c183ce1cc0f85cb8672ceac00ee7 @@ -14,8 +14,8 @@ SHA512 (gtest-1.10.0.tar.gz) = bd52abe938c3722adc2347afad52ea3a17ecc76730d8d16b0 SHA512 (lapack-3.9.0.tgz) = afa4eb05f2b1dc2f9588ec58bd32f90b78c01185f328e71f2baf6adec6622f557c332f09e7eb46f71e5e3f2e852f25a640bde2bf9f4be7205cecf01cb07b6bc8 SHA512 (libfplll-5.2.0.tar.gz) = 67d1a8deb92d3f9245983b09b7593b19c5d43c8fe77cfea893ea9dfb744bcb77b7239d73e4f619450cc6960f4c48fb1c6ba46268208b0f31f855cf1af6bfaa29 SHA512 (linbox-1.6.3.tar.gz) = 7585f51b46b65a90328b4ff82f7c74eb59510c912a0bb0ce49263f4c7c1e777c0f9961e4672fa36be6fb84035a019b8e212615c363fd62d632e37c327d6ed3c0 -SHA512 (lrslib-062.tar.gz) = 78fa6d470b2dd9cb06d1d15023debd8fafc27ed4df93cd90ef746071755f6b1fe9ee2c6a24659030b9a8851bd3ee3a699407586d320f3760c3d8a3a1c79d7116 -SHA512 (M2-emacs-d180956.tar.gz) = e50a2c739624bb4bd3ccf295f7b392edf3531f7f4d73026d9efbc11200ce4b7477b572805577ce0b1b8af115e2467989b9d31b9750a6a13c6a770bacaaa68929 +SHA512 (lrslib-071a.tar.gz) = f33639c593769722a37262d6a90073076a4a8a7453ed81d948ebed6f0a5ee826b80c9211e5a601ca177b776c5388aa4e46efd55e8b219f1b6ce633232aa6b001 +SHA512 (M2-emacs-01af405.tar.gz) = c3b59fa53a75682e9b3a719665169aecac97d341b2ac90a076373b235e1da337f8065b2874231db666ed0a2f885487824a31d090aa079f96f1c6e6ba58d24490 SHA512 (mathic-1.0.tar.gz) = dd675985fc2a5c7efab3ec6492e4b4e4d7273f4d88bdee6d9dc19174d3e319baa5fd94994563efe46c7ed7685e253c173606efdfb2a66af2d1db35e6265d473d SHA512 (mathicgb-1.0.tar.gz) = 09db7dd226b4a50fea5dbcf175d1da2136541b33ae098ed540735315a4eb33be2ca62d7c996b0d86470d1cad9d93261fd211635f84292ecbf7da04c83f4950f2 SHA512 (memtailor-1.0.tar.gz) = 3d93cad8a8e62c4f4b8bd074019f44d2fd8b35cf7e50ccafea85fe15aaeb3af0b175bcd7ed055ee3d789ad557fdb83382e4b66826e7fb849521ff375f25fd16f From f141288b8042a7eb04911c33b34c35470f498e6b Mon Sep 17 00:00:00 2001 From: Jerry James Date: Tue, 29 Jun 2021 14:38:09 -0600 Subject: [PATCH 20/70] Rebuild for ntl 11.5.1. --- Macaulay2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index 21af2b1..38bba12 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -48,7 +48,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 Version: 1.18 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 or GPLv3 URL: http://macaulay2.com/ @@ -505,6 +505,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog +* Tue Jun 29 2021 Jerry James - 1.18-2 +- Rebuild for ntl 11.5.1 + * Thu Jun 17 2021 Jerry James - 1.18-1 - Version 1.18 From 89e532a3e70f027b206d02f11e9d7918a284a956 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 21 Jul 2021 10:59:02 +0000 Subject: [PATCH 21/70] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering From b480014616c0a9298a7bfe54ec66859ffefe5074 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 21 Jul 2021 15:53:37 +0000 Subject: [PATCH 22/70] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- Macaulay2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index 38bba12..f672199 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -48,7 +48,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 Version: 1.18 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 or GPLv3 URL: http://macaulay2.com/ @@ -505,6 +505,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog +* Wed Jul 21 2021 Fedora Release Engineering - 1.18-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Tue Jun 29 2021 Jerry James - 1.18-2 - Rebuild for ntl 11.5.1 From 78c38cc9b1193c19d7ebf26a3701027d7f47cb24 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Fri, 6 Aug 2021 22:00:49 +0100 Subject: [PATCH 23/70] Rebuilt for Boost 1.76 --- Macaulay2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index f672199..87b2c75 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -48,7 +48,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 Version: 1.18 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 or GPLv3 URL: http://macaulay2.com/ @@ -505,6 +505,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog +* Fri Aug 06 2021 Jonathan Wakely - 1.18-4 +- Rebuilt for Boost 1.76 + * Wed Jul 21 2021 Fedora Release Engineering - 1.18-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 782f9fde143a2fe8c53f774aea7a62ac720e4e3b Mon Sep 17 00:00:00 2001 From: Jerry James Date: Thu, 25 Nov 2021 20:43:36 -0700 Subject: [PATCH 24/70] Version 1.19. --- Macaulay2-1.16-ulimit.patch | 22 ++-- Macaulay2.spec | 30 +++-- README.md | 7 ++ factory-4.1.3.patch | 72 ----------- mathic-1.0.patch | 66 ++++------ mathicgb-1.0.patch | 237 +++--------------------------------- sources | 12 +- 7 files changed, 89 insertions(+), 357 deletions(-) create mode 100644 README.md delete mode 100644 factory-4.1.3.patch diff --git a/Macaulay2-1.16-ulimit.patch b/Macaulay2-1.16-ulimit.patch index 2da04af..9d25e39 100644 --- a/Macaulay2-1.16-ulimit.patch +++ b/Macaulay2-1.16-ulimit.patch @@ -1,5 +1,5 @@ ---- M2/GNUmakefile.in.orig 2021-01-08 08:30:25.000000000 -0700 -+++ M2/GNUmakefile.in 2021-02-15 15:47:32.292569472 -0700 +--- M2/GNUmakefile.in.orig 2021-11-17 15:21:40.000000000 -0700 ++++ M2/GNUmakefile.in 2021-11-24 16:10:22.499027509 -0700 @@ -136,7 +136,7 @@ build-in-$1: submodules/$1/Makefile $(MAKE) -C submodules/$1 all check-in-$1: run-configure-in-$1 @@ -9,8 +9,8 @@ endif install-in-$1: build-in-$1; + $(MAKE) -C submodules/$1 install ---- M2/libraries/Makefile.library.in.orig 2021-01-08 08:30:25.000000000 -0700 -+++ M2/libraries/Makefile.library.in 2021-02-15 15:48:02.429394066 -0700 +--- M2/libraries/Makefile.library.in.orig 2021-11-17 15:21:40.000000000 -0700 ++++ M2/libraries/Makefile.library.in 2021-11-24 16:10:22.499027509 -0700 @@ -238,10 +238,10 @@ distclean: package-distclean clean::; rm -rf .patched* .untarred* $(LIBNAME)* .checked* .compiled* .configured* .installed* .untarred2* diffs tmp $(UNTARDIR) $(OLDUNTARDIR) distclean: clean ; rm -rf Makefile @@ -26,10 +26,10 @@ LIMIT := : ifeq (@ULIMIT_T@,yes) LIMIT += ; ulimit -t $(TLIMIT) ---- M2/Macaulay2/m2/basictests/Makefile.in.orig 2021-01-08 08:30:25.000000000 -0700 -+++ M2/Macaulay2/m2/basictests/Makefile.in 2021-02-15 15:47:13.769677288 -0700 +--- M2/Macaulay2/m2/basictests/Makefile.in.orig 2021-11-17 15:21:40.000000000 -0700 ++++ M2/Macaulay2/m2/basictests/Makefile.in 2021-11-24 16:10:22.499027509 -0700 @@ -22,17 +22,17 @@ $(TESTRESULTS) : @pre_exec_prefix@/bin/M - ARGS := --silent -q --stop --no-setup -e 'srcdir = "@srcdir@/"' + ARGS := --silent -q --stop --no-core -e 'srcdir = "@srcdir@/"' ifeq "@DEBUG@" "no" -TLIMIT ?= 20 @@ -53,8 +53,8 @@ LIMIT := ifeq (@ULIMIT_T@,yes) ---- M2/Macaulay2/tests/ComputationsBook/Makefile.chapter.in.orig 2021-01-08 08:30:25.000000000 -0700 -+++ M2/Macaulay2/tests/ComputationsBook/Makefile.chapter.in 2021-02-15 15:47:13.770677282 -0700 +--- M2/Macaulay2/tests/ComputationsBook/Makefile.chapter.in.orig 2021-11-17 15:21:40.000000000 -0700 ++++ M2/Macaulay2/tests/ComputationsBook/Makefile.chapter.in 2021-11-24 16:10:22.500027511 -0700 @@ -15,16 +15,16 @@ diff: LIMIT := @@ -76,8 +76,8 @@ endif ---- M2/Macaulay2/tests/Makefile.test.in.orig 2021-01-08 08:30:25.000000000 -0700 -+++ M2/Macaulay2/tests/Makefile.test.in 2021-02-15 15:49:32.468869998 -0700 +--- M2/Macaulay2/tests/Makefile.test.in.orig 2021-11-17 15:21:40.000000000 -0700 ++++ M2/Macaulay2/tests/Makefile.test.in 2021-11-24 16:10:22.500027511 -0700 @@ -6,18 +6,18 @@ DEFERRED ?= no DOTS ?= ../.. diff --git a/Macaulay2.spec b/Macaulay2.spec index 87b2c75..aafe8f4 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -47,8 +47,8 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 -Version: 1.18 -Release: 4%{?dist} +Version: 1.19 +Release: 1%{?dist} License: GPLv2 or GPLv3 URL: http://macaulay2.com/ @@ -78,18 +78,18 @@ Source101: http://www.mpfr.org/mpfr-%{mpfrver}/mpfr-%{mpfrver}.tar.xz Provides: bundled(mpfr) = %{mpfrver} # FLINT is bundled because it must be linked with the specially-built MPFR -%global flintver 2.7.1 +%global flintver 2.8.3 Source102: http://www.flintlib.org/flint-%{flintver}.tar.gz Provides: bundled(flint) = %{flintver} # FACTORY is bundled because it must be built with special options -%global factoryver 4.2.0 +%global factoryver 4.2.1 Source103: http://faculty.math.illinois.edu/Macaulay2/Downloads/OtherSourceCode/factory-%{factoryver}.tar.gz Provides: bundled(factory) = %{factoryver} # MATHICGB is bundled because it must be built with different threading options %global mathicgbver 1.0 -%global mathicgbcommit 4d23c24302c2395efbbeef9ea1fd52e4f0f56f65 +%global mathicgbcommit 9ed59d9afe69253ea1d1ddeeaf5eb300d45ed9e1 Source104: https://github.com/Macaulay2/mathicgb/tarball/%{mathicgbcommit}/mathicgb-%{mathicgbver}.tar.gz Provides: bundled(mathicgb) = %{mathicgbver} @@ -99,13 +99,13 @@ Source105: https://faculty.math.illinois.edu/Macaulay2/Downloads/OtherSourceCode # MEMTAILOR is bundled because it causes garbage collector crashes otherwise %global memtailorver 1.0 -%global memtailorcommit 777c5d2d341ff742850b86e2fb29d24007ac9bae +%global memtailorcommit 123afe02b7a458faa4be8ec3a85d6a362a5e7c89 Source106: https://github.com/Macaulay2/memtailor/tarball/%{memtailorcommit}/memtailor-%{memtailorver}.tar.gz Provides: bundled(memtailor) = %{memtailorver} # MATHIC is bundled because it causes garbage collector crashes otherwise %global mathicver 1.0 -%global mathiccommit cc52f4685b1e1f1af084d22cfb730f62e34c2dfc +%global mathiccommit 68da8d452dcafeb07fc8749839c566662a2f9b03 Source107: https://github.com/Macaulay2/mathic/tarball/%{mathiccommit}/mathic-%{mathicver}.tar.gz Provides: bundled(mathic) = %{mathicver} @@ -361,6 +361,12 @@ sed -e 's/BUILD_cddlib=yes/BUILD_cddlib=no/' \ -e 's,\$added_fclibs != yes,"$added_fclibs" != yes,' \ -i configure.ac +# We call it flint. Upstream calls it flint2. +sed -i 's/\(LIBNAME = flint\)2/\1/' libraries/flint/Makefile.in + +# Cannot do git submodule operations on a koji builder +sed -i 's/git-checkout-in-memtailor.*//' GNUmakefile.in + # (re)generate configure autoreconf -fi . @@ -379,10 +385,15 @@ optflags=$(sed 's/-O2/-O/g' <<< "%{optflags}") optflags="%{optflags}" %endif +# Possible bug in Macaulay2 1.19: the memtailor, mathic, and mathicgb headers +# cannot be found. We work around this here. See if the problem has been fixed +# in later versions. +CPPFLAGS="-I$PWD/submodules/memtailor/src -I$PWD/submodules/mathic/src -I$PWD/submodules/mathicgb/src" + ## configure macro currently broken, due to some odd prefix-checks. probably fixable -- Rex mkdir -p BUILD/%{_target_platform} pushd BUILD/%{_target_platform} -CPPFLAGS="-I%{_includedir}/cddlib -I%{_includedir}/frobby" \ +CPPFLAGS="$CPPFLAGS -I%{_includedir}/cddlib -I%{_includedir}/frobby" \ CFLAGS="${optflags} -fsigned-char" \ CXXFLAGS="${optflags} -fsigned-char" \ LIBS="-lflexiblas" \ @@ -505,6 +516,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog +* Wed Nov 24 2021 Jerry James - 1.19-1 +- Version 1.19 + * Fri Aug 06 2021 Jonathan Wakely - 1.18-4 - Rebuilt for Boost 1.76 diff --git a/README.md b/README.md new file mode 100644 index 0000000..7d3e139 --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +# Macaulay2 + +[Macaulay2](http://macaulay2.com/) is a system for computing in commutative +algebra, algebraic geometry and related fields. The system was originally +written by Dan Grayson and Mike Stillman. David Eisenbud joined the project a +number of years ago, and many users are writing packages for the system, and +some are contributing source code. diff --git a/factory-4.1.3.patch b/factory-4.1.3.patch deleted file mode 100644 index 71f2cf4..0000000 --- a/factory-4.1.3.patch +++ /dev/null @@ -1,72 +0,0 @@ ---- factory-4.1.3/ftmpl_inst.cc.orig 2019-04-10 10:20:16.000000000 -0600 -+++ factory-4.1.3/ftmpl_inst.cc 2021-01-12 13:57:49.211563226 -0700 -@@ -73,7 +73,7 @@ template List Difference ( con - // NTL 6 - #ifdef HAVE_NTL - #include --#if NTL_MAJOR_VERSION == 6 -+#if NTL_MAJOR_VERSION >= 6 - - #include - #include ---- factory-4.1.3/m4/flags.m4.orig 2020-05-14 08:01:02.000000000 -0600 -+++ factory-4.1.3/m4/flags.m4 2021-01-12 13:55:01.715902074 -0700 -@@ -122,7 +122,7 @@ AC_DEFUN([SING_CHECK_SET_ARGS], [ - ## for clang: -Wunneeded-internal-declaration - - if test "x${ENABLE_OPTIMIZATION}" != xno; then -- OPTFLAGS="-g0 -O3 -Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -fno-enforce-eh-specs -fconserve-space -funroll-loops -fno-delete-null-pointer-checks" -+ OPTFLAGS="-Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -fno-enforce-eh-specs -fconserve-space -funroll-loops -fno-delete-null-pointer-checks" - # -O3 - crashes gcc???!!! - # -fpermissive - AC_LANG_PUSH([C]) ---- factory-4.1.3/m4/flint-check.m4.orig 2020-05-14 08:01:02.000000000 -0600 -+++ factory-4.1.3/m4/flint-check.m4 2021-01-12 13:54:28.179969923 -0700 -@@ -44,7 +44,7 @@ if test "$FLINT_HOME_PATH" = "$DEFAULT_C - - # we suppose that mpfr and mpir to be in the same place or available by default - CFLAGS="${BACKUP_CFLAGS} ${GMP_CPPFLAGS}" -- LIBS="${FLINT_LIBS} ${GMP_LIBS} ${BACKUPLIBS}" -+ LIBS="${FLINT_LIBS} ${GMP_LIBS} ${BACKUP_LIBS}" - - AC_CHECK_HEADER([flint/fmpz.h], - [AC_CHECK_LIB(flint,fmpz_init, -@@ -66,7 +66,7 @@ if test "x$flint_found" = "xno" ; then - - # we suppose that mpfr and mpir to be in the same place or available by default - CFLAGS="${BACKUP_CFLAGS} ${FLINT_CFLAGS} ${GMP_CPPFLAGS}" -- LIBS="${FLINT_LIBS} ${GMP_LIBS} ${BACKUPLIBS}" -+ LIBS="${FLINT_LIBS} ${GMP_LIBS} ${BACKUP_LIBS}" - - AC_CHECK_LIB(flint,fmpz_init, - [flint_found="yes"], ---- factory-4.1.3/configure.orig 2020-05-14 08:16:23.000000000 -0600 -+++ factory-4.1.3/configure 2021-01-12 13:59:22.956373563 -0700 -@@ -5811,7 +5811,7 @@ done - ## for clang: -Wunneeded-internal-declaration - - if test "x${ENABLE_OPTIMIZATION}" != xno; then -- OPTFLAGS="-g0 -O3 -Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -fno-enforce-eh-specs -fconserve-space -funroll-loops -fno-delete-null-pointer-checks" -+ OPTFLAGS="-Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -fno-enforce-eh-specs -fconserve-space -funroll-loops -fno-delete-null-pointer-checks" - # -O3 - crashes gcc???!!! - # -fpermissive - ac_ext=c -@@ -22401,7 +22401,7 @@ if test "$FLINT_HOME_PATH" = "$DEFAULT_C - - # we suppose that mpfr and mpir to be in the same place or available by default - CFLAGS="${BACKUP_CFLAGS} ${GMP_CPPFLAGS}" -- LIBS="${FLINT_LIBS} ${GMP_LIBS} ${BACKUPLIBS}" -+ LIBS="${FLINT_LIBS} ${GMP_LIBS} ${BACKUP_LIBS}" - - ac_fn_c_check_header_mongrel "$LINENO" "flint/fmpz.h" "ac_cv_header_flint_fmpz_h" "$ac_includes_default" - if test "x$ac_cv_header_flint_fmpz_h" = xyes; then : -@@ -22460,7 +22460,7 @@ if test "x$flint_found" = "xno" ; then - - # we suppose that mpfr and mpir to be in the same place or available by default - CFLAGS="${BACKUP_CFLAGS} ${FLINT_CFLAGS} ${GMP_CPPFLAGS}" -- LIBS="${FLINT_LIBS} ${GMP_LIBS} ${BACKUPLIBS}" -+ LIBS="${FLINT_LIBS} ${GMP_LIBS} ${BACKUP_LIBS}" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fmpz_init in -lflint" >&5 - $as_echo_n "checking for fmpz_init in -lflint... " >&6; } - diff --git a/mathic-1.0.patch b/mathic-1.0.patch index e479efc..d45f2a6 100644 --- a/mathic-1.0.patch +++ b/mathic-1.0.patch @@ -1,16 +1,25 @@ ---- src/mathic/ColumnPrinter.cpp.orig 2020-07-09 10:51:54.000000000 -0600 -+++ src/mathic/ColumnPrinter.cpp 2021-02-12 09:12:52.257016443 -0700 -@@ -193,7 +193,7 @@ namespace mathic { - MATHIC_ASSERT(maxSize == std::string("100.0%").size()); - const auto size = str.size(); - if (size > maxSize) -- return std::move(str); -+ return str; - return std::string(maxSize - str.size(), ' ') + std::move(str); - } +--- Makefile.am.orig 2021-09-30 19:42:32.000000000 -0600 ++++ Makefile.am 2021-10-07 09:21:40.078080233 -0600 +@@ -10,7 +10,7 @@ libmathic_la_CPPFLAGS = $(DEPS_CFLAGS) + lib_LTLIBRARIES = libmathic.la ---- src/mathic/error.cpp.orig 2020-07-09 10:51:54.000000000 -0600 -+++ src/mathic/error.cpp 2021-02-12 09:12:33.688040243 -0700 + # set the C++ compiler to include src/ +-AM_CXXFLAGS=-I$(top_srcdir)/src/ -std=gnu++0x ++AM_CXXFLAGS=-I$(top_srcdir)/src/ -std=gnu++14 + + # libraries that are needed by this library + libmathic_la_LIBADD= $(DEPS_LIBS) +@@ -85,7 +85,7 @@ if with_gtest + TESTS=unittest + check_PROGRAMS=$(TESTS) + +-unittest_CXXFLAGS = -I$(top_srcdir)/src/ -std=gnu++0x ++unittest_CXXFLAGS = -I$(top_srcdir)/src/ -std=gnu++14 + unittest_LDADD = $(top_builddir)/libmathic.la $(DEPS_LIBS) -lmemtailor -lpthread + unittest_CPPFLAGS = $(DEPS_CFLAGS) + +--- src/mathic/error.cpp.orig 2021-09-30 19:42:32.000000000 -0600 ++++ src/mathic/error.cpp 2021-10-07 09:21:23.097049833 -0600 @@ -2,15 +2,15 @@ #include @@ -30,8 +39,8 @@ (const std::string& errorMsg, const char* file, unsigned int lineNumber) { std::ostringstream err; ---- src/mathic/error.h.orig 2020-07-09 10:51:54.000000000 -0600 -+++ src/mathic/error.h 2021-02-12 09:12:33.689040242 -0700 +--- src/mathic/error.h.orig 2021-09-30 19:42:32.000000000 -0600 ++++ src/mathic/error.h 2021-10-07 09:21:23.098049835 -0600 @@ -18,26 +18,19 @@ namespace mathic { InternalMathicException(const std::string& str): logic_error(str) {} }; @@ -64,32 +73,3 @@ throw Exception("ERROR: " + errorMsg + '\n'); } ---- src/mathic/PairQueue.h.orig 2020-07-09 10:51:54.000000000 -0600 -+++ src/mathic/PairQueue.h 2021-02-12 15:20:39.649741958 -0700 -@@ -149,7 +149,7 @@ namespace mathic { - template - class SupportRetirement { - public: -- void addNextIndex() {mRetired.push_back(false);} -+ void addNextIndex() {mRetired.push_back('\0');} - void undoAdd() { - MATHIC_ASSERT(!mRetired.empty()); - mRetired.pop_back(); -@@ -157,15 +157,12 @@ namespace mathic { - - void retireIndex(size_t index) { - MATHIC_ASSERT(index < mRetired.size()); -- mRetired[index] = true; -+ mRetired[index] = '\1'; - } - - bool retired(size_t index) const { - MATHIC_ASSERT(index < mRetired.size()); -- // if we just cast to bool here the compiler has to ensure that the -- // value is not something other than 0 or 1. By reinterpreting the -- // reference as a bool we free the compiler from this obligation. -- return reinterpret_cast(mRetired[index]); -+ return mRetired[index] != '\0'; - } - - private: diff --git a/mathicgb-1.0.patch b/mathicgb-1.0.patch index 7baf96c..1a0f8a3 100644 --- a/mathicgb-1.0.patch +++ b/mathicgb-1.0.patch @@ -1,83 +1,5 @@ ---- src/mathicgb/F4MatrixBuilder.cpp.orig 2021-01-09 10:32:37.000000000 -0700 -+++ src/mathicgb/F4MatrixBuilder.cpp 2021-02-12 09:09:35.256270557 -0700 -@@ -146,7 +146,7 @@ void F4MatrixBuilder::buildMatrixAndClea - *monoid().alloc().release(), - *monoid().alloc().release() - }; -- return std::move(data); -+ return data; - }); - - mgb::mtbb::parallel_do(mTodo.begin(), mTodo.end(), ---- src/mathicgb/F4MatrixProjection.cpp.orig 2021-01-09 10:32:37.000000000 -0700 -+++ src/mathicgb/F4MatrixProjection.cpp 2021-02-12 09:09:35.257270555 -0700 -@@ -275,7 +275,7 @@ done:; - qm.bottomLeft = bottom.moveLeft(); - qm.bottomRight = bottom.moveRight(); - -- return std::move(qm); -+ return qm; - } - - namespace { -@@ -352,7 +352,7 @@ QuadMatrix F4MatrixProjection::makeAndCl - qm.bottomRight = std::move(right.second); - qm.leftColumnMonomials = std::move(mLeftMonomials); - qm.rightColumnMonomials = std::move(mRightMonomials); -- return std::move(qm); -+ return qm; - } - - MATHICGB_NAMESPACE_END ---- src/mathicgb/F4MatrixReducer.cpp.orig 2021-01-09 10:32:37.000000000 -0700 -+++ src/mathicgb/F4MatrixReducer.cpp 2021-02-12 09:09:35.258270554 -0700 -@@ -314,7 +314,7 @@ namespace { - if (!zero) - reduced.rowDone(); - }}); -- return std::move(reduced); -+ return reduced; - } - - SparseMatrix reduceToEchelonFormSparse( -@@ -392,7 +392,7 @@ namespace { - pivotRowOfCol[pivotCol] = reduced.rowCount(); - rowToReduce.appendTo(reduced); - } -- return std::move(reduced); -+ return reduced; - } - - SparseMatrix reduceToEchelonForm( -@@ -546,7 +546,7 @@ namespace { - for (size_t row = 0; row < rowCount; ++row) - if (!dense[row].empty()) - dense[row].appendTo(reduced); -- return std::move(reduced); -+ return reduced; - } - } - -@@ -686,7 +686,7 @@ SparseMatrix reduceToEchelonFormShrawan( - if (!rowIsZero) - reduced.rowDone(); - } -- return std::move(reduced); -+ return reduced; - } - - SparseMatrix reduceToEchelonFormShrawanDelayedModulus( -@@ -723,7 +723,7 @@ SparseMatrix reduceToEchelonFormShrawanD - if (!rowIsZero) - reduced.rowDone(); - } -- return std::move(reduced); -+ return reduced; - } - - SparseMatrix F4MatrixReducer::reduceToBottomRight(const QuadMatrix& matrix) { ---- src/mathicgb/MathicIO.hpp.orig 2021-01-09 10:32:37.000000000 -0700 -+++ src/mathicgb/MathicIO.hpp 2021-02-12 09:09:35.258270554 -0700 +--- src/mathicgb/MathicIO.hpp.orig 2021-09-30 19:41:54.000000000 -0600 ++++ src/mathicgb/MathicIO.hpp 2021-11-24 16:04:28.969499776 -0700 @@ -300,7 +300,7 @@ auto MathicIO::readOrder( componentsAscendingDesired, schreyering @@ -87,144 +9,25 @@ } template -@@ -355,7 +355,7 @@ Basis MathicIO::readBasis( - *p = p->polyWithTermsDescending(); - basis.insert(std::move(p)); - } -- return std::move(basis); -+ return basis; - } +--- src/mathicgb/MonoMonoid.hpp.orig 2021-09-30 19:41:54.000000000 -0600 ++++ src/mathicgb/MonoMonoid.hpp 2021-11-24 16:05:44.657612757 -0700 +@@ -573,7 +573,8 @@ public: + // for unaligned access. Performance seems to be no worse than for using + // 32 bit integers directly. - template -@@ -391,7 +391,7 @@ Poly MathicIO::readPolyDoNotOrder +- if (sizeof(Exponent) != 4 || (!StoreHash && !StoreOrder)) ++ if (sizeof(Exponent) != 4 || (!StoreHash && !StoreOrder) || ++ __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) + return isProductOf(a, b, ab); - // also skips whitespace - if (in.match('0') || in.match("+0") || in.match("-0")) -- return std::move(p); -+ return p; - MATHICGB_ASSERT(!in.peekWhite()); - - auto mono = ring.monoid().alloc(); -@@ -402,7 +402,7 @@ Poly MathicIO::readPolyDoNotOrder - readTerm(ring, readComponent, coef, mono, in); - p.append(coef.value(), *mono); - } while (!in.peekWhite() && !in.matchEOF()); -- return std::move(p); -+ return p; - } - - template ---- src/mathicgb/MonoMonoid.hpp.orig 2021-01-09 10:32:37.000000000 -0700 -+++ src/mathicgb/MonoMonoid.hpp 2021-02-15 13:14:11.464204458 -0700 -@@ -582,6 +582,7 @@ public: - MATHICGB_ASSERT(i == varCount() / 2 || access(a, i*2+1) >= 0); - - uint64 A, B, AB; -+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ - // We have to use std::memcpy here because just casting to a int64 breaks - // the strict aliasing rule which implies undefined behavior. Both MSVC and - // gcc don't actually call memcpy here. MSVC is a tiny bit slower for this -@@ -589,6 +590,11 @@ public: - std::memcpy(&A, ptr(a, i*2), 8); - std::memcpy(&B, ptr(b, i*2), 8); - std::memcpy(&AB, ptr(ab, i*2), 8); -+#else -+ A = *ptr(a, i*2) | (((uint64)*ptr(a, i*2 + 1)) << 32); -+ B = *ptr(b, i*2) | (((uint64)*ptr(b, i*2 + 1)) << 32); -+ AB = *ptr(ab, i*2) | (((uint64)*ptr(ab, i*2 + 1)) << 32); -+#endif - orOfXor |= AB ^ (A + B); - } - MATHICGB_ASSERT((orOfXor == 0) == isProductOf(a, b, ab)); -@@ -608,11 +614,19 @@ public: uint64 orOfXor = 0; - for (VarIndex i = varCount() / 2; i != beforeEntriesIndexBegin(); --i) { - uint64 A1, A2, B, A1B, A2B; -+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ - std::memcpy(&A1, ptr(a1, i*2), 8); - std::memcpy(&A2, ptr(a2, i*2), 8); - std::memcpy(&B, ptr(b, i*2), 8); - std::memcpy(&A1B, ptr(a1b, i*2), 8); - std::memcpy(&A2B, ptr(a2b, i*2), 8); -+#else -+ A1 = *ptr(a1, i*2) | (((uint64)*ptr(a1, i*2 + 1)) << 32); -+ A2 = *ptr(a2, i*2) | (((uint64)*ptr(a2, i*2 + 1)) << 32); -+ B = *ptr(b, i*2) | (((uint64)*ptr(b, i*2 + 1)) << 32); -+ A1B = *ptr(a1b, i*2) | (((uint64)*ptr(a1b, i*2 + 1)) << 32); -+ A2B = *ptr(a2b, i*2) | (((uint64)*ptr(a2b, i*2 + 1)) << 32); -+#endif - orOfXor |= (A1B ^ (A1 + B)) | (A2B ^ (A2 + B)); - } - MATHICGB_ASSERT ---- src/mathicgb/MonoProcessor.hpp.orig 2021-01-09 10:32:37.000000000 -0700 -+++ src/mathicgb/MonoProcessor.hpp 2021-02-12 14:47:07.794824672 -0700 -@@ -121,7 +121,6 @@ private: - return *mSchreyerMultipliers[component]; - } +@@ -602,7 +603,8 @@ public: + ConstMonoRef a1b, + ConstMonoRef a2b + ) const { +- if (sizeof(Exponent) != 4 || (!StoreHash && !StoreOrder)) ++ if (sizeof(Exponent) != 4 || (!StoreHash && !StoreOrder) || ++ __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) + return (isProductOf(a1, b, a1b) && isProductOf(a2, b, a2b)); -- bool mOrderFromLeft; - bool mComponentsAscendingDesired; - Component mComponentCount; - bool mSchreyering; ---- src/mathicgb/QuadMatrixBuilder.cpp.orig 2021-01-09 10:32:37.000000000 -0700 -+++ src/mathicgb/QuadMatrixBuilder.cpp 2021-02-12 09:09:35.258270554 -0700 -@@ -130,7 +130,7 @@ QuadMatrix QuadMatrixBuilder::buildMatri - mBottomRight.clear(); - - MATHICGB_ASSERT(out.debugAssertValid()); -- return std::move(out); -+ return out; - } - - MATHICGB_NAMESPACE_END ---- src/mathicgb/QuadMatrix.cpp.orig 2021-01-09 10:32:37.000000000 -0700 -+++ src/mathicgb/QuadMatrix.cpp 2021-02-12 09:09:35.258270554 -0700 -@@ -247,7 +247,7 @@ QuadMatrix QuadMatrix::toCanonical() con - matrix.leftColumnMonomials = leftColumnMonomials; - matrix.rightColumnMonomials = rightColumnMonomials; - -- return std::move(matrix); -+ return matrix; - } - - std::ostream& operator<<(std::ostream& out, const QuadMatrix& qm) { -@@ -310,7 +310,7 @@ namespace { - permutation[columns[col].second] = col; - } - -- return std::move(permutation); -+ return permutation; - } - } - ---- src/mathicgb/RawVector.hpp.orig 2021-01-09 10:32:37.000000000 -0700 -+++ src/mathicgb/RawVector.hpp 2021-01-12 14:26:02.384372562 -0700 -@@ -3,6 +3,7 @@ - #ifndef MATHICGB_RAW_VECTOR_GUARD - #define MATHICGB_RAW_VECTOR_GUARD - -+#include - #include - #include - #include ---- src/mathicgb/SparseMatrix.cpp.orig 2021-01-09 10:32:37.000000000 -0700 -+++ src/mathicgb/SparseMatrix.cpp 2021-01-12 14:26:30.569325348 -0700 -@@ -1,6 +1,7 @@ - // MathicGB copyright 2012 all rights reserved. MathicGB comes with ABSOLUTELY - // NO WARRANTY and is licensed as GPL v2.0 or later - see LICENSE.txt. - #include "stdinc.h" -+#include - #include "SparseMatrix.hpp" - - #include "Poly.hpp" ---- src/mathicgb/TypicalReducer.cpp.orig 2021-01-09 10:32:37.000000000 -0700 -+++ src/mathicgb/TypicalReducer.cpp 2021-02-12 09:09:35.258270554 -0700 -@@ -133,7 +133,7 @@ std::unique_ptr TypicalReducer::cl - ring.freeMonomial(lcm); - ring.freeMonomial(multiple1); - ring.freeMonomial(multiple2); -- return std::move(reduced); -+ return reduced; - } - - void TypicalReducer::classicReduceSPolySet + uint64 orOfXor = 0; diff --git a/sources b/sources index d65ebe7..6aab3c6 100644 --- a/sources +++ b/sources @@ -1,11 +1,11 @@ SHA512 (Macaulay2-icons.tar.xz) = 069aa0ad70a0253583b00091c094da9b79d2a2f0f2d38aa97f543081f5df5fd3b5a9e1463febd6947c3151cf01844133174c7372f57e158c2d3faba6baed5d1d -SHA512 (Macaulay2-1.18.tar.gz) = 7c5a5c550a206ac11fa8cb5345af16f1244cebd40b0bf4ba8681192b4d579b90136d52d15650052d5fa0efc0f1f356a23e90788d2606d69e1e054d8475ce86db +SHA512 (Macaulay2-1.19.tar.gz) = f72647ab923c36de44b861e15e4158c0ff4688be40795ad5def8954325f51ef07e79b43c2545e9e4c56b4f0efc6a59f6983a63416d288365e7e4fb08621301ca SHA512 (4ti2-1.6.9.tar.gz) = f02b61ba04d7512e86d9574574669ec764d053fc5d01744dc6b521518d4165b41355ae12344923f1549b323406130c6562a4d9272b1b88de2ecc2c20d3d892d5 SHA512 (cddlib-094m.tar.gz) = d140d57391b1c963d68ca2e344fbda723a5077004bace322a18362fdc1fff8b50fdc4b598ca8cdf131158e07afc96c5d9aafd7abde082a9e241701e403310b9f SHA512 (cohomCalg-0.32.tar.gz) = b76d8de00b13a8fe8881222178247c5e99c15075c46290830f6c3afffb9dfc18af0d57f738ac5a0d7c00044db81b4465d1e0563c95f7f656a2440be5765c6818 SHA512 (Csdp-6.2.0.tgz) = 6f6c44abcb7b0e277f5a42a1e31acbd41c8fbdce0c1641982a48199fe1d922b28d86433d1a98ac71ae521bea04188a830c441db1e9d8eebf174debf501430e82 -SHA512 (factory-4.2.0.tar.gz) = 4da0414c69c531b9b3744b7f2b20524ed11637dd848b8ab929be383143e94ff083165df34ae69ca8f973911969e55e263416dfd0a8038eb847bcdf26e72bd9ad -SHA512 (flint-2.7.1.tar.gz) = abea97228e91089d82a9a44714e719064bef261c45f5f5b24700955bb841cc98a8182e04e6054fcbcaa3bd92f2f95a82bd5d168ec2171af6a58d4f71eb0a479a +SHA512 (factory-4.2.1.tar.gz) = c1c0009cefa769807082b2bf9defb01c286f1bfb9c0c0ac2a07ab87a8019694ff26ba4f7ad43082305dd4fe79a459a340d40f5a2088e963331512c71d3a374c0 +SHA512 (flint-2.8.3.tar.gz) = c3d35ac4c840d0985291f54c7a1cd3c54eb90b3016ae3e94e3051bf1e010f3a4b53b0f05cfa5df0c6f99f398e259b25ec3563515e04ec9f5f9187624b3206aa9 SHA512 (frobby_v0.9.0.tar.gz) = bc96ff20ec334932b5eaa8a3d15d0e36eab41eb85e8b74dbdc374dcaafc9873e44a8af16f6caae649aeea17cd6284caf244d4d345689ad43288f199c591a68a6 SHA512 (gfan0.6.2.tar.gz) = 08a9cc543967771af959a506b79db5b55e0e4942e4170dad8691db35ef7d381d878e1ea6534a3cacc0f5d30ec31564ec94cc20b46792d06f18a3a8a3c0aac91d SHA512 (givaro-4.1.1.tar.gz) = baaf139f42176838c541143a5b69acf47a8f31c17020a85cf413ce18ade2c3048e009d15c2acf4d71041c0776cd42f5fedb1c183ce1cc0f85cb8672ceac00ee7 @@ -16,9 +16,9 @@ SHA512 (libfplll-5.2.0.tar.gz) = 67d1a8deb92d3f9245983b09b7593b19c5d43c8fe77cfea SHA512 (linbox-1.6.3.tar.gz) = 7585f51b46b65a90328b4ff82f7c74eb59510c912a0bb0ce49263f4c7c1e777c0f9961e4672fa36be6fb84035a019b8e212615c363fd62d632e37c327d6ed3c0 SHA512 (lrslib-071a.tar.gz) = f33639c593769722a37262d6a90073076a4a8a7453ed81d948ebed6f0a5ee826b80c9211e5a601ca177b776c5388aa4e46efd55e8b219f1b6ce633232aa6b001 SHA512 (M2-emacs-01af405.tar.gz) = c3b59fa53a75682e9b3a719665169aecac97d341b2ac90a076373b235e1da337f8065b2874231db666ed0a2f885487824a31d090aa079f96f1c6e6ba58d24490 -SHA512 (mathic-1.0.tar.gz) = dd675985fc2a5c7efab3ec6492e4b4e4d7273f4d88bdee6d9dc19174d3e319baa5fd94994563efe46c7ed7685e253c173606efdfb2a66af2d1db35e6265d473d -SHA512 (mathicgb-1.0.tar.gz) = 09db7dd226b4a50fea5dbcf175d1da2136541b33ae098ed540735315a4eb33be2ca62d7c996b0d86470d1cad9d93261fd211635f84292ecbf7da04c83f4950f2 -SHA512 (memtailor-1.0.tar.gz) = 3d93cad8a8e62c4f4b8bd074019f44d2fd8b35cf7e50ccafea85fe15aaeb3af0b175bcd7ed055ee3d789ad557fdb83382e4b66826e7fb849521ff375f25fd16f +SHA512 (mathic-1.0.tar.gz) = 4c1dffe5fd45dfa5df9c01477828bba38905ec0b4b30052c821f535a1a8de34139fc91b364fb4fa779299c1ffb1a8a91ac37383d3bcb383f53c33055c7165f41 +SHA512 (mathicgb-1.0.tar.gz) = 5f419a0ad59610eba18edf69012603e0026c6de7c457546f40122b6fdd8bfb46a25b691cbdcd7e83c7495f21cbf1412c7b6a042e18e64500dfa18b368b3f9a5e +SHA512 (memtailor-1.0.tar.gz) = 54bbc2711bc463d3200de82fcdb7abe1da0bb6c2c3bf1f27b68d24ed2500e55daec1b3f3855e1a67e1fb14c8ab9c05d2b88b4daba7e99bf709939749d6a90032 SHA512 (mpfr-4.1.0.tar.xz) = 1bd1c349741a6529dfa53af4f0da8d49254b164ece8a46928cdb13a99460285622d57fe6f68cef19c6727b3f9daa25ddb3d7d65c201c8f387e421c7f7bee6273 SHA512 (mpsolve-3.2.1.tar.gz) = 8f0cb1be303767bf5a68c150df01c98f7f5e17bfaee685ea4cb9300c0dbf740069c774d647f141a4a1eb46fa54f23d9e75a800ce195cd522527c72e3c6aeed0f SHA512 (normaliz-3.7.2.tar.gz) = 044a1b5c7e877cdfceedbe6b283b982b66e58f0cc5b0ccf6a63a293044d1348290fde92531b4c4a0a58f5263bb7696a2511b5a1dff94222c9e56a2fe3fccb69b From a2ad9ab6784fd63a43d4b6eba91ccbf3cb2fbe58 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 19 Jan 2022 19:28:35 +0000 Subject: [PATCH 25/70] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- Macaulay2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index aafe8f4..d3ed51e 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -48,7 +48,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 Version: 1.19 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 or GPLv3 URL: http://macaulay2.com/ @@ -516,6 +516,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog +* Wed Jan 19 2022 Fedora Release Engineering - 1.19-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Wed Nov 24 2021 Jerry James - 1.19-1 - Version 1.19 From 0c8f1948445671ea434fb2f21e2411b9a7fc39b7 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Mon, 21 Feb 2022 09:25:53 -0700 Subject: [PATCH 26/70] Version 1.19.1. Disable LTO to work around segfaults. --- Macaulay2.spec | 22 ++++++++++++++++------ sources | 10 +++++----- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index d3ed51e..b184ccb 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -45,10 +45,16 @@ # The examples contain some python files which should not be byte compiled %global _python_bytecompile_extra 0 +# Starting with GCC 12, Macaulay2 segfaults during the build on all +# architectures when LTO is enabled. (With GCC 11, s390x did this, but the +# other architectures did not.) Until somebody can figure out what is going +# on, disable LTO universally. +%define _lto_cflags %{nil} + Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 -Version: 1.19 -Release: 2%{?dist} +Version: 1.19.1 +Release: 1%{?dist} License: GPLv2 or GPLv3 URL: http://macaulay2.com/ @@ -78,7 +84,7 @@ Source101: http://www.mpfr.org/mpfr-%{mpfrver}/mpfr-%{mpfrver}.tar.xz Provides: bundled(mpfr) = %{mpfrver} # FLINT is bundled because it must be linked with the specially-built MPFR -%global flintver 2.8.3 +%global flintver 2.8.4 Source102: http://www.flintlib.org/flint-%{flintver}.tar.gz Provides: bundled(flint) = %{flintver} @@ -89,7 +95,7 @@ Provides: bundled(factory) = %{factoryver} # MATHICGB is bundled because it must be built with different threading options %global mathicgbver 1.0 -%global mathicgbcommit 9ed59d9afe69253ea1d1ddeeaf5eb300d45ed9e1 +%global mathicgbcommit 6a9cabf106ceb02d27b3147da3a83822bee48923 Source104: https://github.com/Macaulay2/mathicgb/tarball/%{mathicgbcommit}/mathicgb-%{mathicgbver}.tar.gz Provides: bundled(mathicgb) = %{mathicgbver} @@ -99,13 +105,13 @@ Source105: https://faculty.math.illinois.edu/Macaulay2/Downloads/OtherSourceCode # MEMTAILOR is bundled because it causes garbage collector crashes otherwise %global memtailorver 1.0 -%global memtailorcommit 123afe02b7a458faa4be8ec3a85d6a362a5e7c89 +%global memtailorcommit 95dbac776c475f4b1c2b08a8e8c6def14c8aaf9a Source106: https://github.com/Macaulay2/memtailor/tarball/%{memtailorcommit}/memtailor-%{memtailorver}.tar.gz Provides: bundled(memtailor) = %{memtailorver} # MATHIC is bundled because it causes garbage collector crashes otherwise %global mathicver 1.0 -%global mathiccommit 68da8d452dcafeb07fc8749839c566662a2f9b03 +%global mathiccommit f52234d2357410f702d5be60c0a8471b5731496b Source107: https://github.com/Macaulay2/mathic/tarball/%{mathiccommit}/mathic-%{mathicver}.tar.gz Provides: bundled(mathic) = %{mathicver} @@ -516,6 +522,10 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog +* Mon Feb 21 2022 Jerry James - 1.19.1-1 +- Version 1.19.1 +- Disable LTO to work around segfaults + * Wed Jan 19 2022 Fedora Release Engineering - 1.19-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild diff --git a/sources b/sources index 6aab3c6..7d22a03 100644 --- a/sources +++ b/sources @@ -1,11 +1,11 @@ SHA512 (Macaulay2-icons.tar.xz) = 069aa0ad70a0253583b00091c094da9b79d2a2f0f2d38aa97f543081f5df5fd3b5a9e1463febd6947c3151cf01844133174c7372f57e158c2d3faba6baed5d1d -SHA512 (Macaulay2-1.19.tar.gz) = f72647ab923c36de44b861e15e4158c0ff4688be40795ad5def8954325f51ef07e79b43c2545e9e4c56b4f0efc6a59f6983a63416d288365e7e4fb08621301ca +SHA512 (Macaulay2-1.19.1.tar.gz) = 504f233ed7e4f954f0e91212c7a533655f18e8488e7462834b2a256faa891872b35af890808bde6695678916b68c45b4d3d74ae6963ec639bdd4c76c4fa4d53e SHA512 (4ti2-1.6.9.tar.gz) = f02b61ba04d7512e86d9574574669ec764d053fc5d01744dc6b521518d4165b41355ae12344923f1549b323406130c6562a4d9272b1b88de2ecc2c20d3d892d5 SHA512 (cddlib-094m.tar.gz) = d140d57391b1c963d68ca2e344fbda723a5077004bace322a18362fdc1fff8b50fdc4b598ca8cdf131158e07afc96c5d9aafd7abde082a9e241701e403310b9f SHA512 (cohomCalg-0.32.tar.gz) = b76d8de00b13a8fe8881222178247c5e99c15075c46290830f6c3afffb9dfc18af0d57f738ac5a0d7c00044db81b4465d1e0563c95f7f656a2440be5765c6818 SHA512 (Csdp-6.2.0.tgz) = 6f6c44abcb7b0e277f5a42a1e31acbd41c8fbdce0c1641982a48199fe1d922b28d86433d1a98ac71ae521bea04188a830c441db1e9d8eebf174debf501430e82 SHA512 (factory-4.2.1.tar.gz) = c1c0009cefa769807082b2bf9defb01c286f1bfb9c0c0ac2a07ab87a8019694ff26ba4f7ad43082305dd4fe79a459a340d40f5a2088e963331512c71d3a374c0 -SHA512 (flint-2.8.3.tar.gz) = c3d35ac4c840d0985291f54c7a1cd3c54eb90b3016ae3e94e3051bf1e010f3a4b53b0f05cfa5df0c6f99f398e259b25ec3563515e04ec9f5f9187624b3206aa9 +SHA512 (flint-2.8.4.tar.gz) = 56dbe7b8a4d0d10f79a0d453692a37f74e809ff698440128459b4f4c08c2b8ead23085c92adc944e15e5950371daebfc31e167f24bd9d5ab385bf7018dc4582a SHA512 (frobby_v0.9.0.tar.gz) = bc96ff20ec334932b5eaa8a3d15d0e36eab41eb85e8b74dbdc374dcaafc9873e44a8af16f6caae649aeea17cd6284caf244d4d345689ad43288f199c591a68a6 SHA512 (gfan0.6.2.tar.gz) = 08a9cc543967771af959a506b79db5b55e0e4942e4170dad8691db35ef7d381d878e1ea6534a3cacc0f5d30ec31564ec94cc20b46792d06f18a3a8a3c0aac91d SHA512 (givaro-4.1.1.tar.gz) = baaf139f42176838c541143a5b69acf47a8f31c17020a85cf413ce18ade2c3048e009d15c2acf4d71041c0776cd42f5fedb1c183ce1cc0f85cb8672ceac00ee7 @@ -16,9 +16,9 @@ SHA512 (libfplll-5.2.0.tar.gz) = 67d1a8deb92d3f9245983b09b7593b19c5d43c8fe77cfea SHA512 (linbox-1.6.3.tar.gz) = 7585f51b46b65a90328b4ff82f7c74eb59510c912a0bb0ce49263f4c7c1e777c0f9961e4672fa36be6fb84035a019b8e212615c363fd62d632e37c327d6ed3c0 SHA512 (lrslib-071a.tar.gz) = f33639c593769722a37262d6a90073076a4a8a7453ed81d948ebed6f0a5ee826b80c9211e5a601ca177b776c5388aa4e46efd55e8b219f1b6ce633232aa6b001 SHA512 (M2-emacs-01af405.tar.gz) = c3b59fa53a75682e9b3a719665169aecac97d341b2ac90a076373b235e1da337f8065b2874231db666ed0a2f885487824a31d090aa079f96f1c6e6ba58d24490 -SHA512 (mathic-1.0.tar.gz) = 4c1dffe5fd45dfa5df9c01477828bba38905ec0b4b30052c821f535a1a8de34139fc91b364fb4fa779299c1ffb1a8a91ac37383d3bcb383f53c33055c7165f41 -SHA512 (mathicgb-1.0.tar.gz) = 5f419a0ad59610eba18edf69012603e0026c6de7c457546f40122b6fdd8bfb46a25b691cbdcd7e83c7495f21cbf1412c7b6a042e18e64500dfa18b368b3f9a5e -SHA512 (memtailor-1.0.tar.gz) = 54bbc2711bc463d3200de82fcdb7abe1da0bb6c2c3bf1f27b68d24ed2500e55daec1b3f3855e1a67e1fb14c8ab9c05d2b88b4daba7e99bf709939749d6a90032 +SHA512 (mathic-1.0.tar.gz) = 6e2e27c4b85ffde91436eacdce7486ee1e2cd74f0c26d5a31db056ed5ac92d0c6313add6aa84c803b172bc60c541805e3068da88261ae9e2d80bf9d916430081 +SHA512 (mathicgb-1.0.tar.gz) = b1a958cc858b88a354c6212394e23ce63969f3eee3db2fee60de45105e6708475b8ba9911910f84a7c9a59055db40f166070710ffe89e7d2017cd2259a43e1e6 +SHA512 (memtailor-1.0.tar.gz) = 50eded674dc33d3c55f5ec0f250586106f7e16995baa4e46f21684016066cb41e02ace7d82b38305029b947f474835598a972c39dcb0ead6679566b53549a0df SHA512 (mpfr-4.1.0.tar.xz) = 1bd1c349741a6529dfa53af4f0da8d49254b164ece8a46928cdb13a99460285622d57fe6f68cef19c6727b3f9daa25ddb3d7d65c201c8f387e421c7f7bee6273 SHA512 (mpsolve-3.2.1.tar.gz) = 8f0cb1be303767bf5a68c150df01c98f7f5e17bfaee685ea4cb9300c0dbf740069c774d647f141a4a1eb46fa54f23d9e75a800ce195cd522527c72e3c6aeed0f SHA512 (normaliz-3.7.2.tar.gz) = 044a1b5c7e877cdfceedbe6b283b982b66e58f0cc5b0ccf6a63a293044d1348290fde92531b4c4a0a58f5263bb7696a2511b5a1dff94222c9e56a2fe3fccb69b From 673ab051de1d33c9bad211318a1272a3274b1d31 Mon Sep 17 00:00:00 2001 From: Thomas Rodgers Date: Wed, 4 May 2022 11:40:13 +0200 Subject: [PATCH 27/70] Rebuilt for Boost 1.78 --- Macaulay2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index b184ccb..d6cb758 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -54,7 +54,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 Version: 1.19.1 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 or GPLv3 URL: http://macaulay2.com/ @@ -522,6 +522,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog +* Wed May 04 2022 Thomas Rodgers - 1.19.1-2 +- Rebuilt for Boost 1.78 + * Mon Feb 21 2022 Jerry James - 1.19.1-1 - Version 1.19.1 - Disable LTO to work around segfaults From dcbf68be2b7ce826f2ca691b64a26d9100f01f20 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 20 Jul 2022 18:46:48 +0000 Subject: [PATCH 28/70] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- Macaulay2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index d6cb758..4a21c2d 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -54,7 +54,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 Version: 1.19.1 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 or GPLv3 URL: http://macaulay2.com/ @@ -522,6 +522,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog +* Wed Jul 20 2022 Fedora Release Engineering - 1.19.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Wed May 04 2022 Thomas Rodgers - 1.19.1-2 - Rebuilt for Boost 1.78 From 320b6a93ad9ffc0d0585b18b11b6ece06ded2b53 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Fri, 5 Aug 2022 16:36:32 -0600 Subject: [PATCH 29/70] Version 1.20. --- 2536.patch | 29 +++++++++ Macaulay2-1.16-ulimit.patch | 27 +++----- Macaulay2-1.17-default_make_targets.patch | 11 ++-- Macaulay2.spec | 66 +++++++++----------- mathic-1.0.patch | 75 ----------------------- mathicgb-1.0.patch | 11 ---- sources | 6 +- 7 files changed, 74 insertions(+), 151 deletions(-) create mode 100644 2536.patch delete mode 100644 mathic-1.0.patch diff --git a/2536.patch b/2536.patch new file mode 100644 index 0000000..38506cf --- /dev/null +++ b/2536.patch @@ -0,0 +1,29 @@ +From 3cb279aac40010572d2ea2367bca66203be2b861 Mon Sep 17 00:00:00 2001 +From: Jay Yang +Date: Fri, 1 Jul 2022 00:09:40 -0400 +Subject: [PATCH] change Monoid::set_degrees to add the right number of entries + to the degree_of_var_ list even when the degree length is 0 + +--- + M2/Macaulay2/e/monoid.cpp | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/M2/Macaulay2/e/monoid.cpp b/M2/Macaulay2/e/monoid.cpp +index fd53b942e3..0459ed4944 100644 +--- a/M2/Macaulay2/e/monoid.cpp ++++ b/M2/Macaulay2/e/monoid.cpp +@@ -225,7 +225,13 @@ void Monoid::set_degrees() + } + else + { +- for (int i = 0; i < nvars_; i++) heft_degree_of_var_->array[i] = 1; ++ for (int i = 0; i < nvars_; i++) ++ { ++ monomial m = degree_monoid_->make_one(); ++ degree_monoid_->from_expvector(t, m); ++ degree_of_var_.push_back(m); ++ heft_degree_of_var_->array[i] = 1; ++ } + } + degree_of_var_.push_back(degree_monoid_->make_one()); + } diff --git a/Macaulay2-1.16-ulimit.patch b/Macaulay2-1.16-ulimit.patch index 9d25e39..900bafe 100644 --- a/Macaulay2-1.16-ulimit.patch +++ b/Macaulay2-1.16-ulimit.patch @@ -1,16 +1,5 @@ ---- M2/GNUmakefile.in.orig 2021-11-17 15:21:40.000000000 -0700 -+++ M2/GNUmakefile.in 2021-11-24 16:10:22.499027509 -0700 -@@ -136,7 +136,7 @@ build-in-$1: submodules/$1/Makefile - $(MAKE) -C submodules/$1 all - check-in-$1: run-configure-in-$1 - ifeq ($(no-check-$1),) -- ulimit -v 1000000 && $(MAKE) -C submodules/$1 check -+ ulimit -v 2000000 && $(MAKE) -C submodules/$1 check - endif - - install-in-$1: build-in-$1; + $(MAKE) -C submodules/$1 install ---- M2/libraries/Makefile.library.in.orig 2021-11-17 15:21:40.000000000 -0700 -+++ M2/libraries/Makefile.library.in 2021-11-24 16:10:22.499027509 -0700 +--- M2/libraries/Makefile.library.in.orig 2022-05-13 20:58:36.000000000 -0600 ++++ M2/libraries/Makefile.library.in 2022-05-23 06:33:19.410991764 -0600 @@ -238,10 +238,10 @@ distclean: package-distclean clean::; rm -rf .patched* .untarred* $(LIBNAME)* .checked* .compiled* .configured* .installed* .untarred2* diffs tmp $(UNTARDIR) $(OLDUNTARDIR) distclean: clean ; rm -rf Makefile @@ -26,8 +15,8 @@ LIMIT := : ifeq (@ULIMIT_T@,yes) LIMIT += ; ulimit -t $(TLIMIT) ---- M2/Macaulay2/m2/basictests/Makefile.in.orig 2021-11-17 15:21:40.000000000 -0700 -+++ M2/Macaulay2/m2/basictests/Makefile.in 2021-11-24 16:10:22.499027509 -0700 +--- M2/Macaulay2/m2/basictests/Makefile.in.orig 2022-05-13 20:58:36.000000000 -0600 ++++ M2/Macaulay2/m2/basictests/Makefile.in 2022-05-23 06:33:19.417991753 -0600 @@ -22,17 +22,17 @@ $(TESTRESULTS) : @pre_exec_prefix@/bin/M ARGS := --silent -q --stop --no-core -e 'srcdir = "@srcdir@/"' @@ -53,8 +42,8 @@ LIMIT := ifeq (@ULIMIT_T@,yes) ---- M2/Macaulay2/tests/ComputationsBook/Makefile.chapter.in.orig 2021-11-17 15:21:40.000000000 -0700 -+++ M2/Macaulay2/tests/ComputationsBook/Makefile.chapter.in 2021-11-24 16:10:22.500027511 -0700 +--- M2/Macaulay2/tests/ComputationsBook/Makefile.chapter.in.orig 2022-05-13 20:58:36.000000000 -0600 ++++ M2/Macaulay2/tests/ComputationsBook/Makefile.chapter.in 2022-05-23 06:33:19.424991742 -0600 @@ -15,16 +15,16 @@ diff: LIMIT := @@ -76,8 +65,8 @@ endif ---- M2/Macaulay2/tests/Makefile.test.in.orig 2021-11-17 15:21:40.000000000 -0700 -+++ M2/Macaulay2/tests/Makefile.test.in 2021-11-24 16:10:22.500027511 -0700 +--- M2/Macaulay2/tests/Makefile.test.in.orig 2022-05-13 20:58:36.000000000 -0600 ++++ M2/Macaulay2/tests/Makefile.test.in 2022-05-23 06:33:19.431991731 -0600 @@ -6,18 +6,18 @@ DEFERRED ?= no DOTS ?= ../.. diff --git a/Macaulay2-1.17-default_make_targets.patch b/Macaulay2-1.17-default_make_targets.patch index 96be906..fb6da94 100644 --- a/Macaulay2-1.17-default_make_targets.patch +++ b/Macaulay2-1.17-default_make_targets.patch @@ -1,11 +1,12 @@ ---- M2/Macaulay2/Makefile.in.orig 2021-01-12 14:18:59.570080654 -0700 -+++ M2/Macaulay2/Makefile.in 2021-01-12 14:19:19.802046768 -0700 -@@ -3,7 +3,7 @@ +--- M2/Macaulay2/Makefile.in.orig 2022-05-23 06:34:31.896886749 -0600 ++++ M2/Macaulay2/Makefile.in 2022-05-23 06:35:19.380825646 -0600 +@@ -3,8 +3,7 @@ VPATH = @srcdir@ include ../include/config.Makefile all: @pre_docdir@/COPYING-GPL-2 @pre_docdir@/COPYING-GPL-3 @pre_docdir@/README @pre_docdir@/LAYOUT --SUBDIRS = util c d e system bin m2 man packages editors html-check-links tests -+SUBDIRS = util c d e system bin m2 man packages editors +-SUBDIRS = util c d e system bin m2 man packages editors \ +- $(if $(filter html, @DOCUMENTATION@), html-check-links) tests ++SUBDIRS = util c d e system bin m2 man packages editors tests define do-in-subdirs $(foreach d,$(SUBDIRS), diff --git a/Macaulay2.spec b/Macaulay2.spec index 4a21c2d..c487f29 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -12,11 +12,11 @@ # memtailor and mathic, which sit underneath mathicgb, must also be bundled or # we get random GC-related crashes for an as yet undiagnosed reason. # -# We have to use the static version of the libfplll and givaro library. They -# have global objects whose constructors run before GC is initialized. If we -# allow the shared libraries to be unloaded, which happens as a normal part of -# Macaulay2's functioning, then GC tries to free objects it did not allocate, -# which leads to a segfault. +# We have to use the static versions of the libfplll and givaro libraries. +# They have global objects whose constructors run before GC is initialized. +# If we allow the shared libraries to be unloaded, which happens as a normal +# part of Macaulay2's functioning, then GC tries to free objects it did not +# allocate, which leads to a segfault. # # We have to bundle the linbox package. It has global constructors that cause # the same problem as libfplll. @@ -53,11 +53,11 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 -Version: 1.19.1 -Release: 3%{?dist} +Version: 1.20 +Release: 1%{?dist} License: GPLv2 or GPLv3 -URL: http://macaulay2.com/ +URL: https://macaulay2.com/ %if 0%{?snap:1} Source0: %{name}-%{version}-%{snap}.tar.xz %else @@ -74,9 +74,11 @@ Source20: etags.sh ## BUNDLED code # Normaliz must sometimes be bundled due to version differences -%global normalizver 3.7.2 +%if ! %system_normaliz +%global normalizver 3.9.2 Source100: http://www.math.uiuc.edu/Macaulay2/Downloads/OtherSourceCode/normaliz-%{normalizver}.tar.gz Provides: bundled(normaliz) = %{normalizver} +%endif # MPFR is bundled because it must be built with different threading options %global mpfrver 4.1.0 @@ -95,7 +97,7 @@ Provides: bundled(factory) = %{factoryver} # MATHICGB is bundled because it must be built with different threading options %global mathicgbver 1.0 -%global mathicgbcommit 6a9cabf106ceb02d27b3147da3a83822bee48923 +%global mathicgbcommit 7c2bea4b6c7bd72a1b732663a9b01fa36dd9bf4f Source104: https://github.com/Macaulay2/mathicgb/tarball/%{mathicgbcommit}/mathicgb-%{mathicgbver}.tar.gz Provides: bundled(mathicgb) = %{mathicgbver} @@ -111,7 +113,7 @@ Provides: bundled(memtailor) = %{memtailorver} # MATHIC is bundled because it causes garbage collector crashes otherwise %global mathicver 1.0 -%global mathiccommit f52234d2357410f702d5be60c0a8471b5731496b +%global mathiccommit 18ff8de1f5b5102ef291e450522c4930cf9eb7f2 Source107: https://github.com/Macaulay2/mathic/tarball/%{mathiccommit}/mathic-%{mathicver}.tar.gz Provides: bundled(mathic) = %{mathicver} @@ -127,8 +129,6 @@ Source200: linbox-1.6.3.patch Source201: mpfr-4.1.0.patch # Fix mathicgb build on big endian machines and with gcc 11 Source202: mathicgb-1.0.patch -# Silence GCC warnings about mathic code -Source203: mathic-1.0.patch ## FAKE library tarballs that convince Macaulay2 to use the system versions Source300: frobby_v0.9.0.tar.gz @@ -146,13 +146,13 @@ Source311: Csdp-6.2.0.tgz Source312: mpsolve-3.2.1.tar.gz # let Fedora optflags override the defaults -Patch0: %{name}-1.15-optflags.patch +Patch0: %{name}-1.15-optflags.patch # give the build a little more time and space than upstream permits Patch1: %{name}-1.16-ulimit.patch # drop 'tests' from default make target -Patch2: %{name}-1.17-default_make_targets.patch +Patch2: %{name}-1.17-default_make_targets.patch # disable check for gftables -Patch3: %{name}-1.18-no_gftables.patch +Patch3: %{name}-1.18-no_gftables.patch # adapt to libfplll 5.2.1 Patch4: %{name}-1.15-fplll.patch # do not override the debug level @@ -161,6 +161,8 @@ Patch5: %{name}-1.17-configure.patch Patch6: %{name}-1.16-rightarrow.patch # Fix LTO warnings about mismatched declarations and definitions Patch7: %{name}-1.18-lto.patch +# Fix a crash when building documentation +Patch8: https://github.com/Macaulay2/M2/pull/2536.patch BuildRequires: 4ti2 BuildRequires: autoconf @@ -210,7 +212,7 @@ BuildRequires: libatomic_ops-devel BuildRequires: libfplll-static BuildRequires: libfrobby-devel BuildRequires: libnauty-devel -BuildRequires: libnormaliz-devel >= 3.6.3 +BuildRequires: libnormaliz-devel >= 3.9.2 BuildRequires: libtool BuildRequires: lrslib-devel BuildRequires: lrslib-utils @@ -297,7 +299,9 @@ tar -C Macaulay2/editors/emacs --strip-components=1 -xzf %{SOURCE1} install -p -m755 %{SOURCE20} ./etags ## bundled code +%if ! %system_normaliz install -p -m644 %{SOURCE100} BUILD/tarfiles/ +%endif install -p -m644 %{SOURCE101} %{SOURCE102} %{SOURCE103} %{SOURCE105} \ %{SOURCE108} BUILD/tarfiles/ sed -i 's/\(VERSION = \).*/\1%{mpfrver}/' libraries/mpfr/Makefile.in @@ -309,7 +313,6 @@ tar -C submodules/mathicgb -xf %{SOURCE104} --strip-components=1 patch -d submodules/mathicgb -p0 < %{SOURCE202} tar -C submodules/memtailor -xf %{SOURCE106} --strip-components=1 tar -C submodules/mathic -xf %{SOURCE107} --strip-components=1 -patch -d submodules/mathic -p0 < %{SOURCE203} ## patches for bundled code sed -e 's,--with-blas,&=%{_includedir}/flexiblas --with-ntl,' \ @@ -345,6 +348,7 @@ ln -s %{_datadir}/factory \ %patch5 -p1 -b .configure %patch6 -p1 -b .rightarrow %patch7 -p1 -b .lto +%patch8 -p2 -b .crash2536 # repeatable builds: inject a node name sed -i 's,`uname -n`,build.fedoraproject.org,' configure.ac @@ -371,26 +375,13 @@ sed -e 's/BUILD_cddlib=yes/BUILD_cddlib=no/' \ sed -i 's/\(LIBNAME = flint\)2/\1/' libraries/flint/Makefile.in # Cannot do git submodule operations on a koji builder -sed -i 's/git-checkout-in-memtailor.*//' GNUmakefile.in +sed -i 's/git-checkout-in-\$1, git-checkout-warning-for-\$1//' GNUmakefile.in # (re)generate configure autoreconf -fi . %build -%ifarch s390x -# For as yet unknown reasons, when this package is built with optimization -# level -O2 on s390x, the mathicgb code accesses out-of-bounds array elements. -# In addition, valgrind shows accesses to uninitialized elements of arrays -# that should not have any uninitialized elements. The code eventually -# segfaults. When built with -O1 and LTO, the linker segfaults. Until we can -# diagnose and fix these issues, we build with -O1 and without LTO on s390x. -%define _lto_cflags %{nil} -optflags=$(sed 's/-O2/-O/g' <<< "%{optflags}") -%else -optflags="%{optflags}" -%endif - # Possible bug in Macaulay2 1.19: the memtailor, mathic, and mathicgb headers # cannot be found. We work around this here. See if the problem has been fixed # in later versions. @@ -400,8 +391,8 @@ CPPFLAGS="-I$PWD/submodules/memtailor/src -I$PWD/submodules/mathic/src -I$PWD/su mkdir -p BUILD/%{_target_platform} pushd BUILD/%{_target_platform} CPPFLAGS="$CPPFLAGS -I%{_includedir}/cddlib -I%{_includedir}/frobby" \ -CFLAGS="${optflags} -fsigned-char" \ -CXXFLAGS="${optflags} -fsigned-char" \ +CFLAGS="%{build_cflags} -fsigned-char" \ +CXXFLAGS="%{build_cxxflags} -fsigned-char" \ LIBS="-lflexiblas" \ ../../configure \ --build=%{_build} \ @@ -492,10 +483,6 @@ rm -fr %{buildroot}/builddir %check -CFLAGS="%{build_cflags}" \ -CXXFLAGS="%{build_cxxflags}" \ -LDFLAGS="%{build_ldflags}" \ - # The test suite has grown to the point where it takes many hours to run. # Just run the most basic tests. make check -C BUILD/%{_target_platform}/Macaulay2/e @@ -522,6 +509,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog +* Thu Aug 4 2022 Jerry James - 1.20-1 +- Version 1.20 + * Wed Jul 20 2022 Fedora Release Engineering - 1.19.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild diff --git a/mathic-1.0.patch b/mathic-1.0.patch deleted file mode 100644 index d45f2a6..0000000 --- a/mathic-1.0.patch +++ /dev/null @@ -1,75 +0,0 @@ ---- Makefile.am.orig 2021-09-30 19:42:32.000000000 -0600 -+++ Makefile.am 2021-10-07 09:21:40.078080233 -0600 -@@ -10,7 +10,7 @@ libmathic_la_CPPFLAGS = $(DEPS_CFLAGS) - lib_LTLIBRARIES = libmathic.la - - # set the C++ compiler to include src/ --AM_CXXFLAGS=-I$(top_srcdir)/src/ -std=gnu++0x -+AM_CXXFLAGS=-I$(top_srcdir)/src/ -std=gnu++14 - - # libraries that are needed by this library - libmathic_la_LIBADD= $(DEPS_LIBS) -@@ -85,7 +85,7 @@ if with_gtest - TESTS=unittest - check_PROGRAMS=$(TESTS) - --unittest_CXXFLAGS = -I$(top_srcdir)/src/ -std=gnu++0x -+unittest_CXXFLAGS = -I$(top_srcdir)/src/ -std=gnu++14 - unittest_LDADD = $(top_builddir)/libmathic.la $(DEPS_LIBS) -lmemtailor -lpthread - unittest_CPPFLAGS = $(DEPS_CFLAGS) - ---- src/mathic/error.cpp.orig 2021-09-30 19:42:32.000000000 -0600 -+++ src/mathic/error.cpp 2021-10-07 09:21:23.097049833 -0600 -@@ -2,15 +2,15 @@ - #include - - namespace mathic { -- void reportError(const std::string& errorMsg) { -+ void reportError [[noreturn]] (const std::string& errorMsg) { - throw MathicException("ERROR: " + errorMsg); - } - -- void reportInternalError(const std::string& errorMsg) { -+ void reportInternalError [[noreturn]] (const std::string& errorMsg) { - throw InternalMathicException("INTERNAL ERROR: " + errorMsg); - } - -- void reportInternalError -+ void reportInternalError [[noreturn]] - (const std::string& errorMsg, const char* file, unsigned int lineNumber) { - - std::ostringstream err; ---- src/mathic/error.h.orig 2021-09-30 19:42:32.000000000 -0600 -+++ src/mathic/error.h 2021-10-07 09:21:23.098049835 -0600 -@@ -18,26 +18,19 @@ namespace mathic { - InternalMathicException(const std::string& str): logic_error(str) {} - }; - -- // The do {...} while (0) is to collect everything into a single -- // statement that still requires a semicolon after it. The throw is to -- // prevent spurious compiler warnings about a missing return -- // statement. - #define MATHIC_INTERNAL_ERROR(msg) \ -- do { \ -- reportInternalError(msg, __FILE__, __LINE__); \ -- throw; \ -- } while (false) -+ reportInternalError(msg, __FILE__, __LINE__) - #define INTERNAL_ERROR_UNIMPLEMENTED() \ - INTERNAL_ERROR("Called function that has not been implemented.") - - // These methods throw exceptions. -- void reportError(const std::string& errorMsg); -- void reportInternalError(const std::string& errorMsg); -- void reportInternalError -+ void reportError [[noreturn]] (const std::string& errorMsg); -+ void reportInternalError [[noreturn]] (const std::string& errorMsg); -+ void reportInternalError [[noreturn]] - (const std::string& errorMsg, const char* file, unsigned int lineNumber); - - template -- void throwError(const std::string& errorMsg) { -+ void throwError [[noreturn]] (const std::string& errorMsg) { - throw Exception("ERROR: " + errorMsg + '\n'); - } - diff --git a/mathicgb-1.0.patch b/mathicgb-1.0.patch index 1a0f8a3..fcb6271 100644 --- a/mathicgb-1.0.patch +++ b/mathicgb-1.0.patch @@ -1,14 +1,3 @@ ---- src/mathicgb/MathicIO.hpp.orig 2021-09-30 19:41:54.000000000 -0600 -+++ src/mathicgb/MathicIO.hpp 2021-11-24 16:04:28.969499776 -0700 -@@ -300,7 +300,7 @@ auto MathicIO::readOrder( - componentsAscendingDesired, - schreyering - ); -- return std::move(order); -+ return order; - } - - template --- src/mathicgb/MonoMonoid.hpp.orig 2021-09-30 19:41:54.000000000 -0600 +++ src/mathicgb/MonoMonoid.hpp 2021-11-24 16:05:44.657612757 -0700 @@ -573,7 +573,8 @@ public: diff --git a/sources b/sources index 7d22a03..a71e341 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ SHA512 (Macaulay2-icons.tar.xz) = 069aa0ad70a0253583b00091c094da9b79d2a2f0f2d38aa97f543081f5df5fd3b5a9e1463febd6947c3151cf01844133174c7372f57e158c2d3faba6baed5d1d -SHA512 (Macaulay2-1.19.1.tar.gz) = 504f233ed7e4f954f0e91212c7a533655f18e8488e7462834b2a256faa891872b35af890808bde6695678916b68c45b4d3d74ae6963ec639bdd4c76c4fa4d53e +SHA512 (Macaulay2-1.20.tar.gz) = 188469fda279aeb62bd35b02440c0ba77f50cba927e5bf454afdbd9c340564c7c6acfa6f342193b2faef75d8140adfcb5a9862ef6399396f27a5e9fd4a34b658 SHA512 (4ti2-1.6.9.tar.gz) = f02b61ba04d7512e86d9574574669ec764d053fc5d01744dc6b521518d4165b41355ae12344923f1549b323406130c6562a4d9272b1b88de2ecc2c20d3d892d5 SHA512 (cddlib-094m.tar.gz) = d140d57391b1c963d68ca2e344fbda723a5077004bace322a18362fdc1fff8b50fdc4b598ca8cdf131158e07afc96c5d9aafd7abde082a9e241701e403310b9f SHA512 (cohomCalg-0.32.tar.gz) = b76d8de00b13a8fe8881222178247c5e99c15075c46290830f6c3afffb9dfc18af0d57f738ac5a0d7c00044db81b4465d1e0563c95f7f656a2440be5765c6818 @@ -16,8 +16,8 @@ SHA512 (libfplll-5.2.0.tar.gz) = 67d1a8deb92d3f9245983b09b7593b19c5d43c8fe77cfea SHA512 (linbox-1.6.3.tar.gz) = 7585f51b46b65a90328b4ff82f7c74eb59510c912a0bb0ce49263f4c7c1e777c0f9961e4672fa36be6fb84035a019b8e212615c363fd62d632e37c327d6ed3c0 SHA512 (lrslib-071a.tar.gz) = f33639c593769722a37262d6a90073076a4a8a7453ed81d948ebed6f0a5ee826b80c9211e5a601ca177b776c5388aa4e46efd55e8b219f1b6ce633232aa6b001 SHA512 (M2-emacs-01af405.tar.gz) = c3b59fa53a75682e9b3a719665169aecac97d341b2ac90a076373b235e1da337f8065b2874231db666ed0a2f885487824a31d090aa079f96f1c6e6ba58d24490 -SHA512 (mathic-1.0.tar.gz) = 6e2e27c4b85ffde91436eacdce7486ee1e2cd74f0c26d5a31db056ed5ac92d0c6313add6aa84c803b172bc60c541805e3068da88261ae9e2d80bf9d916430081 -SHA512 (mathicgb-1.0.tar.gz) = b1a958cc858b88a354c6212394e23ce63969f3eee3db2fee60de45105e6708475b8ba9911910f84a7c9a59055db40f166070710ffe89e7d2017cd2259a43e1e6 +SHA512 (mathic-1.0.tar.gz) = e95c2397cdea3bbff1c8cd52273277183535f07443c222e38659861c25d392b09cbfb33c9cc2a482f8dc9c1b6bc1754e86934fe5a833f8f19ef0edf0cd2e7165 +SHA512 (mathicgb-1.0.tar.gz) = 8e69689f286b703d8018ca4f79054b4339054d0a5bba5095fd57393c2301c5c66afa9bcfe5ed693630f07bbe8a1774c7ea07f4e384d2a3a7cde4f613b7844b14 SHA512 (memtailor-1.0.tar.gz) = 50eded674dc33d3c55f5ec0f250586106f7e16995baa4e46f21684016066cb41e02ace7d82b38305029b947f474835598a972c39dcb0ead6679566b53549a0df SHA512 (mpfr-4.1.0.tar.xz) = 1bd1c349741a6529dfa53af4f0da8d49254b164ece8a46928cdb13a99460285622d57fe6f68cef19c6727b3f9daa25ddb3d7d65c201c8f387e421c7f7bee6273 SHA512 (mpsolve-3.2.1.tar.gz) = 8f0cb1be303767bf5a68c150df01c98f7f5e17bfaee685ea4cb9300c0dbf740069c774d647f141a4a1eb46fa54f23d9e75a800ce195cd522527c72e3c6aeed0f From 3e37e1a7c61a2bc8b4f1addfe58908b3ce1a4b64 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Mon, 8 Aug 2022 06:08:59 -0600 Subject: [PATCH 30/70] Restore s390x optimization reduction, apparently still needed. --- Macaulay2.spec | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index c487f29..4034e32 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -382,6 +382,19 @@ autoreconf -fi . %build +%ifarch s390x +# For as yet unknown reasons, when this package is built with optimization +# level -O2 on s390x, the mathicgb code accesses out-of-bounds array elements. +# In addition, valgrind shows accesses to uninitialized elements of arrays +# that should not have any uninitialized elements. The code eventually +# segfaults. When built with -O1 and LTO, the linker segfaults. Until we can +# diagnose and fix these issues, we build with -O1 and without LTO on s390x. +%define _lto_cflags %{nil} +optflags=$(sed 's/-O2/-O/g' <<< "%{build_cflags}") +%else +optflags="%{build_cflags}" +%endif + # Possible bug in Macaulay2 1.19: the memtailor, mathic, and mathicgb headers # cannot be found. We work around this here. See if the problem has been fixed # in later versions. @@ -391,8 +404,8 @@ CPPFLAGS="-I$PWD/submodules/memtailor/src -I$PWD/submodules/mathic/src -I$PWD/su mkdir -p BUILD/%{_target_platform} pushd BUILD/%{_target_platform} CPPFLAGS="$CPPFLAGS -I%{_includedir}/cddlib -I%{_includedir}/frobby" \ -CFLAGS="%{build_cflags} -fsigned-char" \ -CXXFLAGS="%{build_cxxflags} -fsigned-char" \ +CFLAGS="$optflags -fsigned-char" \ +CXXFLAGS="$optflags -fsigned-char" \ LIBS="-lflexiblas" \ ../../configure \ --build=%{_build} \ From 9880d23979d1bd8727d94c7609e8bb8321259765 Mon Sep 17 00:00:00 2001 From: Rich Mattes Date: Sun, 25 Sep 2022 14:42:42 -0400 Subject: [PATCH 31/70] Rebuild for tinyxml2-9.0.0 --- Macaulay2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index 4034e32..1526886 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -54,7 +54,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 Version: 1.20 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 or GPLv3 URL: https://macaulay2.com/ @@ -522,6 +522,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog +* Sun Sep 25 2022 Rich Mattes - 1.20-2 +- Rebuild for tinyxml2-9.0.0 + * Thu Aug 4 2022 Jerry James - 1.20-1 - Version 1.20 From 5f575ce03652d285672f2a425aa36a0a14efc2f0 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Tue, 20 Dec 2022 15:38:58 -0700 Subject: [PATCH 32/70] Convert License tag to SPDX --- Macaulay2.spec | 112 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 111 insertions(+), 1 deletion(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index 1526886..97e0a4f 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -56,7 +56,114 @@ Name: Macaulay2 Version: 1.20 Release: 2%{?dist} -License: GPLv2 or GPLv3 +# GPL-2.0-only OR GPL-3.0-only: +# - the project as a whole +# - factory (bundled) +# GPL-1.0-or-later: +# - Macaulay2/packages/FormalGroupLaws.m2 +# - Macaulay2/packages/WeylGroups.m2 +# GPL-2.0-only: +# - Macaulay2/packages/ModuleDeformations.m2 +# - Macaulay2/packages/QuillenSuslin.m2 +# - Macaulay2/packages/Visualize.m2 +# GPL-2.0-or-later: +# - mathicgb (bundled) +# - Macaulay2/e/bibasis +# - Macaulay2/m2/computations.m2 +# - Macaulay2/packages/AlgebraicSplines.m2 +# - Macaulay2/packages/BIBasis.m2 +# - Macaulay2/packages/Binomials.m2 +# - Macaulay2/packages/Chordal.m2 +# - Macaulay2/packages/Cremona.m2 +# - Macaulay2/packages/Cyclotomic.m2 +# - Macaulay2/packages/EdgeIdeals.m2 +# - Macaulay2/packages/FourierMotzkin.m2 +# - Macaulay2/packages/GKMVarieties.m2 +# - Macaulay2/packages/GradedLieAlgebras.m2 +# - Macaulay2/packages/GraphicalModels* +# - Macaulay2/packages/Graphics.m2 +# - Macaulay2/packages/Graphs.m2 +# - Macaulay2/packages/GroebnerWalk.m2 +# - Macaulay2/packages/HyperplaneArrangements.m2 +# - Macaulay2/packages/InvariantRing* +# - Macaulay2/packages/KustinMiller.m2 +# - Macaulay2/packages/LieTypes.m2 +# - Macaulay2/packages/MonomialAlgebras.m2 +# - Macaulay2/packages/MultiprojectiveVarieties.m2 +# - Macaulay2/packages/NAGtypes.m2 +# - Macaulay2/packages/Nauty* +# - Macaulay2/packages/Normaliz.m2 +# - Macaulay2/packages/NumericalAlgebraicGeometry.m2 +# - Macaulay2/packages/PackageCitations.m2 +# - Macaulay2/packages/Posets.m2 +# - Macaulay2/packages/RationalPoints* +# - Macaulay2/packages/ResLengthThree.m2 +# - Macaulay2/packages/ResolutionsOfStanleyReisnerRings.m2 +# - Macaulay2/packages/Resultants.m2 +# - Macaulay2/packages/RunExternalM2.m2 +# - Macaulay2/packages/SLPexpressions.m2 +# - Macaulay2/packages/SLnEquivariantMatrices.m2 +# - Macaulay2/packages/SimplicialDecomposability.m2 +# - Macaulay2/packages/SparseResultants.m2 +# - Macaulay2/packages/SpecialFanoFourfolds.m2 +# - Macaulay2/packages/StatGraphs.m2 +# - Macaulay2/packages/TriangularSets.m2 +# - Macaulay2/packages/VectorFields.m2 +# GPL-3.0-or-later: +# - normaliz, when it is bundled +# - Macaulay2/e/mpreal.h +# - Macaulay2/packages/BettiCharacters.m2 +# - Macaulay2/packages/CodingTheory.m2 +# - Macaulay2/packages/FGLM.m2 +# - Macaulay2/packages/HighestWeights* +# - Macaulay2/packages/Jets.m2 +# - Macaulay2/packages/LocalRings +# - Macaulay2/packages/MonomialIntegerPrograms.m2 +# - Macaulay2/packages/MultiplierIdeals.m2 +# - Macaulay2/packages/NormalToricVarieties.m2 +# - Macaulay2/packages/NumericSolutions.m2 +# - Macaulay2/packages/OldPolyhedra.m2 +# - Macaulay2/packages/OldToricVectorBundles.m2 +# - Macaulay2/packages/PieriMaps.m2 +# - Macaulay2/packages/Polyhedra.m2 +# - Macaulay2/packages/PositivityToricBundles.m2 +# - Macaulay2/packages/SchurRings.m2 +# - Macaulay2/packages/SchurVeronese.m2 +# - Macaulay2/packages/Simplicial* +# - Macaulay2/packages/SpectralSequences.m2 +# - Macaulay2/packages/TensorComplexes.m2 +# - Macaulay2/packages/ToricTopology.m2 +# - Macaulay2/packages/ToricVectorBundles.m2 +# - Macaulay2/packages/VersalDeformations.m2 +# LGPL-2.0-or-later: +# - flint (bundled) +# - linbox (bundled) +# - mathic (bundled) +# LGPL-3.0-or-later: +# - mpfr (bundled) +# Apache-2.0: +# - Macaulay2/packages/OpenMath.m2 +# - Macaulay2/packages/SCSCP.m2 +# BSD-3-Clause: +# - memtailor (bundled) +# MIT: +# - Macaulay2/packages/Visualize/css +# - Macaulay2/packages/Visualize/js +# MIT AND OFL-1.1-RFN: +# - Macaulay2/packages/Style +# LicenseRef-Fedora-Public-Domain: +# - Macaulay2/e/localring* +# - Macaulay2/e/mutablecomplex* +# - Macaulay2/e/NAG* +# - Macaulay2/e/SLP* +# - Macaulay2/packages/Depth.m2 +# - Macaulay2/packages/Divisor.m2 +# - Macaulay2/packages/FastMinors.m2 +# - Macaulay2/packages/LatticePolytopes.m2 +# - Macaulay2/packages/NoetherNormalization.m2 +# - Macaulay2/packages/RationalMaps.m2 +# - Macaulay2/packages/SectionRing.m2 +License: (GPL-2.0-only OR GPL-3.0-only) AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.0-or-later AND LGPL-3.0-or-later AND Apache-2.0 AND BSD-3-Clause AND MIT AND OFL-1.1-RFN AND LicenseRef-Fedora-Public-Domain URL: https://macaulay2.com/ %if 0%{?snap:1} Source0: %{name}-%{version}-%{snap}.tar.xz @@ -522,6 +629,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog +* Tue Dec 20 2022 Jerry James - 1.20-2 +- Convert License tag to SPDX + * Sun Sep 25 2022 Rich Mattes - 1.20-2 - Rebuild for tinyxml2-9.0.0 From 2bd041957d7077765e32e3d887caf1471a576934 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Thu, 22 Dec 2022 19:02:18 -0700 Subject: [PATCH 33/70] Version 1.21 - Drop upstreamed patch for crash when building documentation - Use rdns names for the desktop and metainfo files --- 2536.patch | 29 ------- Macaulay2.spec | 83 ++++++++----------- ...desktop => com.macaulay2.macaulay2.desktop | 0 ...ml => com.macaulay2.macaulay2.metainfo.xml | 10 +-- mathicgb-1.0.patch | 22 ----- sources | 7 +- 6 files changed, 44 insertions(+), 107 deletions(-) delete mode 100644 2536.patch rename Macaulay2.desktop => com.macaulay2.macaulay2.desktop (100%) rename Macaulay2.metainfo.xml => com.macaulay2.macaulay2.metainfo.xml (80%) delete mode 100644 mathicgb-1.0.patch diff --git a/2536.patch b/2536.patch deleted file mode 100644 index 38506cf..0000000 --- a/2536.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 3cb279aac40010572d2ea2367bca66203be2b861 Mon Sep 17 00:00:00 2001 -From: Jay Yang -Date: Fri, 1 Jul 2022 00:09:40 -0400 -Subject: [PATCH] change Monoid::set_degrees to add the right number of entries - to the degree_of_var_ list even when the degree length is 0 - ---- - M2/Macaulay2/e/monoid.cpp | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/M2/Macaulay2/e/monoid.cpp b/M2/Macaulay2/e/monoid.cpp -index fd53b942e3..0459ed4944 100644 ---- a/M2/Macaulay2/e/monoid.cpp -+++ b/M2/Macaulay2/e/monoid.cpp -@@ -225,7 +225,13 @@ void Monoid::set_degrees() - } - else - { -- for (int i = 0; i < nvars_; i++) heft_degree_of_var_->array[i] = 1; -+ for (int i = 0; i < nvars_; i++) -+ { -+ monomial m = degree_monoid_->make_one(); -+ degree_monoid_->from_expvector(t, m); -+ degree_of_var_.push_back(m); -+ heft_degree_of_var_->array[i] = 1; -+ } - } - degree_of_var_.push_back(degree_monoid_->make_one()); - } diff --git a/Macaulay2.spec b/Macaulay2.spec index 97e0a4f..a649457 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -23,7 +23,7 @@ %global m2url https://github.com/Macaulay2/M2 -%global emacscommit 01af405c5c92f90e4009ff580a1b1dcefe43a714 +%global emacscommit 86150290208bd9e468511b4b69a187ce870f303e %global emacsurl https://github.com/Macaulay2/M2-emacs %global emacsshort %(cut -b -7 <<< %{emacscommit}) @@ -37,8 +37,6 @@ # use system normaliz %global system_normaliz 1 #endif -# standardize on gmp instead of mpir (mostly for pari/sagemath) -%global gmp 1 %global ISSUE %{?fedora:Fedora-%{fedora}}%{?rhel:RedHatEnterprise-%{rhel}} %global M2_machine %{_target_cpu}-Linux-%{ISSUE} @@ -53,8 +51,8 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 -Version: 1.20 -Release: 2%{?dist} +Version: 1.21 +Release: 1%{?dist} # GPL-2.0-only OR GPL-3.0-only: # - the project as a whole @@ -175,8 +173,8 @@ Source1: %{emacsurl}/tarball/%{emacscommit}/M2-emacs-%{emacsshort}.tar.gz # Various sizes of the planets icon from macaulay2.com. See README.icons in # the tar file for details on how these icons were created. Source10: Macaulay2-icons.tar.xz -Source11: Macaulay2.desktop -Source12: Macaulay2.metainfo.xml +Source11: com.macaulay2.macaulay2.desktop +Source12: com.macaulay2.macaulay2.metainfo.xml Source20: etags.sh ## BUNDLED code @@ -204,7 +202,7 @@ Provides: bundled(factory) = %{factoryver} # MATHICGB is bundled because it must be built with different threading options %global mathicgbver 1.0 -%global mathicgbcommit 7c2bea4b6c7bd72a1b732663a9b01fa36dd9bf4f +%global mathicgbcommit f3a05da1494843b5e4e7baa18e644cc6f32baeca Source104: https://github.com/Macaulay2/mathicgb/tarball/%{mathicgbcommit}/mathicgb-%{mathicgbver}.tar.gz Provides: bundled(mathicgb) = %{mathicgbver} @@ -234,8 +232,6 @@ Provides: bundled(linbox) = %{linboxver} Source200: linbox-1.6.3.patch # MPFR bug fixes from mpfr upstream. Source201: mpfr-4.1.0.patch -# Fix mathicgb build on big endian machines and with gcc 11 -Source202: mathicgb-1.0.patch ## FAKE library tarballs that convince Macaulay2 to use the system versions Source300: frobby_v0.9.0.tar.gz @@ -268,15 +264,13 @@ Patch5: %{name}-1.17-configure.patch Patch6: %{name}-1.16-rightarrow.patch # Fix LTO warnings about mismatched declarations and definitions Patch7: %{name}-1.18-lto.patch -# Fix a crash when building documentation -Patch8: https://github.com/Macaulay2/M2/pull/2536.patch BuildRequires: 4ti2 +BuildRequires: appstream BuildRequires: autoconf BuildRequires: autoconf-archive BuildRequires: bison BuildRequires: boost-devel -BuildRequires: cddlib-devel BuildRequires: chrpath BuildRequires: cohomCalg BuildRequires: csdp-tools @@ -289,11 +283,8 @@ BuildRequires: doxygen BuildRequires: eigen3-static # etags BuildRequires: emacs -BuildRequires: expat-devel BuildRequires: factory-gftables -BuildRequires: fflas-ffpack-devel BuildRequires: flex -BuildRequires: flexiblas-devel BuildRequires: gawk BuildRequires: gcc-c++ BuildRequires: gcc-gfortran @@ -304,45 +295,45 @@ BuildRequires: gfan BuildRequires: git-core BuildRequires: givaro-static BuildRequires: glpk-devel -%if 0%{?gmp} -BuildRequires: gmp-devel -%else -BuildRequires: mpir-devel -%endif -BuildRequires: gtest-devel BuildRequires: iml-devel BuildRequires: info -BuildRequires: libappstream-glib -BuildRequires: libgfan-devel -BuildRequires: libtool -BuildRequires: libatomic_ops-devel BuildRequires: libfplll-static BuildRequires: libfrobby-devel -BuildRequires: libnauty-devel +BuildRequires: libgfan-devel BuildRequires: libnormaliz-devel >= 3.9.2 BuildRequires: libtool BuildRequires: lrslib-devel BuildRequires: lrslib-utils -BuildRequires: m4ri-devel -BuildRequires: m4rie-devel BuildRequires: make -BuildRequires: mariadb-devel -BuildRequires: mpfi-devel BuildRequires: mpsolve-devel BuildRequires: nauty BuildRequires: normaliz BuildRequires: ntl-devel -BuildRequires: pkgconfig(bdw-gc) >= 7.6.2 +BuildRequires: pari-devel +BuildRequires: pkgconfig(atomic_ops) +BuildRequires: pkgconfig(bdw-gc) >= 8.0.4 +BuildRequires: pkgconfig(cddlib) +BuildRequires: pkgconfig(expat) +BuildRequires: pkgconfig(fflas-ffpack) +BuildRequires: pkgconfig(flexiblas) +BuildRequires: pkgconfig(gmp) +BuildRequires: pkgconfig(gtest) +BuildRequires: pkgconfig(libffi) BuildRequires: pkgconfig(libxml-2.0) +BuildRequires: pkgconfig(m4ri) +BuildRequires: pkgconfig(m4rie) +BuildRequires: pkgconfig(mariadb) +BuildRequires: pkgconfig(mpfi) +BuildRequires: pkgconfig(nauty) BuildRequires: pkgconfig(ncurses) +BuildRequires: pkgconfig(qd) +BuildRequires: pkgconfig(readline) +BuildRequires: pkgconfig(tbb) +BuildRequires: pkgconfig(tinyxml2) BuildRequires: polymake BuildRequires: python3-devel -BuildRequires: qd-devel -BuildRequires: readline-devel -BuildRequires: tbb-devel BuildRequires: texinfo BuildRequires: time -BuildRequires: tinyxml2-devel BuildRequires: TOPCOM BuildRequires: transfig BuildRequires: valgrind @@ -417,7 +408,6 @@ sed -e 's/\(VERSION = \).*/\1%{linboxver}/' \ -e 's,--with-gmp.*,GIVARO_CFLAGS=-I$(LIBRARIESDIR) GIVARO_LIBS="%{_libdir}/libgivaro.a",' \ -i libraries/linbox/Makefile.in tar -C submodules/mathicgb -xf %{SOURCE104} --strip-components=1 -patch -d submodules/mathicgb -p0 < %{SOURCE202} tar -C submodules/memtailor -xf %{SOURCE106} --strip-components=1 tar -C submodules/mathic -xf %{SOURCE107} --strip-components=1 @@ -455,7 +445,6 @@ ln -s %{_datadir}/factory \ %patch5 -p1 -b .configure %patch6 -p1 -b .rightarrow %patch7 -p1 -b .lto -%patch8 -p2 -b .crash2536 # repeatable builds: inject a node name sed -i 's,`uname -n`,build.fedoraproject.org,' configure.ac @@ -525,11 +514,7 @@ LIBS="-lflexiblas" \ --disable-strip \ --enable-fplll \ --enable-linbox \ -%if 0%{?gmp} --with-integer-package=gmp \ -%else - --with-integer-package=mpir \ -%endif --with-unbuilt-programs="cddplus nauty" \ --enable-build-libraries="mpfr flint factory lapack fplll givaro linbox gtest" # The list of libraries and submodules above should include only those that: @@ -583,9 +568,8 @@ desktop-file-install --vendor="" \ %{SOURCE11} mkdir -p %{buildroot}%{_metainfodir} -install -pm 644 %{SOURCE12} %{buildroot}%{_metainfodir}/%{name}.metainfo.xml -appstream-util validate-relax --nonet \ - %{buildroot}%{_metainfodir}/%{name}.metainfo.xml +install -pm 644 %{SOURCE12} %{buildroot}%{_metainfodir} +appstreamcli validate --nonet %{buildroot}%{_metainfodir}/com.macaulay2.macaulay2.metainfo.xml # Byte compile the Emacs files, and move the documentation pushd %{buildroot}%{_emacs_sitelispdir}/macaulay2 @@ -619,9 +603,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %files common %endif %{_datadir}/Macaulay2/ -%{_datadir}/applications/*Macaulay2.desktop +%{_datadir}/applications/com.macaulay2.macaulay2.desktop %{_datadir}/icons/hicolor/*/*/* -%{_metainfodir}/%{name}.metainfo.xml +%{_metainfodir}/com.macaulay2.macaulay2.metainfo.xml %{_docdir}/Macaulay2/ %{_infodir}/*.info* %{_mandir}/man1/* @@ -629,6 +613,11 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog +* Thu Dec 22 2022 Jerry James - 1.21-1 +- Version 1.21 +- Drop upstreamed patch for crash when building documentation +- Use rdns names for the desktop and metainfo files + * Tue Dec 20 2022 Jerry James - 1.20-2 - Convert License tag to SPDX diff --git a/Macaulay2.desktop b/com.macaulay2.macaulay2.desktop similarity index 100% rename from Macaulay2.desktop rename to com.macaulay2.macaulay2.desktop diff --git a/Macaulay2.metainfo.xml b/com.macaulay2.macaulay2.metainfo.xml similarity index 80% rename from Macaulay2.metainfo.xml rename to com.macaulay2.macaulay2.metainfo.xml index 5d7bd15..2ae837e 100644 --- a/Macaulay2.metainfo.xml +++ b/com.macaulay2.macaulay2.metainfo.xml @@ -1,8 +1,8 @@ - Macaulay2 - CC0-1.0 - GPL-2.0 or GPL-3.0 + com.macaulay2.macaulay2 + 0BSD + GPL-2.0-only OR GPL-3.0-only Macaulay2 System for algebraic geometry and commutative algebra @@ -12,7 +12,7 @@ and Michael E. Stillman.

- Macaulay2.desktop + com.macaulay2.macaulay2.desktop https://faculty.math.illinois.edu/Macaulay2/Screenshots/texmacs.png @@ -24,7 +24,7 @@ loganjerry@gmail.com - http://macaulay2.com/ + https://macaulay2.com/ https://github.com/Macaulay2/M2/issues https://groups.google.com/g/macaulay2 diff --git a/mathicgb-1.0.patch b/mathicgb-1.0.patch deleted file mode 100644 index fcb6271..0000000 --- a/mathicgb-1.0.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- src/mathicgb/MonoMonoid.hpp.orig 2021-09-30 19:41:54.000000000 -0600 -+++ src/mathicgb/MonoMonoid.hpp 2021-11-24 16:05:44.657612757 -0700 -@@ -573,7 +573,8 @@ public: - // for unaligned access. Performance seems to be no worse than for using - // 32 bit integers directly. - -- if (sizeof(Exponent) != 4 || (!StoreHash && !StoreOrder)) -+ if (sizeof(Exponent) != 4 || (!StoreHash && !StoreOrder) || -+ __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) - return isProductOf(a, b, ab); - - uint64 orOfXor = 0; -@@ -602,7 +603,8 @@ public: - ConstMonoRef a1b, - ConstMonoRef a2b - ) const { -- if (sizeof(Exponent) != 4 || (!StoreHash && !StoreOrder)) -+ if (sizeof(Exponent) != 4 || (!StoreHash && !StoreOrder) || -+ __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) - return (isProductOf(a1, b, a1b) && isProductOf(a2, b, a2b)); - - uint64 orOfXor = 0; diff --git a/sources b/sources index a71e341..b8c7c11 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ SHA512 (Macaulay2-icons.tar.xz) = 069aa0ad70a0253583b00091c094da9b79d2a2f0f2d38aa97f543081f5df5fd3b5a9e1463febd6947c3151cf01844133174c7372f57e158c2d3faba6baed5d1d -SHA512 (Macaulay2-1.20.tar.gz) = 188469fda279aeb62bd35b02440c0ba77f50cba927e5bf454afdbd9c340564c7c6acfa6f342193b2faef75d8140adfcb5a9862ef6399396f27a5e9fd4a34b658 +SHA512 (Macaulay2-1.21.tar.gz) = 79760d1b6362ba2b89966b5ebcdf3ae9f40579db2fa3fbdde146b178a6b802b1bca546d78f12c5a67d14d8b8a8fb70553fb0903d6b91490f366d114e54a5ce0e SHA512 (4ti2-1.6.9.tar.gz) = f02b61ba04d7512e86d9574574669ec764d053fc5d01744dc6b521518d4165b41355ae12344923f1549b323406130c6562a4d9272b1b88de2ecc2c20d3d892d5 SHA512 (cddlib-094m.tar.gz) = d140d57391b1c963d68ca2e344fbda723a5077004bace322a18362fdc1fff8b50fdc4b598ca8cdf131158e07afc96c5d9aafd7abde082a9e241701e403310b9f SHA512 (cohomCalg-0.32.tar.gz) = b76d8de00b13a8fe8881222178247c5e99c15075c46290830f6c3afffb9dfc18af0d57f738ac5a0d7c00044db81b4465d1e0563c95f7f656a2440be5765c6818 @@ -15,11 +15,10 @@ SHA512 (lapack-3.9.0.tgz) = afa4eb05f2b1dc2f9588ec58bd32f90b78c01185f328e71f2baf SHA512 (libfplll-5.2.0.tar.gz) = 67d1a8deb92d3f9245983b09b7593b19c5d43c8fe77cfea893ea9dfb744bcb77b7239d73e4f619450cc6960f4c48fb1c6ba46268208b0f31f855cf1af6bfaa29 SHA512 (linbox-1.6.3.tar.gz) = 7585f51b46b65a90328b4ff82f7c74eb59510c912a0bb0ce49263f4c7c1e777c0f9961e4672fa36be6fb84035a019b8e212615c363fd62d632e37c327d6ed3c0 SHA512 (lrslib-071a.tar.gz) = f33639c593769722a37262d6a90073076a4a8a7453ed81d948ebed6f0a5ee826b80c9211e5a601ca177b776c5388aa4e46efd55e8b219f1b6ce633232aa6b001 -SHA512 (M2-emacs-01af405.tar.gz) = c3b59fa53a75682e9b3a719665169aecac97d341b2ac90a076373b235e1da337f8065b2874231db666ed0a2f885487824a31d090aa079f96f1c6e6ba58d24490 +SHA512 (M2-emacs-8615029.tar.gz) = 557343ae4e2200583533954336ccfa4e3907138cf953cd4d44eadc1b52865ef080ddec775450cec0da1e720765cba6d106b8c5216cf8a9668219f4a9efada7f5 SHA512 (mathic-1.0.tar.gz) = e95c2397cdea3bbff1c8cd52273277183535f07443c222e38659861c25d392b09cbfb33c9cc2a482f8dc9c1b6bc1754e86934fe5a833f8f19ef0edf0cd2e7165 -SHA512 (mathicgb-1.0.tar.gz) = 8e69689f286b703d8018ca4f79054b4339054d0a5bba5095fd57393c2301c5c66afa9bcfe5ed693630f07bbe8a1774c7ea07f4e384d2a3a7cde4f613b7844b14 +SHA512 (mathicgb-1.0.tar.gz) = e3b05385f67c42302fba22b9a7d391eb1fca5a56c0eec02ab3e37a28e1d4de6d734b803d5d5701acac8663bbe391afd6ffc40ab5c5e6f11e8fff22fd5f07a2ea SHA512 (memtailor-1.0.tar.gz) = 50eded674dc33d3c55f5ec0f250586106f7e16995baa4e46f21684016066cb41e02ace7d82b38305029b947f474835598a972c39dcb0ead6679566b53549a0df SHA512 (mpfr-4.1.0.tar.xz) = 1bd1c349741a6529dfa53af4f0da8d49254b164ece8a46928cdb13a99460285622d57fe6f68cef19c6727b3f9daa25ddb3d7d65c201c8f387e421c7f7bee6273 SHA512 (mpsolve-3.2.1.tar.gz) = 8f0cb1be303767bf5a68c150df01c98f7f5e17bfaee685ea4cb9300c0dbf740069c774d647f141a4a1eb46fa54f23d9e75a800ce195cd522527c72e3c6aeed0f -SHA512 (normaliz-3.7.2.tar.gz) = 044a1b5c7e877cdfceedbe6b283b982b66e58f0cc5b0ccf6a63a293044d1348290fde92531b4c4a0a58f5263bb7696a2511b5a1dff94222c9e56a2fe3fccb69b SHA512 (TOPCOM-0.17.8.tar.gz) = 8611e8bd36eda00646fb40794435f23e6af81ecbee93c40e8fe5f73905e673e6244cb0f8cc1fe5c29050e40c7d53a44c615c60cbbecc8452b3c85f1d8a816d7a From 0a34ae3e3b2cd0b3c3807894a6fef431e06d1708 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Thu, 12 Jan 2023 21:55:22 -0700 Subject: [PATCH 34/70] Rebuild for libfplll 5.4.4 --- Macaulay2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index a649457..ffa011b 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -52,7 +52,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 Version: 1.21 -Release: 1%{?dist} +Release: 2%{?dist} # GPL-2.0-only OR GPL-3.0-only: # - the project as a whole @@ -613,6 +613,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog +* Thu Jan 12 2022 Jerry James - 1.21-2 +- Rebuild for libfplll 5.4.4 + * Thu Dec 22 2022 Jerry James - 1.21-1 - Version 1.21 - Drop upstreamed patch for crash when building documentation From c4f69993430c944985d3a3232f040d7be9bdd75d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 18 Jan 2023 19:53:54 +0000 Subject: [PATCH 35/70] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- Macaulay2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index ffa011b..199cdda 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -52,7 +52,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 Version: 1.21 -Release: 2%{?dist} +Release: 3%{?dist} # GPL-2.0-only OR GPL-3.0-only: # - the project as a whole @@ -613,6 +613,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog +* Wed Jan 18 2023 Fedora Release Engineering - 1.21-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Thu Jan 12 2022 Jerry James - 1.21-2 - Rebuild for libfplll 5.4.4 From 38e2779d1638f9a085997589dbbdb92254316ad4 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Mon, 20 Feb 2023 22:07:26 +0000 Subject: [PATCH 36/70] Rebuilt for Boost 1.81 --- Macaulay2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index 199cdda..7169b36 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -52,7 +52,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 Version: 1.21 -Release: 3%{?dist} +Release: 4%{?dist} # GPL-2.0-only OR GPL-3.0-only: # - the project as a whole @@ -613,6 +613,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog +* Mon Feb 20 2023 Jonathan Wakely - 1.21-4 +- Rebuilt for Boost 1.81 + * Wed Jan 18 2023 Fedora Release Engineering - 1.21-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From 3ce3ab2bc5ea8d3e94de5483e4370d542f6066d7 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Sat, 15 Apr 2023 22:01:55 +0200 Subject: [PATCH 37/70] Port configure script to C99 Related to: --- Macaulay2-configure-c99.patch | 18 ++++++++++++++++++ Macaulay2.spec | 7 ++++++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 Macaulay2-configure-c99.patch diff --git a/Macaulay2-configure-c99.patch b/Macaulay2-configure-c99.patch new file mode 100644 index 0000000..2cdc1c6 --- /dev/null +++ b/Macaulay2-configure-c99.patch @@ -0,0 +1,18 @@ +Avoid an implicit int, which was removed from the C99 revision of the +C language. This prevents altering the outcome of the check with +future compilers. + +Submitted upstream: + +diff -ur M2-release-1.21.orig/M2/configure.ac M2-release-1.21/M2/configure.ac +--- M2-release-1.21.orig/M2/configure.ac 2023-04-15 19:52:33.823153026 +0200 ++++ M2-release-1.21/M2/configure.ac 2023-04-15 20:00:57.701024623 +0200 +@@ -1719,7 +1719,7 @@ + #ifdef HAVE_NETDB_H + #include + #endif +- main() { ++ int main(void) { + struct addrinfo *addr; + return 0 != getaddrinfo("1.2.3.4", "80", 0, &addr) ? 99 : 0 ; + } diff --git a/Macaulay2.spec b/Macaulay2.spec index 7169b36..5f72200 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -52,7 +52,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 Version: 1.21 -Release: 4%{?dist} +Release: 5%{?dist} # GPL-2.0-only OR GPL-3.0-only: # - the project as a whole @@ -264,6 +264,7 @@ Patch5: %{name}-1.17-configure.patch Patch6: %{name}-1.16-rightarrow.patch # Fix LTO warnings about mismatched declarations and definitions Patch7: %{name}-1.18-lto.patch +Patch8: Macaulay2-configure-c99.patch BuildRequires: 4ti2 BuildRequires: appstream @@ -445,6 +446,7 @@ ln -s %{_datadir}/factory \ %patch5 -p1 -b .configure %patch6 -p1 -b .rightarrow %patch7 -p1 -b .lto +%patch8 -p2 -b .configure-c99 # repeatable builds: inject a node name sed -i 's,`uname -n`,build.fedoraproject.org,' configure.ac @@ -613,6 +615,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog +* Sat Apr 15 2023 Florian Weimer - 1.21-5 +- Port configure script to C99 + * Mon Feb 20 2023 Jonathan Wakely - 1.21-4 - Rebuilt for Boost 1.81 From 0b7c12049255fc9ca06f0ca97c12816c941c2d52 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 19 Jul 2023 11:14:58 +0000 Subject: [PATCH 38/70] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- Macaulay2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index 5f72200..ef26d79 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -52,7 +52,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 Version: 1.21 -Release: 5%{?dist} +Release: 6%{?dist} # GPL-2.0-only OR GPL-3.0-only: # - the project as a whole @@ -615,6 +615,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog +* Wed Jul 19 2023 Fedora Release Engineering - 1.21-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Sat Apr 15 2023 Florian Weimer - 1.21-5 - Port configure script to C99 From 17aeaa02c07216881023b0faf7f3792c35b3d185 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Thu, 28 Sep 2023 12:23:08 +0200 Subject: [PATCH 39/70] Build against the 'mariadb-connector-c-devel' package https://bugzilla.redhat.com/show_bug.cgi?id=2241091 --- Macaulay2.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index ef26d79..40eea01 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -323,7 +323,7 @@ BuildRequires: pkgconfig(libffi) BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(m4ri) BuildRequires: pkgconfig(m4rie) -BuildRequires: pkgconfig(mariadb) +BuildRequires: pkgconfig(libmariadb) BuildRequires: pkgconfig(mpfi) BuildRequires: pkgconfig(nauty) BuildRequires: pkgconfig(ncurses) From d2d3d3bb3cf63e8a3855a6c675fdcf99943e193d Mon Sep 17 00:00:00 2001 From: Jerry James Date: Thu, 26 Oct 2023 12:44:35 -0600 Subject: [PATCH 40/70] Version 1.22 Drop upstreamed Macaulay2-configure-c99.patch --- Macaulay2-configure-c99.patch | 18 ------- Macaulay2.spec | 74 +++++++++++++++------------- com.macaulay2.macaulay2.metainfo.xml | 2 +- linbox-1.6.3.patch | 35 ------------- linbox-1.7.0.patch | 15 ++++++ sources | 12 ++--- 6 files changed, 62 insertions(+), 94 deletions(-) delete mode 100644 Macaulay2-configure-c99.patch delete mode 100644 linbox-1.6.3.patch create mode 100644 linbox-1.7.0.patch diff --git a/Macaulay2-configure-c99.patch b/Macaulay2-configure-c99.patch deleted file mode 100644 index 2cdc1c6..0000000 --- a/Macaulay2-configure-c99.patch +++ /dev/null @@ -1,18 +0,0 @@ -Avoid an implicit int, which was removed from the C99 revision of the -C language. This prevents altering the outcome of the check with -future compilers. - -Submitted upstream: - -diff -ur M2-release-1.21.orig/M2/configure.ac M2-release-1.21/M2/configure.ac ---- M2-release-1.21.orig/M2/configure.ac 2023-04-15 19:52:33.823153026 +0200 -+++ M2-release-1.21/M2/configure.ac 2023-04-15 20:00:57.701024623 +0200 -@@ -1719,7 +1719,7 @@ - #ifdef HAVE_NETDB_H - #include - #endif -- main() { -+ int main(void) { - struct addrinfo *addr; - return 0 != getaddrinfo("1.2.3.4", "80", 0, &addr) ? 99 : 0 ; - } diff --git a/Macaulay2.spec b/Macaulay2.spec index 40eea01..a98c4cb 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -23,7 +23,7 @@ %global m2url https://github.com/Macaulay2/M2 -%global emacscommit 86150290208bd9e468511b4b69a187ce870f303e +%global emacscommit 2bac85883e2edd479f606ef8eedbbf2869770200 %global emacsurl https://github.com/Macaulay2/M2-emacs %global emacsshort %(cut -b -7 <<< %{emacscommit}) @@ -51,8 +51,8 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 -Version: 1.21 -Release: 6%{?dist} +Version: 1.22 +Release: 1%{?dist} # GPL-2.0-only OR GPL-3.0-only: # - the project as a whole @@ -202,7 +202,7 @@ Provides: bundled(factory) = %{factoryver} # MATHICGB is bundled because it must be built with different threading options %global mathicgbver 1.0 -%global mathicgbcommit f3a05da1494843b5e4e7baa18e644cc6f32baeca +%global mathicgbcommit de9cc70d7f6d72fe35fc832d7ab478f5debbc90f Source104: https://github.com/Macaulay2/mathicgb/tarball/%{mathicgbcommit}/mathicgb-%{mathicgbver}.tar.gz Provides: bundled(mathicgb) = %{mathicgbver} @@ -212,24 +212,25 @@ Source105: https://faculty.math.illinois.edu/Macaulay2/Downloads/OtherSourceCode # MEMTAILOR is bundled because it causes garbage collector crashes otherwise %global memtailorver 1.0 -%global memtailorcommit 95dbac776c475f4b1c2b08a8e8c6def14c8aaf9a +%global memtailorcommit f785005b92a54463dbd5377ab80855a3d2a5f92d Source106: https://github.com/Macaulay2/memtailor/tarball/%{memtailorcommit}/memtailor-%{memtailorver}.tar.gz Provides: bundled(memtailor) = %{memtailorver} # MATHIC is bundled because it causes garbage collector crashes otherwise %global mathicver 1.0 -%global mathiccommit 18ff8de1f5b5102ef291e450522c4930cf9eb7f2 +%global mathiccommit 07e8df4ded6b586c0ce9eec0f9096690379749cb Source107: https://github.com/Macaulay2/mathic/tarball/%{mathiccommit}/mathic-%{mathicver}.tar.gz Provides: bundled(mathic) = %{mathicver} # LINBOX is bundled because it introduces static global objects -%global linboxver 1.6.3 +%global linboxver 1.7.0 Source108: https://github.com/linbox-team/linbox/releases/download/v%{linboxver}/linbox-%{linboxver}.tar.gz Provides: bundled(linbox) = %{linboxver} ## PATCHES FOR BUNDLED code -# Work around an ambiguous overload on 32-bit platforms -Source200: linbox-1.6.3.patch +# Fix a buffer overflow +# https://github.com/linbox-team/linbox/pull/307 +Source200: linbox-1.7.0.patch # MPFR bug fixes from mpfr upstream. Source201: mpfr-4.1.0.patch @@ -264,7 +265,6 @@ Patch5: %{name}-1.17-configure.patch Patch6: %{name}-1.16-rightarrow.patch # Fix LTO warnings about mismatched declarations and definitions Patch7: %{name}-1.18-lto.patch -Patch8: Macaulay2-configure-c99.patch BuildRequires: 4ti2 BuildRequires: appstream @@ -307,9 +307,11 @@ BuildRequires: lrslib-devel BuildRequires: lrslib-utils BuildRequires: make BuildRequires: mpsolve-devel +BuildRequires: msolve-devel BuildRequires: nauty BuildRequires: normaliz BuildRequires: ntl-devel +BuildRequires: ocl-icd-devel BuildRequires: pari-devel BuildRequires: pkgconfig(atomic_ops) BuildRequires: pkgconfig(bdw-gc) >= 8.0.4 @@ -320,10 +322,10 @@ BuildRequires: pkgconfig(flexiblas) BuildRequires: pkgconfig(gmp) BuildRequires: pkgconfig(gtest) BuildRequires: pkgconfig(libffi) +BuildRequires: pkgconfig(libmariadb) BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(m4ri) BuildRequires: pkgconfig(m4rie) -BuildRequires: pkgconfig(libmariadb) BuildRequires: pkgconfig(mpfi) BuildRequires: pkgconfig(nauty) BuildRequires: pkgconfig(ncurses) @@ -331,13 +333,16 @@ BuildRequires: pkgconfig(qd) BuildRequires: pkgconfig(readline) BuildRequires: pkgconfig(tbb) BuildRequires: pkgconfig(tinyxml2) -BuildRequires: polymake +# Polymake is currently uninstallable +#BuildRequires: polymake BuildRequires: python3-devel BuildRequires: texinfo BuildRequires: time BuildRequires: TOPCOM BuildRequires: transfig +%ifarch %{valgrind_arches} BuildRequires: valgrind +%endif Requires: 4ti2 Requires: cohomCalg @@ -402,11 +407,11 @@ install -p -m755 %{SOURCE20} ./etags install -p -m644 %{SOURCE100} BUILD/tarfiles/ %endif install -p -m644 %{SOURCE101} %{SOURCE102} %{SOURCE103} %{SOURCE105} \ - %{SOURCE108} BUILD/tarfiles/ + BUILD/tarfiles/ +install -p -m644 %{SOURCE108} BUILD/tarfiles/v%{linboxver}.tar.gz sed -i 's/\(VERSION = \).*/\1%{mpfrver}/' libraries/mpfr/Makefile.in sed -e 's/\(VERSION = \).*/\1%{linboxver}/' \ - -e 's/^#\(PATCHFILE\)/\1/' \ - -e 's,--with-gmp.*,GIVARO_CFLAGS=-I$(LIBRARIESDIR) GIVARO_LIBS="%{_libdir}/libgivaro.a",' \ + -e 's,--with-gmp.*,--without-archnative GIVARO_CFLAGS=-I$(LIBRARIESDIR) GIVARO_LIBS="%{_libdir}/libgivaro.a",' \ -i libraries/linbox/Makefile.in tar -C submodules/mathicgb -xf %{SOURCE104} --strip-components=1 tar -C submodules/memtailor -xf %{SOURCE106} --strip-components=1 @@ -414,7 +419,6 @@ tar -C submodules/mathic -xf %{SOURCE107} --strip-components=1 ## patches for bundled code sed -e 's,--with-blas,&=%{_includedir}/flexiblas --with-ntl,' \ - -e 's,2\.6\.0,%{flintver},' \ -i libraries/flint/Makefile.in cp -p %{SOURCE200} libraries/linbox/patch-%{linboxver} sed -e '/^TARFILE =/iPATCHFILE = @abs_srcdir@/patch-$(VERSION)' \ @@ -434,19 +438,18 @@ sed -i 's,install \(lib.*\.a\),ln -s %{_libdir}/\1,' libraries/lapack/Makefile.i ## fake givaro submodule tar -C submodules/givaro --strip-components=1 -xzf %{SOURCE306} -%patch0 -p1 -b .optflags -%patch1 -p1 -b .ulimit -%patch2 -p1 -b .default_make_targets -%patch3 -p1 -b .no_gftables +%patch -P0 -p1 -b .optflags +%patch -P1 -p1 -b .ulimit +%patch -P2 -p1 -b .default_make_targets +%patch -P3 -p1 -b .no_gftables # factory-gftables symlink mkdir -p BUILD/%{_target_platform}/usr-dist/common/share/Macaulay2/Core ln -s %{_datadir}/factory \ BUILD/%{_target_platform}/usr-dist/common/share/Macaulay2/Core/factory -%patch4 -p1 -b .fplll -%patch5 -p1 -b .configure -%patch6 -p1 -b .rightarrow -%patch7 -p1 -b .lto -%patch8 -p2 -b .configure-c99 +%patch -P4 -p1 -b .fplll +%patch -P5 -p1 -b .configure +%patch -P6 -p1 -b .rightarrow +%patch -P7 -p1 -b .lto # repeatable builds: inject a node name sed -i 's,`uname -n`,build.fedoraproject.org,' configure.ac @@ -475,6 +478,11 @@ sed -i 's/\(LIBNAME = flint\)2/\1/' libraries/flint/Makefile.in # Cannot do git submodule operations on a koji builder sed -i 's/git-checkout-in-\$1, git-checkout-warning-for-\$1//' GNUmakefile.in +# Avoid obsolescence warnings +sed -i 's/egrep/grep -E/g' GNUmakefile.in Makefile Macaulay2/bin/Makefile.in \ + Macaulay2/tests/Makefile{,.test}.in libraries/Makefile.library.in +sed -i 's/fgrep/grep -F/g' Macaulay2/util/linkexec-alternative + # (re)generate configure autoreconf -fi . @@ -485,19 +493,12 @@ autoreconf -fi . # level -O2 on s390x, the mathicgb code accesses out-of-bounds array elements. # In addition, valgrind shows accesses to uninitialized elements of arrays # that should not have any uninitialized elements. The code eventually -# segfaults. When built with -O1 and LTO, the linker segfaults. Until we can -# diagnose and fix these issues, we build with -O1 and without LTO on s390x. -%define _lto_cflags %{nil} +# segfaults. optflags=$(sed 's/-O2/-O/g' <<< "%{build_cflags}") %else optflags="%{build_cflags}" %endif -# Possible bug in Macaulay2 1.19: the memtailor, mathic, and mathicgb headers -# cannot be found. We work around this here. See if the problem has been fixed -# in later versions. -CPPFLAGS="-I$PWD/submodules/memtailor/src -I$PWD/submodules/mathic/src -I$PWD/submodules/mathicgb/src" - ## configure macro currently broken, due to some odd prefix-checks. probably fixable -- Rex mkdir -p BUILD/%{_target_platform} pushd BUILD/%{_target_platform} @@ -615,6 +616,11 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog +* Thu Oct 26 2023 Jerry James - 1.22-1 +- Version 1.22 +- Drop upstreamed Macaulay2-configure-c99.patch +- Build against mariadb-connector-c instead of the server package + * Wed Jul 19 2023 Fedora Release Engineering - 1.21-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild @@ -627,7 +633,7 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin * Wed Jan 18 2023 Fedora Release Engineering - 1.21-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild -* Thu Jan 12 2022 Jerry James - 1.21-2 +* Thu Jan 12 2023 Jerry James - 1.21-2 - Rebuild for libfplll 5.4.4 * Thu Dec 22 2022 Jerry James - 1.21-1 diff --git a/com.macaulay2.macaulay2.metainfo.xml b/com.macaulay2.macaulay2.metainfo.xml index 2ae837e..0de35f5 100644 --- a/com.macaulay2.macaulay2.metainfo.xml +++ b/com.macaulay2.macaulay2.metainfo.xml @@ -23,7 +23,7 @@ Macaulay2 with Emacs - loganjerry@gmail.com + Macaulay2-maintainers@fedoraproject.org https://macaulay2.com/ https://github.com/Macaulay2/M2/issues https://groups.google.com/g/macaulay2 diff --git a/linbox-1.6.3.patch b/linbox-1.6.3.patch deleted file mode 100644 index f2481c0..0000000 --- a/linbox-1.6.3.patch +++ /dev/null @@ -1,35 +0,0 @@ ---- linbox-1.6.3/configure.ac.orig 2019-06-07 07:22:08.000000000 -0600 -+++ linbox-1.6.3/configure.ac 2020-06-05 12:24:32.920910975 -0600 -@@ -65,9 +65,8 @@ AC_PROG_CXX - - AC_COMPILER_NAME - --STDFLAG=${CXXFLAGS} -+STDFLAG="" - --CXXFLAGS="" - - # We need a C++11 compiler now - AB 2014-12-12 - # clang-3.8 does not support __float128 without explicitly passing it -std=c++11 -@@ -187,10 +186,6 @@ echo "---------------------------------- - echo " START LINBOX CONFIG " - echo "-----------------------------------------------" - --# Checks which SIMD optimization flags to use and set SIMD_CFLAGS accordingly --INSTR_SET --AC_SUBST(SIMD_FLAGS) -- - dnl gcc-4.9.2 bug See https://trac.sagemath.org/ticket/17635#comment:178 - AS_IF([ test "x$CCNAM" = "xgcc492" ],[CXXFLAGS="${CXXFLAGS} -fpermissive"],[]) - ---- linbox-1.6.3/linbox/algorithms/gauss/gauss-solve-gf2.inl.orig 2019-06-07 07:22:08.000000000 -0600 -+++ linbox-1.6.3/linbox/algorithms/gauss/gauss-solve-gf2.inl 2020-02-01 16:19:20.692143829 -0700 -@@ -72,7 +72,7 @@ namespace LinBox - - Vector1 w(F2, A.coldim()); - -- for(typename Vector1::iterator it=w.begin()+(ptrdiff_t)Rank;it!=w.end();++it) -+ for(typename Vector1::iterator it=w.begin()+(long)Rank;it!=w.end();++it) - F2.assign(*it,F2.zero); - - return this->solve(x, w, Rank, Q, L, A, P, b); diff --git a/linbox-1.7.0.patch b/linbox-1.7.0.patch new file mode 100644 index 0000000..70edb8c --- /dev/null +++ b/linbox-1.7.0.patch @@ -0,0 +1,15 @@ +--- linbox-1.7.0/linbox/blackbox/apply.h.orig 2021-12-13 13:01:21.000000000 -0700 ++++ linbox-1.7.0/linbox/blackbox/apply.h 2023-10-20 13:30:15.295959186 -0600 +@@ -593,8 +593,10 @@ namespace LinBox + */ + int rclen = (int)num_chunks*2 + 5; + +- unsigned char* combined = new unsigned char[(size_t)rc*_n*(size_t)rclen]; +- memset(combined, 0, (size_t)rc*_n*(size_t)rclen); ++ // https://github.com/linbox-team/linbox/issues/304#issuecomment-1766621021 ++ size_t combined_size = (size_t)rc*_n*(size_t)rclen + 1; ++ unsigned char* combined = new unsigned char[combined_size]; ++ memset(combined, 0, combined_size); + + //order from major index to minor: combining index, component of sol'n, byte + //compute a product (chunk times x) for each chunk diff --git a/sources b/sources index b8c7c11..4bf407c 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ SHA512 (Macaulay2-icons.tar.xz) = 069aa0ad70a0253583b00091c094da9b79d2a2f0f2d38aa97f543081f5df5fd3b5a9e1463febd6947c3151cf01844133174c7372f57e158c2d3faba6baed5d1d -SHA512 (Macaulay2-1.21.tar.gz) = 79760d1b6362ba2b89966b5ebcdf3ae9f40579db2fa3fbdde146b178a6b802b1bca546d78f12c5a67d14d8b8a8fb70553fb0903d6b91490f366d114e54a5ce0e +SHA512 (Macaulay2-1.22.tar.gz) = c66e29ea0cbc824dc2310d7ffca22858719526388ccd1914e11e37e231192e3c96310a4819ed951f9df59f50058dd7a7c041b792ecbf352110659ed1e02ebe49 SHA512 (4ti2-1.6.9.tar.gz) = f02b61ba04d7512e86d9574574669ec764d053fc5d01744dc6b521518d4165b41355ae12344923f1549b323406130c6562a4d9272b1b88de2ecc2c20d3d892d5 SHA512 (cddlib-094m.tar.gz) = d140d57391b1c963d68ca2e344fbda723a5077004bace322a18362fdc1fff8b50fdc4b598ca8cdf131158e07afc96c5d9aafd7abde082a9e241701e403310b9f SHA512 (cohomCalg-0.32.tar.gz) = b76d8de00b13a8fe8881222178247c5e99c15075c46290830f6c3afffb9dfc18af0d57f738ac5a0d7c00044db81b4465d1e0563c95f7f656a2440be5765c6818 @@ -13,12 +13,12 @@ SHA512 (glpk-4.59.tar.gz) = ca05bd085880143acf4a440cf7efd2392d4dde89bed53a0e5726 SHA512 (gtest-1.10.0.tar.gz) = bd52abe938c3722adc2347afad52ea3a17ecc76730d8d16b065e165bc7477d762bce0997a427131866a89f1001e3f3315198204ffa5d643a9355f1f4d0d7b1a9 SHA512 (lapack-3.9.0.tgz) = afa4eb05f2b1dc2f9588ec58bd32f90b78c01185f328e71f2baf6adec6622f557c332f09e7eb46f71e5e3f2e852f25a640bde2bf9f4be7205cecf01cb07b6bc8 SHA512 (libfplll-5.2.0.tar.gz) = 67d1a8deb92d3f9245983b09b7593b19c5d43c8fe77cfea893ea9dfb744bcb77b7239d73e4f619450cc6960f4c48fb1c6ba46268208b0f31f855cf1af6bfaa29 -SHA512 (linbox-1.6.3.tar.gz) = 7585f51b46b65a90328b4ff82f7c74eb59510c912a0bb0ce49263f4c7c1e777c0f9961e4672fa36be6fb84035a019b8e212615c363fd62d632e37c327d6ed3c0 +SHA512 (linbox-1.7.0.tar.gz) = cb4e848186d1f6357f498d1e3bda6484b4c789c02440f9614a227a2ae206a31fb20b32be40bda74da3f2f8f981bbd58d80fc97c95499b5151bb06eafb867ef9e SHA512 (lrslib-071a.tar.gz) = f33639c593769722a37262d6a90073076a4a8a7453ed81d948ebed6f0a5ee826b80c9211e5a601ca177b776c5388aa4e46efd55e8b219f1b6ce633232aa6b001 -SHA512 (M2-emacs-8615029.tar.gz) = 557343ae4e2200583533954336ccfa4e3907138cf953cd4d44eadc1b52865ef080ddec775450cec0da1e720765cba6d106b8c5216cf8a9668219f4a9efada7f5 -SHA512 (mathic-1.0.tar.gz) = e95c2397cdea3bbff1c8cd52273277183535f07443c222e38659861c25d392b09cbfb33c9cc2a482f8dc9c1b6bc1754e86934fe5a833f8f19ef0edf0cd2e7165 -SHA512 (mathicgb-1.0.tar.gz) = e3b05385f67c42302fba22b9a7d391eb1fca5a56c0eec02ab3e37a28e1d4de6d734b803d5d5701acac8663bbe391afd6ffc40ab5c5e6f11e8fff22fd5f07a2ea -SHA512 (memtailor-1.0.tar.gz) = 50eded674dc33d3c55f5ec0f250586106f7e16995baa4e46f21684016066cb41e02ace7d82b38305029b947f474835598a972c39dcb0ead6679566b53549a0df +SHA512 (M2-emacs-2bac858.tar.gz) = 3b44dab7e54e323a3b7f69fa8fe42890d91c9855680af4c10b771446701c268501fcf6362d0b1ba2da6f409f91ff589ad465c2c88ec852c86763d4e6a7a40ab9 +SHA512 (mathic-1.0.tar.gz) = 9eb2fe94d266ffda4624c89021e08526e073286635dd5439042e744f07ba053534bc9476ab81d37f7622d62d8ce40c3eedbc5f7013cd529584f46d3685f15d3a +SHA512 (mathicgb-1.0.tar.gz) = aea24832681c40c92cad012211ed647ed4e8287964481f36a62d6f0fb0d053fb07c17c49385b4782b380576a92aa387f67fa2843437a0e7b315c74288e65d5a8 +SHA512 (memtailor-1.0.tar.gz) = 147ef22f322a82d5336c004ba9cce055ee94eb7ad93d4271524cbee4713f94b258342f4e31569abac2e29472fdd25df2fad94000496ce46e469b7e074af3c86e SHA512 (mpfr-4.1.0.tar.xz) = 1bd1c349741a6529dfa53af4f0da8d49254b164ece8a46928cdb13a99460285622d57fe6f68cef19c6727b3f9daa25ddb3d7d65c201c8f387e421c7f7bee6273 SHA512 (mpsolve-3.2.1.tar.gz) = 8f0cb1be303767bf5a68c150df01c98f7f5e17bfaee685ea4cb9300c0dbf740069c774d647f141a4a1eb46fa54f23d9e75a800ce195cd522527c72e3c6aeed0f SHA512 (TOPCOM-0.17.8.tar.gz) = 8611e8bd36eda00646fb40794435f23e6af81ecbee93c40e8fe5f73905e673e6244cb0f8cc1fe5c29050e40c7d53a44c615c60cbbecc8452b3c85f1d8a816d7a From bbe0816b0e71bb34ee30623984e31d697a23e64c Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Thu, 9 Nov 2023 19:51:18 -0500 Subject: [PATCH 41/70] Correct appstreamcli invocation (--nonet no longer works) --- Macaulay2.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index a98c4cb..b79525f 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -52,7 +52,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 Version: 1.22 -Release: 1%{?dist} +Release: 2%{?dist} # GPL-2.0-only OR GPL-3.0-only: # - the project as a whole @@ -572,7 +572,8 @@ desktop-file-install --vendor="" \ mkdir -p %{buildroot}%{_metainfodir} install -pm 644 %{SOURCE12} %{buildroot}%{_metainfodir} -appstreamcli validate --nonet %{buildroot}%{_metainfodir}/com.macaulay2.macaulay2.metainfo.xml +appstreamcli validate --no-net \ + %{buildroot}%{_metainfodir}/com.macaulay2.macaulay2.metainfo.xml # Byte compile the Emacs files, and move the documentation pushd %{buildroot}%{_emacs_sitelispdir}/macaulay2 @@ -616,6 +617,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog +* Fri Nov 10 2023 Benjamin A. Beasley - 1.22-2 +- Correct appstreamcli invocation (--nonet no longer works) + * Thu Oct 26 2023 Jerry James - 1.22-1 - Version 1.22 - Drop upstreamed Macaulay2-configure-c99.patch From 5cd5a8ed12ed0aee77375818e965ac4b988c0433 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Thu, 9 Nov 2023 19:51:51 -0500 Subject: [PATCH 42/70] Ask appstreamcli to explain validation findings --- Macaulay2.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index b79525f..bba5504 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -572,7 +572,7 @@ desktop-file-install --vendor="" \ mkdir -p %{buildroot}%{_metainfodir} install -pm 644 %{SOURCE12} %{buildroot}%{_metainfodir} -appstreamcli validate --no-net \ +appstreamcli validate --no-net --explain \ %{buildroot}%{_metainfodir}/com.macaulay2.macaulay2.metainfo.xml # Byte compile the Emacs files, and move the documentation @@ -619,6 +619,7 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog * Fri Nov 10 2023 Benjamin A. Beasley - 1.22-2 - Correct appstreamcli invocation (--nonet no longer works) +- Ask appstreamcli to explain validation findings * Thu Oct 26 2023 Jerry James - 1.22-1 - Version 1.22 From 0023a59935617ed60c82f92a12be5d76355a452f Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Thu, 9 Nov 2023 19:54:43 -0500 Subject: [PATCH 43/70] Also validate AppStream XML with appstream-util, required by guidelines --- Macaulay2.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Macaulay2.spec b/Macaulay2.spec index bba5504..47c8616 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -298,6 +298,7 @@ BuildRequires: givaro-static BuildRequires: glpk-devel BuildRequires: iml-devel BuildRequires: info +BuildRequires: libappstream-glib BuildRequires: libfplll-static BuildRequires: libfrobby-devel BuildRequires: libgfan-devel @@ -572,6 +573,11 @@ desktop-file-install --vendor="" \ mkdir -p %{buildroot}%{_metainfodir} install -pm 644 %{SOURCE12} %{buildroot}%{_metainfodir} +# Still required by guidelines for now +# (https://pagure.io/packaging-committee/issue/1053): +appstream-util validate-relax --nonet \ + %{buildroot}%{_metainfodir}/com.macaulay2.macaulay2.metainfo.xml +# Matches what gnome-software and others use: appstreamcli validate --no-net --explain \ %{buildroot}%{_metainfodir}/com.macaulay2.macaulay2.metainfo.xml @@ -620,6 +626,7 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin * Fri Nov 10 2023 Benjamin A. Beasley - 1.22-2 - Correct appstreamcli invocation (--nonet no longer works) - Ask appstreamcli to explain validation findings +- Also validate AppStream XML with appstream-util, required by guidelines * Thu Oct 26 2023 Jerry James - 1.22-1 - Version 1.22 From a4414e91a5f6a6f76696b78125b45fe2952e2916 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Wed, 17 Jan 2024 22:58:51 +0000 Subject: [PATCH 44/70] Rebuilt for Boost 1.83 --- Macaulay2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index 47c8616..582cf0c 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -52,7 +52,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 Version: 1.22 -Release: 2%{?dist} +Release: 3%{?dist} # GPL-2.0-only OR GPL-3.0-only: # - the project as a whole @@ -623,6 +623,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog +* Wed Jan 17 2024 Jonathan Wakely - 1.22-3 +- Rebuilt for Boost 1.83 + * Fri Nov 10 2023 Benjamin A. Beasley - 1.22-2 - Correct appstreamcli invocation (--nonet no longer works) - Ask appstreamcli to explain validation findings From ae8d0d9bc2fe5b7c5fea04eb4d306dbd18c57cd4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jan 2024 09:59:00 +0000 Subject: [PATCH 45/70] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- Macaulay2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index 582cf0c..59a4c64 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -52,7 +52,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 Version: 1.22 -Release: 3%{?dist} +Release: 4%{?dist} # GPL-2.0-only OR GPL-3.0-only: # - the project as a whole @@ -623,6 +623,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog +* Fri Jan 19 2024 Fedora Release Engineering - 1.22-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Wed Jan 17 2024 Jonathan Wakely - 1.22-3 - Rebuilt for Boost 1.83 From a06875216ccf6bf7f1d1cb71215c87ac5f913d8c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 22 Jan 2024 21:03:51 +0000 Subject: [PATCH 46/70] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- Macaulay2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index 59a4c64..2aabbab 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -52,7 +52,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 Version: 1.22 -Release: 4%{?dist} +Release: 5%{?dist} # GPL-2.0-only OR GPL-3.0-only: # - the project as a whole @@ -623,6 +623,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog +* Mon Jan 22 2024 Fedora Release Engineering - 1.22-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Fri Jan 19 2024 Fedora Release Engineering - 1.22-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 15c2dabd0d0c70e5514c7127633acba67561e314 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Fri, 23 Feb 2024 19:54:52 -0700 Subject: [PATCH 47/70] Build the polymake and scip examples - Recommend scip --- Macaulay2.spec | 16 +- linbox-1.7.0.patch | 416 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 427 insertions(+), 5 deletions(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index 2aabbab..96b77b5 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -52,7 +52,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 Version: 1.22 -Release: 5%{?dist} +Release: 6%{?dist} # GPL-2.0-only OR GPL-3.0-only: # - the project as a whole @@ -228,7 +228,7 @@ Source108: https://github.com/linbox-team/linbox/releases/download/v%{linboxver} Provides: bundled(linbox) = %{linboxver} ## PATCHES FOR BUNDLED code -# Fix a buffer overflow +# Fix a buffer overflow and some constness issues # https://github.com/linbox-team/linbox/pull/307 Source200: linbox-1.7.0.patch # MPFR bug fixes from mpfr upstream. @@ -334,9 +334,9 @@ BuildRequires: pkgconfig(qd) BuildRequires: pkgconfig(readline) BuildRequires: pkgconfig(tbb) BuildRequires: pkgconfig(tinyxml2) -# Polymake is currently uninstallable -#BuildRequires: polymake +BuildRequires: polymake BuildRequires: python3-devel +BuildRequires: scip BuildRequires: texinfo BuildRequires: time BuildRequires: TOPCOM @@ -361,6 +361,7 @@ Requires: TOPCOM Requires: xdg-utils Recommends: mathicgb +Recommends: scip %if 0%{?common} Requires: %{name}-common = %{version}-%{release} @@ -377,7 +378,7 @@ Provides: macaulay2 = %{version}-%{release} # Macaulay2 no longer builds successfully on 32-bit platforms # https://bugzilla.redhat.com/show_bug.cgi?id=1874318 -ExcludeArch: %{ix86} %{arm} +ExcludeArch: %{ix86} # Do not advertise the bundled mpfr %global __provides_exclude libmpfr.so* @@ -422,6 +423,7 @@ tar -C submodules/mathic -xf %{SOURCE107} --strip-components=1 sed -e 's,--with-blas,&=%{_includedir}/flexiblas --with-ntl,' \ -i libraries/flint/Makefile.in cp -p %{SOURCE200} libraries/linbox/patch-%{linboxver} +sed -i 's/^#\(PATCHFILE\)/\1/' libraries/linbox/Makefile.in sed -e '/^TARFILE =/iPATCHFILE = @abs_srcdir@/patch-$(VERSION)' \ -i libraries/mpfr/Makefile.in cp -p %{SOURCE201} libraries/mpfr/patch-%{mpfrver} @@ -623,6 +625,10 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog +* Fri Feb 23 2024 Jerry James - 1.22-6 +- Build the polymake and scip examples +- Recommend scip + * Mon Jan 22 2024 Fedora Release Engineering - 1.22-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild diff --git a/linbox-1.7.0.patch b/linbox-1.7.0.patch index 70edb8c..36fc3b1 100644 --- a/linbox-1.7.0.patch +++ b/linbox-1.7.0.patch @@ -13,3 +13,419 @@ //order from major index to minor: combining index, component of sol'n, byte //compute a product (chunk times x) for each chunk +--- linbox-1.7.0/linbox/matrix/matrixdomain/opencl-domain.h ++++ linbox-1.7.0/linbox/matrix/matrixdomain/opencl-domain.h +@@ -208,8 +208,8 @@ namespace LinBox{ + * @param j Column index of entry, 0...coldim() - 1 + * @param a_ij Element to set + */ +- const Element& setEntry(size_t i, size_t j, const Element& a_ij){ +- return _Mat->setEntry(_r0 + i, _c0 + j, a_ij); ++ const void setEntry(size_t i, size_t j, const Element& a_ij){ ++ _Mat->setEntry(_r0 + i, _c0 + j, a_ij); + } + + /** Get a writeable reference to an entry in the matrix. +--- linbox-1.7.0/linbox/algorithms/gauss/gauss-nullspace.inl ++++ linbox-1.7.0/linbox/algorithms/gauss/gauss-nullspace.inl +@@ -2,7 +2,7 @@ + * Copyright (C) LinBox 2008 + * + * Written by Jean-Guillaume Dumas +- * Time-stamp: <27 Aug 20 15:17:09 Jean-Guillaume.Dumas@imag.fr> ++ * Time-stamp: <26 Jan 24 16:05:55 Jean-Guillaume.Dumas@imag.fr> + * + * + * ========LICENCE======== +@@ -104,11 +104,11 @@ namespace LinBox + + Permutation P(field(),(int)Nj); + +- // A.write( std::cerr << "A:=", Tag::FileFormat::Maple ) << ';' << std::endl; ++// A.write( std::cerr << "A:=", Tag::FileFormat::Maple ) << ';' << std::endl; + this->InPlaceLinearPivoting(Rank, Det, A, P, Ni, Nj ); + +- // P.write( std::cerr << "P:=", Tag::FileFormat::Maple ) << ';' << std::endl; +- // A.write( std::cerr << "Ua:=", Tag::FileFormat::Maple ) << ';' << std::endl; ++// P.write( std::cerr << "P:=", Tag::FileFormat::Maple ) << ';' << std::endl; ++// A.write( std::cerr << "Ua:=", Tag::FileFormat::Maple ) << ';' << std::endl; + + for(size_t i=0; i< Ni; ++i) { + if (A[i].size() == 0) { +@@ -123,7 +123,7 @@ namespace LinBox + } + } + +- // A.write( std::cerr << "Ub:=", Tag::FileFormat::Maple ) << ';' << std::endl; ++// A.write( std::cerr << "Ub:=", Tag::FileFormat::Maple ) << ';' << std::endl; + + return this->nullspacebasis(x, Rank, A, P); + } +--- linbox-1.7.0/linbox/matrix/sparsematrix/sparse-ell-matrix.h ++++ linbox-1.7.0/linbox/matrix/sparsematrix/sparse-ell-matrix.h +@@ -1210,10 +1210,10 @@ namespace LinBox + _colid_beg = iter._colid_beg ; + _colid_it = iter._colid_it ; + _data_it = iter._data_it ; +- _data_beg = iter._data_beg ; +- _data_end = iter._data_end ; +- _field = iter._field ; +- _ld = iter._ld ; ++ const_cast(_data_beg) = iter._data_beg ; ++ const_cast(_data_end) = iter._data_end ; ++ const_cast(_field) = iter._field ; ++ const_cast(ld) = iter._ld ; + _row = iter._row ; + + return *this; +--- linbox-1.7.0/linbox/matrix/sparsematrix/sparse-ellr-matrix.h ++++ linbox-1.7.0/linbox/matrix/sparsematrix/sparse-ellr-matrix.h +@@ -1102,11 +1102,11 @@ namespace LinBox + _Iterator &operator = (const _Iterator &iter) + { + _data_it = iter._data_it ; +- _data_beg = iter._data_beg ; +- _data_end = iter._data_end ; +- _field = iter._field ; +- _rowid = iter._rowid; +- _ld = iter._ld ; ++ const_cast(_data_beg) = iter._data_beg ; ++ const_cast(_data_end)= iter._data_end ; ++ const_cast(_field) = iter._field ; ++ const_cast&>(_rowid) = iter._rowid; ++ const_cast(ld) = iter._ld ; + _row = iter._row ; + + return *this; +@@ -1252,10 +1252,10 @@ namespace LinBox + _colid_beg = iter._colid_beg ; + _colid_it = iter._colid_it ; + _data_it = iter._data_it ; +- _data_beg = iter._data_beg ; +- _data_end = iter._data_end ; +- _field = iter._field ; +- _ld = iter._ld ; ++ const_cast(_data_beg) = iter._data_beg ; ++ const_cast(_data_end) = iter._data_end ; ++ const_cast(_field) = iter._field ; ++ const_cast(ld)= iter._ld ; + _row = iter._row ; + + return *this; +--- linbox-1.7.0/linbox/ring/ntl/ntl-lzz_p.h ++++ linbox-1.7.0/linbox/ring/ntl/ntl-lzz_p.h +@@ -85,7 +85,7 @@ namespace Givaro + * @param x reference to Integer to contain output (reference returned). + * @param y constant reference to field element. + */ +- template <> ++ template <> + Integer& Caster(Integer& x, const NTL::zz_p& y) + { + return x = int64_t(rep(y)); +@@ -130,7 +130,7 @@ namespace LinBox + typedef NTL::zz_p Element ; + typedef Givaro::UnparametricOperations Father_t ; + typedef UnparametricRandIter RandIter; +- ++ + const Element zero,one,mOne ; + + +@@ -145,6 +145,11 @@ namespace LinBox + ,zero( NTL::to_zz_p(0)),one( NTL::to_zz_p(1)),mOne(-one) + {} + ++ Element &init (Element &x) const ++ { ++ return x = NTL::to_zz_p(0); ++ } ++ + Element& init(Element& x, const double& y) const + { + double z = fmod(y,(double)Element::modulus()); +@@ -153,7 +158,7 @@ namespace LinBox + return x = NTL::to_zz_p(static_cast(z)); //rounds towards 0 + } + +- Element &init (Element &x, const integer &y=0) const ++ Element &init (Element &x, const integer &y) const + { + NTL::ZZ tmp= NTL::to_ZZ(std::string(y).data()); + return x = NTL::to_zz_p(tmp); +--- linbox-1.7.0/linbox/ring/ntl/ntl-lzz_pe.h ++++ linbox-1.7.0/linbox/ring/ntl/ntl-lzz_pe.h +@@ -96,18 +96,18 @@ namespace LinBox + NTL::zz_pE::init(irredPoly); + _f = irredPoly; + } +- ++ + NTL_zz_pE_Initialiser( const Integer & p, const NTL::zz_pX & f) { + NTL::zz_p::init((int64_t) p); + NTL::zz_pE::init(f); + _f = f; + } +- ++ + NTL_zz_pE_Initialiser(const NTL::zz_pX &f) { + NTL::zz_pE::init(f); + _f = f; + } +- ++ + const NTL::zz_pX& modulus() const { + return _f; + } +@@ -143,22 +143,22 @@ namespace LinBox + NTL_zz_pE (const integer &p, const integer &k) : + NTL_zz_pE_Initialiser(p,k),Father_t () + { +- init(const_cast(zero), 0); +- init(const_cast(one), 1); +- init(const_cast(mOne), p-1); ++ init(const_cast(zero), 0); ++ init(const_cast(one), 1); ++ init(const_cast(mOne), p-1); + } +- ++ + NTL_zz_pE (const integer &p, const NTL::zz_pX &f) : + NTL_zz_pE_Initialiser(p,f), Father_t() + { + init(const_cast(zero), 0); +- init(const_cast(one), 1); +- init(const_cast(mOne), p-1); ++ init(const_cast(one), 1); ++ init(const_cast(mOne), p-1); + } +- ++ + NTL_zz_pE(const NTL_zz_pE &F) : +- NTL_zz_pE_Initialiser(F.modulus()), Father_t(), +- zero(NTL::to_zz_pE(0)), one(NTL::to_zz_pE(1)), mOne(-one) ++ NTL_zz_pE_Initialiser(F.modulus()), Father_t(), ++ zero(NTL::to_zz_pE(0)), one(NTL::to_zz_pE(1)), mOne(-one) + { + } + +@@ -182,15 +182,15 @@ namespace LinBox + + bool isUnit (const Element& x) const + { +- if (isZero(x)) { +- return false; +- } +- +- NTL::zz_pX g, tmp; +- tmp = NTL::conv(x); +- NTL::GCD(g, tmp, modulus()); +- +- return g == 1; ++ if (isZero(x)) { ++ return false; ++ } ++ ++ NTL::zz_pX g, tmp; ++ tmp = NTL::conv(x); ++ NTL::GCD(g, tmp, modulus()); ++ ++ return g == 1; + } + + bool isMOne (const Element& x) const +@@ -207,7 +207,9 @@ namespace LinBox + return f; + } + +- Element & init(Element & x, integer n = 0) const ++ Element & init(Element & x) const { return x; } ++ ++ Element & init(Element & x, integer n) const + { // assumes n >= 0. + int e = exponent(); + n %= cardinality(); +@@ -215,14 +217,14 @@ namespace LinBox + //write(std::cout << "init-ed ", x) << std::endl; + return x; + } +- ++ + // documentation of NTL::conv: + // http://www.shoup.net/ntl/doc/conversions.txt + // XXX = long, ZZ, ZZ_p, ZZ_pE, ZZ_pX + template + Element &init(Element &x, const XXX &y) const { +- x = NTL::conv(y); +- return x; ++ x = NTL::conv(y); ++ return x; + } + + integer & convert(integer & x, const Element & y) const +@@ -279,81 +281,80 @@ namespace LinBox + x=one/x; + return x; + } +- ++ + Element& div(Element &x, const Element &y, const Element &z) const { +- NTL::zz_pX g, zx; +- conv(zx, z); +- NTL::GCD(g, zx, modulus()); +- +- NTL::zz_pE zg; +- conv(zg, zx / g); +- x = NTL::conv(NTL::conv(y) / g); +- x /= zg; +- +- return x; ++ NTL::zz_pX g, zx; ++ conv(zx, z); ++ NTL::GCD(g, zx, modulus()); ++ ++ NTL::zz_pE zg; ++ conv(zg, zx / g); ++ x = NTL::conv(NTL::conv(y) / g); ++ x /= zg; ++ ++ return x; + } +- ++ + Element& divin(Element &x, const Element &y) const { +- Element r; +- div(r, x, y); +- return x = r; ++ Element r; ++ div(r, x, y); ++ return x = r; + } + + bool isDivisor(const Element &x, const Element &y) const { +- if (isZero(y)) { +- return false; +- } +- +- if (isUnit(y)) { +- return true; +- } +- +- NTL::zz_pX a, b; +- conv(a, x); +- conv(b, y); +- +- NTL::zz_pX ga, gb; +- NTL::GCD(ga, a, modulus()); +- NTL::GCD(gb, b, modulus()); +- +- NTL::zz_pX r; +- r = ga % gb; +- return isZero(NTL::conv(r)); ++ if (isZero(y)) { ++ return false; ++ } ++ ++ if (isUnit(y)) { ++ return true; ++ } ++ ++ NTL::zz_pX a, b; ++ conv(a, x); ++ conv(b, y); ++ ++ NTL::zz_pX ga, gb; ++ NTL::GCD(ga, a, modulus()); ++ NTL::GCD(gb, b, modulus()); ++ NTL::zz_pX r; ++ r = ga % gb; ++ return isZero(NTL::conv(r)); + } +- ++ + Element& gcd(Element &g, const Element &a, const Element &b) const { + NTL::zz_pX r1, r2, x, y; + conv(x, a); + conv(y, b); +- ++ + NTL::GCD(r1, x, modulus()); + NTL::GCD(r2, y, r1); +- ++ + return g = NTL::conv(r2); + } +- ++ + Element& gcdin(Element &a, const Element &b) const { + NTL::zz_pE g; + gcd(g, a, b); + return a = g; + } +- ++ + Element& dxgcd(Element &g, Element &s, Element &t, Element &u, Element &v, const Element &a, const Element &b) const { + NTL::zz_pX gx, sx, tx, ux, vx, ax, bx; + conv(ax, a); + conv(bx, b); +- ++ + NTL::XGCD(gx, sx, tx, ax, bx); +- ++ + ux = ax / gx; + vx = bx / gx; +- ++ + conv(g, gx); + conv(s, sx); + conv(t, tx); + conv(u, ux); + conv(v, vx); +- ++ + return g; + } + +@@ -364,12 +365,12 @@ namespace LinBox + x=NTL::to_zz_pE(tmp); + return is; + } +- ++ + std::ostream& write( std::ostream& os ) const + { + return os << "Polynomial quotient ring using NTL::zz_pE"; + } +- ++ + std::ostream& write( std::ostream& os, const Element& x) const { + os << x; + return os; +@@ -429,7 +430,7 @@ namespace LinBox + uint64_t _seed; + const NTL_zz_pE& _ring; + }; // class UnparametricRandIters +- ++ + } // LinBox + + #endif //__LINBOX_ntl_lzz_pe_H +--- linbox-1.7.0/linbox/ring/ntl/ntl-zz_px.h ++++ linbox-1.7.0/linbox/ring/ntl/ntl-zz_px.h +@@ -104,6 +104,12 @@ namespace LinBox + ,_CField(cf) + {} + ++ /** Initialize p to 0 */ ++ Element& init( Element& p ) const ++ { ++ return p = 0; ++ } ++ + /** Initialize p to the constant y (p = y*x^0) */ + template + Element& init( Element& p, const ANY& y ) const +-- +2.43.0 + From 0a0ed4abf77ebbfe664af7acef641dce72b69547 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Sat, 24 Feb 2024 11:36:16 -0700 Subject: [PATCH 48/70] Disable ppc64le build until segfaults can be diagnosed --- Macaulay2.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index 96b77b5..00f2d43 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -378,7 +378,10 @@ Provides: macaulay2 = %{version}-%{release} # Macaulay2 no longer builds successfully on 32-bit platforms # https://bugzilla.redhat.com/show_bug.cgi?id=1874318 -ExcludeArch: %{ix86} +# +# Macaulay2 started segfaulting during the build on ppc64le just prior to +# F40 Beta Freeze. Disable it for now until we can diagnose the problem. +ExcludeArch: %{ix86} ppc64le # Do not advertise the bundled mpfr %global __provides_exclude libmpfr.so* @@ -628,6 +631,7 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin * Fri Feb 23 2024 Jerry James - 1.22-6 - Build the polymake and scip examples - Recommend scip +- Disable ppc64le build until segfaults can be diagnosed * Mon Jan 22 2024 Fedora Release Engineering - 1.22-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 7cd564a535977d54c7ba30450de6734fbe5983fb Mon Sep 17 00:00:00 2001 From: Jerry James Date: Thu, 20 Jun 2024 06:47:20 -0600 Subject: [PATCH 49/70] Version 1.24.05 --- Macaulay2-1.18-no_gftables.patch | 8 +++--- Macaulay2-1.24-vector-overrun.patch | 40 +++++++++++++++++++++++++++++ Macaulay2.spec | 31 ++++++++++++++-------- sources | 8 +++--- 4 files changed, 68 insertions(+), 19 deletions(-) create mode 100644 Macaulay2-1.24-vector-overrun.patch diff --git a/Macaulay2-1.18-no_gftables.patch b/Macaulay2-1.18-no_gftables.patch index 17ebc01..3f5806f 100644 --- a/Macaulay2-1.18-no_gftables.patch +++ b/Macaulay2-1.18-no_gftables.patch @@ -1,7 +1,7 @@ ---- M2/configure.ac.orig 2021-06-13 14:28:15.330215045 -0600 -+++ M2/configure.ac 2021-06-13 14:28:49.449246006 -0600 -@@ -667,7 +667,7 @@ AC_SUBST(BUILTLIBS) - AC_SUBST(LIBLIST, " atomic_ops gc gdbm gmp mpir mpfr mpfi readline ntl flint factory lapack mpsolve frobby glpk cddlib fplll linbox gtest ") +--- M2/configure.ac.orig 2024-06-19 10:44:06.256033026 -0600 ++++ M2/configure.ac 2024-06-19 10:44:46.295476556 -0600 +@@ -679,7 +679,7 @@ AC_SUBST(BUILTLIBS) + AC_SUBST(LIBLIST, " gc gdbm gmp mpir mpfr mpfi readline ntl flint factory lapack mpsolve frobby glpk cddlib fplll linbox gtest ") # The list LIBLIST is the list of libraries that might be used and linked into M2. -AC_SUBST(PROGLIST, "4ti2 gfan normaliz csdp nauty cddplus lrslib gftables topcom cohomcalg") diff --git a/Macaulay2-1.24-vector-overrun.patch b/Macaulay2-1.24-vector-overrun.patch new file mode 100644 index 0000000..363fe92 --- /dev/null +++ b/Macaulay2-1.24-vector-overrun.patch @@ -0,0 +1,40 @@ +Fixes this error in monoid.cpp: + +/usr/include/c++/14/bits/stl_vector.h:1225: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::front() const [with _Tp = int; _Alloc = std::allocator; const_reference = const int&]: Assertion '!this->empty()' failed. + +and this error in BasicPolyListParser.cpp: + +/usr/include/c++/14/string_view:256: constexpr const std::basic_string_view<_CharT, _Traits>::value_type& std::basic_string_view<_CharT, _Traits>::operator[](size_type) const [with _CharT = char; _Traits = std::char_traits; const_reference = const char&; size_type = long unsigned int]: Assertion '__pos < this->_M_len' failed. + +--- M2/Macaulay2/e/BasicPolyListParser.cpp.orig 2024-05-14 17:18:01.000000000 -0600 ++++ M2/Macaulay2/e/BasicPolyListParser.cpp 2024-06-19 16:10:30.329278475 -0600 +@@ -82,7 +82,7 @@ std::vector readIdentifierL + char c = line[i]; + if (not isalpha(c)) continue; // possibly should give an error if we see a number? or non-identifieer start char? + auto loc = i+1; +- while ((isalpha(line[loc]) or isdigit(line[loc]) or line[loc] == '_') and (loc < line.size())) ++ while ((loc < line.size()) and (isalpha(line[loc]) or isdigit(line[loc]) or line[loc] == '_')) + { + loc++; + } +--- M2/Macaulay2/e/monoid.cpp.orig 2024-05-14 17:18:01.000000000 -0600 ++++ M2/Macaulay2/e/monoid.cpp 2024-06-19 18:48:28.445246775 -0600 +@@ -188,7 +188,7 @@ void Monoid::set_degrees() + } + + auto degrk = mDegreeMonoid->n_vars(); +- auto *iter = &mDegrees.front(); ++ auto *iter = mDegrees.data(); + + if (mHeftVector.size() != degrk) + { +@@ -209,9 +209,7 @@ void Monoid::set_degrees() + } + else + { +- // TODO: what is iter in this case?! + auto m = mDegreeMonoid->make_one(); +- mDegreeMonoid->from_expvector(iter, m); + mDegreeOfVar.assign(mVariableCount, m); + mHeftDegrees.assign(mVariableCount, 1); + } diff --git a/Macaulay2.spec b/Macaulay2.spec index 00f2d43..bc82c28 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -21,9 +21,7 @@ # We have to bundle the linbox package. It has global constructors that cause # the same problem as libfplll. -%global m2url https://github.com/Macaulay2/M2 - -%global emacscommit 2bac85883e2edd479f606ef8eedbbf2869770200 +%global emacscommit 90ce16a15ea1f4fad08e8ba0b74b5045f4a72e8f %global emacsurl https://github.com/Macaulay2/M2-emacs %global emacsshort %(cut -b -7 <<< %{emacscommit}) @@ -51,8 +49,8 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 -Version: 1.22 -Release: 6%{?dist} +Version: 1.24.05 +Release: 1%{?dist} # GPL-2.0-only OR GPL-3.0-only: # - the project as a whole @@ -163,10 +161,11 @@ Release: 6%{?dist} # - Macaulay2/packages/SectionRing.m2 License: (GPL-2.0-only OR GPL-3.0-only) AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.0-or-later AND LGPL-3.0-or-later AND Apache-2.0 AND BSD-3-Clause AND MIT AND OFL-1.1-RFN AND LicenseRef-Fedora-Public-Domain URL: https://macaulay2.com/ +VCS: https://github.com/Macaulay2/M2 %if 0%{?snap:1} Source0: %{name}-%{version}-%{snap}.tar.xz %else -Source0: %{m2url}/archive/release-%{version}/%{name}-%{version}.tar.gz +Source0: %{vcs}/archive/release-%{version}/%{name}-%{version}.tar.gz %endif Source1: %{emacsurl}/tarball/%{emacscommit}/M2-emacs-%{emacsshort}.tar.gz @@ -196,19 +195,19 @@ Source102: http://www.flintlib.org/flint-%{flintver}.tar.gz Provides: bundled(flint) = %{flintver} # FACTORY is bundled because it must be built with special options -%global factoryver 4.2.1 -Source103: http://faculty.math.illinois.edu/Macaulay2/Downloads/OtherSourceCode/factory-%{factoryver}.tar.gz +%global factoryver 4.3.0 +Source103: https://www.singular.uni-kl.de/ftp/pub/Math/Factory/factory-%{factoryver}.tar.gz Provides: bundled(factory) = %{factoryver} # MATHICGB is bundled because it must be built with different threading options %global mathicgbver 1.0 -%global mathicgbcommit de9cc70d7f6d72fe35fc832d7ab478f5debbc90f +%global mathicgbcommit 4cd2bd1357107cf0c83661fdda66c94987de4608 Source104: https://github.com/Macaulay2/mathicgb/tarball/%{mathicgbcommit}/mathicgb-%{mathicgbver}.tar.gz Provides: bundled(mathicgb) = %{mathicgbver} # GTEST is bundled because MATHICGB refuses to build otherwise %global gtestver 1.10.0 -Source105: https://faculty.math.illinois.edu/Macaulay2/Downloads/OtherSourceCode/gtest-%{gtestver}.tar.gz +Source105: https://macaulay2.com/Downloads/OtherSourceCode/gtest-%{gtestver}.tar.gz # MEMTAILOR is bundled because it causes garbage collector crashes otherwise %global memtailorver 1.0 @@ -238,7 +237,7 @@ Source201: mpfr-4.1.0.patch Source300: frobby_v0.9.0.tar.gz Source301: cddlib-094m.tar.gz Source302: lapack-3.9.0.tgz -Source303: 4ti2-1.6.9.tar.gz +Source303: 4ti2-1.6.10.tar.gz Source304: libfplll-5.2.0.tar.gz Source305: gfan0.6.2.tar.gz Source306: givaro-4.1.1.tar.gz @@ -265,6 +264,9 @@ Patch5: %{name}-1.17-configure.patch Patch6: %{name}-1.16-rightarrow.patch # Fix LTO warnings about mismatched declarations and definitions Patch7: %{name}-1.18-lto.patch +# Avoid accessing invalid vector elements +# https://github.com/Macaulay2/M2/issues/3316 +Patch8: %{name}-1.24-vector-overrun.patch BuildRequires: 4ti2 BuildRequires: appstream @@ -456,6 +458,7 @@ ln -s %{_datadir}/factory \ %patch -P5 -p1 -b .configure %patch -P6 -p1 -b .rightarrow %patch -P7 -p1 -b .lto +%patch -P8 -p1 -b .vector # repeatable builds: inject a node name sed -i 's,`uname -n`,build.fedoraproject.org,' configure.ac @@ -505,6 +508,9 @@ optflags=$(sed 's/-O2/-O/g' <<< "%{build_cflags}") optflags="%{build_cflags}" %endif +# Let the configure script find lrslib utilities +module load lrslib-%{_arch} + ## configure macro currently broken, due to some odd prefix-checks. probably fixable -- Rex mkdir -p BUILD/%{_target_platform} pushd BUILD/%{_target_platform} @@ -628,6 +634,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog +* Wed Jun 19 2024 Jerry James - 1.24.05-1 +- Version 1.24.05 + * Fri Feb 23 2024 Jerry James - 1.22-6 - Build the polymake and scip examples - Recommend scip diff --git a/sources b/sources index 4bf407c..079264f 100644 --- a/sources +++ b/sources @@ -1,10 +1,10 @@ SHA512 (Macaulay2-icons.tar.xz) = 069aa0ad70a0253583b00091c094da9b79d2a2f0f2d38aa97f543081f5df5fd3b5a9e1463febd6947c3151cf01844133174c7372f57e158c2d3faba6baed5d1d -SHA512 (Macaulay2-1.22.tar.gz) = c66e29ea0cbc824dc2310d7ffca22858719526388ccd1914e11e37e231192e3c96310a4819ed951f9df59f50058dd7a7c041b792ecbf352110659ed1e02ebe49 -SHA512 (4ti2-1.6.9.tar.gz) = f02b61ba04d7512e86d9574574669ec764d053fc5d01744dc6b521518d4165b41355ae12344923f1549b323406130c6562a4d9272b1b88de2ecc2c20d3d892d5 +SHA512 (Macaulay2-1.24.05.tar.gz) = de15faa981491783f9f69c036adab96f19285d4a11dbc77bf77b0d0ded435abb7bca5987094286cdf17835ff81dc122d269e897e4792167d2734ce02760c0190 +SHA512 (4ti2-1.6.10.tar.gz) = 0bdf73a8885fe03258a903f0bfb45b8271dcf755d8033b57b8d5620daba7fc25b51031ffb2c8609e40bc19508e07ba028de035d8c193caeffe6400457fc0e3e1 SHA512 (cddlib-094m.tar.gz) = d140d57391b1c963d68ca2e344fbda723a5077004bace322a18362fdc1fff8b50fdc4b598ca8cdf131158e07afc96c5d9aafd7abde082a9e241701e403310b9f SHA512 (cohomCalg-0.32.tar.gz) = b76d8de00b13a8fe8881222178247c5e99c15075c46290830f6c3afffb9dfc18af0d57f738ac5a0d7c00044db81b4465d1e0563c95f7f656a2440be5765c6818 SHA512 (Csdp-6.2.0.tgz) = 6f6c44abcb7b0e277f5a42a1e31acbd41c8fbdce0c1641982a48199fe1d922b28d86433d1a98ac71ae521bea04188a830c441db1e9d8eebf174debf501430e82 -SHA512 (factory-4.2.1.tar.gz) = c1c0009cefa769807082b2bf9defb01c286f1bfb9c0c0ac2a07ab87a8019694ff26ba4f7ad43082305dd4fe79a459a340d40f5a2088e963331512c71d3a374c0 +SHA512 (factory-4.3.0.tar.gz) = d88690836f9ac5e29c9118078042436184a88ed4881768f9e5f58a15c973da580847b53466a58310a411db695c82b42667124e85689948c1af72689be4e10272 SHA512 (flint-2.8.4.tar.gz) = 56dbe7b8a4d0d10f79a0d453692a37f74e809ff698440128459b4f4c08c2b8ead23085c92adc944e15e5950371daebfc31e167f24bd9d5ab385bf7018dc4582a SHA512 (frobby_v0.9.0.tar.gz) = bc96ff20ec334932b5eaa8a3d15d0e36eab41eb85e8b74dbdc374dcaafc9873e44a8af16f6caae649aeea17cd6284caf244d4d345689ad43288f199c591a68a6 SHA512 (gfan0.6.2.tar.gz) = 08a9cc543967771af959a506b79db5b55e0e4942e4170dad8691db35ef7d381d878e1ea6534a3cacc0f5d30ec31564ec94cc20b46792d06f18a3a8a3c0aac91d @@ -15,7 +15,7 @@ SHA512 (lapack-3.9.0.tgz) = afa4eb05f2b1dc2f9588ec58bd32f90b78c01185f328e71f2baf SHA512 (libfplll-5.2.0.tar.gz) = 67d1a8deb92d3f9245983b09b7593b19c5d43c8fe77cfea893ea9dfb744bcb77b7239d73e4f619450cc6960f4c48fb1c6ba46268208b0f31f855cf1af6bfaa29 SHA512 (linbox-1.7.0.tar.gz) = cb4e848186d1f6357f498d1e3bda6484b4c789c02440f9614a227a2ae206a31fb20b32be40bda74da3f2f8f981bbd58d80fc97c95499b5151bb06eafb867ef9e SHA512 (lrslib-071a.tar.gz) = f33639c593769722a37262d6a90073076a4a8a7453ed81d948ebed6f0a5ee826b80c9211e5a601ca177b776c5388aa4e46efd55e8b219f1b6ce633232aa6b001 -SHA512 (M2-emacs-2bac858.tar.gz) = 3b44dab7e54e323a3b7f69fa8fe42890d91c9855680af4c10b771446701c268501fcf6362d0b1ba2da6f409f91ff589ad465c2c88ec852c86763d4e6a7a40ab9 +SHA512 (M2-emacs-90ce16a.tar.gz) = f68fe2916b2b030b7ecebf66c8cfe0e3776fd1768bbebece2ce53055d9dcead88b8d679c5320c6e46f6b4d4378fe4a8af62a4912afff51c5253f33ea8665cad1 SHA512 (mathic-1.0.tar.gz) = 9eb2fe94d266ffda4624c89021e08526e073286635dd5439042e744f07ba053534bc9476ab81d37f7622d62d8ce40c3eedbc5f7013cd529584f46d3685f15d3a SHA512 (mathicgb-1.0.tar.gz) = aea24832681c40c92cad012211ed647ed4e8287964481f36a62d6f0fb0d053fb07c17c49385b4782b380576a92aa387f67fa2843437a0e7b315c74288e65d5a8 SHA512 (memtailor-1.0.tar.gz) = 147ef22f322a82d5336c004ba9cce055ee94eb7ad93d4271524cbee4713f94b258342f4e31569abac2e29472fdd25df2fad94000496ce46e469b7e074af3c86e From c84c864c7b1183cd7ec62b93914812bf6ab835b5 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 17 Jul 2024 14:59:12 +0000 Subject: [PATCH 50/70] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- Macaulay2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index bc82c28..e1a74bd 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -50,7 +50,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 Version: 1.24.05 -Release: 1%{?dist} +Release: 2%{?dist} # GPL-2.0-only OR GPL-3.0-only: # - the project as a whole @@ -634,6 +634,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog +* Wed Jul 17 2024 Fedora Release Engineering - 1.24.05-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Wed Jun 19 2024 Jerry James - 1.24.05-1 - Version 1.24.05 From e45bdc76df22194cd0805274a1499363ee60652b Mon Sep 17 00:00:00 2001 From: Jerry James Date: Sat, 24 Aug 2024 06:52:53 -0600 Subject: [PATCH 51/70] Rebuild for Singular 4.4.0p4 --- Macaulay2.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index e1a74bd..c95ebe0 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -24,6 +24,7 @@ %global emacscommit 90ce16a15ea1f4fad08e8ba0b74b5045f4a72e8f %global emacsurl https://github.com/Macaulay2/M2-emacs %global emacsshort %(cut -b -7 <<< %{emacscommit}) +%global m2url https://github.com/Macaulay2/M2 # Address randomization interferes with Macaulay2's memory management scheme, # and linking with -z now breaks configure. @@ -50,7 +51,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 Version: 1.24.05 -Release: 2%{?dist} +Release: 3%{?dist} # GPL-2.0-only OR GPL-3.0-only: # - the project as a whole @@ -161,11 +162,11 @@ Release: 2%{?dist} # - Macaulay2/packages/SectionRing.m2 License: (GPL-2.0-only OR GPL-3.0-only) AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.0-or-later AND LGPL-3.0-or-later AND Apache-2.0 AND BSD-3-Clause AND MIT AND OFL-1.1-RFN AND LicenseRef-Fedora-Public-Domain URL: https://macaulay2.com/ -VCS: https://github.com/Macaulay2/M2 +VCS: git:%{m2url}.git %if 0%{?snap:1} Source0: %{name}-%{version}-%{snap}.tar.xz %else -Source0: %{vcs}/archive/release-%{version}/%{name}-%{version}.tar.gz +Source0: %{m2url}/archive/release-%{version}/%{name}-%{version}.tar.gz %endif Source1: %{emacsurl}/tarball/%{emacscommit}/M2-emacs-%{emacsshort}.tar.gz @@ -634,6 +635,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog +* Sat Aug 24 2024 Jerry James - 1.24.05-3 +- Rebuild for Singular 4.4.0p4 + * Wed Jul 17 2024 Fedora Release Engineering - 1.24.05-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From ceb56615468fe18ba6392062aaabaf08b4872fd9 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Tue, 24 Sep 2024 21:41:39 -0600 Subject: [PATCH 52/70] Rebuild for nauty 2.8.9 --- Macaulay2.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index c95ebe0..2f3a1cb 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -51,7 +51,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 Version: 1.24.05 -Release: 3%{?dist} +Release: 4%{?dist} # GPL-2.0-only OR GPL-3.0-only: # - the project as a whole @@ -327,11 +327,11 @@ BuildRequires: pkgconfig(gmp) BuildRequires: pkgconfig(gtest) BuildRequires: pkgconfig(libffi) BuildRequires: pkgconfig(libmariadb) +BuildRequires: pkgconfig(libnauty) BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(m4ri) BuildRequires: pkgconfig(m4rie) BuildRequires: pkgconfig(mpfi) -BuildRequires: pkgconfig(nauty) BuildRequires: pkgconfig(ncurses) BuildRequires: pkgconfig(qd) BuildRequires: pkgconfig(readline) @@ -635,6 +635,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog +* Mon Sep 23 2024 Jerry James - 1.24.05-4 +- Rebuild for nauty 2.8.9 + * Sat Aug 24 2024 Jerry James - 1.24.05-3 - Rebuild for Singular 4.4.0p4 From a62e57f082c5a792eb991ef241effe47b3a010ff Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 22 Nov 2024 14:15:25 -0500 Subject: [PATCH 53/70] libfplll 5.5.0 --- Macaulay2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index 2f3a1cb..8ec1eb9 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -51,7 +51,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 Version: 1.24.05 -Release: 4%{?dist} +Release: 5%{?dist} # GPL-2.0-only OR GPL-3.0-only: # - the project as a whole @@ -635,6 +635,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog +* Fri Nov 22 2024 Benjamin A. Beasley - 1.24.05-5 +- Rebuild for libfplll 5.5.0 + * Mon Sep 23 2024 Jerry James - 1.24.05-4 - Rebuild for nauty 2.8.9 From e7178e0213c0548d06b3dea933d77c4b8c970123 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 16 Jan 2025 08:43:25 +0000 Subject: [PATCH 54/70] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- Macaulay2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index 8ec1eb9..a331af4 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -51,7 +51,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 Version: 1.24.05 -Release: 5%{?dist} +Release: 6%{?dist} # GPL-2.0-only OR GPL-3.0-only: # - the project as a whole @@ -635,6 +635,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog +* Thu Jan 16 2025 Fedora Release Engineering - 1.24.05-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Fri Nov 22 2024 Benjamin A. Beasley - 1.24.05-5 - Rebuild for libfplll 5.5.0 From 2de5ad26e60b879219fd3a38321b53cbddc00dee Mon Sep 17 00:00:00 2001 From: Jerry James Date: Thu, 20 Feb 2025 14:07:03 -0700 Subject: [PATCH 55/70] Version 1.24.11 - Drop upstreamed vector overrun patch - Add patch to fix mismatched options to codim - BR e-antic-devel - BR and Recommend msolve - Move configuration steps to %conf - Remove pessimization on s390x --- Macaulay2-1.16-ulimit.patch | 22 +- Macaulay2-1.18-no_gftables.patch | 12 +- Macaulay2-1.24-codim-option.patch | 52 + Macaulay2-1.24-vector-overrun.patch | 40 - Macaulay2.spec | 122 +- flint-3.1.3.patch | 17 + linbox-1.7.0.patch | 375 ++++-- mpfr-4.1.0.patch | 1747 --------------------------- sources | 16 +- 9 files changed, 456 insertions(+), 1947 deletions(-) create mode 100644 Macaulay2-1.24-codim-option.patch delete mode 100644 Macaulay2-1.24-vector-overrun.patch create mode 100644 flint-3.1.3.patch delete mode 100644 mpfr-4.1.0.patch diff --git a/Macaulay2-1.16-ulimit.patch b/Macaulay2-1.16-ulimit.patch index 900bafe..ad15955 100644 --- a/Macaulay2-1.16-ulimit.patch +++ b/Macaulay2-1.16-ulimit.patch @@ -1,8 +1,8 @@ ---- M2/libraries/Makefile.library.in.orig 2022-05-13 20:58:36.000000000 -0600 -+++ M2/libraries/Makefile.library.in 2022-05-23 06:33:19.410991764 -0600 -@@ -238,10 +238,10 @@ distclean: package-distclean - clean::; rm -rf .patched* .untarred* $(LIBNAME)* .checked* .compiled* .configured* .installed* .untarred2* diffs tmp $(UNTARDIR) $(OLDUNTARDIR) - distclean: clean ; rm -rf Makefile +--- M2/libraries/Makefile.library.in.orig 2024-11-01 04:33:00.000000000 -0600 ++++ M2/libraries/Makefile.library.in 2025-02-18 20:23:38.667139158 -0700 +@@ -254,10 +254,10 @@ ifneq (@DOWNLOAD@,yes) + @ false + endif -SLIMIT ?= 8192 -TLIMIT ?= 100 @@ -15,8 +15,8 @@ LIMIT := : ifeq (@ULIMIT_T@,yes) LIMIT += ; ulimit -t $(TLIMIT) ---- M2/Macaulay2/m2/basictests/Makefile.in.orig 2022-05-13 20:58:36.000000000 -0600 -+++ M2/Macaulay2/m2/basictests/Makefile.in 2022-05-23 06:33:19.417991753 -0600 +--- M2/Macaulay2/m2/basictests/Makefile.in.orig 2024-11-01 04:33:00.000000000 -0600 ++++ M2/Macaulay2/m2/basictests/Makefile.in 2025-02-18 20:23:38.667139158 -0700 @@ -22,17 +22,17 @@ $(TESTRESULTS) : @pre_exec_prefix@/bin/M ARGS := --silent -q --stop --no-core -e 'srcdir = "@srcdir@/"' @@ -42,8 +42,8 @@ LIMIT := ifeq (@ULIMIT_T@,yes) ---- M2/Macaulay2/tests/ComputationsBook/Makefile.chapter.in.orig 2022-05-13 20:58:36.000000000 -0600 -+++ M2/Macaulay2/tests/ComputationsBook/Makefile.chapter.in 2022-05-23 06:33:19.424991742 -0600 +--- M2/Macaulay2/tests/ComputationsBook/Makefile.chapter.in.orig 2024-11-01 04:33:00.000000000 -0600 ++++ M2/Macaulay2/tests/ComputationsBook/Makefile.chapter.in 2025-02-18 20:23:38.667139158 -0700 @@ -15,16 +15,16 @@ diff: LIMIT := @@ -65,8 +65,8 @@ endif ---- M2/Macaulay2/tests/Makefile.test.in.orig 2022-05-13 20:58:36.000000000 -0600 -+++ M2/Macaulay2/tests/Makefile.test.in 2022-05-23 06:33:19.431991731 -0600 +--- M2/Macaulay2/tests/Makefile.test.in.orig 2024-11-01 04:33:00.000000000 -0600 ++++ M2/Macaulay2/tests/Makefile.test.in 2025-02-18 20:23:38.667139158 -0700 @@ -6,18 +6,18 @@ DEFERRED ?= no DOTS ?= ../.. diff --git a/Macaulay2-1.18-no_gftables.patch b/Macaulay2-1.18-no_gftables.patch index 3f5806f..624b4bf 100644 --- a/Macaulay2-1.18-no_gftables.patch +++ b/Macaulay2-1.18-no_gftables.patch @@ -1,11 +1,11 @@ ---- M2/configure.ac.orig 2024-06-19 10:44:06.256033026 -0600 -+++ M2/configure.ac 2024-06-19 10:44:46.295476556 -0600 -@@ -679,7 +679,7 @@ AC_SUBST(BUILTLIBS) - AC_SUBST(LIBLIST, " gc gdbm gmp mpir mpfr mpfi readline ntl flint factory lapack mpsolve frobby glpk cddlib fplll linbox gtest ") +--- M2/configure.ac.orig 2025-02-18 20:23:14.170473648 -0700 ++++ M2/configure.ac 2025-02-18 20:25:03.857046789 -0700 +@@ -615,7 +615,7 @@ AC_SUBST(BUILTLIBS) + AC_SUBST(LIBLIST, " gc gdbm gmp mpfr mpfi normaliz readline ntl flint factory lapack mpsolve frobby glpk cddlib fplll givaro fflas_ffpack linbox gtest tbb memtailor mathic mathicgb eigen ") # The list LIBLIST is the list of libraries that might be used and linked into M2. --AC_SUBST(PROGLIST, "4ti2 gfan normaliz csdp nauty cddplus lrslib gftables topcom cohomcalg") -+AC_SUBST(PROGLIST, "4ti2 gfan normaliz csdp nauty cddplus lrslib topcom cohomcalg") +-AC_SUBST(PROGLIST, "4ti2 gfan csdp nauty cddplus lrslib gftables topcom cohomcalg msolve") ++AC_SUBST(PROGLIST, "4ti2 gfan csdp nauty cddplus lrslib topcom cohomcalg msolve") # The list PROGLIST is the list of programs and libraries for them that are distributed with M2. # Initially, we offer no option for not compiling some of them. diff --git a/Macaulay2-1.24-codim-option.patch b/Macaulay2-1.24-codim-option.patch new file mode 100644 index 0000000..2e4b980 --- /dev/null +++ b/Macaulay2-1.24-codim-option.patch @@ -0,0 +1,52 @@ +Fixes these errors: + + -- ___Ignore__Primes.errors + -- ************************ + -- o4 : List + -- + -- i5 : L2 = topMinimalPrimesIP(I, IgnorePrimes=>L1) + -- + -- o5 = {monomialIdeal (x, y, w, v)} + -- + -- o5 : List + -- + -- i6 : minimalPrimes I + -- stdio:6:13:(3): error: encountered an unknown key or option: Generic + -- + -- _top__Minimal__Primes__I__P.errors + -- ********************************** + -- i1 : R = QQ[x,y,z,w,v]; + -- + -- i2 : I = monomialIdeal(y^12, x*y^3, z*w^3, z*v*y^10, z*x^10, v*z^10, w*v^10, y*v*x*z*w); + -- + -- o2 : MonomialIdeal of R + -- + -- i3 : ScipPrintLevel = 0; + -- + -- i4 : minimalPrimes(I) + -- stdio:4:13:(3): error: encountered an unknown key or option: Generic + -- + -- _minimal__Primes__I__P.errors + -- ***************************** + -- i5 : minimalPrimesIP I + -- + -- o5 = {monomialIdeal (y, z, w), monomialIdeal (y, z, v), monomialIdeal (x, y, + -- ------------------------------------------------------------------------ + -- w, v)} + -- + -- o5 : List + -- + -- i6 : minimalPrimes I + -- stdio:6:13:(3): error: encountered an unknown key or option: Generic + +--- M2/Macaulay2/packages/MonomialIntegerPrograms.m2.orig 2024-11-01 04:33:00.000000000 -0600 ++++ M2/Macaulay2/packages/MonomialIntegerPrograms.m2 2025-02-19 19:09:27.203480082 -0700 +@@ -135,7 +135,7 @@ oldCodim = lookup(codim, MonomialIdeal); + oldDegree = lookup(degree, MonomialIdeal); + loadSCIPCodimAndDegree = method(); + installMethod(loadSCIPCodimAndDegree,() -> ( +- codim MonomialIdeal := {} >> opts -> m -> ((cacheValue symbol codim) codimensionIP) m; ++ codim MonomialIdeal := options oldCodim >> opts -> m -> ((cacheValue symbol codim) codimensionIP) m; + degree MonomialIdeal := m -> ((cacheValue symbol degree) degreeIP) m; + )); + loadBuiltinCodimAndDegree = method(); diff --git a/Macaulay2-1.24-vector-overrun.patch b/Macaulay2-1.24-vector-overrun.patch deleted file mode 100644 index 363fe92..0000000 --- a/Macaulay2-1.24-vector-overrun.patch +++ /dev/null @@ -1,40 +0,0 @@ -Fixes this error in monoid.cpp: - -/usr/include/c++/14/bits/stl_vector.h:1225: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::front() const [with _Tp = int; _Alloc = std::allocator; const_reference = const int&]: Assertion '!this->empty()' failed. - -and this error in BasicPolyListParser.cpp: - -/usr/include/c++/14/string_view:256: constexpr const std::basic_string_view<_CharT, _Traits>::value_type& std::basic_string_view<_CharT, _Traits>::operator[](size_type) const [with _CharT = char; _Traits = std::char_traits; const_reference = const char&; size_type = long unsigned int]: Assertion '__pos < this->_M_len' failed. - ---- M2/Macaulay2/e/BasicPolyListParser.cpp.orig 2024-05-14 17:18:01.000000000 -0600 -+++ M2/Macaulay2/e/BasicPolyListParser.cpp 2024-06-19 16:10:30.329278475 -0600 -@@ -82,7 +82,7 @@ std::vector readIdentifierL - char c = line[i]; - if (not isalpha(c)) continue; // possibly should give an error if we see a number? or non-identifieer start char? - auto loc = i+1; -- while ((isalpha(line[loc]) or isdigit(line[loc]) or line[loc] == '_') and (loc < line.size())) -+ while ((loc < line.size()) and (isalpha(line[loc]) or isdigit(line[loc]) or line[loc] == '_')) - { - loc++; - } ---- M2/Macaulay2/e/monoid.cpp.orig 2024-05-14 17:18:01.000000000 -0600 -+++ M2/Macaulay2/e/monoid.cpp 2024-06-19 18:48:28.445246775 -0600 -@@ -188,7 +188,7 @@ void Monoid::set_degrees() - } - - auto degrk = mDegreeMonoid->n_vars(); -- auto *iter = &mDegrees.front(); -+ auto *iter = mDegrees.data(); - - if (mHeftVector.size() != degrk) - { -@@ -209,9 +209,7 @@ void Monoid::set_degrees() - } - else - { -- // TODO: what is iter in this case?! - auto m = mDegreeMonoid->make_one(); -- mDegreeMonoid->from_expvector(iter, m); - mDegreeOfVar.assign(mVariableCount, m); - mHeftDegrees.assign(mVariableCount, 1); - } diff --git a/Macaulay2.spec b/Macaulay2.spec index a331af4..19fdc5f 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -21,7 +21,7 @@ # We have to bundle the linbox package. It has global constructors that cause # the same problem as libfplll. -%global emacscommit 90ce16a15ea1f4fad08e8ba0b74b5045f4a72e8f +%global emacscommit f0bb736dff7bbf30d143ecc68700ee747263a35d %global emacsurl https://github.com/Macaulay2/M2-emacs %global emacsshort %(cut -b -7 <<< %{emacscommit}) %global m2url https://github.com/Macaulay2/M2 @@ -50,8 +50,8 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 -Version: 1.24.05 -Release: 6%{?dist} +Version: 1.24.11 +Release: 1%{?dist} # GPL-2.0-only OR GPL-3.0-only: # - the project as a whole @@ -180,23 +180,23 @@ Source20: etags.sh ## BUNDLED code # Normaliz must sometimes be bundled due to version differences %if ! %system_normaliz -%global normalizver 3.9.2 +%global normalizver 3.10.4 Source100: http://www.math.uiuc.edu/Macaulay2/Downloads/OtherSourceCode/normaliz-%{normalizver}.tar.gz Provides: bundled(normaliz) = %{normalizver} %endif # MPFR is bundled because it must be built with different threading options -%global mpfrver 4.1.0 -Source101: http://www.mpfr.org/mpfr-%{mpfrver}/mpfr-%{mpfrver}.tar.xz +%global mpfrver 4.2.1 +Source101: https://www.mpfr.org/mpfr-%{mpfrver}/mpfr-%{mpfrver}.tar.gz Provides: bundled(mpfr) = %{mpfrver} # FLINT is bundled because it must be linked with the specially-built MPFR -%global flintver 2.8.4 -Source102: http://www.flintlib.org/flint-%{flintver}.tar.gz +%global flintver 3.1.3 +Source102: https://flintlib.org/download/flint-%{flintver}.tar.gz Provides: bundled(flint) = %{flintver} # FACTORY is bundled because it must be built with special options -%global factoryver 4.3.0 +%global factoryver 4.4.0 Source103: https://www.singular.uni-kl.de/ftp/pub/Math/Factory/factory-%{factoryver}.tar.gz Provides: bundled(factory) = %{factoryver} @@ -207,8 +207,8 @@ Source104: https://github.com/Macaulay2/mathicgb/tarball/%{mathicgbcommit}/mathi Provides: bundled(mathicgb) = %{mathicgbver} # GTEST is bundled because MATHICGB refuses to build otherwise -%global gtestver 1.10.0 -Source105: https://macaulay2.com/Downloads/OtherSourceCode/gtest-%{gtestver}.tar.gz +%global gtestver 1.11.0 +Source105: https://github.com/google/googletest/archive/release-%{gtestver}/gtest-%{gtestver}.tar.gz # MEMTAILOR is bundled because it causes garbage collector crashes otherwise %global memtailorver 1.0 @@ -228,20 +228,19 @@ Source108: https://github.com/linbox-team/linbox/releases/download/v%{linboxver} Provides: bundled(linbox) = %{linboxver} ## PATCHES FOR BUNDLED code -# Fix a buffer overflow and some constness issues -# https://github.com/linbox-team/linbox/pull/307 +# This is a conglomeration of all current patches for the Fedora linbox package Source200: linbox-1.7.0.patch -# MPFR bug fixes from mpfr upstream. -Source201: mpfr-4.1.0.patch +# Fix a header bug in flint +Source201: flint-3.1.3.patch ## FAKE library tarballs that convince Macaulay2 to use the system versions -Source300: frobby_v0.9.0.tar.gz +Source300: frobby_v0.9.5.tar.gz Source301: cddlib-094m.tar.gz Source302: lapack-3.9.0.tgz Source303: 4ti2-1.6.10.tar.gz Source304: libfplll-5.2.0.tar.gz Source305: gfan0.6.2.tar.gz -Source306: givaro-4.1.1.tar.gz +Source306: givaro-4.2.0.tar.gz Source307: lrslib-071a.tar.gz Source308: TOPCOM-0.17.8.tar.gz Source309: cohomCalg-0.32.tar.gz @@ -265,9 +264,9 @@ Patch5: %{name}-1.17-configure.patch Patch6: %{name}-1.16-rightarrow.patch # Fix LTO warnings about mismatched declarations and definitions Patch7: %{name}-1.18-lto.patch -# Avoid accessing invalid vector elements -# https://github.com/Macaulay2/M2/issues/3316 -Patch8: %{name}-1.24-vector-overrun.patch +# Fix a build error due to mismatched options to codim +# https://github.com/Macaulay2/M2/pull/3651 +Patch8: %{name}-1.24-codim-option.patch BuildRequires: 4ti2 BuildRequires: appstream @@ -279,11 +278,13 @@ BuildRequires: chrpath BuildRequires: cohomCalg BuildRequires: csdp-tools BuildRequires: desktop-file-utils +BuildRequires: diffutils %if 0%{?fedora} BuildRequires: doxygen-latex %else BuildRequires: doxygen %endif +BuildRequires: e-antic-devel BuildRequires: eigen3-static # etags BuildRequires: emacs @@ -305,12 +306,13 @@ BuildRequires: libappstream-glib BuildRequires: libfplll-static BuildRequires: libfrobby-devel BuildRequires: libgfan-devel -BuildRequires: libnormaliz-devel >= 3.9.2 +BuildRequires: libnormaliz-devel >= 3.10.4 BuildRequires: libtool BuildRequires: lrslib-devel BuildRequires: lrslib-utils BuildRequires: make BuildRequires: mpsolve-devel +BuildRequires: msolve BuildRequires: msolve-devel BuildRequires: nauty BuildRequires: normaliz @@ -318,7 +320,7 @@ BuildRequires: ntl-devel BuildRequires: ocl-icd-devel BuildRequires: pari-devel BuildRequires: pkgconfig(atomic_ops) -BuildRequires: pkgconfig(bdw-gc) >= 8.0.4 +BuildRequires: pkgconfig(bdw-gc) >= 8.2.6 BuildRequires: pkgconfig(cddlib) BuildRequires: pkgconfig(expat) BuildRequires: pkgconfig(fflas-ffpack) @@ -364,6 +366,7 @@ Requires: TOPCOM Requires: xdg-utils Recommends: mathicgb +Recommends: msolve Recommends: scip %if 0%{?common} @@ -427,12 +430,14 @@ tar -C submodules/mathic -xf %{SOURCE107} --strip-components=1 ## patches for bundled code sed -e 's,--with-blas,&=%{_includedir}/flexiblas --with-ntl,' \ + -e 's/3\.0\.0/%{flintver}/' \ + -e 's/\(LICENSEFILES = \).*/\1COPYING COPYING.LESSER/' \ + -e 's/-pedantic-errors/& -fno-strict-aliasing/' \ -i libraries/flint/Makefile.in +cp -p %{SOURCE201} libraries/flint/patch-%{flintver} +sed -i 's/^# \(PATCHFILE\)/\1/' libraries/flint/Makefile.in cp -p %{SOURCE200} libraries/linbox/patch-%{linboxver} sed -i 's/^#\(PATCHFILE\)/\1/' libraries/linbox/Makefile.in -sed -e '/^TARFILE =/iPATCHFILE = @abs_srcdir@/patch-$(VERSION)' \ - -i libraries/mpfr/Makefile.in -cp -p %{SOURCE201} libraries/mpfr/patch-%{mpfrver} ## fake library tarballs install -p -m644 %{SOURCE300} %{SOURCE301} %{SOURCE302} %{SOURCE303} \ @@ -447,6 +452,15 @@ sed -i 's,install \(lib.*\.a\),ln -s %{_libdir}/\1,' libraries/lapack/Makefile.i ## fake givaro submodule tar -C submodules/givaro --strip-components=1 -xzf %{SOURCE306} +## flint submodule +tar -C submodules/flint --strip-components=1 -xzf %{SOURCE102} +cd submodules/flint +patch -p1 < %{SOURCE201} +cd - + +## gtest submodule +tar -C submodules/googletest --strip-components=1 -xzf %{SOURCE105} + %patch -P0 -p1 -b .optflags %patch -P1 -p1 -b .ulimit %patch -P2 -p1 -b .default_make_targets @@ -459,8 +473,10 @@ ln -s %{_datadir}/factory \ %patch -P5 -p1 -b .configure %patch -P6 -p1 -b .rightarrow %patch -P7 -p1 -b .lto -%patch -P8 -p1 -b .vector +%patch -P8 -p1 -b .codim + +%conf # repeatable builds: inject a node name sed -i 's,`uname -n`,build.fedoraproject.org,' configure.ac @@ -478,66 +494,55 @@ sed -e 's/BUILD_cddlib=yes/BUILD_cddlib=no/' \ -e 's,-lfplll,%{_libdir}/libfplll.a -lqd,' \ -e 's,`\$PKG_CONFIG --libs givaro`,%{_libdir}/libgivaro.a,' \ -e 's,-lgivaro,%{_libdir}/libgivaro.a,' \ - -e 's,-llapack -lrefblas,-lflexiblas,' \ + -e 's,-lrefblas,-lflexiblas,' \ + -e 's,-llapack,-lflexiblas,' \ -e 's,\$added_fclibs != yes,"$added_fclibs" != yes,' \ -i configure.ac -# We call it flint. Upstream calls it flint2. -sed -i 's/\(LIBNAME = flint\)2/\1/' libraries/flint/Makefile.in - -# Cannot do git submodule operations on a koji builder -sed -i 's/git-checkout-in-\$1, git-checkout-warning-for-\$1//' GNUmakefile.in - # Avoid obsolescence warnings -sed -i 's/egrep/grep -E/g' GNUmakefile.in Makefile Macaulay2/bin/Makefile.in \ +sed -i 's/egrep/grep -E/g' Makefile.in Macaulay2/bin/Makefile.in \ Macaulay2/tests/Makefile{,.test}.in libraries/Makefile.library.in sed -i 's/fgrep/grep -F/g' Macaulay2/util/linkexec-alternative +# Do not try to download tarballs +sed -i '/^fetch: download-enabled/d' libraries/Makefile.library.in + +# Do not try to fetch sources with git +sed -i 's/^\(fetch:\) update-submodule/\1/' libraries/Makefile.library.in + # (re)generate configure autoreconf -fi . %build -%ifarch s390x -# For as yet unknown reasons, when this package is built with optimization -# level -O2 on s390x, the mathicgb code accesses out-of-bounds array elements. -# In addition, valgrind shows accesses to uninitialized elements of arrays -# that should not have any uninitialized elements. The code eventually -# segfaults. -optflags=$(sed 's/-O2/-O/g' <<< "%{build_cflags}") -%else -optflags="%{build_cflags}" -%endif - # Let the configure script find lrslib utilities module load lrslib-%{_arch} ## configure macro currently broken, due to some odd prefix-checks. probably fixable -- Rex mkdir -p BUILD/%{_target_platform} -pushd BUILD/%{_target_platform} +cd BUILD/%{_target_platform} CPPFLAGS="$CPPFLAGS -I%{_includedir}/cddlib -I%{_includedir}/frobby" \ -CFLAGS="$optflags -fsigned-char" \ -CXXFLAGS="$optflags -fsigned-char" \ +CFLAGS='%{build_cflags} -fsigned-char' \ +CXXFLAGS='%{build_cflags} -fsigned-char' \ LIBS="-lflexiblas" \ ../../configure \ --build=%{_build} \ --host=%{_host} \ --with-issue=%{ISSUE} \ --prefix=%{_prefix} \ - --disable-dumpdata \ --enable-shared \ - --disable-fc-lib-ldflags \ --disable-strip \ --enable-fplll \ --enable-linbox \ - --with-integer-package=gmp \ + --with-blas=flexiblas \ + --with-lapack=flexiblas \ --with-unbuilt-programs="cddplus nauty" \ --enable-build-libraries="mpfr flint factory lapack fplll givaro linbox gtest" # The list of libraries and submodules above should include only those that: # 1. We bundle (mpfr, flint, factory, and linbox) # 2. We sneakily substitute one library for another (lapack -> flexiblas) # 3. Have to be linked with the static library (fplll and givaro) -popd +cd - # link with static libraries when global constructors run prior to GC # initialization. Otherwise, unloading the shared object causes a crash. @@ -594,11 +599,11 @@ appstreamcli validate --no-net --explain \ %{buildroot}%{_metainfodir}/com.macaulay2.macaulay2.metainfo.xml # Byte compile the Emacs files, and move the documentation -pushd %{buildroot}%{_emacs_sitelispdir}/macaulay2 +cd %{buildroot}%{_emacs_sitelispdir}/macaulay2 mv M2-emacs* %{buildroot}%{_pkgdocdir} mv README.md %{buildroot}%{_pkgdocdir}/README-emacs.md %{_emacs_bytecompile} *.el -popd +cd - ## unpackaged files # info dir @@ -635,6 +640,15 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog +* Thu Feb 20 2025 Jerry James - 1.24.11-1 +- Version 1.24.11 +- Drop upstreamed vector overrun patch +- Add patch to fix mismatched options to codim +- BR e-antic-devel +- BR and Recommend msolve +- Move configuration steps to %%conf +- Remove pessimization on s390x + * Thu Jan 16 2025 Fedora Release Engineering - 1.24.05-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild diff --git a/flint-3.1.3.patch b/flint-3.1.3.patch new file mode 100644 index 0000000..932be7b --- /dev/null +++ b/flint-3.1.3.patch @@ -0,0 +1,17 @@ +--- flint-3.1.3/src/flint.h.in.orig ++++ flint-3.1.3/src/flint.h.in +@@ -141,12 +141,10 @@ typedef struct __FLINT_FILE FLINT_FILE; + # define FLINT_CONSTANT_P(x) 0 + #endif + +-#if defined(__cplusplus) ++#if defined(__cplusplus) || ( __STDC_VERSION__ >= 202300L ) + # define FLINT_NORETURN [[noreturn]] +-#elif __STDC_VERSION__ < 202300L +-# define FLINT_NORETURN _Noreturn + #else +-# define FLINT_NORETURN noreturn ++# define FLINT_NORETURN _Noreturn + #endif + + #if FLINT_USES_TLS diff --git a/linbox-1.7.0.patch b/linbox-1.7.0.patch index 36fc3b1..74da7d0 100644 --- a/linbox-1.7.0.patch +++ b/linbox-1.7.0.patch @@ -1,33 +1,5 @@ ---- linbox-1.7.0/linbox/blackbox/apply.h.orig 2021-12-13 13:01:21.000000000 -0700 -+++ linbox-1.7.0/linbox/blackbox/apply.h 2023-10-20 13:30:15.295959186 -0600 -@@ -593,8 +593,10 @@ namespace LinBox - */ - int rclen = (int)num_chunks*2 + 5; - -- unsigned char* combined = new unsigned char[(size_t)rc*_n*(size_t)rclen]; -- memset(combined, 0, (size_t)rc*_n*(size_t)rclen); -+ // https://github.com/linbox-team/linbox/issues/304#issuecomment-1766621021 -+ size_t combined_size = (size_t)rc*_n*(size_t)rclen + 1; -+ unsigned char* combined = new unsigned char[combined_size]; -+ memset(combined, 0, combined_size); - - //order from major index to minor: combining index, component of sol'n, byte - //compute a product (chunk times x) for each chunk ---- linbox-1.7.0/linbox/matrix/matrixdomain/opencl-domain.h -+++ linbox-1.7.0/linbox/matrix/matrixdomain/opencl-domain.h -@@ -208,8 +208,8 @@ namespace LinBox{ - * @param j Column index of entry, 0...coldim() - 1 - * @param a_ij Element to set - */ -- const Element& setEntry(size_t i, size_t j, const Element& a_ij){ -- return _Mat->setEntry(_r0 + i, _c0 + j, a_ij); -+ const void setEntry(size_t i, size_t j, const Element& a_ij){ -+ _Mat->setEntry(_r0 + i, _c0 + j, a_ij); - } - - /** Get a writeable reference to an entry in the matrix. ---- linbox-1.7.0/linbox/algorithms/gauss/gauss-nullspace.inl -+++ linbox-1.7.0/linbox/algorithms/gauss/gauss-nullspace.inl +--- linbox-1.7.0/linbox/algorithms/gauss/gauss-nullspace.inl.orig 2020-09-10 03:26:43.000000000 -0600 ++++ linbox-1.7.0/linbox/algorithms/gauss/gauss-nullspace.inl 2025-02-18 20:18:35.488279051 -0700 @@ -2,7 +2,7 @@ * Copyright (C) LinBox 2008 * @@ -61,8 +33,36 @@ return this->nullspacebasis(x, Rank, A, P); } ---- linbox-1.7.0/linbox/matrix/sparsematrix/sparse-ell-matrix.h -+++ linbox-1.7.0/linbox/matrix/sparsematrix/sparse-ell-matrix.h +--- linbox-1.7.0/linbox/blackbox/apply.h.orig 2021-12-13 13:01:21.000000000 -0700 ++++ linbox-1.7.0/linbox/blackbox/apply.h 2025-02-18 20:17:28.073199632 -0700 +@@ -593,8 +593,10 @@ namespace LinBox + */ + int rclen = (int)num_chunks*2 + 5; + +- unsigned char* combined = new unsigned char[(size_t)rc*_n*(size_t)rclen]; +- memset(combined, 0, (size_t)rc*_n*(size_t)rclen); ++ // https://github.com/linbox-team/linbox/issues/304#issuecomment-1766621021 ++ size_t combined_size = (size_t)rc*_n*(size_t)rclen + 1; ++ unsigned char* combined = new unsigned char[combined_size]; ++ memset(combined, 0, combined_size); + + //order from major index to minor: combining index, component of sol'n, byte + //compute a product (chunk times x) for each chunk +--- linbox-1.7.0/linbox/matrix/matrixdomain/opencl-domain.h.orig 2021-12-10 07:36:06.000000000 -0700 ++++ linbox-1.7.0/linbox/matrix/matrixdomain/opencl-domain.h 2025-02-18 20:17:41.112021598 -0700 +@@ -208,8 +208,8 @@ namespace LinBox{ + * @param j Column index of entry, 0...coldim() - 1 + * @param a_ij Element to set + */ +- const Element& setEntry(size_t i, size_t j, const Element& a_ij){ +- return _Mat->setEntry(_r0 + i, _c0 + j, a_ij); ++ const void setEntry(size_t i, size_t j, const Element& a_ij){ ++ _Mat->setEntry(_r0 + i, _c0 + j, a_ij); + } + + /** Get a writeable reference to an entry in the matrix. +--- linbox-1.7.0/linbox/matrix/sparsematrix/sparse-ell-matrix.h.orig 2020-06-26 09:09:12.000000000 -0600 ++++ linbox-1.7.0/linbox/matrix/sparsematrix/sparse-ell-matrix.h 2025-02-18 20:18:35.488279051 -0700 @@ -1210,10 +1210,10 @@ namespace LinBox _colid_beg = iter._colid_beg ; _colid_it = iter._colid_it ; @@ -78,8 +78,8 @@ _row = iter._row ; return *this; ---- linbox-1.7.0/linbox/matrix/sparsematrix/sparse-ellr-matrix.h -+++ linbox-1.7.0/linbox/matrix/sparsematrix/sparse-ellr-matrix.h +--- linbox-1.7.0/linbox/matrix/sparsematrix/sparse-ellr-matrix.h.orig 2020-06-26 09:09:12.000000000 -0600 ++++ linbox-1.7.0/linbox/matrix/sparsematrix/sparse-ellr-matrix.h 2025-02-18 20:18:35.488279051 -0700 @@ -1102,11 +1102,11 @@ namespace LinBox _Iterator &operator = (const _Iterator &iter) { @@ -112,49 +112,22 @@ _row = iter._row ; return *this; ---- linbox-1.7.0/linbox/ring/ntl/ntl-lzz_p.h -+++ linbox-1.7.0/linbox/ring/ntl/ntl-lzz_p.h -@@ -85,7 +85,7 @@ namespace Givaro - * @param x reference to Integer to contain output (reference returned). - * @param y constant reference to field element. - */ -- template <> -+ template <> - Integer& Caster(Integer& x, const NTL::zz_p& y) - { - return x = int64_t(rep(y)); -@@ -130,7 +130,7 @@ namespace LinBox - typedef NTL::zz_p Element ; - typedef Givaro::UnparametricOperations Father_t ; - typedef UnparametricRandIter RandIter; -- -+ - const Element zero,one,mOne ; +--- linbox-1.7.0/linbox/matrix/sparsematrix/sparse-tpl-matrix-omp.h.orig 2020-06-26 09:09:12.000000000 -0600 ++++ linbox-1.7.0/linbox/matrix/sparsematrix/sparse-tpl-matrix-omp.h 2025-02-18 20:19:35.886454322 -0700 +@@ -318,9 +318,9 @@ class SparseMatrix(z)); //rounds towards 0 - } - -- Element &init (Element &x, const integer &y=0) const -+ Element &init (Element &x, const integer &y) const - { - NTL::ZZ tmp= NTL::to_ZZ(std::string(y).data()); - return x = NTL::to_zz_p(tmp); ---- linbox-1.7.0/linbox/ring/ntl/ntl-lzz_pe.h -+++ linbox-1.7.0/linbox/ring/ntl/ntl-lzz_pe.h +- Ap.data_.resize(A.data.size()); ++ Ap.data_.resize(A.data_.size()); + for (v_p = A.data_.begin(), vp_p = Ap.data_.begin(); +- v_p != A.data.end(); ++ v_p, ++ vp_p) ++ v_p != A.data_.end(); ++ v_p, ++ vp_p) + hom.image (vp_p->elt, v_p->elt); + } + }; +--- linbox-1.7.0/linbox/ring/ntl/ntl-lzz_pe.h.orig 2021-12-13 13:01:21.000000000 -0700 ++++ linbox-1.7.0/linbox/ring/ntl/ntl-lzz_pe.h 2025-02-18 20:18:35.488279051 -0700 @@ -96,18 +96,18 @@ namespace LinBox NTL::zz_pE::init(irredPoly); _f = irredPoly; @@ -411,8 +384,49 @@ } // LinBox #endif //__LINBOX_ntl_lzz_pe_H ---- linbox-1.7.0/linbox/ring/ntl/ntl-zz_px.h -+++ linbox-1.7.0/linbox/ring/ntl/ntl-zz_px.h +--- linbox-1.7.0/linbox/ring/ntl/ntl-lzz_p.h.orig 2021-12-13 13:01:21.000000000 -0700 ++++ linbox-1.7.0/linbox/ring/ntl/ntl-lzz_p.h 2025-02-18 20:18:35.488279051 -0700 +@@ -85,7 +85,7 @@ namespace Givaro + * @param x reference to Integer to contain output (reference returned). + * @param y constant reference to field element. + */ +- template <> ++ template <> + Integer& Caster(Integer& x, const NTL::zz_p& y) + { + return x = int64_t(rep(y)); +@@ -130,7 +130,7 @@ namespace LinBox + typedef NTL::zz_p Element ; + typedef Givaro::UnparametricOperations Father_t ; + typedef UnparametricRandIter RandIter; +- ++ + const Element zero,one,mOne ; + + +@@ -145,6 +145,11 @@ namespace LinBox + ,zero( NTL::to_zz_p(0)),one( NTL::to_zz_p(1)),mOne(-one) + {} + ++ Element &init (Element &x) const ++ { ++ return x = NTL::to_zz_p(0); ++ } ++ + Element& init(Element& x, const double& y) const + { + double z = fmod(y,(double)Element::modulus()); +@@ -153,7 +158,7 @@ namespace LinBox + return x = NTL::to_zz_p(static_cast(z)); //rounds towards 0 + } + +- Element &init (Element &x, const integer &y=0) const ++ Element &init (Element &x, const integer &y) const + { + NTL::ZZ tmp= NTL::to_ZZ(std::string(y).data()); + return x = NTL::to_zz_p(tmp); +--- linbox-1.7.0/linbox/ring/ntl/ntl-zz_px.h.orig 2020-06-26 09:09:12.000000000 -0600 ++++ linbox-1.7.0/linbox/ring/ntl/ntl-zz_px.h 2025-02-18 20:18:35.488279051 -0700 @@ -104,6 +104,12 @@ namespace LinBox ,_CField(cf) {} @@ -426,6 +440,205 @@ /** Initialize p to the constant y (p = y*x^0) */ template Element& init( Element& p, const ANY& y ) const --- -2.43.0 - +--- linbox-1.7.0/linbox/vector/blas-subvector.h.orig 2020-09-10 03:26:43.000000000 -0600 ++++ linbox-1.7.0/linbox/vector/blas-subvector.h 2025-02-18 20:19:06.510855483 -0700 +@@ -1,6 +1,6 @@ + /* linbox/matrix/blas-vector.h + * Copyright (C) 2013 the LinBox group +- * 2019 Pascal Giorgi ++ * 2019 Pascal Giorgi + * + * Written by : + * Pascal Giorgi pascal.giorgi@lirmm.fr +@@ -45,7 +45,7 @@ namespace LinBox { + // forward declaration + template + class BlasVector; +- ++ + + template + class VectorEltPointer { +@@ -61,7 +61,7 @@ namespace LinBox { + typedef typename _Vector::Storage::const_reference reference; + using Element=const typename _Vector::Field::Element; + }; +- ++ + template + class BlasSubvector { + +@@ -88,7 +88,7 @@ namespace LinBox { + typedef std::reverse_iterator const_reverse_iterator; + + protected: +- pointer _ptr; ++ pointer _ptr; + size_t _size; + size_t _inc; + Field const*_field; +@@ -101,7 +101,7 @@ namespace LinBox { + ////////////////// + + BlasSubvector(){} +- ++ + /** Constructor from an existing @ref BlasVector and dimensions. + * \param V Pointer to @ref BlasVector of which to construct subvector + * \param beg Starting idx +@@ -110,7 +110,7 @@ namespace LinBox { + */ + BlasSubvector (vectorType &V, size_t beg, size_t inc, size_t dim) : + _ptr(V.getPointer()+beg), _size(dim), _inc(inc), _field(&V.field()) {} +- ++ + /** Constructor from an existing @ref BlasSubvector and dimensions. + * \param V Pointer to @ref DenseSubector of which to construct subvector + * \param beg Starting idx +@@ -118,9 +118,9 @@ namespace LinBox { + * \param inc distance between two element + */ + BlasSubvector (Self_t &V, size_t beg, size_t inc, size_t dim) : +- _ptr(V.data()+beg), _size(dim), _inc(inc), _field(&V.field()) {} ++ _ptr(V.getPointer()+beg), _size(dim), _inc(inc), _field(&V.field()) {} ++ + +- + /** Constructor from an existing @ref BlasVector + * \param V Pointer to @ref BlasVector of which to construct submatrix + */ +@@ -132,17 +132,17 @@ namespace LinBox { + */ + BlasSubvector (const Field& F, pointer ptr, size_t inc, size_t dim) : + _ptr(ptr), _size(dim), _inc(inc), _field(&F) {} +- +- ++ ++ + + BlasSubvector (const Field& F, std::vector& v) : +- _ptr(v.data()), _size(v.size()), _inc(1), _field(&F) ++ _ptr(v.data()), _size(v.size()), _inc(1), _field(&F) + { + std::cerr<<"WARNING "<<__LINE__<<" ("<<__FILE__<<") : creating a BlasSubvector from a std::vector -> MUST BE DEPRECATED"< + Self_t& copy(const Vect& A){ +- assert(_size == A.size()); ++ assert(_size == A.size()); + auto it=A.begin(); auto jt=begin(); + for( ; it!=A.end();++it,++jt) + field().assign(*jt,*it); + return *this; + } +- ++ + //! Rebind operator + template::other> + struct rebind { + typedef BlasVector<_Tp1, _Rep2> other; +- ++ + void operator() (other & Ap, const Self_t& A) { + typedef typename Self_t::const_iterator ConstSelfIterator ; + typedef typename other::iterator OtherIterator ; +@@ -180,14 +180,14 @@ namespace LinBox { + } + }; + +- ++ + + ///////////////// + // ACCESSORS // + ///////////////// + + const Field& field() const { return *_field;} +- ++ + // dimension of the vector + size_t size() const{ return _size; } + size_t max_size() const{ return _size; } +@@ -203,14 +203,14 @@ namespace LinBox { + * @return the inc value of the subvector + */ + size_t getInc() const {return _inc;} +- ++ + + void setEntry (size_t i, const Element &a_i){ field().assign(_ptr[i],a_i); } +- ++ + reference refEntry (size_t i){ return _ptr[i]; } + + const_reference getEntry (size_t i) const { return _ptr[i]; } +- ++ + Element& getEntry (Element &x, size_t i) const{ return field().assign(x,_ptr[i]); } + + // write +@@ -226,7 +226,7 @@ namespace LinBox { + case (Tag::FileFormat::Maple) : + { + os << '<' ; +- for(size_t i=0; i<_size; i++){ ++ for(size_t i=0; i<_size; i++){ + field().write(os, *(_ptr+_inc*i)); + if (i != _size-1) + os << ',' ; +@@ -237,7 +237,7 @@ namespace LinBox { + return os << "not implemented" ; + } + } +- ++ + //read + std::istream &read ( std::istream &is, Tag::FileFormat fmt = Tag::FileFormat::Pretty ) { + return is; +@@ -275,10 +275,10 @@ namespace LinBox { + const_reference front (void) const { return _ptr[0];} + reference back (void) { return _ptr[(_size-1)*_inc];} + const_reference back (void) const { return _ptr[(_size-1)*_inc];} +- ++ + bool empty() const {return (_size==0);} + }; +- ++ + template + std::ostream& operator<< (std::ostream & os, const BlasSubvector & V) { + return V.write(os); +@@ -296,7 +296,7 @@ namespace LinBox { + + + +- ++ + } // LinBox + #endif + // Local Variables: +--- linbox-1.7.0/tests/test-subvector.C.orig 2020-06-26 09:09:12.000000000 -0600 ++++ linbox-1.7.0/tests/test-subvector.C 2025-02-18 20:19:06.510855483 -0700 +@@ -752,6 +752,12 @@ static bool testSubvector3(Field &F, siz + //vector ww(3, 77); + w = ww; + report << ww << std::endl; ++ ++ report << "Constructing subvectors from subvector: "; ++ subVector ww1(w, 0, 0, Length); ++ report << ww1 << std::endl; ++ ++ + #if 0 + report << "Constructing subvector from iterators: "; + Subvect www(w.begin(), w.end()); diff --git a/mpfr-4.1.0.patch b/mpfr-4.1.0.patch deleted file mode 100644 index 30775a5..0000000 --- a/mpfr-4.1.0.patch +++ /dev/null @@ -1,1747 +0,0 @@ ---- mpfr-4.1.0/PATCHES.orig 2021-02-11 12:40:40.079363480 +0000 -+++ mpfr-4.1.0/PATCHES 2021-02-11 12:40:40.119363040 +0000 -@@ -0,0 +1 @@ -+decimal128-conv ---- mpfr-4.1.0/VERSION.orig 2020-07-10 11:52:33.000000000 +0000 -+++ mpfr-4.1.0/VERSION 2021-02-11 12:40:40.119363040 +0000 -@@ -1 +1 @@ --4.1.0 -+4.1.0-p1 ---- mpfr-4.1.0/src/get_d128.c.orig 2020-04-08 22:39:35.000000000 +0000 -+++ mpfr-4.1.0/src/get_d128.c 2021-02-11 12:40:40.103363216 +0000 -@@ -40,22 +40,21 @@ - static _Decimal128 - get_decimal128_nan (void) - { -- return (_Decimal128) MPFR_DBL_NAN; -+ return 0.0dl / 0.0dl; - } - - /* construct the decimal128 Inf with given sign */ - static _Decimal128 - get_decimal128_inf (int negative) - { -- return (_Decimal128) (negative ? MPFR_DBL_INFM : MPFR_DBL_INFP); -+ return negative ? - 1.0dl / 0.0dl : 1.0dl / 0.0dl; - } - - /* construct the decimal128 zero with given sign */ - static _Decimal128 - get_decimal128_zero (int negative) - { -- _Decimal128 zero = 0; -- return (_Decimal128) (negative ? -zero : zero); -+ return negative ? - 0.0dl : 0.0dl; - } - - /* construct the decimal128 smallest non-zero with given sign: ---- mpfr-4.1.0/src/mpfr.h.orig 2020-07-10 11:52:33.000000000 +0000 -+++ mpfr-4.1.0/src/mpfr.h 2021-02-11 12:40:40.115363084 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 4 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 0 --#define MPFR_VERSION_STRING "4.1.0" -+#define MPFR_VERSION_STRING "4.1.0-p1" - - /* User macros: - MPFR_USE_FILE: Define it to make MPFR define functions dealing ---- mpfr-4.1.0/src/version.c.orig 2020-07-10 11:52:33.000000000 +0000 -+++ mpfr-4.1.0/src/version.c 2021-02-11 12:40:40.119363040 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "4.1.0"; -+ return "4.1.0-p1"; - } ---- mpfr-4.1.0/PATCHES.orig 2021-02-11 12:43:51.761257868 +0000 -+++ mpfr-4.1.0/PATCHES 2021-02-11 12:43:51.801257430 +0000 -@@ -0,0 +1 @@ -+random_deviate ---- mpfr-4.1.0/VERSION.orig 2021-02-11 12:40:40.119363040 +0000 -+++ mpfr-4.1.0/VERSION 2021-02-11 12:43:51.801257430 +0000 -@@ -1 +1 @@ --4.1.0-p1 -+4.1.0-p2 ---- mpfr-4.1.0/src/mpfr.h.orig 2021-02-11 12:40:40.115363084 +0000 -+++ mpfr-4.1.0/src/mpfr.h 2021-02-11 12:43:51.801257430 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 4 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 0 --#define MPFR_VERSION_STRING "4.1.0-p1" -+#define MPFR_VERSION_STRING "4.1.0-p2" - - /* User macros: - MPFR_USE_FILE: Define it to make MPFR define functions dealing ---- mpfr-4.1.0/src/random_deviate.c.orig 2020-01-08 18:11:13.000000000 +0000 -+++ mpfr-4.1.0/src/random_deviate.c 2021-02-11 12:43:51.789257562 +0000 -@@ -289,6 +289,7 @@ - mpfr_random_size_t p = mpfr_get_prec (z); /* Number of bits in result */ - mpz_t t; - int inex; -+ mpfr_exp_t negxe; - - if (n == 0) - { -@@ -370,14 +371,22 @@ - mpz_setbit (t, 0); /* Set the trailing bit so result is always inexact */ - if (neg) - mpz_neg (t, t); -- /* Is -x->e representable as a mpfr_exp_t? */ -- MPFR_ASSERTN (x->e <= (mpfr_uexp_t)(-1) >> 1); -+ /* Portable version of the negation of x->e, with a check of overflow. */ -+ if (MPFR_UNLIKELY (x->e > MPFR_EXP_MAX)) -+ { -+ /* Overflow, except when x->e = MPFR_EXP_MAX + 1 = - MPFR_EXP_MIN. */ -+ MPFR_ASSERTN (MPFR_EXP_MIN + MPFR_EXP_MAX == -1 && -+ x->e == (mpfr_random_size_t) MPFR_EXP_MAX + 1); -+ negxe = MPFR_EXP_MIN; -+ } -+ else -+ negxe = - (mpfr_exp_t) x->e; - /* - * Let mpfr_set_z_2exp do all the work of rounding to the requested - * precision, setting overflow/underflow flags, and returning the right - * inexact value. - */ -- inex = mpfr_set_z_2exp (z, t, -x->e, rnd); -+ inex = mpfr_set_z_2exp (z, t, negxe, rnd); - mpz_clear (t); - return inex; - } ---- mpfr-4.1.0/src/version.c.orig 2021-02-11 12:40:40.119363040 +0000 -+++ mpfr-4.1.0/src/version.c 2021-02-11 12:43:51.801257430 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "4.1.0-p1"; -+ return "4.1.0-p2"; - } ---- mpfr-4.1.0/PATCHES.orig 2021-02-11 12:46:49.075316772 +0000 -+++ mpfr-4.1.0/PATCHES 2021-02-11 12:46:49.115316335 +0000 -@@ -0,0 +1 @@ -+set_z_2exp-overflow ---- mpfr-4.1.0/VERSION.orig 2021-02-11 12:43:51.801257430 +0000 -+++ mpfr-4.1.0/VERSION 2021-02-11 12:46:49.115316335 +0000 -@@ -1 +1 @@ --4.1.0-p2 -+4.1.0-p3 ---- mpfr-4.1.0/src/mpfr.h.orig 2021-02-11 12:43:51.801257430 +0000 -+++ mpfr-4.1.0/src/mpfr.h 2021-02-11 12:46:49.115316335 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 4 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 0 --#define MPFR_VERSION_STRING "4.1.0-p2" -+#define MPFR_VERSION_STRING "4.1.0-p3" - - /* User macros: - MPFR_USE_FILE: Define it to make MPFR define functions dealing ---- mpfr-4.1.0/src/set_z_exp.c.orig 2020-01-08 18:11:13.000000000 +0000 -+++ mpfr-4.1.0/src/set_z_exp.c 2021-02-11 12:46:49.103316466 +0000 -@@ -28,10 +28,11 @@ - int - mpfr_set_z_2exp (mpfr_ptr f, mpz_srcptr z, mpfr_exp_t e, mpfr_rnd_t rnd_mode) - { -- mp_size_t fn, zn, dif, en; -+ mp_size_t fn, zn, dif; - int k, sign_z, inex; - mp_limb_t *fp, *zp; -- mpfr_exp_t exp; -+ mpfr_exp_t exp, nmax; -+ mpfr_uexp_t uexp; - - sign_z = mpz_sgn (z); - if (MPFR_UNLIKELY (sign_z == 0)) /* ignore the exponent for 0 */ -@@ -43,10 +44,15 @@ - MPFR_ASSERTD (sign_z == MPFR_SIGN_POS || sign_z == MPFR_SIGN_NEG); - - zn = ABSIZ(z); /* limb size of z */ -- /* compute en = floor(e/GMP_NUMB_BITS) */ -- en = (e >= 0) ? e / GMP_NUMB_BITS : (e + 1) / GMP_NUMB_BITS - 1; - MPFR_ASSERTD (zn >= 1); -- if (MPFR_UNLIKELY (zn + en > MPFR_EMAX_MAX / GMP_NUMB_BITS + 1)) -+ nmax = MPFR_EMAX_MAX / GMP_NUMB_BITS + 1; -+ /* Detect early overflow with zn + en > nmax, -+ where en = floor(e / GMP_NUMB_BITS). -+ This is checked without an integer overflow (even assuming some -+ future version of GMP, where limitations may be removed). */ -+ if (MPFR_UNLIKELY (e >= 0 ? -+ zn > nmax - e / GMP_NUMB_BITS : -+ zn + (e + 1) / GMP_NUMB_BITS - 1 > nmax)) - return mpfr_overflow (f, rnd_mode, sign_z); - /* because zn + en >= MPFR_EMAX_MAX / GMP_NUMB_BITS + 2 - implies (zn + en) * GMP_NUMB_BITS >= MPFR_EMAX_MAX + GMP_NUMB_BITS + 1 -@@ -64,8 +70,21 @@ - and exp = zn * GMP_NUMB_BITS + e - k - <= (zn + en) * GMP_NUMB_BITS - k + GMP_NUMB_BITS - 1 - <= MPFR_EMAX_MAX + 2 * GMP_NUMB_BITS - 1 */ -- exp = (mpfr_prec_t) zn * GMP_NUMB_BITS + e - k; -+ /* We need to compute exp = zn * GMP_NUMB_BITS + e - k with well-defined -+ operations (no integer overflows / no implementation-defined results). -+ The mathematical result of zn * GMP_NUMB_BITS may be larger than -+ the largest value of mpfr_exp_t while exp could still be less than -+ __gmpfr_emax. Thanks to early overflow detection, we can compute the -+ result in modular arithmetic, using mpfr_uexp_t, and convert it to -+ mpfr_exp_t. */ -+ uexp = (mpfr_uexp_t) zn * GMP_NUMB_BITS + (mpfr_uexp_t) e - k; -+ -+ /* Convert to signed in a portable way (see doc/README.dev). -+ On most platforms, this can be optimized to identity (no-op). */ -+ exp = uexp > MPFR_EXP_MAX ? -1 - (mpfr_exp_t) ~uexp : (mpfr_exp_t) uexp; -+ - /* The exponent will be exp or exp + 1 (due to rounding) */ -+ - if (MPFR_UNLIKELY (exp > __gmpfr_emax)) - return mpfr_overflow (f, rnd_mode, sign_z); - if (MPFR_UNLIKELY (exp + 1 < __gmpfr_emin)) ---- mpfr-4.1.0/src/version.c.orig 2021-02-11 12:43:51.801257430 +0000 -+++ mpfr-4.1.0/src/version.c 2021-02-11 12:46:49.115316335 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "4.1.0-p2"; -+ return "4.1.0-p3"; - } ---- mpfr-4.1.0/tests/tset_z_exp.c.orig 2020-01-08 18:11:13.000000000 +0000 -+++ mpfr-4.1.0/tests/tset_z_exp.c 2021-02-11 12:46:49.103316466 +0000 -@@ -97,49 +97,149 @@ - mpfr_get_si is a rather indirect test of a low level routine. */ - - static void --check (long i, mpfr_rnd_t rnd) -+check (long i, mpfr_rnd_t rnd, int reduced) - { -- mpfr_t f; -+ mpfr_t f1, f2, f3; - mpz_t z; -- mpfr_exp_t e; -+ mpfr_exp_t e, old_emin, old_emax; - int inex; -+ mpfr_flags_t flags; -+ -+ old_emin = mpfr_get_emin (); -+ old_emax = mpfr_get_emax (); - - /* using CHAR_BIT * sizeof(long) bits of precision ensures that - mpfr_set_z_2exp is exact below */ -- mpfr_init2 (f, CHAR_BIT * sizeof(long)); -+ mpfr_inits2 (CHAR_BIT * sizeof(long), f1, f2, f3, (mpfr_ptr) 0); - mpz_init (z); - mpz_set_ui (z, i); - /* the following loop ensures that no overflow occurs */ - do - e = randexp (); - while (e > mpfr_get_emax () - CHAR_BIT * sizeof(long)); -- inex = mpfr_set_z_2exp (f, z, e, rnd); -- if (inex != 0) -+ -+ mpfr_clear_flags (); -+ inex = mpfr_set_z_2exp (f1, z, e, rnd); -+ flags = __gmpfr_flags; -+ -+ if (inex != 0 || flags != 0 || -+ (mpfr_div_2si (f2, f1, e, rnd), mpfr_get_si (f2, MPFR_RNDZ) != i)) - { -- printf ("Error in mpfr_set_z_2exp for i=%ld, e=%ld," -- " wrong ternary value\n", i, (long) e); -- printf ("expected 0, got %d\n", inex); -+ printf ("Error in mpfr_set_z_2exp for i=%ld e=%" MPFR_EXP_FSPEC -+ "d rnd_mode=%d\n", i, (mpfr_eexp_t) e, rnd); -+ mpfr_set_si_2exp (f2, i, e, MPFR_RNDN); -+ printf ("expected "); mpfr_dump (f2); -+ printf ("with inex = %d and flags =", 0); -+ flags_out (0); -+ printf ("got "); mpfr_dump (f1); -+ printf ("with inex = %d and flags =", inex); -+ flags_out (flags); - exit (1); - } -- mpfr_div_2si (f, f, e, rnd); -- if (mpfr_get_si (f, MPFR_RNDZ) != i) -+ -+ if (reduced) - { -- printf ("Error in mpfr_set_z_2exp for i=%ld e=", i); -- if (e < LONG_MIN) -- printf ("( LONG_MAX) -- printf ("(>LONG_MAX)"); -- else -- printf ("%ld", (long) e); -- printf (" rnd_mode=%d\n", rnd); -- printf ("expected %ld\n", i); -- printf ("got "); mpfr_dump (f); -- exit (1); -+ mpfr_exp_t ef, emin, emax; -+ int inex2, inex3; -+ mpfr_flags_t flags2, flags3; -+ -+ ef = i == 0 ? 0 : mpfr_get_exp (f1); -+ for (emin = ef - 2; emin <= ef + 2; emin++) -+ for (emax = emin; emax <= ef + 2; emax++) -+ { -+ inex3 = mpfr_set (f3, f1, rnd); -+ MPFR_ASSERTN (inex3 == 0); -+ mpfr_set_emin (emin); -+ mpfr_set_emax (emax); -+ mpfr_clear_flags (); -+ inex2 = mpfr_set_z_2exp (f2, z, e, rnd); -+ flags2 = __gmpfr_flags; -+ mpfr_clear_flags (); -+ inex3 = mpfr_check_range (f3, 0, rnd); -+ flags3 = __gmpfr_flags; -+ if (!(mpfr_equal_p (f2, f3) && -+ SAME_SIGN (inex2, inex3) && -+ flags2 == flags3)) -+ { -+ printf ("Error in mpfr_set_z_2exp for i=%ld e=%" -+ MPFR_EXP_FSPEC "d rnd_mode=%d\nand emin=%" -+ MPFR_EXP_FSPEC "d emax=%" MPFR_EXP_FSPEC -+ "d\n", i, (mpfr_eexp_t) e, rnd, -+ (mpfr_eexp_t) emin, (mpfr_eexp_t) emax); -+ printf ("expected "); mpfr_dump (f3); -+ printf ("with inex = %d and flags =", inex3); -+ flags_out (flags3); -+ printf ("got "); mpfr_dump (f2); -+ printf ("with inex = %d and flags =", inex2); -+ flags_out (flags2); -+ exit (1); -+ } -+ } -+ mpfr_set_emin (old_emin); -+ mpfr_set_emax (old_emax); - } -- mpfr_clear (f); -+ -+ mpfr_clears (f1, f2, f3, (mpfr_ptr) 0); - mpz_clear (z); - } - -+static void -+check_huge (void) -+{ -+ if (getenv ("MPFR_CHECK_LARGEMEM") != NULL) -+ { -+ mpfr_t x; -+ mpz_t z; -+ long e; -+ -+ /* Increase tests_memory_limit to the maximum in order to avoid -+ an obvious failure due to insufficient memory. */ -+ tests_memory_limit = (size_t) -1; /* no memory limit */ -+ -+ mpfr_init2 (x, 32); -+ -+ /* In r14140, with a 32-bit ABI (GCC's -m32): -+ - With UBsan (-fsanitize=undefined -fno-sanitize-recover), -+ this fails with: -+ set_z_2exp.c:71:26: runtime error: signed integer overflow: -+ 67108864 * 32 cannot be represented in type 'long int' -+ - With -D_MPFR_EXP_FORMAT=4, this fails with: -+ Expected 0.10001000000000000000000000000000E5 -+ Got 0 -+ */ -+ mpz_init_set_ui (z, 17); -+ e = 0x7ffffff0; -+ mpz_mul_2exp (z, z, e); -+ mpz_add_ui (z, z, 1); -+ mpfr_set_z_2exp (x, z, -e, MPFR_RNDN); -+ if (mpfr_cmp_ui0 (x, 17) != 0) -+ { -+ printf ("Error 1 in check_huge\n"); -+ printf ("Expected 0.10001000000000000000000000000000E5\n"); -+ printf ("Got "); -+ mpfr_dump (x); -+ exit (1); -+ } -+ mpz_clear (z); -+ -+ mpz_init_set_ui (z, 17); -+ mpz_mul_2exp (z, z, 0xffffffb0); -+ mpz_add_ui (z, z, 1); -+ mpfr_set_z_2exp (x, z, -1, MPFR_RNDN); -+ if (! MPFR_IS_INF (x) || MPFR_IS_NEG (x)) -+ { -+ printf ("Error 2 in check_huge\n"); -+ printf ("Expected @Inf@\n"); -+ printf ("Got "); -+ mpfr_dump (x); -+ exit (1); -+ } -+ mpz_clear (z); -+ -+ mpfr_clear (x); -+ } -+} -+ - int - main (int argc, char *argv[]) - { -@@ -147,11 +247,13 @@ - - tests_start_mpfr (); - -- check (0, MPFR_RNDN); -+ check (0, MPFR_RNDN, 0); - for (j = 0; j < 200000; j++) -- check (randlimb () & LONG_MAX, RND_RAND ()); -+ check (randlimb () & LONG_MAX, RND_RAND (), j < 200); - check0 (); - -+ check_huge (); -+ - tests_end_mpfr (); - - return 0; ---- mpfr-4.1.0/PATCHES.orig 2021-02-11 12:48:27.322243271 +0000 -+++ mpfr-4.1.0/PATCHES 2021-02-11 12:48:27.370242746 +0000 -@@ -0,0 +1 @@ -+prototypes ---- mpfr-4.1.0/VERSION.orig 2021-02-11 12:46:49.115316335 +0000 -+++ mpfr-4.1.0/VERSION 2021-02-11 12:48:27.370242746 +0000 -@@ -1 +1 @@ --4.1.0-p3 -+4.1.0-p4 ---- mpfr-4.1.0/src/atan.c.orig 2020-04-22 15:27:07.000000000 +0000 -+++ mpfr-4.1.0/src/atan.c 2021-02-11 12:48:27.354242922 +0000 -@@ -56,7 +56,7 @@ - }; - - static void --set_table (mpfr_t y, const mp_limb_t x[3]) -+set_table (mpfr_ptr y, const mp_limb_t x[3]) - { - mpfr_prec_t p = MPFR_PREC(y); - mp_size_t n = MPFR_PREC2LIMBS(p); ---- mpfr-4.1.0/src/const_euler.c.orig 2020-01-08 18:11:13.000000000 +0000 -+++ mpfr-4.1.0/src/const_euler.c 2021-02-11 12:48:27.354242922 +0000 -@@ -181,7 +181,7 @@ - } - - int --mpfr_const_euler_internal (mpfr_t x, mpfr_rnd_t rnd) -+mpfr_const_euler_internal (mpfr_ptr x, mpfr_rnd_t rnd) - { - mpfr_const_euler_bs_t sum; - mpz_t t, u, v; ---- mpfr-4.1.0/src/eint.c.orig 2020-03-09 15:31:45.000000000 +0000 -+++ mpfr-4.1.0/src/eint.c 2021-02-11 12:48:27.354242922 +0000 -@@ -36,7 +36,7 @@ - Return PREC(y) when the truncated series does not converge. - */ - static mpfr_exp_t --mpfr_eint_aux (mpfr_t y, mpfr_srcptr x) -+mpfr_eint_aux (mpfr_ptr y, mpfr_srcptr x) - { - mpfr_t eps; /* dynamic (absolute) error bound on t */ - mpfr_t erru, errs; ---- mpfr-4.1.0/src/erandom.c.orig 2020-01-08 18:11:13.000000000 +0000 -+++ mpfr-4.1.0/src/erandom.c 2021-02-11 12:48:27.354242922 +0000 -@@ -80,7 +80,7 @@ - - /* return an exponential random deviate with mean 1 as a MPFR */ - int --mpfr_erandom (mpfr_t z, gmp_randstate_t r, mpfr_rnd_t rnd) -+mpfr_erandom (mpfr_ptr z, gmp_randstate_t r, mpfr_rnd_t rnd) - { - mpfr_random_deviate_t x, p, q; - int inex; ---- mpfr-4.1.0/src/fpif.c.orig 2020-01-08 18:11:13.000000000 +0000 -+++ mpfr-4.1.0/src/fpif.c 2021-02-11 12:48:27.354242922 +0000 -@@ -291,7 +291,8 @@ - * until one has integer types larger than 128 bits). - */ - static unsigned char* --mpfr_fpif_store_exponent (unsigned char *buffer, size_t *buffer_size, mpfr_t x) -+mpfr_fpif_store_exponent (unsigned char *buffer, size_t *buffer_size, -+ mpfr_ptr x) - { - unsigned char *result; - mpfr_uexp_t uexp; -@@ -372,7 +373,7 @@ - * than 128 bits). - */ - static int --mpfr_fpif_read_exponent_from_file (mpfr_t x, FILE * fh) -+mpfr_fpif_read_exponent_from_file (mpfr_ptr x, FILE * fh) - { - mpfr_exp_t exponent; - mpfr_uexp_t uexp; -@@ -456,7 +457,7 @@ - * format - */ - static unsigned char* --mpfr_fpif_store_limbs (unsigned char *buffer, size_t *buffer_size, mpfr_t x) -+mpfr_fpif_store_limbs (unsigned char *buffer, size_t *buffer_size, mpfr_ptr x) - { - unsigned char *result; - mpfr_prec_t precision; -@@ -492,7 +493,7 @@ - * Assume buffer is not NULL. - */ - static void --mpfr_fpif_read_limbs (mpfr_t x, unsigned char *buffer, size_t nb_byte) -+mpfr_fpif_read_limbs (mpfr_ptr x, unsigned char *buffer, size_t nb_byte) - { - size_t mp_bytes_per_limb; - size_t nb_partial_byte; -@@ -522,7 +523,7 @@ - * return 0 if successful - */ - int --mpfr_fpif_export (FILE *fh, mpfr_t x) -+mpfr_fpif_export (FILE *fh, mpfr_ptr x) - { - int status; - unsigned char *buf; -@@ -582,7 +583,7 @@ - * Return 0 if the import was successful. - */ - int --mpfr_fpif_import (mpfr_t x, FILE *fh) -+mpfr_fpif_import (mpfr_ptr x, FILE *fh) - { - int status; - mpfr_prec_t precision; ---- mpfr-4.1.0/src/li2.c.orig 2020-01-08 18:11:13.000000000 +0000 -+++ mpfr-4.1.0/src/li2.c 2021-02-11 12:48:27.354242922 +0000 -@@ -31,7 +31,7 @@ - for determinating the relative error. - */ - static int --li2_series (mpfr_t sum, mpfr_srcptr z, mpfr_rnd_t rnd_mode) -+li2_series (mpfr_ptr sum, mpfr_srcptr z, mpfr_rnd_t rnd_mode) - { - int i; - mpfr_t s, u, v, w; ---- mpfr-4.1.0/src/lngamma.c.orig 2020-01-08 18:11:13.000000000 +0000 -+++ mpfr-4.1.0/src/lngamma.c 2021-02-11 12:48:27.354242922 +0000 -@@ -31,7 +31,7 @@ - precision should be >= 4. - */ - static void --mpfr_gamma_alpha (mpfr_t s, mpfr_prec_t p) -+mpfr_gamma_alpha (mpfr_ptr s, mpfr_prec_t p) - { - MPFR_LOG_FUNC - (("p=%Pu", p), ---- mpfr-4.1.0/src/mpfr-impl.h.orig 2020-06-10 21:50:12.000000000 +0000 -+++ mpfr-4.1.0/src/mpfr-impl.h 2021-02-11 12:48:27.354242922 +0000 -@@ -2474,7 +2474,8 @@ - __MPFR_DECLSPEC mpz_srcptr mpfr_bernoulli_cache (unsigned long); - __MPFR_DECLSPEC void mpfr_bernoulli_freecache (void); - --__MPFR_DECLSPEC int mpfr_sincos_fast (mpfr_t, mpfr_t, mpfr_srcptr, mpfr_rnd_t); -+__MPFR_DECLSPEC int mpfr_sincos_fast (mpfr_ptr, mpfr_ptr, mpfr_srcptr, -+ mpfr_rnd_t); - - __MPFR_DECLSPEC double mpfr_scale2 (double, int); - -@@ -2485,7 +2486,7 @@ - mpfr_prec_t); - - __MPFR_DECLSPEC void mpfr_mpz_init (mpz_ptr); --__MPFR_DECLSPEC void mpfr_mpz_init2 (mpz_t, mp_bitcnt_t); -+__MPFR_DECLSPEC void mpfr_mpz_init2 (mpz_ptr, mp_bitcnt_t); - __MPFR_DECLSPEC void mpfr_mpz_clear (mpz_ptr); - - __MPFR_DECLSPEC int mpfr_odd_p (mpfr_srcptr); ---- mpfr-4.1.0/src/mpfr.h.orig 2021-02-11 12:46:49.115316335 +0000 -+++ mpfr-4.1.0/src/mpfr.h 2021-02-11 12:48:27.366242791 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 4 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 0 --#define MPFR_VERSION_STRING "4.1.0-p3" -+#define MPFR_VERSION_STRING "4.1.0-p4" - - /* User macros: - MPFR_USE_FILE: Define it to make MPFR define functions dealing -@@ -781,8 +781,8 @@ - __MPFR_DECLSPEC int mpfr_strtofr (mpfr_ptr, const char *, char **, int, - mpfr_rnd_t); - --__MPFR_DECLSPEC void mpfr_round_nearest_away_begin (mpfr_t); --__MPFR_DECLSPEC int mpfr_round_nearest_away_end (mpfr_t, int); -+__MPFR_DECLSPEC void mpfr_round_nearest_away_begin (mpfr_ptr); -+__MPFR_DECLSPEC int mpfr_round_nearest_away_end (mpfr_ptr, int); - - __MPFR_DECLSPEC size_t mpfr_custom_get_size (mpfr_prec_t); - __MPFR_DECLSPEC void mpfr_custom_init (void *, mpfr_prec_t); -@@ -1080,10 +1080,12 @@ - #define mpfr_set_uj_2exp __gmpfr_set_uj_2exp - #define mpfr_get_sj __gmpfr_mpfr_get_sj - #define mpfr_get_uj __gmpfr_mpfr_get_uj --__MPFR_DECLSPEC int mpfr_set_sj (mpfr_t, intmax_t, mpfr_rnd_t); --__MPFR_DECLSPEC int mpfr_set_sj_2exp (mpfr_t, intmax_t, intmax_t, mpfr_rnd_t); --__MPFR_DECLSPEC int mpfr_set_uj (mpfr_t, uintmax_t, mpfr_rnd_t); --__MPFR_DECLSPEC int mpfr_set_uj_2exp (mpfr_t, uintmax_t, intmax_t, mpfr_rnd_t); -+__MPFR_DECLSPEC int mpfr_set_sj (mpfr_ptr, intmax_t, mpfr_rnd_t); -+__MPFR_DECLSPEC int mpfr_set_sj_2exp (mpfr_ptr, intmax_t, intmax_t, -+ mpfr_rnd_t); -+__MPFR_DECLSPEC int mpfr_set_uj (mpfr_ptr, uintmax_t, mpfr_rnd_t); -+__MPFR_DECLSPEC int mpfr_set_uj_2exp (mpfr_ptr, uintmax_t, intmax_t, -+ mpfr_rnd_t); - __MPFR_DECLSPEC intmax_t mpfr_get_sj (mpfr_srcptr, mpfr_rnd_t); - __MPFR_DECLSPEC uintmax_t mpfr_get_uj (mpfr_srcptr, mpfr_rnd_t); - ---- mpfr-4.1.0/src/nrandom.c.orig 2020-01-08 18:11:13.000000000 +0000 -+++ mpfr-4.1.0/src/nrandom.c 2021-02-11 12:48:27.354242922 +0000 -@@ -155,7 +155,7 @@ - - /* return a normal random deviate with mean 0 and variance 1 as a MPFR */ - int --mpfr_nrandom (mpfr_t z, gmp_randstate_t r, mpfr_rnd_t rnd) -+mpfr_nrandom (mpfr_ptr z, gmp_randstate_t r, mpfr_rnd_t rnd) - { - mpfr_random_deviate_t x, p, q; - int inex; ---- mpfr-4.1.0/src/pool.c.orig 2020-01-08 18:11:13.000000000 +0000 -+++ mpfr-4.1.0/src/pool.c 2021-02-11 12:48:27.354242922 +0000 -@@ -35,7 +35,7 @@ - static MPFR_THREAD_ATTR __mpz_struct mpz_tab[MPFR_POOL_NENTRIES]; - - MPFR_HOT_FUNCTION_ATTR void --mpfr_mpz_init (mpz_t z) -+mpfr_mpz_init (mpz_ptr z) - { - if (MPFR_LIKELY (n_alloc > 0)) - { -@@ -54,7 +54,7 @@ - } - - MPFR_HOT_FUNCTION_ATTR void --mpfr_mpz_init2 (mpz_t z, mp_bitcnt_t n) -+mpfr_mpz_init2 (mpz_ptr z, mp_bitcnt_t n) - { - /* The condition on n is used below as the argument n will be ignored if - the mpz_t is obtained from the MPFR stack of previously used mpz_t. -@@ -82,7 +82,7 @@ - - - MPFR_HOT_FUNCTION_ATTR void --mpfr_mpz_clear (mpz_t z) -+mpfr_mpz_clear (mpz_ptr z) - { - /* We only put objects with at most MPFR_POOL_MAX_SIZE in the mpz_t pool, - to avoid it takes too much memory (and anyway the speedup is mainly ---- mpfr-4.1.0/src/random_deviate.c.orig 2021-02-11 12:43:51.789257562 +0000 -+++ mpfr-4.1.0/src/random_deviate.c 2021-02-11 12:48:27.354242922 +0000 -@@ -64,7 +64,7 @@ - - /* allocate and set to (0,1) */ - void --mpfr_random_deviate_init (mpfr_random_deviate_t x) -+mpfr_random_deviate_init (mpfr_random_deviate_ptr x) - { - mpz_init (x->f); - x->e = 0; -@@ -72,21 +72,22 @@ - - /* reset to (0,1) */ - void --mpfr_random_deviate_reset (mpfr_random_deviate_t x) -+mpfr_random_deviate_reset (mpfr_random_deviate_ptr x) - { - x->e = 0; - } - - /* deallocate */ - void --mpfr_random_deviate_clear (mpfr_random_deviate_t x) -+mpfr_random_deviate_clear (mpfr_random_deviate_ptr x) - { - mpz_clear (x->f); - } - - /* swap two random deviates */ - void --mpfr_random_deviate_swap (mpfr_random_deviate_t x, mpfr_random_deviate_t y) -+mpfr_random_deviate_swap (mpfr_random_deviate_ptr x, -+ mpfr_random_deviate_ptr y) - { - mpfr_random_size_t s; - unsigned long t; -@@ -107,7 +108,7 @@ - - /* ensure x has at least k bits */ - static void --random_deviate_generate (mpfr_random_deviate_t x, mpfr_random_size_t k, -+random_deviate_generate (mpfr_random_deviate_ptr x, mpfr_random_size_t k, - gmp_randstate_t r, mpz_t t) - { - /* Various compile time checks on mpfr_random_deviate_t */ -@@ -223,7 +224,7 @@ - - /* return position of leading bit, counting from 1 */ - static mpfr_random_size_t --random_deviate_leading_bit (mpfr_random_deviate_t x, gmp_randstate_t r) -+random_deviate_leading_bit (mpfr_random_deviate_ptr x, gmp_randstate_t r) - { - mpfr_random_size_t l; - random_deviate_generate (x, W, r, 0); -@@ -243,7 +244,7 @@ - - /* return kth bit of fraction, representing 2^-k */ - int --mpfr_random_deviate_tstbit (mpfr_random_deviate_t x, mpfr_random_size_t k, -+mpfr_random_deviate_tstbit (mpfr_random_deviate_ptr x, mpfr_random_size_t k, - gmp_randstate_t r) - { - if (k == 0) -@@ -256,7 +257,8 @@ - - /* compare two random deviates, x < y */ - int --mpfr_random_deviate_less (mpfr_random_deviate_t x, mpfr_random_deviate_t y, -+mpfr_random_deviate_less (mpfr_random_deviate_ptr x, -+ mpfr_random_deviate_ptr y, - gmp_randstate_t r) - { - mpfr_random_size_t k = 1; -@@ -280,7 +282,7 @@ - /* set mpfr_t z = (neg ? -1 : 1) * (n + x) */ - int - mpfr_random_deviate_value (int neg, unsigned long n, -- mpfr_random_deviate_t x, mpfr_t z, -+ mpfr_random_deviate_ptr x, mpfr_ptr z, - gmp_randstate_t r, mpfr_rnd_t rnd) - { - /* r is used to add as many bits as necessary to match the precision of z */ ---- mpfr-4.1.0/src/random_deviate.h.orig 2020-01-08 18:11:13.000000000 +0000 -+++ mpfr-4.1.0/src/random_deviate.h 2021-02-11 12:48:27.354242922 +0000 -@@ -76,7 +76,7 @@ - /* set mpfr_t z = (neg ? -1 : 1) * (n + x) */ - __MPFR_DECLSPEC int - mpfr_random_deviate_value (int, unsigned long, -- mpfr_random_deviate_ptr, mpfr_t, -+ mpfr_random_deviate_ptr, mpfr_ptr, - gmp_randstate_t, mpfr_rnd_t); - - #if defined(__cplusplus) ---- mpfr-4.1.0/src/rndna.c.orig 2020-01-08 18:11:13.000000000 +0000 -+++ mpfr-4.1.0/src/rndna.c 2021-02-11 12:48:27.354242922 +0000 -@@ -61,7 +61,7 @@ - and prepares rop to give it one more bit of precision - and to save its old value within it. */ - void --mpfr_round_nearest_away_begin (mpfr_t rop) -+mpfr_round_nearest_away_begin (mpfr_ptr rop) - { - mpfr_t tmp; - mp_size_t xsize; -@@ -129,7 +129,7 @@ - copying it back the result of the applied function - and performing additional roundings. */ - int --mpfr_round_nearest_away_end (mpfr_t rop, int inex) -+mpfr_round_nearest_away_end (mpfr_ptr rop, int inex) - { - mpfr_t tmp; - mp_size_t xsize; ---- mpfr-4.1.0/src/set_sj.c.orig 2020-06-01 10:39:52.000000000 +0000 -+++ mpfr-4.1.0/src/set_sj.c 2021-02-11 12:48:27.354242922 +0000 -@@ -26,13 +26,13 @@ - #ifdef _MPFR_H_HAVE_INTMAX_T - - int --mpfr_set_sj (mpfr_t x, intmax_t j, mpfr_rnd_t rnd) -+mpfr_set_sj (mpfr_ptr x, intmax_t j, mpfr_rnd_t rnd) - { - return mpfr_set_sj_2exp (x, j, 0, rnd); - } - - int --mpfr_set_sj_2exp (mpfr_t x, intmax_t j, intmax_t e, mpfr_rnd_t rnd) -+mpfr_set_sj_2exp (mpfr_ptr x, intmax_t j, intmax_t e, mpfr_rnd_t rnd) - { - if (j >= 0) - return mpfr_set_uj_2exp (x, j, e, rnd); ---- mpfr-4.1.0/src/set_str.c.orig 2020-01-08 18:11:13.000000000 +0000 -+++ mpfr-4.1.0/src/set_str.c 2021-02-11 12:48:27.354242922 +0000 -@@ -23,7 +23,7 @@ - #include "mpfr-impl.h" - - int --mpfr_set_str (mpfr_t x, const char *str, int base, mpfr_rnd_t rnd) -+mpfr_set_str (mpfr_ptr x, const char *str, int base, mpfr_rnd_t rnd) - { - char *p; - ---- mpfr-4.1.0/src/set_uj.c.orig 2020-06-01 10:39:52.000000000 +0000 -+++ mpfr-4.1.0/src/set_uj.c 2021-02-11 12:48:27.354242922 +0000 -@@ -29,13 +29,13 @@ - #define uintmaxpml (sizeof(uintmax_t) / sizeof(mp_limb_t)) - - int --mpfr_set_uj (mpfr_t x, uintmax_t j, mpfr_rnd_t rnd) -+mpfr_set_uj (mpfr_ptr x, uintmax_t j, mpfr_rnd_t rnd) - { - return mpfr_set_uj_2exp (x, j, 0, rnd); - } - - int --mpfr_set_uj_2exp (mpfr_t x, uintmax_t j, intmax_t e, mpfr_rnd_t rnd) -+mpfr_set_uj_2exp (mpfr_ptr x, uintmax_t j, intmax_t e, mpfr_rnd_t rnd) - { - int cnt, inex; - mp_size_t i, k; ---- mpfr-4.1.0/src/sin_cos.c.orig 2020-01-08 18:11:13.000000000 +0000 -+++ mpfr-4.1.0/src/sin_cos.c 2021-02-11 12:48:27.354242922 +0000 -@@ -463,7 +463,7 @@ - Return err such that the relative error is bounded by 2^err ulps. - */ - static int --sincos_aux (mpfr_t s, mpfr_t c, mpfr_srcptr x, mpfr_rnd_t rnd_mode) -+sincos_aux (mpfr_ptr s, mpfr_ptr c, mpfr_srcptr x, mpfr_rnd_t rnd_mode) - { - mpfr_prec_t prec_s, sh; - mpz_t Q, S, C, Q2, S2, C2, y; -@@ -577,7 +577,7 @@ - Assumes s differs from c. - */ - int --mpfr_sincos_fast (mpfr_t s, mpfr_t c, mpfr_srcptr x, mpfr_rnd_t rnd) -+mpfr_sincos_fast (mpfr_ptr s, mpfr_ptr c, mpfr_srcptr x, mpfr_rnd_t rnd) - { - int inexs, inexc; - mpfr_t x_red, ts, tc; ---- mpfr-4.1.0/src/strtofr.c.orig 2020-01-08 18:11:13.000000000 +0000 -+++ mpfr-4.1.0/src/strtofr.c 2021-02-11 12:48:27.354242922 +0000 -@@ -226,7 +226,7 @@ - BUT if it returns 0 (NAN or INF), the ternary value is also '0' - (ie NAN and INF are exact) */ - static int --parse_string (mpfr_t x, struct parsed_string *pstr, -+parse_string (mpfr_ptr x, struct parsed_string *pstr, - const char **string, int base) - { - const char *str = *string; -@@ -451,7 +451,7 @@ - and the precision of x. - Returns the ternary value. */ - static int --parsed_string_to_mpfr (mpfr_t x, struct parsed_string *pstr, mpfr_rnd_t rnd) -+parsed_string_to_mpfr (mpfr_ptr x, struct parsed_string *pstr, mpfr_rnd_t rnd) - { - mpfr_prec_t precx, prec, ysize_bits, pstr_size; - mpfr_exp_t exp; -@@ -934,7 +934,7 @@ - } - - int --mpfr_strtofr (mpfr_t x, const char *string, char **end, int base, -+mpfr_strtofr (mpfr_ptr x, const char *string, char **end, int base, - mpfr_rnd_t rnd) - { - int res; ---- mpfr-4.1.0/src/vasprintf.c.orig 2020-06-01 10:39:52.000000000 +0000 -+++ mpfr-4.1.0/src/vasprintf.c 2021-02-11 12:48:27.354242922 +0000 -@@ -963,7 +963,7 @@ - #define NDIGITS 8 - - MPFR_RETURNS_NONNULL static char * --mpfr_get_str_wrapper (mpfr_exp_t *exp, int base, size_t n, const mpfr_t op, -+mpfr_get_str_wrapper (mpfr_exp_t *exp, int base, size_t n, mpfr_srcptr op, - const struct printf_spec spec) - { - size_t ndigits; ---- mpfr-4.1.0/src/version.c.orig 2021-02-11 12:46:49.115316335 +0000 -+++ mpfr-4.1.0/src/version.c 2021-02-11 12:48:27.370242746 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "4.1.0-p3"; -+ return "4.1.0-p4"; - } ---- mpfr-4.1.0/src/zeta.c.orig 2020-01-08 18:11:13.000000000 +0000 -+++ mpfr-4.1.0/src/zeta.c 2021-02-11 12:48:27.354242922 +0000 -@@ -35,7 +35,7 @@ - sum(tc[i]*product((s+2j)*(s+2j-1)/n^2,j=1..i-1), i=1..p)*s*n^(-s-1) - */ - static void --mpfr_zeta_part_b (mpfr_t b, mpfr_srcptr s, int n, int p, mpfr_t *tc) -+mpfr_zeta_part_b (mpfr_ptr b, mpfr_srcptr s, int n, int p, mpfr_t *tc) - { - mpfr_t s1, d, u; - unsigned long n2; -@@ -130,7 +130,7 @@ - n - an integer - Output: sum - a floating-point number approximating sum(1/i^s, i=1..n-1) */ - static void --mpfr_zeta_part_a (mpfr_t sum, mpfr_srcptr s, int n) -+mpfr_zeta_part_a (mpfr_ptr sum, mpfr_srcptr s, int n) - { - mpfr_t u, s1; - int i; -@@ -158,7 +158,7 @@ - Output: z - Zeta(s) rounded to the precision of z with direction rnd_mode - */ - static int --mpfr_zeta_pos (mpfr_t z, mpfr_srcptr s, mpfr_rnd_t rnd_mode) -+mpfr_zeta_pos (mpfr_ptr z, mpfr_srcptr s, mpfr_rnd_t rnd_mode) - { - mpfr_t b, c, z_pre, f, s1; - double beta, sd, dnep; -@@ -356,8 +356,8 @@ - At input, p is Pi rounded down. - The comments in the code are for rnd = RNDD. */ - static void --mpfr_reflection_overflow (mpfr_t z, mpfr_t s1, const mpfr_t s, mpfr_t y, -- mpfr_t p, mpfr_rnd_t rnd) -+mpfr_reflection_overflow (mpfr_ptr z, mpfr_ptr s1, mpfr_srcptr s, mpfr_ptr y, -+ mpfr_ptr p, mpfr_rnd_t rnd) - { - mpz_t sint; - -@@ -432,7 +432,7 @@ - } - - int --mpfr_zeta (mpfr_t z, mpfr_srcptr s, mpfr_rnd_t rnd_mode) -+mpfr_zeta (mpfr_ptr z, mpfr_srcptr s, mpfr_rnd_t rnd_mode) - { - mpfr_t z_pre, s1, y, p; - long add; ---- mpfr-4.1.0/tests/tcmp2.c.orig 2020-01-08 18:11:13.000000000 +0000 -+++ mpfr-4.1.0/tests/tcmp2.c 2021-02-11 12:48:27.350242965 +0000 -@@ -24,7 +24,7 @@ - - /* set bit n of x to b, where bit 0 is the most significant one */ - static void --set_bit (mpfr_t x, unsigned int n, int b) -+set_bit (mpfr_ptr x, unsigned int n, int b) - { - unsigned l; - mp_size_t xn; ---- mpfr-4.1.0/tests/tdiv.c.orig 2020-01-08 18:11:13.000000000 +0000 -+++ mpfr-4.1.0/tests/tdiv.c 2021-02-11 12:48:27.350242965 +0000 -@@ -369,7 +369,7 @@ - /* given y = o(x/u), x, u, find the inexact flag by - multiplying y by u */ - static int --get_inexact (mpfr_t y, mpfr_t x, mpfr_t u) -+get_inexact (mpfr_ptr y, mpfr_ptr x, mpfr_ptr u) - { - mpfr_t xx; - int inex; ---- mpfr-4.1.0/tests/teq.c.orig 2020-01-08 18:11:13.000000000 +0000 -+++ mpfr-4.1.0/tests/teq.c 2021-02-11 12:48:27.350242965 +0000 -@@ -23,7 +23,7 @@ - #include "mpfr-test.h" - - static void --teq (mpfr_t x) -+teq (mpfr_ptr x) - { - mpfr_t y; - unsigned long k, px, mx; ---- mpfr-4.1.0/tests/terandom_chisq.c.orig 2020-01-08 18:11:13.000000000 +0000 -+++ mpfr-4.1.0/tests/terandom_chisq.c 2021-02-11 12:48:27.350242965 +0000 -@@ -26,7 +26,7 @@ - * exponential distribution. We only take differences of this function so the - * offset doesn't matter; here Phi(0) = 0. */ - static void --exponential_cumulative (mpfr_t z, mpfr_t x, mpfr_rnd_t rnd) -+exponential_cumulative (mpfr_ptr z, mpfr_ptr x, mpfr_rnd_t rnd) - { - mpfr_neg (z, x, rnd); - mpfr_expm1 (z, z, rnd); -@@ -43,7 +43,7 @@ - * TAOCP, Vol 2, 3.3.1, Table 1. It more accurate than the similar formula, - * DLMF 8.11.10. */ - static void --chisq_prob (mpfr_t q, long nu, mpfr_t chisqp) -+chisq_prob (mpfr_ptr q, long nu, mpfr_ptr chisqp) - { - mpfr_t t; - mpfr_rnd_t rnd; -@@ -170,7 +170,7 @@ - * this function. low precision means prec = 2, 3, or 4. High values of - * precision will result in integer overflow. */ - static long --sequential (mpfr_t x) -+sequential (mpfr_ptr x) - { - long expt, prec; - ---- mpfr-4.1.0/tests/tfmma.c.orig 2020-03-24 13:47:38.000000000 +0000 -+++ mpfr-4.1.0/tests/tfmma.c 2021-02-11 12:48:27.350242965 +0000 -@@ -24,7 +24,7 @@ - - /* check both mpfr_fmma and mpfr_fmms */ - static void --random_test (mpfr_t a, mpfr_t b, mpfr_t c, mpfr_t d, mpfr_rnd_t rnd) -+random_test (mpfr_ptr a, mpfr_ptr b, mpfr_ptr c, mpfr_ptr d, mpfr_rnd_t rnd) - { - mpfr_t ref, res, ab, cd; - int inex_ref, inex_res; ---- mpfr-4.1.0/tests/tfmod.c.orig 2020-01-08 18:11:13.000000000 +0000 -+++ mpfr-4.1.0/tests/tfmod.c 2021-02-11 12:48:27.350242965 +0000 -@@ -62,8 +62,8 @@ - } - - static void --test_failed (mpfr_t erem, mpfr_t grem, int eret, int gret, mpfr_t x, mpfr_t y, -- mpfr_rnd_t rnd) -+test_failed (mpfr_ptr erem, mpfr_ptr grem, int eret, int gret, -+ mpfr_ptr x, mpfr_ptr y, mpfr_rnd_t rnd) - { - printf ("error: mpfr_fmod (r, x, y, rnd)\n x = "); - mpfr_out_str (stdout, 10, 0, x, MPFR_RNDD); -@@ -83,7 +83,7 @@ - } - - static void --check (mpfr_t r0, mpfr_t x, mpfr_t y, mpfr_rnd_t rnd) -+check (mpfr_ptr r0, mpfr_ptr x, mpfr_ptr y, mpfr_rnd_t rnd) - { - int inex0, inex1; - mpfr_t r1; ---- mpfr-4.1.0/tests/tfprintf.c.orig 2020-06-01 10:39:52.000000000 +0000 -+++ mpfr-4.1.0/tests/tfprintf.c 2021-02-11 12:48:27.350242965 +0000 -@@ -65,7 +65,7 @@ - const int prec_max_printf = 5000; - - static void --check (FILE *fout, const char *fmt, mpfr_t x) -+check (FILE *fout, const char *fmt, mpfr_ptr x) - { - if (mpfr_fprintf (fout, fmt, x) == -1) - { ---- mpfr-4.1.0/tests/tgamma.c.orig 2020-06-01 00:15:37.000000000 +0000 -+++ mpfr-4.1.0/tests/tgamma.c 2021-02-11 12:48:27.350242965 +0000 -@@ -890,7 +890,7 @@ - computing with a working precision p2. Assume that x is not an - integer <= 2. */ - static void --exp_lgamma (mpfr_t x, mpfr_prec_t p1, mpfr_prec_t p2) -+exp_lgamma (mpfr_ptr x, mpfr_prec_t p1, mpfr_prec_t p2) - { - mpfr_t yd, yu, zd, zu; - int inexd, inexu, sign; ---- mpfr-4.1.0/tests/tnrandom_chisq.c.orig 2020-01-08 18:11:13.000000000 +0000 -+++ mpfr-4.1.0/tests/tnrandom_chisq.c 2021-02-11 12:48:27.350242965 +0000 -@@ -26,7 +26,7 @@ - * for the normal distribution. We only take differences of this function so - * the offset doesn't matter; here Phi(0) = 0. */ - static void --normal_cumulative (mpfr_t z, mpfr_t x, mpfr_rnd_t rnd) -+normal_cumulative (mpfr_ptr z, mpfr_ptr x, mpfr_rnd_t rnd) - { - mpfr_sqrt_ui (z, 2, rnd); - mpfr_div (z, x, z, rnd); -@@ -44,7 +44,7 @@ - * TAOCP, Vol 2, 3.3.1, Table 1. It more accurate than the similar formula, - * DLMF 8.11.10. */ - static void --chisq_prob (mpfr_t q, long nu, mpfr_t chisqp) -+chisq_prob (mpfr_ptr q, long nu, mpfr_ptr chisqp) - { - mpfr_t t; - mpfr_rnd_t rnd; -@@ -166,7 +166,7 @@ - * this function. low precision means prec = 2, 3, or 4. High values of - * precision will result in integer overflow. */ - static long --sequential (mpfr_t x) -+sequential (mpfr_ptr x) - { - long expt, prec; - ---- mpfr-4.1.0/tests/tprintf.c.orig 2020-06-01 10:39:52.000000000 +0000 -+++ mpfr-4.1.0/tests/tprintf.c 2021-02-11 12:48:27.350242965 +0000 -@@ -74,7 +74,7 @@ - int stdout_redirect; - - static void --check (const char *fmt, mpfr_t x) -+check (const char *fmt, mpfr_ptr x) - { - if (mpfr_printf (fmt, x) == -1) - { ---- mpfr-4.1.0/tests/trint.c.orig 2020-02-12 13:04:50.000000000 +0000 -+++ mpfr-4.1.0/tests/trint.c 2021-02-11 12:48:27.350242965 +0000 -@@ -367,7 +367,7 @@ - #endif - - static void --err (const char *str, mp_size_t s, mpfr_t x, mpfr_t y, mpfr_prec_t p, -+err (const char *str, mp_size_t s, mpfr_ptr x, mpfr_ptr y, mpfr_prec_t p, - mpfr_rnd_t r, int trint, int inexact) - { - printf ("Error: %s\ns = %u, p = %u, r = %s, trint = %d, inexact = %d\nx = ", ---- mpfr-4.1.0/tests/tsinh_cosh.c.orig 2020-01-08 18:11:13.000000000 +0000 -+++ mpfr-4.1.0/tests/tsinh_cosh.c 2021-02-11 12:48:27.350242965 +0000 -@@ -23,7 +23,7 @@ - #include "mpfr-test.h" - - static void --failed (mpfr_t x, mpfr_t esh, mpfr_t gsh, mpfr_t ech, mpfr_t gch) -+failed (mpfr_ptr x, mpfr_ptr esh, mpfr_ptr gsh, mpfr_ptr ech, mpfr_ptr gch) - { - printf ("error : mpfr_sinh_cosh (x) x = "); - mpfr_out_str (stdout, 10, 0, x, MPFR_RNDD); -@@ -43,7 +43,7 @@ - - /* check against sinh, cosh */ - static void --check (mpfr_t x, mpfr_rnd_t rnd) -+check (mpfr_ptr x, mpfr_rnd_t rnd) - { - mpfr_t s, c, sx, cx; - int isc, is, ic; ---- mpfr-4.1.0/tests/tsqr.c.orig 2020-01-08 18:11:13.000000000 +0000 -+++ mpfr-4.1.0/tests/tsqr.c 2021-02-11 12:48:27.350242965 +0000 -@@ -33,7 +33,7 @@ - - static void - error1 (mpfr_rnd_t rnd, mpfr_prec_t prec, -- mpfr_t in, mpfr_t outmul, mpfr_t outsqr) -+ mpfr_t in, mpfr_ptr outmul, mpfr_ptr outsqr) - { - printf("ERROR: for %s and prec=%lu\nINPUT=", mpfr_print_rnd_mode(rnd), - (unsigned long) prec); -@@ -44,7 +44,7 @@ - } - - static void --error2 (mpfr_rnd_t rnd, mpfr_prec_t prec, mpfr_t in, mpfr_t out, -+error2 (mpfr_rnd_t rnd, mpfr_prec_t prec, mpfr_ptr in, mpfr_ptr out, - int inexactmul, int inexactsqr) - { - printf("ERROR: for %s and prec=%lu\nINPUT=", mpfr_print_rnd_mode(rnd), ---- mpfr-4.1.0/tests/tsum.c.orig 2020-01-08 18:11:13.000000000 +0000 -+++ mpfr-4.1.0/tests/tsum.c 2021-02-11 12:48:27.350242965 +0000 -@@ -59,7 +59,7 @@ - } - - static void --get_exact_sum (mpfr_t sum, mpfr_t *tab, int n) -+get_exact_sum (mpfr_ptr sum, mpfr_t *tab, int n) - { - int i; - -@@ -1198,7 +1198,7 @@ - } - - static int --mpfr_sum_naive (mpfr_t s, mpfr_t *x, int n, mpfr_rnd_t rnd) -+mpfr_sum_naive (mpfr_ptr s, mpfr_t *x, int n, mpfr_rnd_t rnd) - { - int ret, i; - switch (n) ---- mpfr-4.1.0/PATCHES.orig 2021-02-11 12:50:22.384987438 +0000 -+++ mpfr-4.1.0/PATCHES 2021-02-11 12:50:22.424987002 +0000 -@@ -0,0 +1 @@ -+digamma-hugemem ---- mpfr-4.1.0/VERSION.orig 2021-02-11 12:48:27.370242746 +0000 -+++ mpfr-4.1.0/VERSION 2021-02-11 12:50:22.424987002 +0000 -@@ -1 +1 @@ --4.1.0-p4 -+4.1.0-p5 ---- mpfr-4.1.0/src/digamma.c.orig 2020-06-18 17:17:18.000000000 +0000 -+++ mpfr-4.1.0/src/digamma.c 2021-02-11 12:50:22.412987133 +0000 -@@ -214,19 +214,27 @@ - (("x[%Pu]=%.*Rg rnd=%d", mpfr_get_prec(x), mpfr_log_prec, x, rnd_mode), - ("y[%Pu]=%.*Rg inexact=%d", mpfr_get_prec(y), mpfr_log_prec, y, inex)); - -- /* compute a precision q such that x+1 is exact */ -- if (MPFR_PREC(x) < MPFR_GET_EXP(x)) -- q = MPFR_EXP(x); -- else -- q = MPFR_PREC(x) + 1; -- -- /* for very large x, use |digamma(x) - log(x)| < 1/x < 2^(1-EXP(x)) */ -- if (MPFR_PREC(y) + 10 < MPFR_EXP(x)) -+ /* For very large x, use |digamma(x) - log(x)| < 1/x < 2^(1-EXP(x)). -+ However, for a fixed value of GUARD, MPFR_CAN_ROUND() might fail -+ with probability 1/2^GUARD, in which case the default code will -+ fail since it requires x+1 to be exact, thus a huge precision if -+ x is huge. There are two workarounds: -+ * either perform a Ziv's loop, by increasing GUARD at each step. -+ However, this might fail if x is moderately large, in which case -+ more terms of the asymptotic expansion would be needed. -+ * implement a full asymptotic expansion (with Ziv's loop). */ -+#define GUARD 30 -+ if (MPFR_PREC(y) + GUARD < MPFR_EXP(x)) - { - /* this ensures EXP(x) >= 3, thus x >= 4, thus log(x) > 1 */ -- mpfr_init2 (t, MPFR_PREC(y) + 10); -- mpfr_log (t, x, MPFR_RNDZ); -- if (MPFR_CAN_ROUND (t, MPFR_PREC(y) + 10, MPFR_PREC(y), rnd_mode)) -+ mpfr_init2 (t, MPFR_PREC(y) + GUARD); -+ mpfr_log (t, x, MPFR_RNDN); -+ /* |t - digamma(x)| <= 1/2*ulp(t) + |digamma(x) - log(x)| -+ <= 1/2*ulp(t) + 2^(1-EXP(x)) -+ <= 1/2*ulp(t) + 2^(-PREC(y)-GUARD) -+ <= ulp(t) -+ since |t| >= 1 thus ulp(t) >= 2^(1-PREC(y)-GUARD) */ -+ if (MPFR_CAN_ROUND (t, MPFR_PREC(y) + GUARD, MPFR_PREC(y), rnd_mode)) - { - inex = mpfr_set (y, t, rnd_mode); - mpfr_clear (t); -@@ -235,6 +243,21 @@ - mpfr_clear (t); - } - -+ /* compute a precision q such that x+1 is exact */ -+ if (MPFR_PREC(x) < MPFR_GET_EXP(x)) -+ { -+ /* The goal of the first assertion is to let the compiler ignore -+ the second one when MPFR_EMAX_MAX <= MPFR_PREC_MAX. */ -+ MPFR_ASSERTD (MPFR_EXP(x) <= MPFR_EMAX_MAX); -+ MPFR_ASSERTN (MPFR_EXP(x) <= MPFR_PREC_MAX); -+ q = MPFR_EXP(x); -+ } -+ else -+ q = MPFR_PREC(x) + 1; -+ -+ /* FIXME: q can be much too large, e.g. equal to the maximum exponent! */ -+ MPFR_LOG_MSG (("q=%Pu\n", q)); -+ - mpfr_init2 (x_plus_j, q); - - mpfr_init2 (t, p); ---- mpfr-4.1.0/src/mpfr.h.orig 2021-02-11 12:48:27.366242791 +0000 -+++ mpfr-4.1.0/src/mpfr.h 2021-02-11 12:50:22.424987002 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 4 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 0 --#define MPFR_VERSION_STRING "4.1.0-p4" -+#define MPFR_VERSION_STRING "4.1.0-p5" - - /* User macros: - MPFR_USE_FILE: Define it to make MPFR define functions dealing ---- mpfr-4.1.0/src/version.c.orig 2021-02-11 12:48:27.370242746 +0000 -+++ mpfr-4.1.0/src/version.c 2021-02-11 12:50:22.424987002 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "4.1.0-p4"; -+ return "4.1.0-p5"; - } ---- mpfr-4.1.0/tests/tdigamma.c.orig 2020-06-18 17:17:18.000000000 +0000 -+++ mpfr-4.1.0/tests/tdigamma.c 2021-02-11 12:50:22.412987133 +0000 -@@ -49,12 +49,54 @@ - mpfr_clear (y); - } - -+/* With some GMP_CHECK_RANDOMIZE values, test_generic triggers an error -+ tests_addsize(): too much memory (576460752303432776 bytes) -+ Each time on prec = 200, n = 3, xprec = 140. -+ The following test is a more general testcase. -+*/ -+static void -+bug20210206 (void) -+{ -+#define NPREC 4 -+ mpfr_t x, y[NPREC], z; -+ mpfr_exp_t emin, emax; -+ int i, precx, precy[NPREC] = { 200, 400, 520, 1416 }; -+ -+ emin = mpfr_get_emin (); -+ emax = mpfr_get_emax (); -+ set_emin (MPFR_EMIN_MIN); -+ set_emax (MPFR_EMAX_MAX); -+ -+ for (i = 0; i < NPREC; i++) -+ mpfr_init2 (y[i], precy[i]); -+ mpfr_init2 (z, precy[0]); -+ -+ for (precx = MPFR_PREC_MIN; precx < 150; precx++) -+ { -+ mpfr_init2 (x, precx); -+ mpfr_setmax (x, __gmpfr_emax); -+ for (i = 0; i < NPREC; i++) -+ mpfr_digamma (y[i], x, MPFR_RNDA); -+ mpfr_set (z, y[1], MPFR_RNDA); -+ MPFR_ASSERTN (mpfr_equal_p (y[0], z)); -+ mpfr_clear (x); -+ } -+ -+ for (i = 0; i < NPREC; i++) -+ mpfr_clear (y[i]); -+ mpfr_clear (z); -+ -+ set_emin (emin); -+ set_emax (emax); -+} -+ - int - main (int argc, char *argv[]) - { - tests_start_mpfr (); - - special (); -+ bug20210206 (); - - test_generic (MPFR_PREC_MIN, 200, 20); - ---- mpfr-4.1.0/PATCHES.orig 2021-02-11 12:52:52.519350662 +0000 -+++ mpfr-4.1.0/PATCHES 2021-02-11 12:52:52.563350183 +0000 -@@ -0,0 +1 @@ -+digamma-interm-zero ---- mpfr-4.1.0/VERSION.orig 2021-02-11 12:50:22.424987002 +0000 -+++ mpfr-4.1.0/VERSION 2021-02-11 12:52:52.563350183 +0000 -@@ -1 +1 @@ --4.1.0-p5 -+4.1.0-p6 ---- mpfr-4.1.0/src/digamma.c.orig 2021-02-11 12:50:22.412987133 +0000 -+++ mpfr-4.1.0/src/digamma.c 2021-02-11 12:52:52.547350357 +0000 -@@ -296,21 +296,26 @@ - errt = mpfr_digamma_approx (t, x_plus_j); - expt = MPFR_GET_EXP (t); - mpfr_sub (t, t, u, MPFR_RNDN); -- if (MPFR_GET_EXP (t) < expt) -- errt += expt - MPFR_EXP(t); -- /* Warning: if u is zero (which happens when x_plus_j >= min at the -- beginning of the while loop above), EXP(u) is not defined. -- In this case we have no error from u. */ -- if (MPFR_NOTZERO(u) && MPFR_GET_EXP (t) < MPFR_GET_EXP (u)) -- erru += MPFR_EXP(u) - MPFR_EXP(t); -- if (errt > erru) -- errt = errt + 1; -- else if (errt == erru) -- errt = errt + 2; -- else -- errt = erru + 1; -- if (MPFR_CAN_ROUND (t, p - errt, MPFR_PREC(y), rnd_mode)) -- break; -+ /* Warning! t may be zero (more likely in small precision). Note -+ that in this case, this is an exact zero, not an underflow. */ -+ if (MPFR_NOTZERO(t)) -+ { -+ if (MPFR_GET_EXP (t) < expt) -+ errt += expt - MPFR_EXP(t); -+ /* Warning: if u is zero (which happens when x_plus_j >= min at the -+ beginning of the while loop above), EXP(u) is not defined. -+ In this case we have no error from u. */ -+ if (MPFR_NOTZERO(u) && MPFR_GET_EXP (t) < MPFR_GET_EXP (u)) -+ erru += MPFR_EXP(u) - MPFR_EXP(t); -+ if (errt > erru) -+ errt = errt + 1; -+ else if (errt == erru) -+ errt = errt + 2; -+ else -+ errt = erru + 1; -+ if (MPFR_CAN_ROUND (t, p - errt, MPFR_PREC(y), rnd_mode)) -+ break; -+ } - MPFR_ZIV_NEXT (loop, p); - mpfr_set_prec (t, p); - mpfr_set_prec (u, p); ---- mpfr-4.1.0/src/mpfr.h.orig 2021-02-11 12:50:22.424987002 +0000 -+++ mpfr-4.1.0/src/mpfr.h 2021-02-11 12:52:52.559350226 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 4 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 0 --#define MPFR_VERSION_STRING "4.1.0-p5" -+#define MPFR_VERSION_STRING "4.1.0-p6" - - /* User macros: - MPFR_USE_FILE: Define it to make MPFR define functions dealing ---- mpfr-4.1.0/src/version.c.orig 2021-02-11 12:50:22.424987002 +0000 -+++ mpfr-4.1.0/src/version.c 2021-02-11 12:52:52.559350226 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "4.1.0-p5"; -+ return "4.1.0-p6"; - } ---- mpfr-4.1.0/tests/tdigamma.c.orig 2021-02-11 12:50:22.412987133 +0000 -+++ mpfr-4.1.0/tests/tdigamma.c 2021-02-11 12:52:52.547350357 +0000 -@@ -90,6 +90,26 @@ - set_emax (emax); - } - -+/* another test that fails with GMP_CHECK_RANDOMIZE=1612741376857003 -+ on revision 14398 */ -+static void -+bug20210208 (void) -+{ -+ mpfr_t x, y; -+ int inex; -+ -+ mpfr_init2 (x, 73); -+ mpfr_init2 (y, 1); -+ mpfr_set_str (x, "1.4613470547060071827450", 10, MPFR_RNDN); -+ mpfr_clear_flags (); -+ inex = mpfr_digamma (y, x, MPFR_RNDU); -+ MPFR_ASSERTN (mpfr_cmp_si_2exp (y, -1, -12) == 0); -+ MPFR_ASSERTN (inex > 0); -+ MPFR_ASSERTN (__gmpfr_flags == MPFR_FLAGS_INEXACT); -+ mpfr_clear (x); -+ mpfr_clear (y); -+} -+ - int - main (int argc, char *argv[]) - { -@@ -97,6 +117,7 @@ - - special (); - bug20210206 (); -+ bug20210208 (); - - test_generic (MPFR_PREC_MIN, 200, 20); - ---- mpfr-4.1.0/PATCHES.orig 2021-02-11 12:53:38.382850990 +0000 -+++ mpfr-4.1.0/PATCHES 2021-02-11 12:53:38.426850512 +0000 -@@ -0,0 +1 @@ -+jn-interm-zero ---- mpfr-4.1.0/VERSION.orig 2021-02-11 12:52:52.563350183 +0000 -+++ mpfr-4.1.0/VERSION 2021-02-11 12:53:38.426850512 +0000 -@@ -1 +1 @@ --4.1.0-p6 -+4.1.0-p7 ---- mpfr-4.1.0/src/jyn_asympt.c.orig 2020-07-10 10:33:32.000000000 +0000 -+++ mpfr-4.1.0/src/jyn_asympt.c 2021-02-11 12:53:38.410850685 +0000 -@@ -69,6 +69,8 @@ - MPFR_ZIV_INIT (loop, w); - for (;;) - { -+ int ok = 1; -+ - mpfr_set_prec (c, w); - mpfr_init2 (s, w); - mpfr_init2 (P, w); -@@ -92,6 +94,13 @@ - /* now s approximates sin(z)+cos(z), and c approximates sin(z)-cos(z), - with total absolute error bounded by 2^(1-w). */ - -+ /* if s or c is zero, MPFR_GET_EXP will fail below */ -+ if (MPFR_IS_ZERO(s) || MPFR_IS_ZERO(c)) -+ { -+ ok = 0; -+ goto clear; -+ } -+ - /* precompute 1/(8|z|) */ - mpfr_si_div (iz, MPFR_IS_POS(z) ? 1 : -1, z, MPFR_RNDN); /* err <= 1 */ - mpfr_div_2ui (iz, iz, 3, MPFR_RNDN); -@@ -257,6 +266,9 @@ - err = (err >= err2) ? err + 1 : err2 + 1; - /* the absolute error on c is bounded by 2^(err - w) */ - -+ err -= MPFR_GET_EXP (c); -+ -+ clear: - mpfr_clear (s); - mpfr_clear (P); - mpfr_clear (Q); -@@ -266,8 +278,7 @@ - mpfr_clear (err_s); - mpfr_clear (err_u); - -- err -= MPFR_GET_EXP (c); -- if (MPFR_LIKELY (MPFR_CAN_ROUND (c, w - err, MPFR_PREC(res), r))) -+ if (ok && MPFR_LIKELY (MPFR_CAN_ROUND (c, w - err, MPFR_PREC(res), r))) - break; - if (diverge != 0) - { ---- mpfr-4.1.0/src/mpfr.h.orig 2021-02-11 12:52:52.559350226 +0000 -+++ mpfr-4.1.0/src/mpfr.h 2021-02-11 12:53:38.422850555 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 4 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 0 --#define MPFR_VERSION_STRING "4.1.0-p6" -+#define MPFR_VERSION_STRING "4.1.0-p7" - - /* User macros: - MPFR_USE_FILE: Define it to make MPFR define functions dealing ---- mpfr-4.1.0/src/version.c.orig 2021-02-11 12:52:52.559350226 +0000 -+++ mpfr-4.1.0/src/version.c 2021-02-11 12:53:38.426850512 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "4.1.0-p6"; -+ return "4.1.0-p7"; - } ---- mpfr-4.1.0/tests/tj0.c.orig 2020-01-08 18:11:13.000000000 +0000 -+++ mpfr-4.1.0/tests/tj0.c 2021-02-11 12:53:38.410850685 +0000 -@@ -27,6 +27,25 @@ - #define REDUCE_EMAX 262143 /* otherwise arg. reduction is too expensive */ - #include "tgeneric.c" - -+/* bug found in revision 14399 with GMP_CHECK_RANDOMIZE=1612721106588971 */ -+static void -+bug20210208 (void) -+{ -+ mpfr_t x, y; -+ int inex; -+ -+ mpfr_init2 (x, 79); -+ mpfr_init2 (y, 1); -+ mpfr_set_str (x, "2.552495117262005805960565e+02", 10, MPFR_RNDN); -+ mpfr_clear_flags (); -+ inex = mpfr_j0 (y, x, MPFR_RNDZ); -+ MPFR_ASSERTN (mpfr_cmp_si_2exp (y, -1, -5) == 0); -+ MPFR_ASSERTN (inex > 0); -+ MPFR_ASSERTN (__gmpfr_flags == MPFR_FLAGS_INEXACT); -+ mpfr_clear (x); -+ mpfr_clear (y); -+} -+ - int - main (int argc, char *argv[]) - { -@@ -35,6 +54,8 @@ - - tests_start_mpfr (); - -+ bug20210208 (); -+ - mpfr_init (x); - mpfr_init (y); - ---- mpfr-4.1.0/PATCHES.orig 2021-02-17 17:22:34.594973310 +0000 -+++ mpfr-4.1.0/PATCHES 2021-02-17 17:22:34.702972090 +0000 -@@ -0,0 +1 @@ -+digamma-interm-zero2 ---- mpfr-4.1.0/VERSION.orig 2021-02-11 12:53:38.426850512 +0000 -+++ mpfr-4.1.0/VERSION 2021-02-17 17:22:34.702972090 +0000 -@@ -1 +1 @@ --4.1.0-p7 -+4.1.0-p8 ---- mpfr-4.1.0/src/digamma.c.orig 2021-02-11 12:52:52.547350357 +0000 -+++ mpfr-4.1.0/src/digamma.c 2021-02-17 17:22:34.690972226 +0000 -@@ -173,16 +173,19 @@ - mpfr_digamma (v, u, MPFR_RNDN); /* error <= 1/2 ulp */ - expv = MPFR_GET_EXP (v); - mpfr_sub (v, v, t, MPFR_RNDN); -- if (MPFR_GET_EXP (v) < MPFR_GET_EXP (t)) -- e1 += MPFR_EXP(t) - MPFR_EXP(v); /* scale error for t wrt new v */ -- /* now take into account the 1/2 ulp error for v */ -- if (expv - MPFR_EXP(v) - 1 > e1) -- e1 = expv - MPFR_EXP(v) - 1; -- else -- e1 ++; -- e1 ++; /* rounding error for mpfr_sub */ -- if (MPFR_CAN_ROUND (v, p - e1, MPFR_PREC(y), rnd_mode)) -- break; -+ if (MPFR_NOTZERO(v)) -+ { -+ if (MPFR_GET_EXP (v) < MPFR_GET_EXP (t)) -+ e1 += MPFR_EXP(t) - MPFR_EXP(v); /* scale error for t wrt new v */ -+ /* now take into account the 1/2 ulp error for v */ -+ if (expv - MPFR_EXP(v) - 1 > e1) -+ e1 = expv - MPFR_EXP(v) - 1; -+ else -+ e1 ++; -+ e1 ++; /* rounding error for mpfr_sub */ -+ if (MPFR_CAN_ROUND (v, p - e1, MPFR_PREC(y), rnd_mode)) -+ break; -+ } - MPFR_ZIV_NEXT (loop, p); - mpfr_set_prec (t, p); - mpfr_set_prec (v, p); -@@ -416,10 +419,8 @@ - } - } - -- if (MPFR_IS_NEG(x)) -- inex = mpfr_digamma_reflection (y, x, rnd_mode); - /* if x < 1/2 we use the reflection formula */ -- else if (MPFR_EXP(x) < 0) -+ if (MPFR_IS_NEG(x) || MPFR_EXP(x) < 0) - inex = mpfr_digamma_reflection (y, x, rnd_mode); - else - inex = mpfr_digamma_positive (y, x, rnd_mode); ---- mpfr-4.1.0/src/mpfr.h.orig 2021-02-11 12:53:38.422850555 +0000 -+++ mpfr-4.1.0/src/mpfr.h 2021-02-17 17:22:34.702972090 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 4 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 0 --#define MPFR_VERSION_STRING "4.1.0-p7" -+#define MPFR_VERSION_STRING "4.1.0-p8" - - /* User macros: - MPFR_USE_FILE: Define it to make MPFR define functions dealing ---- mpfr-4.1.0/src/version.c.orig 2021-02-11 12:53:38.426850512 +0000 -+++ mpfr-4.1.0/src/version.c 2021-02-17 17:22:34.702972090 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "4.1.0-p7"; -+ return "4.1.0-p8"; - } ---- mpfr-4.1.0/tests/tdigamma.c.orig 2021-02-11 12:52:52.547350357 +0000 -+++ mpfr-4.1.0/tests/tdigamma.c 2021-02-17 17:22:34.690972226 +0000 -@@ -110,6 +110,26 @@ - mpfr_clear (y); - } - -+/* another test that fails with GMP_CHECK_RANDOMIZE=1613197421465830 -+ on revision 14429 */ -+static void -+bug20210215 (void) -+{ -+ mpfr_t x, y; -+ int inex; -+ -+ mpfr_init2 (x, 510); -+ mpfr_init2 (y, 4); -+ mpfr_set_str (x, "-8.2923051438433494998166335341807999322052669984208422481227138906096000469898717007386115912802685588348601663465077353194268894939972221117314512518182580e+35", 10, MPFR_RNDN); -+ mpfr_clear_flags (); -+ inex = mpfr_digamma (y, x, MPFR_RNDU); -+ MPFR_ASSERTN (mpfr_cmp_ui0 (y, 88) == 0); -+ MPFR_ASSERTN (inex > 0); -+ MPFR_ASSERTN (__gmpfr_flags == MPFR_FLAGS_INEXACT); -+ mpfr_clear (x); -+ mpfr_clear (y); -+} -+ - int - main (int argc, char *argv[]) - { -@@ -118,6 +138,7 @@ - special (); - bug20210206 (); - bug20210208 (); -+ bug20210215 (); - - test_generic (MPFR_PREC_MIN, 200, 20); - ---- mpfr-4.1.0/PATCHES.orig 2021-02-17 17:25:46.396981483 +0000 -+++ mpfr-4.1.0/PATCHES 2021-02-17 17:25:46.440981068 +0000 -@@ -0,0 +1 @@ -+jyn_asympt-interm-zero ---- mpfr-4.1.0/VERSION.orig 2021-02-17 17:22:34.702972090 +0000 -+++ mpfr-4.1.0/VERSION 2021-02-17 17:25:46.440981068 +0000 -@@ -1 +1 @@ --4.1.0-p8 -+4.1.0-p9 ---- mpfr-4.1.0/src/jyn_asympt.c.orig 2021-02-11 12:53:38.410850685 +0000 -+++ mpfr-4.1.0/src/jyn_asympt.c 2021-02-17 17:25:46.424981219 +0000 -@@ -69,7 +69,7 @@ - MPFR_ZIV_INIT (loop, w); - for (;;) - { -- int ok = 1; -+ int ok = 0; - - mpfr_set_prec (c, w); - mpfr_init2 (s, w); -@@ -96,10 +96,7 @@ - - /* if s or c is zero, MPFR_GET_EXP will fail below */ - if (MPFR_IS_ZERO(s) || MPFR_IS_ZERO(c)) -- { -- ok = 0; -- goto clear; -- } -+ goto clear; /* with ok=0 */ - - /* precompute 1/(8|z|) */ - mpfr_si_div (iz, MPFR_IS_POS(z) ? 1 : -1, z, MPFR_RNDN); /* err <= 1 */ -@@ -227,6 +224,9 @@ - mpfr_sub (s, c, s, MPFR_RNDN); - #endif - } -+ if (MPFR_IS_ZERO(s)) -+ goto clear; /* with ok=0 */ -+ ok = 1; - if ((n & 2) != 0) - mpfr_neg (s, s, MPFR_RNDN); - if (MPFR_GET_EXP (s) > err) ---- mpfr-4.1.0/src/mpfr.h.orig 2021-02-17 17:22:34.702972090 +0000 -+++ mpfr-4.1.0/src/mpfr.h 2021-02-17 17:25:46.436981105 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 4 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 0 --#define MPFR_VERSION_STRING "4.1.0-p8" -+#define MPFR_VERSION_STRING "4.1.0-p9" - - /* User macros: - MPFR_USE_FILE: Define it to make MPFR define functions dealing ---- mpfr-4.1.0/src/version.c.orig 2021-02-17 17:22:34.702972090 +0000 -+++ mpfr-4.1.0/src/version.c 2021-02-17 17:25:46.440981068 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "4.1.0-p8"; -+ return "4.1.0-p9"; - } ---- mpfr-4.1.0/tests/mpfr-test.h.orig 2020-06-29 13:57:32.000000000 +0000 -+++ mpfr-4.1.0/tests/mpfr-test.h 2021-02-17 17:25:46.424981219 +0000 -@@ -191,6 +191,8 @@ - - #define mpfr_cmp0(x,y) (MPFR_ASSERTN (!MPFR_IS_NAN (x) && !MPFR_IS_NAN (y)), mpfr_cmp (x,y)) - #define mpfr_cmp_ui0(x,i) (MPFR_ASSERTN (!MPFR_IS_NAN (x)), mpfr_cmp_ui (x,i)) -+#define mpfr_cmp_si_2exp0(x,i,e) (MPFR_ASSERTN (!MPFR_IS_NAN (x)), \ -+ mpfr_cmp_si_2exp (x,i,e)) - - /* define CHECK_EXTERNAL if you want to check mpfr against another library - with correct rounding. You'll probably have to modify mpfr_print_raw() ---- mpfr-4.1.0/tests/tj1.c.orig 2020-01-08 18:11:13.000000000 +0000 -+++ mpfr-4.1.0/tests/tj1.c 2021-02-17 17:25:46.424981219 +0000 -@@ -55,14 +55,14 @@ - /* since |x| is just above 2^e, |j1(x)| is just above 2^(e-1), - thus y should be 2^(e-1) and the inexact flag should be - of opposite sign of x */ -- MPFR_ASSERTN(mpfr_cmp_si_2exp (y, sign, e - 1) == 0); -+ MPFR_ASSERTN(mpfr_cmp_si_2exp0 (y, sign, e - 1) == 0); - MPFR_ASSERTN(VSIGN (inex) * sign < 0); - } - else - { - /* here |y| should be 0.5*2^emin and the inexact flag should - have the sign of x */ -- MPFR_ASSERTN(mpfr_cmp_si_2exp (y, sign, e) == 0); -+ MPFR_ASSERTN(mpfr_cmp_si_2exp0 (y, sign, e) == 0); - MPFR_ASSERTN(VSIGN (inex) * sign > 0); - } - } -@@ -72,6 +72,26 @@ - mpfr_clear (y); - } - -+/* a test that fails with GMP_CHECK_RANDOMIZE=1613146232984428 -+ on revision 14429 */ -+static void -+bug20210215 (void) -+{ -+ mpfr_t x, y; -+ int inex; -+ -+ mpfr_init2 (x, 221); -+ mpfr_init2 (y, 1); -+ mpfr_set_str (x, "1.6484611511696130037307738844228498447763863563070374544054791168614e+01", 10, MPFR_RNDN); -+ mpfr_clear_flags (); -+ inex = mpfr_j1 (y, x, MPFR_RNDZ); -+ MPFR_ASSERTN (mpfr_cmp_si_2exp0 (y, -1, -9) == 0); -+ MPFR_ASSERTN (inex > 0); -+ MPFR_ASSERTN (__gmpfr_flags == MPFR_FLAGS_INEXACT); -+ mpfr_clear (x); -+ mpfr_clear (y); -+} -+ - int - main (int argc, char *argv[]) - { -@@ -79,6 +99,8 @@ - - tests_start_mpfr (); - -+ bug20210215 (); -+ - test_small (); - - mpfr_init (x); diff --git a/sources b/sources index 079264f..9f65891 100644 --- a/sources +++ b/sources @@ -1,24 +1,24 @@ SHA512 (Macaulay2-icons.tar.xz) = 069aa0ad70a0253583b00091c094da9b79d2a2f0f2d38aa97f543081f5df5fd3b5a9e1463febd6947c3151cf01844133174c7372f57e158c2d3faba6baed5d1d -SHA512 (Macaulay2-1.24.05.tar.gz) = de15faa981491783f9f69c036adab96f19285d4a11dbc77bf77b0d0ded435abb7bca5987094286cdf17835ff81dc122d269e897e4792167d2734ce02760c0190 +SHA512 (Macaulay2-1.24.11.tar.gz) = 22af8b04877f2e88ebfd548a6f4aad7e873d2d638e3c1fbe51dfc2ffae1ad71551dfc018542ea64750a3ffb18c6825ac047c088c00543f2f282a939aad953f9f SHA512 (4ti2-1.6.10.tar.gz) = 0bdf73a8885fe03258a903f0bfb45b8271dcf755d8033b57b8d5620daba7fc25b51031ffb2c8609e40bc19508e07ba028de035d8c193caeffe6400457fc0e3e1 SHA512 (cddlib-094m.tar.gz) = d140d57391b1c963d68ca2e344fbda723a5077004bace322a18362fdc1fff8b50fdc4b598ca8cdf131158e07afc96c5d9aafd7abde082a9e241701e403310b9f SHA512 (cohomCalg-0.32.tar.gz) = b76d8de00b13a8fe8881222178247c5e99c15075c46290830f6c3afffb9dfc18af0d57f738ac5a0d7c00044db81b4465d1e0563c95f7f656a2440be5765c6818 SHA512 (Csdp-6.2.0.tgz) = 6f6c44abcb7b0e277f5a42a1e31acbd41c8fbdce0c1641982a48199fe1d922b28d86433d1a98ac71ae521bea04188a830c441db1e9d8eebf174debf501430e82 -SHA512 (factory-4.3.0.tar.gz) = d88690836f9ac5e29c9118078042436184a88ed4881768f9e5f58a15c973da580847b53466a58310a411db695c82b42667124e85689948c1af72689be4e10272 -SHA512 (flint-2.8.4.tar.gz) = 56dbe7b8a4d0d10f79a0d453692a37f74e809ff698440128459b4f4c08c2b8ead23085c92adc944e15e5950371daebfc31e167f24bd9d5ab385bf7018dc4582a -SHA512 (frobby_v0.9.0.tar.gz) = bc96ff20ec334932b5eaa8a3d15d0e36eab41eb85e8b74dbdc374dcaafc9873e44a8af16f6caae649aeea17cd6284caf244d4d345689ad43288f199c591a68a6 +SHA512 (factory-4.4.0.tar.gz) = 790f2de716a953933cd678d9cf972e0f141c4bae958c36ffd28a8dc9d2f61c49f40f475ffe88931b159c38f19b144b99434138c8dd9ef701aefcce76c96530e5 +SHA512 (flint-3.1.3.tar.gz) = 01a26a39424b2b9f6c5a6e91f2257332dbabf821a96bd0485eb5a6665d82a8b3ebb759da039104f7da3011bd91f5694a3554f34f08368fb635ceb8cadd9a0997 +SHA512 (frobby_v0.9.5.tar.gz) = 321da2c83ddd1e1364a2e97cdf69c9b7bc6d2a59583aeab93526030151222049bb7b7e32287e7575cab4d0d22593a92a1f926092b1ed8f9da6b4d68118371bdb SHA512 (gfan0.6.2.tar.gz) = 08a9cc543967771af959a506b79db5b55e0e4942e4170dad8691db35ef7d381d878e1ea6534a3cacc0f5d30ec31564ec94cc20b46792d06f18a3a8a3c0aac91d -SHA512 (givaro-4.1.1.tar.gz) = baaf139f42176838c541143a5b69acf47a8f31c17020a85cf413ce18ade2c3048e009d15c2acf4d71041c0776cd42f5fedb1c183ce1cc0f85cb8672ceac00ee7 +SHA512 (givaro-4.2.0.tar.gz) = 8258507f4ac2643ab39d1802ec79cf24051e7a70e167fcee1362c1a8ac12f924e831ce24450055cea96a8824f34fa83ad344d240a55571f7d522787db16afdfc SHA512 (glpk-4.59.tar.gz) = ca05bd085880143acf4a440cf7efd2392d4dde89bed53a0e5726526cb210eee004bfcd434aeb8ca8abb1dc89ff93e72054489911e5e2c843e0ed631d50c55f56 -SHA512 (gtest-1.10.0.tar.gz) = bd52abe938c3722adc2347afad52ea3a17ecc76730d8d16b065e165bc7477d762bce0997a427131866a89f1001e3f3315198204ffa5d643a9355f1f4d0d7b1a9 +SHA512 (gtest-1.11.0.tar.gz) = 6fcc7827e4c4d95e3ae643dd65e6c4fc0e3d04e1778b84f6e06e390410fe3d18026c131d828d949d2f20dde6327d30ecee24dcd3ef919e21c91e010d149f3a28 SHA512 (lapack-3.9.0.tgz) = afa4eb05f2b1dc2f9588ec58bd32f90b78c01185f328e71f2baf6adec6622f557c332f09e7eb46f71e5e3f2e852f25a640bde2bf9f4be7205cecf01cb07b6bc8 SHA512 (libfplll-5.2.0.tar.gz) = 67d1a8deb92d3f9245983b09b7593b19c5d43c8fe77cfea893ea9dfb744bcb77b7239d73e4f619450cc6960f4c48fb1c6ba46268208b0f31f855cf1af6bfaa29 SHA512 (linbox-1.7.0.tar.gz) = cb4e848186d1f6357f498d1e3bda6484b4c789c02440f9614a227a2ae206a31fb20b32be40bda74da3f2f8f981bbd58d80fc97c95499b5151bb06eafb867ef9e SHA512 (lrslib-071a.tar.gz) = f33639c593769722a37262d6a90073076a4a8a7453ed81d948ebed6f0a5ee826b80c9211e5a601ca177b776c5388aa4e46efd55e8b219f1b6ce633232aa6b001 -SHA512 (M2-emacs-90ce16a.tar.gz) = f68fe2916b2b030b7ecebf66c8cfe0e3776fd1768bbebece2ce53055d9dcead88b8d679c5320c6e46f6b4d4378fe4a8af62a4912afff51c5253f33ea8665cad1 +SHA512 (M2-emacs-f0bb736.tar.gz) = eefef21cb613e6ad6e8e73b0cec08aab95e948323472e585d69421c2ec23d05e03730dc231ed262cc86b705081fad0329b2e298455dc73f28425f30cb3f9c670 SHA512 (mathic-1.0.tar.gz) = 9eb2fe94d266ffda4624c89021e08526e073286635dd5439042e744f07ba053534bc9476ab81d37f7622d62d8ce40c3eedbc5f7013cd529584f46d3685f15d3a SHA512 (mathicgb-1.0.tar.gz) = aea24832681c40c92cad012211ed647ed4e8287964481f36a62d6f0fb0d053fb07c17c49385b4782b380576a92aa387f67fa2843437a0e7b315c74288e65d5a8 SHA512 (memtailor-1.0.tar.gz) = 147ef22f322a82d5336c004ba9cce055ee94eb7ad93d4271524cbee4713f94b258342f4e31569abac2e29472fdd25df2fad94000496ce46e469b7e074af3c86e -SHA512 (mpfr-4.1.0.tar.xz) = 1bd1c349741a6529dfa53af4f0da8d49254b164ece8a46928cdb13a99460285622d57fe6f68cef19c6727b3f9daa25ddb3d7d65c201c8f387e421c7f7bee6273 +SHA512 (mpfr-4.2.1.tar.gz) = 858b7c2c3018e4099a7cd6d9d38eca7c46af90fa2c307d9417518027f07b6c43c51152c60b56359a53e7101a5d0629753f3eb5c54e17574742c374830832fcfe SHA512 (mpsolve-3.2.1.tar.gz) = 8f0cb1be303767bf5a68c150df01c98f7f5e17bfaee685ea4cb9300c0dbf740069c774d647f141a4a1eb46fa54f23d9e75a800ce195cd522527c72e3c6aeed0f SHA512 (TOPCOM-0.17.8.tar.gz) = 8611e8bd36eda00646fb40794435f23e6af81ecbee93c40e8fe5f73905e673e6244cb0f8cc1fe5c29050e40c7d53a44c615c60cbbecc8452b3c85f1d8a816d7a From d4d2e5d33e2a6d0c9a83df275f1950cbd28f43e5 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Thu, 29 May 2025 09:21:26 -0600 Subject: [PATCH 56/70] Version 1.25.05 - Drop upstreamed patches: no_gftables, fplll, codim-option, rightarrow - Add patch to avoid the deprecated strstream C++ header - Unbundle memtailor, mathic, and mathicgb --- Macaulay2-1.15-fplll.patch | 73 -------- Macaulay2-1.15-optflags.patch | 21 --- Macaulay2-1.16-rightarrow.patch | 11 -- Macaulay2-1.18-no_gftables.patch | 11 -- Macaulay2-1.24-codim-option.patch | 52 ------ ... Macaulay2-1.25-default_make_targets.patch | 6 +- Macaulay2-1.25-optflags.patch | 42 +++++ Macaulay2-1.25-strstream.patch | 10 ++ Macaulay2.spec | 158 +++++++----------- sources | 24 ++- 10 files changed, 122 insertions(+), 286 deletions(-) delete mode 100644 Macaulay2-1.15-fplll.patch delete mode 100644 Macaulay2-1.15-optflags.patch delete mode 100644 Macaulay2-1.16-rightarrow.patch delete mode 100644 Macaulay2-1.18-no_gftables.patch delete mode 100644 Macaulay2-1.24-codim-option.patch rename Macaulay2-1.17-default_make_targets.patch => Macaulay2-1.25-default_make_targets.patch (69%) create mode 100644 Macaulay2-1.25-optflags.patch create mode 100644 Macaulay2-1.25-strstream.patch diff --git a/Macaulay2-1.15-fplll.patch b/Macaulay2-1.15-fplll.patch deleted file mode 100644 index c216db9..0000000 --- a/Macaulay2-1.15-fplll.patch +++ /dev/null @@ -1,73 +0,0 @@ ---- M2/Macaulay2/e/fplll-interface.cpp.orig 2020-05-22 08:58:09.000000000 -0600 -+++ M2/Macaulay2/e/fplll-interface.cpp 2020-05-31 20:25:06.775601853 -0600 -@@ -1,10 +1,10 @@ --#include "fplll-interface.hpp" --#include "mutablemat.hpp" -- - #ifdef HAVE_FPLLL - #include --#include - #endif -+#include -+ -+#include "fplll-interface.hpp" -+#include "mutablemat.hpp" - - bool fp_LLL(MutableMatrix *M, MutableMatrix *U, int strategy) - { -@@ -15,15 +15,15 @@ bool fp_LLL(MutableMatrix *M, MutableMat - assert(U == NULL); - double delta = 0.99; - double eta = 0.51; -- LLLMethod method = LM_WRAPPER; -- FloatType floatType = FT_DEFAULT; -+ fplll::LLLMethod method = fplll::LM_WRAPPER; -+ fplll::FloatType floatType = fplll::FT_DEFAULT; - int precision = 0; -- int flags = LLL_DEFAULT; -+ int flags = fplll::LLL_DEFAULT; - - int ncols = static_cast(M->n_rows()); - int nrows = static_cast(M->n_cols()); - -- ZZ_mat mat(nrows, ncols); -+ fplll::ZZ_mat mat(nrows, ncols); - - for (int i = 0; i < nrows; i++) - for (int j = 0; j < ncols; j++) -@@ -31,21 +31,21 @@ bool fp_LLL(MutableMatrix *M, MutableMat - ring_elem a; - if (M->get_entry(j, i, a)) - { -- mpz_set(mat[i][j].getData(), a.get_mpz()); -+ mpz_set(mat[i][j].get_data(), a.get_mpz()); - } - } - - int result = -- lllReduction(mat, delta, eta, method, floatType, precision, flags); -+ lll_reduction(mat, delta, eta, method, floatType, precision, flags); - - switch (result) - { -- case RED_SUCCESS: -+ case fplll::RED_SUCCESS: - break; -- case RED_BABAI_FAILURE: -+ case fplll::RED_BABAI_FAILURE: - ERROR("Error in fpLLL"); - return 0; -- case RED_LLL_FAILURE: -+ case fplll::RED_LLL_FAILURE: - ERROR("infinite loop in LLL"); - return 0; - default: -@@ -60,7 +60,7 @@ bool fp_LLL(MutableMatrix *M, MutableMat - for (int j = 0; j < ncols; j++) - for (int i = 0; i < nrows; i++) - { -- mpz_set(a, mat[i][j].getData()); -+ mpz_set(a, mat[i][j].get_data()); - ring_elem b = globalZZ->from_int(a); - M->set_entry(j, i, b); - } diff --git a/Macaulay2-1.15-optflags.patch b/Macaulay2-1.15-optflags.patch deleted file mode 100644 index d27c278..0000000 --- a/Macaulay2-1.15-optflags.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- M2/configure.ac.orig 2020-05-22 08:58:09.000000000 -0600 -+++ M2/configure.ac 2020-05-28 19:59:37.838647299 -0600 -@@ -308,12 +308,12 @@ fi - ] - - if test "$OPTIMIZE" = yes --then CFLAGS="$CFLAGS -O2" -- CXXFLAGS="$CXXFLAGS -O2" -- FCFLAGS="$FCFLAGS -O2" --else CFLAGS="$CFLAGS -O0" -- CXXFLAGS="$CXXFLAGS -O0" -- FCFLAGS="$FCFLAGS -O0" -+then CFLAGS="-O2 $CFLAGS" -+ CXXFLAGS="-O2 $CXXFLAGS" -+ FCFLAGS="-O2 $FCFLAGS" -+else CFLAGS="-O0 $CFLAGS" -+ CXXFLAGS="-O0 $CXXFLAGS" -+ FCFLAGS="-O0 $FCFLAGS" - fi - - AC_SUBST(GCCVERSION) diff --git a/Macaulay2-1.16-rightarrow.patch b/Macaulay2-1.16-rightarrow.patch deleted file mode 100644 index 1c4abd5..0000000 --- a/Macaulay2-1.16-rightarrow.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- M2/Macaulay2/packages/Macaulay2Doc/overview_modules.m2.orig 2020-07-11 05:04:29.000000000 -0600 -+++ M2/Macaulay2/packages/Macaulay2Doc/overview_modules.m2 2020-07-12 19:27:28.520963206 -0600 -@@ -347,7 +347,7 @@ document { - }, - TEX "Macaulay2 represents each module (at least conceptually) as a subquotient module, that is, a submodule of - a quotient of an ambient free module. A subquotient module is determined by two -- matrices $f : R^m \\rightarrow{} R^n$ and $g : R^p \\rightarrow{} R^n$. -+ matrices $f : R^m \\rightarrow R^n$ and $g : R^p \\rightarrow R^n$. - The {\\em subquotient module} with generators $f$ and relations $g$ is by definition the module - $M = ((image f) + (image g))/(image g)$.", - PARA{}, diff --git a/Macaulay2-1.18-no_gftables.patch b/Macaulay2-1.18-no_gftables.patch deleted file mode 100644 index 624b4bf..0000000 --- a/Macaulay2-1.18-no_gftables.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- M2/configure.ac.orig 2025-02-18 20:23:14.170473648 -0700 -+++ M2/configure.ac 2025-02-18 20:25:03.857046789 -0700 -@@ -615,7 +615,7 @@ AC_SUBST(BUILTLIBS) - AC_SUBST(LIBLIST, " gc gdbm gmp mpfr mpfi normaliz readline ntl flint factory lapack mpsolve frobby glpk cddlib fplll givaro fflas_ffpack linbox gtest tbb memtailor mathic mathicgb eigen ") - # The list LIBLIST is the list of libraries that might be used and linked into M2. - --AC_SUBST(PROGLIST, "4ti2 gfan csdp nauty cddplus lrslib gftables topcom cohomcalg msolve") -+AC_SUBST(PROGLIST, "4ti2 gfan csdp nauty cddplus lrslib topcom cohomcalg msolve") - # The list PROGLIST is the list of programs and libraries for them that are distributed with M2. - # Initially, we offer no option for not compiling some of them. - diff --git a/Macaulay2-1.24-codim-option.patch b/Macaulay2-1.24-codim-option.patch deleted file mode 100644 index 2e4b980..0000000 --- a/Macaulay2-1.24-codim-option.patch +++ /dev/null @@ -1,52 +0,0 @@ -Fixes these errors: - - -- ___Ignore__Primes.errors - -- ************************ - -- o4 : List - -- - -- i5 : L2 = topMinimalPrimesIP(I, IgnorePrimes=>L1) - -- - -- o5 = {monomialIdeal (x, y, w, v)} - -- - -- o5 : List - -- - -- i6 : minimalPrimes I - -- stdio:6:13:(3): error: encountered an unknown key or option: Generic - -- - -- _top__Minimal__Primes__I__P.errors - -- ********************************** - -- i1 : R = QQ[x,y,z,w,v]; - -- - -- i2 : I = monomialIdeal(y^12, x*y^3, z*w^3, z*v*y^10, z*x^10, v*z^10, w*v^10, y*v*x*z*w); - -- - -- o2 : MonomialIdeal of R - -- - -- i3 : ScipPrintLevel = 0; - -- - -- i4 : minimalPrimes(I) - -- stdio:4:13:(3): error: encountered an unknown key or option: Generic - -- - -- _minimal__Primes__I__P.errors - -- ***************************** - -- i5 : minimalPrimesIP I - -- - -- o5 = {monomialIdeal (y, z, w), monomialIdeal (y, z, v), monomialIdeal (x, y, - -- ------------------------------------------------------------------------ - -- w, v)} - -- - -- o5 : List - -- - -- i6 : minimalPrimes I - -- stdio:6:13:(3): error: encountered an unknown key or option: Generic - ---- M2/Macaulay2/packages/MonomialIntegerPrograms.m2.orig 2024-11-01 04:33:00.000000000 -0600 -+++ M2/Macaulay2/packages/MonomialIntegerPrograms.m2 2025-02-19 19:09:27.203480082 -0700 -@@ -135,7 +135,7 @@ oldCodim = lookup(codim, MonomialIdeal); - oldDegree = lookup(degree, MonomialIdeal); - loadSCIPCodimAndDegree = method(); - installMethod(loadSCIPCodimAndDegree,() -> ( -- codim MonomialIdeal := {} >> opts -> m -> ((cacheValue symbol codim) codimensionIP) m; -+ codim MonomialIdeal := options oldCodim >> opts -> m -> ((cacheValue symbol codim) codimensionIP) m; - degree MonomialIdeal := m -> ((cacheValue symbol degree) degreeIP) m; - )); - loadBuiltinCodimAndDegree = method(); diff --git a/Macaulay2-1.17-default_make_targets.patch b/Macaulay2-1.25-default_make_targets.patch similarity index 69% rename from Macaulay2-1.17-default_make_targets.patch rename to Macaulay2-1.25-default_make_targets.patch index fb6da94..3f97dc6 100644 --- a/Macaulay2-1.17-default_make_targets.patch +++ b/Macaulay2-1.25-default_make_targets.patch @@ -1,9 +1,9 @@ ---- M2/Macaulay2/Makefile.in.orig 2022-05-23 06:34:31.896886749 -0600 -+++ M2/Macaulay2/Makefile.in 2022-05-23 06:35:19.380825646 -0600 +--- M2/Macaulay2/Makefile.in.orig 2025-05-15 13:11:03.000000000 -0600 ++++ M2/Macaulay2/Makefile.in 2025-05-27 07:06:53.335036043 -0600 @@ -3,8 +3,7 @@ VPATH = @srcdir@ include ../include/config.Makefile - all: @pre_docdir@/COPYING-GPL-2 @pre_docdir@/COPYING-GPL-3 @pre_docdir@/README @pre_docdir@/LAYOUT + all: @pre_docdir@/COPYING-GPL-2 @pre_docdir@/COPYING-GPL-3 @pre_docdir@/LAYOUT -SUBDIRS = util c d e system bin m2 man packages editors \ - $(if $(filter html, @DOCUMENTATION@), html-check-links) tests +SUBDIRS = util c d e system bin m2 man packages editors tests diff --git a/Macaulay2-1.25-optflags.patch b/Macaulay2-1.25-optflags.patch new file mode 100644 index 0000000..1210bda --- /dev/null +++ b/Macaulay2-1.25-optflags.patch @@ -0,0 +1,42 @@ +--- M2/configure.ac.orig 2025-05-15 13:11:03.000000000 -0600 ++++ M2/configure.ac 2025-05-27 10:03:26.646029450 -0600 +@@ -314,12 +314,12 @@ fi + ] + + if test "$OPTIMIZE" = yes +-then CFLAGS="$CFLAGS -O2" +- CXXFLAGS="$CXXFLAGS -O2" +- FCFLAGS="$FCFLAGS -O2" +-else CFLAGS="$CFLAGS -O0" +- CXXFLAGS="$CXXFLAGS -O0" +- FCFLAGS="$FCFLAGS -O0" ++then CFLAGS="-O2 $CFLAGS" ++ CXXFLAGS="-O2 $CXXFLAGS" ++ FCFLAGS="-O2 $FCFLAGS" ++else CFLAGS="-O0 $CFLAGS" ++ CXXFLAGS="-O0 $CXXFLAGS" ++ FCFLAGS="-O0 $FCFLAGS" + fi + + AC_SUBST(GCCVERSION) +--- M2/libraries/factory/Makefile.in.orig 2025-05-15 13:11:03.000000000 -0600 ++++ M2/libraries/factory/Makefile.in 2025-05-27 10:06:05.923689632 -0600 +@@ -7,7 +7,7 @@ + URL = https://macaulay2.com/Downloads/OtherSourceCode + VERSION = 4.4.1 + #PATCHFILE = @abs_srcdir@/patch-$(VERSION) +-PRECONFIGURE = autoreconf -vif ++PRECONFIGURE = sed -i 's/-g0 -O3 //' m4/flags.m4 && autoreconf -vif + + BUILDTARGET = all ftmpl_inst.o + LIBRARIES = ftmpl_inst.o +--- M2/libraries/mpfr/Makefile.in.orig 2025-05-15 13:11:03.000000000 -0600 ++++ M2/libraries/mpfr/Makefile.in 2025-05-28 10:00:08.231129391 -0600 +@@ -36,6 +36,7 @@ CONFIGOPTIONS += --disable-shared + # endif + + # PRECONFIGURE = autoreconf -i ++PRECONFIGURE = sed -i '/LDFLAGS/s/ -Wl,--disable-new-dtags//g' configure + include ../Makefile.library + + BUILDOPTIONS += CPPFLAGS="$(CPPFLAGS)" diff --git a/Macaulay2-1.25-strstream.patch b/Macaulay2-1.25-strstream.patch new file mode 100644 index 0000000..a451e15 --- /dev/null +++ b/Macaulay2-1.25-strstream.patch @@ -0,0 +1,10 @@ +--- M2/Macaulay2/e/f4/f4.cpp.orig 2025-05-15 13:11:03.000000000 -0600 ++++ M2/Macaulay2/e/f4/f4.cpp 2025-05-27 14:07:27.737228269 -0600 +@@ -26,7 +26,6 @@ + #include // for stable_sort + #include // for swap, vector + #include // for atomic ints in gauss_reduce +-#include + #include + + class RingElement; diff --git a/Macaulay2.spec b/Macaulay2.spec index 19fdc5f..5ea7a8a 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -2,15 +2,12 @@ # Macaulay2's memory management scheme requires close cooperation with libgc, # and some of the supporting libraries must be compiled with special options to # accomplish this. In particular, Macaulay2 needs: -# - mathicgb configured --without-tbb # - mpfr configured with --disable-thread-safe # - flint linked with the GC-enabled mpfr # - factory (from Singular) configured with --disable-omalloc --enable-streamio # and linked with the flint that is linked with the GC-enabled mpfr # Since the main Fedora packages are not built in this way, we are forced to -# bundle these packages to avoid random GC-related crashes. The packages -# memtailor and mathic, which sit underneath mathicgb, must also be bundled or -# we get random GC-related crashes for an as yet undiagnosed reason. +# bundle these packages to avoid random GC-related crashes. # # We have to use the static versions of the libfplll and givaro libraries. # They have global objects whose constructors run before GC is initialized. @@ -21,7 +18,7 @@ # We have to bundle the linbox package. It has global constructors that cause # the same problem as libfplll. -%global emacscommit f0bb736dff7bbf30d143ecc68700ee747263a35d +%global emacscommit 6d0db52505c524d02c2270059767644aea360fd0 %global emacsurl https://github.com/Macaulay2/M2-emacs %global emacsshort %(cut -b -7 <<< %{emacscommit}) %global m2url https://github.com/Macaulay2/M2 @@ -50,7 +47,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 -Version: 1.24.11 +Version: 1.25.05 Release: 1%{?dist} # GPL-2.0-only OR GPL-3.0-only: @@ -64,7 +61,6 @@ Release: 1%{?dist} # - Macaulay2/packages/QuillenSuslin.m2 # - Macaulay2/packages/Visualize.m2 # GPL-2.0-or-later: -# - mathicgb (bundled) # - Macaulay2/e/bibasis # - Macaulay2/m2/computations.m2 # - Macaulay2/packages/AlgebraicSplines.m2 @@ -135,14 +131,11 @@ Release: 1%{?dist} # LGPL-2.0-or-later: # - flint (bundled) # - linbox (bundled) -# - mathic (bundled) # LGPL-3.0-or-later: # - mpfr (bundled) # Apache-2.0: # - Macaulay2/packages/OpenMath.m2 # - Macaulay2/packages/SCSCP.m2 -# BSD-3-Clause: -# - memtailor (bundled) # MIT: # - Macaulay2/packages/Visualize/css # - Macaulay2/packages/Visualize/js @@ -160,7 +153,7 @@ Release: 1%{?dist} # - Macaulay2/packages/NoetherNormalization.m2 # - Macaulay2/packages/RationalMaps.m2 # - Macaulay2/packages/SectionRing.m2 -License: (GPL-2.0-only OR GPL-3.0-only) AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.0-or-later AND LGPL-3.0-or-later AND Apache-2.0 AND BSD-3-Clause AND MIT AND OFL-1.1-RFN AND LicenseRef-Fedora-Public-Domain +License: (GPL-2.0-only OR GPL-3.0-only) AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.0-or-later AND LGPL-3.0-or-later AND Apache-2.0 AND MIT AND OFL-1.1-RFN AND LicenseRef-Fedora-Public-Domain URL: https://macaulay2.com/ VCS: git:%{m2url}.git %if 0%{?snap:1} @@ -186,87 +179,57 @@ Provides: bundled(normaliz) = %{normalizver} %endif # MPFR is bundled because it must be built with different threading options -%global mpfrver 4.2.1 +%global mpfrver 4.2.2 Source101: https://www.mpfr.org/mpfr-%{mpfrver}/mpfr-%{mpfrver}.tar.gz Provides: bundled(mpfr) = %{mpfrver} # FLINT is bundled because it must be linked with the specially-built MPFR -%global flintver 3.1.3 -Source102: https://flintlib.org/download/flint-%{flintver}.tar.gz +%global flintver 3.2.2 +Source102: https://github.com/flintlib/flint/archive/v%{flintver}/flint-%{flintver}.tar.gz Provides: bundled(flint) = %{flintver} # FACTORY is bundled because it must be built with special options -%global factoryver 4.4.0 +%global factoryver 4.4.1 Source103: https://www.singular.uni-kl.de/ftp/pub/Math/Factory/factory-%{factoryver}.tar.gz Provides: bundled(factory) = %{factoryver} -# MATHICGB is bundled because it must be built with different threading options -%global mathicgbver 1.0 -%global mathicgbcommit 4cd2bd1357107cf0c83661fdda66c94987de4608 -Source104: https://github.com/Macaulay2/mathicgb/tarball/%{mathicgbcommit}/mathicgb-%{mathicgbver}.tar.gz -Provides: bundled(mathicgb) = %{mathicgbver} - -# GTEST is bundled because MATHICGB refuses to build otherwise -%global gtestver 1.11.0 -Source105: https://github.com/google/googletest/archive/release-%{gtestver}/gtest-%{gtestver}.tar.gz - -# MEMTAILOR is bundled because it causes garbage collector crashes otherwise -%global memtailorver 1.0 -%global memtailorcommit f785005b92a54463dbd5377ab80855a3d2a5f92d -Source106: https://github.com/Macaulay2/memtailor/tarball/%{memtailorcommit}/memtailor-%{memtailorver}.tar.gz -Provides: bundled(memtailor) = %{memtailorver} - -# MATHIC is bundled because it causes garbage collector crashes otherwise -%global mathicver 1.0 -%global mathiccommit 07e8df4ded6b586c0ce9eec0f9096690379749cb -Source107: https://github.com/Macaulay2/mathic/tarball/%{mathiccommit}/mathic-%{mathicver}.tar.gz -Provides: bundled(mathic) = %{mathicver} - # LINBOX is bundled because it introduces static global objects %global linboxver 1.7.0 -Source108: https://github.com/linbox-team/linbox/releases/download/v%{linboxver}/linbox-%{linboxver}.tar.gz +Source104: https://github.com/linbox-team/linbox/releases/download/v%{linboxver}/linbox-%{linboxver}.tar.gz Provides: bundled(linbox) = %{linboxver} ## PATCHES FOR BUNDLED code # This is a conglomeration of all current patches for the Fedora linbox package Source200: linbox-1.7.0.patch -# Fix a header bug in flint -Source201: flint-3.1.3.patch ## FAKE library tarballs that convince Macaulay2 to use the system versions Source300: frobby_v0.9.5.tar.gz Source301: cddlib-094m.tar.gz -Source302: lapack-3.9.0.tgz +# lapack +Source302: v3.12.1.tar.gz Source303: 4ti2-1.6.10.tar.gz -Source304: libfplll-5.2.0.tar.gz +Source304: fplll-5.5.0.tar.gz Source305: gfan0.6.2.tar.gz Source306: givaro-4.2.0.tar.gz -Source307: lrslib-071a.tar.gz -Source308: TOPCOM-0.17.8.tar.gz +Source307: lrslib-073.tar.gz +Source308: TOPCOM-1.1.2.tar.gz Source309: cohomCalg-0.32.tar.gz -Source310: glpk-4.59.tar.gz +Source310: glpk-5.0.tar.gz Source311: Csdp-6.2.0.tgz Source312: mpsolve-3.2.1.tar.gz # let Fedora optflags override the defaults -Patch0: %{name}-1.15-optflags.patch +Patch: %{name}-1.25-optflags.patch # give the build a little more time and space than upstream permits -Patch1: %{name}-1.16-ulimit.patch -# drop 'tests' from default make target -Patch2: %{name}-1.17-default_make_targets.patch -# disable check for gftables -Patch3: %{name}-1.18-no_gftables.patch -# adapt to libfplll 5.2.1 -Patch4: %{name}-1.15-fplll.patch +Patch: %{name}-1.16-ulimit.patch +# drop checking of html links from default make target +Patch: %{name}-1.25-default_make_targets.patch # do not override the debug level -Patch5: %{name}-1.17-configure.patch -# Fix "error: in conversion to html, unknown TeX control sequence(s): \rightarrow" -Patch6: %{name}-1.16-rightarrow.patch +Patch: %{name}-1.17-configure.patch # Fix LTO warnings about mismatched declarations and definitions -Patch7: %{name}-1.18-lto.patch -# Fix a build error due to mismatched options to codim -# https://github.com/Macaulay2/M2/pull/3651 -Patch8: %{name}-1.24-codim-option.patch +Patch: %{name}-1.18-lto.patch +# Avoid use of the deprecated strstream C++ header +Patch: %{name}-1.25-strstream.patch BuildRequires: 4ti2 BuildRequires: appstream @@ -275,6 +238,7 @@ BuildRequires: autoconf-archive BuildRequires: bison BuildRequires: boost-devel BuildRequires: chrpath +BuildRequires: cmake BuildRequires: cohomCalg BuildRequires: csdp-tools BuildRequires: desktop-file-utils @@ -303,6 +267,7 @@ BuildRequires: glpk-devel BuildRequires: iml-devel BuildRequires: info BuildRequires: libappstream-glib +BuildRequires: libatomic BuildRequires: libfplll-static BuildRequires: libfrobby-devel BuildRequires: libgfan-devel @@ -333,6 +298,9 @@ BuildRequires: pkgconfig(libnauty) BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(m4ri) BuildRequires: pkgconfig(m4rie) +BuildRequires: pkgconfig(mathic) +BuildRequires: pkgconfig(mathicgb) +BuildRequires: pkgconfig(memtailor) BuildRequires: pkgconfig(mpfi) BuildRequires: pkgconfig(ncurses) BuildRequires: pkgconfig(qd) @@ -341,6 +309,7 @@ BuildRequires: pkgconfig(tbb) BuildRequires: pkgconfig(tinyxml2) BuildRequires: polymake BuildRequires: python3-devel +BuildRequires: R BuildRequires: scip BuildRequires: texinfo BuildRequires: time @@ -382,12 +351,11 @@ Provides: Macaulay2-emacs = %{version}-%{release} Provides: macaulay2 = %{version}-%{release} -# Macaulay2 no longer builds successfully on 32-bit platforms -# https://bugzilla.redhat.com/show_bug.cgi?id=1874318 -# -# Macaulay2 started segfaulting during the build on ppc64le just prior to -# F40 Beta Freeze. Disable it for now until we can diagnose the problem. -ExcludeArch: %{ix86} ppc64le +# See https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval +# Macaulay2 takes more than 14 hours to build on ppc64le, more than twice as +# long as the x86_64 build, and it is doubtful that anyone will ever use it on +# that platform anyway. +ExcludeArch: %{ix86} %{power64} # Do not advertise the bundled mpfr %global __provides_exclude libmpfr.so* @@ -417,25 +385,20 @@ install -p -m755 %{SOURCE20} ./etags %if ! %system_normaliz install -p -m644 %{SOURCE100} BUILD/tarfiles/ %endif -install -p -m644 %{SOURCE101} %{SOURCE102} %{SOURCE103} %{SOURCE105} \ - BUILD/tarfiles/ -install -p -m644 %{SOURCE108} BUILD/tarfiles/v%{linboxver}.tar.gz +install -p -m644 %{SOURCE101} %{SOURCE102} %{SOURCE103} BUILD/tarfiles/ +install -p -m644 %{SOURCE104} BUILD/tarfiles/v%{linboxver}.tar.gz sed -i 's/\(VERSION = \).*/\1%{mpfrver}/' libraries/mpfr/Makefile.in sed -e 's/\(VERSION = \).*/\1%{linboxver}/' \ -e 's,--with-gmp.*,--without-archnative GIVARO_CFLAGS=-I$(LIBRARIESDIR) GIVARO_LIBS="%{_libdir}/libgivaro.a",' \ -i libraries/linbox/Makefile.in -tar -C submodules/mathicgb -xf %{SOURCE104} --strip-components=1 -tar -C submodules/memtailor -xf %{SOURCE106} --strip-components=1 -tar -C submodules/mathic -xf %{SOURCE107} --strip-components=1 ## patches for bundled code -sed -e 's,--with-blas,&=%{_includedir}/flexiblas --with-ntl,' \ - -e 's/3\.0\.0/%{flintver}/' \ +sed -e 's,--disable-shared,& --disable-arch --with-blas-include=%{_includedir}/flexiblas --with-ntl-include=%{_includedir}/NTL,' \ + -e 's/3\.2\.1/%{flintver}/' \ -e 's/\(LICENSEFILES = \).*/\1COPYING COPYING.LESSER/' \ -e 's/-pedantic-errors/& -fno-strict-aliasing/' \ + -e "s,PRECONFIGURE.*,& \&\& sed -i 's/openblas/flexiblas/' configure," \ -i libraries/flint/Makefile.in -cp -p %{SOURCE201} libraries/flint/patch-%{flintver} -sed -i 's/^# \(PATCHFILE\)/\1/' libraries/flint/Makefile.in cp -p %{SOURCE200} libraries/linbox/patch-%{linboxver} sed -i 's/^#\(PATCHFILE\)/\1/' libraries/linbox/Makefile.in @@ -444,7 +407,6 @@ install -p -m644 %{SOURCE300} %{SOURCE301} %{SOURCE302} %{SOURCE303} \ %{SOURCE304} %{SOURCE305} %{SOURCE306} %{SOURCE307} %{SOURCE308} \ %{SOURCE309} %{SOURCE310} %{SOURCE311} %{SOURCE312} BUILD/tarfiles/ sed -i '/PRECONFIGURE/d' libraries/{4ti2,cddlib,givaro,normaliz,topcom}/Makefile.in -sed -i 's/VERSION = 4\.0\.4/VERSION = 5.2.0/;/PATCHFILE/d' libraries/fplll/Makefile.in sed -i '/PATCHFILE/d' libraries/{csdp,frobby,gfan,givaro,mpsolve,normaliz,topcom}/Makefile.in sed -i '/INSTALLCMD/,/stdinc/d' libraries/frobby/Makefile.in sed -i 's,install \(lib.*\.a\),ln -s %{_libdir}/\1,' libraries/lapack/Makefile.in @@ -454,26 +416,8 @@ tar -C submodules/givaro --strip-components=1 -xzf %{SOURCE306} ## flint submodule tar -C submodules/flint --strip-components=1 -xzf %{SOURCE102} -cd submodules/flint -patch -p1 < %{SOURCE201} -cd - -## gtest submodule -tar -C submodules/googletest --strip-components=1 -xzf %{SOURCE105} - -%patch -P0 -p1 -b .optflags -%patch -P1 -p1 -b .ulimit -%patch -P2 -p1 -b .default_make_targets -%patch -P3 -p1 -b .no_gftables -# factory-gftables symlink -mkdir -p BUILD/%{_target_platform}/usr-dist/common/share/Macaulay2/Core -ln -s %{_datadir}/factory \ - BUILD/%{_target_platform}/usr-dist/common/share/Macaulay2/Core/factory -%patch -P4 -p1 -b .fplll -%patch -P5 -p1 -b .configure -%patch -P6 -p1 -b .rightarrow -%patch -P7 -p1 -b .lto -%patch -P8 -p1 -b .codim +%autopatch -p1 %conf @@ -510,6 +454,15 @@ sed -i '/^fetch: download-enabled/d' libraries/Makefile.library.in # Do not try to fetch sources with git sed -i 's/^\(fetch:\) update-submodule/\1/' libraries/Makefile.library.in +# All examples should produce expected results on x86_64. Other platforms +# sometimes encounter problems; e.g., due to differences in rounding error of +# floating point numbers. +%ifnarch %{x86_64} +sed -e '/^IgnoreExampleErrors/s/false/true/' \ + -e '/^CheckDocumentation/s/true/false/' \ + -i Macaulay2/packages/Makefile.in +%endif + # (re)generate configure autoreconf -fi . @@ -532,12 +485,12 @@ LIBS="-lflexiblas" \ --prefix=%{_prefix} \ --enable-shared \ --disable-strip \ - --enable-fplll \ --enable-linbox \ --with-blas=flexiblas \ --with-lapack=flexiblas \ + --with-system-libs \ --with-unbuilt-programs="cddplus nauty" \ - --enable-build-libraries="mpfr flint factory lapack fplll givaro linbox gtest" + --enable-build-libraries="mpfr flint factory lapack fplll givaro linbox" # The list of libraries and submodules above should include only those that: # 1. We bundle (mpfr, flint, factory, and linbox) # 2. We sneakily substitute one library for another (lapack -> flexiblas) @@ -609,9 +562,6 @@ cd - # info dir rm -fv %{buildroot}%{_infodir}/dir -# Delete misinstalled memtailor, mathic, and mathicgb libraries -rm -fr %{buildroot}/builddir - %check # The test suite has grown to the point where it takes many hours to run. @@ -640,6 +590,12 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog +* Thu May 29 2025 Jerry James - 1.25.05-1 +- Version 1.25.05 +- Drop upstreamed patches: no_gftables, fplll, codim-option, rightarrow +- Add patch to avoid the deprecated strstream C++ header +- Unbundle memtailor, mathic, and mathicgb + * Thu Feb 20 2025 Jerry James - 1.24.11-1 - Version 1.24.11 - Drop upstreamed vector overrun patch diff --git a/sources b/sources index 9f65891..afd777f 100644 --- a/sources +++ b/sources @@ -1,24 +1,20 @@ SHA512 (Macaulay2-icons.tar.xz) = 069aa0ad70a0253583b00091c094da9b79d2a2f0f2d38aa97f543081f5df5fd3b5a9e1463febd6947c3151cf01844133174c7372f57e158c2d3faba6baed5d1d -SHA512 (Macaulay2-1.24.11.tar.gz) = 22af8b04877f2e88ebfd548a6f4aad7e873d2d638e3c1fbe51dfc2ffae1ad71551dfc018542ea64750a3ffb18c6825ac047c088c00543f2f282a939aad953f9f +SHA512 (Macaulay2-1.25.05.tar.gz) = 00bc29fb15f01b354f94ff8088f362375e34d3d5c83f8a08365bcbd69156ae3c1fcd3104f788c759a6ad5e06faa24f7f01f9d628b01497fb031ad6e2454765b8 SHA512 (4ti2-1.6.10.tar.gz) = 0bdf73a8885fe03258a903f0bfb45b8271dcf755d8033b57b8d5620daba7fc25b51031ffb2c8609e40bc19508e07ba028de035d8c193caeffe6400457fc0e3e1 SHA512 (cddlib-094m.tar.gz) = d140d57391b1c963d68ca2e344fbda723a5077004bace322a18362fdc1fff8b50fdc4b598ca8cdf131158e07afc96c5d9aafd7abde082a9e241701e403310b9f SHA512 (cohomCalg-0.32.tar.gz) = b76d8de00b13a8fe8881222178247c5e99c15075c46290830f6c3afffb9dfc18af0d57f738ac5a0d7c00044db81b4465d1e0563c95f7f656a2440be5765c6818 SHA512 (Csdp-6.2.0.tgz) = 6f6c44abcb7b0e277f5a42a1e31acbd41c8fbdce0c1641982a48199fe1d922b28d86433d1a98ac71ae521bea04188a830c441db1e9d8eebf174debf501430e82 -SHA512 (factory-4.4.0.tar.gz) = 790f2de716a953933cd678d9cf972e0f141c4bae958c36ffd28a8dc9d2f61c49f40f475ffe88931b159c38f19b144b99434138c8dd9ef701aefcce76c96530e5 -SHA512 (flint-3.1.3.tar.gz) = 01a26a39424b2b9f6c5a6e91f2257332dbabf821a96bd0485eb5a6665d82a8b3ebb759da039104f7da3011bd91f5694a3554f34f08368fb635ceb8cadd9a0997 +SHA512 (factory-4.4.1.tar.gz) = a6ebed7cc0dea06a40c596f8845194633b6175670119afc11cb93269940ff6866a270549b9796929c1cc216645d01386ddea455a07d9ea033ce937baa4a05dfe +SHA512 (flint-3.2.2.tar.gz) = 6856e617efb0369a3b90c8d3a7eb734cfad263c1450f1c2d92236d61294dd8e9c3da3769d10e28aa42d4340c979ad01ee665deef68c0666c7ef48d831e308c8b +SHA512 (fplll-5.5.0.tar.gz) = ffeeeb55c2e4dccb9c7fd2753e49fa3514ae0c88a119131fa6281b213566813c481f95befe0acde344c8c032d8341ef1ec074cd66b130de4f8b8f6eb20f40613 SHA512 (frobby_v0.9.5.tar.gz) = 321da2c83ddd1e1364a2e97cdf69c9b7bc6d2a59583aeab93526030151222049bb7b7e32287e7575cab4d0d22593a92a1f926092b1ed8f9da6b4d68118371bdb SHA512 (gfan0.6.2.tar.gz) = 08a9cc543967771af959a506b79db5b55e0e4942e4170dad8691db35ef7d381d878e1ea6534a3cacc0f5d30ec31564ec94cc20b46792d06f18a3a8a3c0aac91d SHA512 (givaro-4.2.0.tar.gz) = 8258507f4ac2643ab39d1802ec79cf24051e7a70e167fcee1362c1a8ac12f924e831ce24450055cea96a8824f34fa83ad344d240a55571f7d522787db16afdfc -SHA512 (glpk-4.59.tar.gz) = ca05bd085880143acf4a440cf7efd2392d4dde89bed53a0e5726526cb210eee004bfcd434aeb8ca8abb1dc89ff93e72054489911e5e2c843e0ed631d50c55f56 -SHA512 (gtest-1.11.0.tar.gz) = 6fcc7827e4c4d95e3ae643dd65e6c4fc0e3d04e1778b84f6e06e390410fe3d18026c131d828d949d2f20dde6327d30ecee24dcd3ef919e21c91e010d149f3a28 -SHA512 (lapack-3.9.0.tgz) = afa4eb05f2b1dc2f9588ec58bd32f90b78c01185f328e71f2baf6adec6622f557c332f09e7eb46f71e5e3f2e852f25a640bde2bf9f4be7205cecf01cb07b6bc8 -SHA512 (libfplll-5.2.0.tar.gz) = 67d1a8deb92d3f9245983b09b7593b19c5d43c8fe77cfea893ea9dfb744bcb77b7239d73e4f619450cc6960f4c48fb1c6ba46268208b0f31f855cf1af6bfaa29 +SHA512 (glpk-5.0.tar.gz) = 36bcba534ed69b0f5328f4626018359efe07f802322c0821db75c7d1935f760af8cb907189d7d7c5b2f134a8b6214ae747ca004acc4c5ceccf157f6fc311523d SHA512 (linbox-1.7.0.tar.gz) = cb4e848186d1f6357f498d1e3bda6484b4c789c02440f9614a227a2ae206a31fb20b32be40bda74da3f2f8f981bbd58d80fc97c95499b5151bb06eafb867ef9e -SHA512 (lrslib-071a.tar.gz) = f33639c593769722a37262d6a90073076a4a8a7453ed81d948ebed6f0a5ee826b80c9211e5a601ca177b776c5388aa4e46efd55e8b219f1b6ce633232aa6b001 -SHA512 (M2-emacs-f0bb736.tar.gz) = eefef21cb613e6ad6e8e73b0cec08aab95e948323472e585d69421c2ec23d05e03730dc231ed262cc86b705081fad0329b2e298455dc73f28425f30cb3f9c670 -SHA512 (mathic-1.0.tar.gz) = 9eb2fe94d266ffda4624c89021e08526e073286635dd5439042e744f07ba053534bc9476ab81d37f7622d62d8ce40c3eedbc5f7013cd529584f46d3685f15d3a -SHA512 (mathicgb-1.0.tar.gz) = aea24832681c40c92cad012211ed647ed4e8287964481f36a62d6f0fb0d053fb07c17c49385b4782b380576a92aa387f67fa2843437a0e7b315c74288e65d5a8 -SHA512 (memtailor-1.0.tar.gz) = 147ef22f322a82d5336c004ba9cce055ee94eb7ad93d4271524cbee4713f94b258342f4e31569abac2e29472fdd25df2fad94000496ce46e469b7e074af3c86e -SHA512 (mpfr-4.2.1.tar.gz) = 858b7c2c3018e4099a7cd6d9d38eca7c46af90fa2c307d9417518027f07b6c43c51152c60b56359a53e7101a5d0629753f3eb5c54e17574742c374830832fcfe +SHA512 (lrslib-073.tar.gz) = f5d283c3c9bcc8ea83c1f6a0ce184202ccd0818987caaa7cf32fe8287cf8277802587f5001dc44878658c962c48fe6ae1250e9a522bb2bf0fa1d0ca8b84e1b9a +SHA512 (M2-emacs-6d0db52.tar.gz) = e0bc13093ad931c19673c1ea6adb279d6b7934cc38caf3d5359c6241e349b2d22695db6c35a9c7e12c943863f8923da25c9d4b4f35e0b7bffc52a9bdd376e402 +SHA512 (mpfr-4.2.2.tar.gz) = 373c5ce2c9636e45685dfa94f45bc4f8f6c2c0512d634b9e065ec33cb29da727b3ea13cf23aff307c1da765a40064f0fd4a347a3849ebd97252984fc85a0a400 SHA512 (mpsolve-3.2.1.tar.gz) = 8f0cb1be303767bf5a68c150df01c98f7f5e17bfaee685ea4cb9300c0dbf740069c774d647f141a4a1eb46fa54f23d9e75a800ce195cd522527c72e3c6aeed0f -SHA512 (TOPCOM-0.17.8.tar.gz) = 8611e8bd36eda00646fb40794435f23e6af81ecbee93c40e8fe5f73905e673e6244cb0f8cc1fe5c29050e40c7d53a44c615c60cbbecc8452b3c85f1d8a816d7a +SHA512 (TOPCOM-1.1.2.tar.gz) = 8f0d6dcfe5d83b260f671d4fd231a8e5a902668d2bf02d0977fbfa6a1d49e0ba3f1f51f2305267a4cbc0591c183c07642ef3d9613aae8f27f1832fe96ca90abb +SHA512 (v3.12.1.tar.gz) = eedfbae0447a965da66fea6dcd1a561717faede85e0f2e19a794d3947f6b8b4649b3415786ceba65914755766fafc0c2ff4ba80dfd309230145f879e6b900284 From e03e7aac2345146e13419aacd9cdccaa412218e2 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Tue, 3 Jun 2025 15:32:49 +0200 Subject: [PATCH 57/70] Rebuilt for Python 3.14 --- Macaulay2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index 5ea7a8a..897dd0a 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -48,7 +48,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 Version: 1.25.05 -Release: 1%{?dist} +Release: 2%{?dist} # GPL-2.0-only OR GPL-3.0-only: # - the project as a whole @@ -590,6 +590,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog +* Tue Jun 03 2025 Python Maint - 1.25.05-2 +- Rebuilt for Python 3.14 + * Thu May 29 2025 Jerry James - 1.25.05-1 - Version 1.25.05 - Drop upstreamed patches: no_gftables, fplll, codim-option, rightarrow From 59b47bf61faa00155a199a7a90bba100d5b890a3 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Wed, 11 Jun 2025 20:54:55 -0600 Subject: [PATCH 58/70] Rebuild for normaliz 3.10.5 --- Macaulay2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index 897dd0a..1e61592 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -48,7 +48,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 Version: 1.25.05 -Release: 2%{?dist} +Release: 3%{?dist} # GPL-2.0-only OR GPL-3.0-only: # - the project as a whole @@ -590,6 +590,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog +* Wed Jun 11 2025 Jerry James - 1.25.05-3 +- Rebuild for normaliz 3.10.5 + * Tue Jun 03 2025 Python Maint - 1.25.05-2 - Rebuilt for Python 3.14 From 2347c2ca2e8283b373d30b61354f40243878d0c6 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Fri, 13 Jun 2025 08:01:32 -0600 Subject: [PATCH 59/70] Unbundle factory-gftables (bz 2372455) --- Macaulay2.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index 1e61592..f445cd8 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -48,7 +48,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 Version: 1.25.05 -Release: 3%{?dist} +Release: 4%{?dist} # GPL-2.0-only OR GPL-3.0-only: # - the project as a whole @@ -529,6 +529,10 @@ for fil in checkregularity chiro2circuits chiro2cocircuits cohomcalg csdp lrs \ ln -s %{_bindir}/$fil $mbindir/$fil done +# unbundle factory-gftables +rm -fr %{buildroot}%{_datadir}/Macaulay2/Core/factory +ln -s ../../factory %{buildroot}%{_datadir}/Macaulay2/Core + # app img for sz in 64 72 96 128 192 256 512; do sz2=${sz}x${sz} @@ -590,6 +594,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog +* Fri Jun 13 2025 Jerry James - 1.25.05-4 +- Unbundle factory-gftables (bz 2372455) + * Wed Jun 11 2025 Jerry James - 1.25.05-3 - Rebuild for normaliz 3.10.5 From 03495424bf3935678fd5fc0c582c41b1184633ea Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 23 Jul 2025 15:51:02 +0000 Subject: [PATCH 60/70] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- Macaulay2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index f445cd8..de5a9b2 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -48,7 +48,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 Version: 1.25.05 -Release: 4%{?dist} +Release: 5%{?dist} # GPL-2.0-only OR GPL-3.0-only: # - the project as a whole @@ -594,6 +594,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog +* Wed Jul 23 2025 Fedora Release Engineering - 1.25.05-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Fri Jun 13 2025 Jerry James - 1.25.05-4 - Unbundle factory-gftables (bz 2372455) From e36d37b56d1f0424c7337bb3e1512c479b40cc9d Mon Sep 17 00:00:00 2001 From: Jerry James Date: Fri, 8 Aug 2025 13:54:08 -0600 Subject: [PATCH 61/70] Version 1.25.06 --- Macaulay2.spec | 11 +++++++---- sources | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index de5a9b2..3e4929e 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -47,8 +47,8 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 -Version: 1.25.05 -Release: 5%{?dist} +Version: 1.25.06 +Release: 1%{?dist} # GPL-2.0-only OR GPL-3.0-only: # - the project as a whole @@ -594,13 +594,16 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog +* Fri Aug 08 2025 Jerry James - 1.25.06-1 +- Version 1.25.06 + * Wed Jul 23 2025 Fedora Release Engineering - 1.25.05-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild -* Fri Jun 13 2025 Jerry James - 1.25.05-4 +* Fri Jun 13 2025 Jerry James - 1.25.05-4 - Unbundle factory-gftables (bz 2372455) -* Wed Jun 11 2025 Jerry James - 1.25.05-3 +* Wed Jun 11 2025 Jerry James - 1.25.05-3 - Rebuild for normaliz 3.10.5 * Tue Jun 03 2025 Python Maint - 1.25.05-2 diff --git a/sources b/sources index afd777f..d32f616 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ SHA512 (Macaulay2-icons.tar.xz) = 069aa0ad70a0253583b00091c094da9b79d2a2f0f2d38aa97f543081f5df5fd3b5a9e1463febd6947c3151cf01844133174c7372f57e158c2d3faba6baed5d1d -SHA512 (Macaulay2-1.25.05.tar.gz) = 00bc29fb15f01b354f94ff8088f362375e34d3d5c83f8a08365bcbd69156ae3c1fcd3104f788c759a6ad5e06faa24f7f01f9d628b01497fb031ad6e2454765b8 +SHA512 (Macaulay2-1.25.06.tar.gz) = 4493fd9142ea78d3a30f289f7bd03666f646858798b93feb7c8a96669a6ef1a47b30914ba9be34af5b36d1623aba6c8394d795b6688b36ac1b7fbccb96e34fea SHA512 (4ti2-1.6.10.tar.gz) = 0bdf73a8885fe03258a903f0bfb45b8271dcf755d8033b57b8d5620daba7fc25b51031ffb2c8609e40bc19508e07ba028de035d8c193caeffe6400457fc0e3e1 SHA512 (cddlib-094m.tar.gz) = d140d57391b1c963d68ca2e344fbda723a5077004bace322a18362fdc1fff8b50fdc4b598ca8cdf131158e07afc96c5d9aafd7abde082a9e241701e403310b9f SHA512 (cohomCalg-0.32.tar.gz) = b76d8de00b13a8fe8881222178247c5e99c15075c46290830f6c3afffb9dfc18af0d57f738ac5a0d7c00044db81b4465d1e0563c95f7f656a2440be5765c6818 From 80d72d3d57ce0913e9015d4ef13e694ad0d9c6ba Mon Sep 17 00:00:00 2001 From: Jerry James Date: Wed, 20 Aug 2025 06:34:04 -0600 Subject: [PATCH 62/70] Rebuild for tbb 2022.2.0 --- Macaulay2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index 3e4929e..ef90c4c 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -48,7 +48,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 Version: 1.25.06 -Release: 1%{?dist} +Release: 2%{?dist} # GPL-2.0-only OR GPL-3.0-only: # - the project as a whole @@ -594,6 +594,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog +* Wed Aug 20 2025 Jerry James - 1.25.06-2 +- Rebuild for tbb 2022.2.0 + * Fri Aug 08 2025 Jerry James - 1.25.06-1 - Version 1.25.06 From b201a8d33f382501e21daabc46203445b3c72275 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sat, 23 Aug 2025 06:54:31 -0400 Subject: [PATCH 63/70] Rebuilt for tinyxml2 11.0.0 --- Macaulay2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index ef90c4c..a1fdfe3 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -48,7 +48,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 Version: 1.25.06 -Release: 2%{?dist} +Release: 3%{?dist} # GPL-2.0-only OR GPL-3.0-only: # - the project as a whole @@ -594,6 +594,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog +* Sat Aug 23 2025 Benjamin A. Beasley - 1.25.06-3 +- Rebuilt for tinyxml2 11.0.0 + * Wed Aug 20 2025 Jerry James - 1.25.06-2 - Rebuild for tbb 2022.2.0 From c0e21ea5f6f00aedd70f1ac81e87f5ed34c8bed5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Terje=20R=C3=B8sten?= Date: Wed, 8 Oct 2025 13:37:01 +0200 Subject: [PATCH 64/70] Move to C++17 for gtest 1.17.0 --- Macaulay2-1.25-c++17.patch | 11 +++++++++++ Macaulay2.spec | 7 ++++++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 Macaulay2-1.25-c++17.patch diff --git a/Macaulay2-1.25-c++17.patch b/Macaulay2-1.25-c++17.patch new file mode 100644 index 0000000..7c1cc08 --- /dev/null +++ b/Macaulay2-1.25-c++17.patch @@ -0,0 +1,11 @@ +--- M2/configure.ac ++++ M2/configure.ac +@@ -262,7 +262,7 @@ AC_SUBST(M2_CFLAGS) + AC_SUBST(M2_CXXFLAGS) + + dnl Fix standards, apply everywhere +-CXXFLAGS="-std=gnu++14 $CXXFLAGS" ++CXXFLAGS="-std=gnu++17 $CXXFLAGS" + CFLAGS="-std=gnu11 $CFLAGS" + + AC_PROG_CC() # set CFLAGS before this diff --git a/Macaulay2.spec b/Macaulay2.spec index a1fdfe3..1e03b9e 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -48,7 +48,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 Version: 1.25.06 -Release: 3%{?dist} +Release: 4%{?dist} # GPL-2.0-only OR GPL-3.0-only: # - the project as a whole @@ -230,6 +230,8 @@ Patch: %{name}-1.17-configure.patch Patch: %{name}-1.18-lto.patch # Avoid use of the deprecated strstream C++ header Patch: %{name}-1.25-strstream.patch +# Move to C++17 for gtest 1.17.0 +Patch: %{name}-1.25-c++17.patch BuildRequires: 4ti2 BuildRequires: appstream @@ -594,6 +596,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog +* Wed Oct 08 2025 Terje Rosten - 1.25.06-4 +- Move to C++17 for gtest 1.17.0 + * Sat Aug 23 2025 Benjamin A. Beasley - 1.25.06-3 - Rebuilt for tinyxml2 11.0.0 From f8f7eed549a6df58f818a88ada511319ccba76af Mon Sep 17 00:00:00 2001 From: Jerry James Date: Mon, 13 Oct 2025 16:47:42 -0600 Subject: [PATCH 65/70] Drop unused atomic_ops dependency --- Macaulay2.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index 1e03b9e..4b173d7 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -286,7 +286,6 @@ BuildRequires: normaliz BuildRequires: ntl-devel BuildRequires: ocl-icd-devel BuildRequires: pari-devel -BuildRequires: pkgconfig(atomic_ops) BuildRequires: pkgconfig(bdw-gc) >= 8.2.6 BuildRequires: pkgconfig(cddlib) BuildRequires: pkgconfig(expat) @@ -596,6 +595,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog +* Mon Oct 13 2025 Jerry James - 1.25.06-4 +- Drop unused atomic_ops dependency + * Wed Oct 08 2025 Terje Rosten - 1.25.06-4 - Move to C++17 for gtest 1.17.0 From 39960738e324259232d37bf476f84ad7c8b09128 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Fri, 14 Nov 2025 12:09:39 -0700 Subject: [PATCH 66/70] Convert to %autorelease and %autochangelog [skip changelog] --- Macaulay2.spec | 686 +------------------------------------------------ changelog | 682 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 684 insertions(+), 684 deletions(-) create mode 100644 changelog diff --git a/Macaulay2.spec b/Macaulay2.spec index 4b173d7..e81b2f2 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -48,7 +48,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 Version: 1.25.06 -Release: 4%{?dist} +Release: %autorelease # GPL-2.0-only OR GPL-3.0-only: # - the project as a whole @@ -595,686 +595,4 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin %changelog -* Mon Oct 13 2025 Jerry James - 1.25.06-4 -- Drop unused atomic_ops dependency - -* Wed Oct 08 2025 Terje Rosten - 1.25.06-4 -- Move to C++17 for gtest 1.17.0 - -* Sat Aug 23 2025 Benjamin A. Beasley - 1.25.06-3 -- Rebuilt for tinyxml2 11.0.0 - -* Wed Aug 20 2025 Jerry James - 1.25.06-2 -- Rebuild for tbb 2022.2.0 - -* Fri Aug 08 2025 Jerry James - 1.25.06-1 -- Version 1.25.06 - -* Wed Jul 23 2025 Fedora Release Engineering - 1.25.05-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Fri Jun 13 2025 Jerry James - 1.25.05-4 -- Unbundle factory-gftables (bz 2372455) - -* Wed Jun 11 2025 Jerry James - 1.25.05-3 -- Rebuild for normaliz 3.10.5 - -* Tue Jun 03 2025 Python Maint - 1.25.05-2 -- Rebuilt for Python 3.14 - -* Thu May 29 2025 Jerry James - 1.25.05-1 -- Version 1.25.05 -- Drop upstreamed patches: no_gftables, fplll, codim-option, rightarrow -- Add patch to avoid the deprecated strstream C++ header -- Unbundle memtailor, mathic, and mathicgb - -* Thu Feb 20 2025 Jerry James - 1.24.11-1 -- Version 1.24.11 -- Drop upstreamed vector overrun patch -- Add patch to fix mismatched options to codim -- BR e-antic-devel -- BR and Recommend msolve -- Move configuration steps to %%conf -- Remove pessimization on s390x - -* Thu Jan 16 2025 Fedora Release Engineering - 1.24.05-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Fri Nov 22 2024 Benjamin A. Beasley - 1.24.05-5 -- Rebuild for libfplll 5.5.0 - -* Mon Sep 23 2024 Jerry James - 1.24.05-4 -- Rebuild for nauty 2.8.9 - -* Sat Aug 24 2024 Jerry James - 1.24.05-3 -- Rebuild for Singular 4.4.0p4 - -* Wed Jul 17 2024 Fedora Release Engineering - 1.24.05-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Wed Jun 19 2024 Jerry James - 1.24.05-1 -- Version 1.24.05 - -* Fri Feb 23 2024 Jerry James - 1.22-6 -- Build the polymake and scip examples -- Recommend scip -- Disable ppc64le build until segfaults can be diagnosed - -* Mon Jan 22 2024 Fedora Release Engineering - 1.22-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Fri Jan 19 2024 Fedora Release Engineering - 1.22-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Wed Jan 17 2024 Jonathan Wakely - 1.22-3 -- Rebuilt for Boost 1.83 - -* Fri Nov 10 2023 Benjamin A. Beasley - 1.22-2 -- Correct appstreamcli invocation (--nonet no longer works) -- Ask appstreamcli to explain validation findings -- Also validate AppStream XML with appstream-util, required by guidelines - -* Thu Oct 26 2023 Jerry James - 1.22-1 -- Version 1.22 -- Drop upstreamed Macaulay2-configure-c99.patch -- Build against mariadb-connector-c instead of the server package - -* Wed Jul 19 2023 Fedora Release Engineering - 1.21-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Sat Apr 15 2023 Florian Weimer - 1.21-5 -- Port configure script to C99 - -* Mon Feb 20 2023 Jonathan Wakely - 1.21-4 -- Rebuilt for Boost 1.81 - -* Wed Jan 18 2023 Fedora Release Engineering - 1.21-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Thu Jan 12 2023 Jerry James - 1.21-2 -- Rebuild for libfplll 5.4.4 - -* Thu Dec 22 2022 Jerry James - 1.21-1 -- Version 1.21 -- Drop upstreamed patch for crash when building documentation -- Use rdns names for the desktop and metainfo files - -* Tue Dec 20 2022 Jerry James - 1.20-2 -- Convert License tag to SPDX - -* Sun Sep 25 2022 Rich Mattes - 1.20-2 -- Rebuild for tinyxml2-9.0.0 - -* Thu Aug 4 2022 Jerry James - 1.20-1 -- Version 1.20 - -* Wed Jul 20 2022 Fedora Release Engineering - 1.19.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Wed May 04 2022 Thomas Rodgers - 1.19.1-2 -- Rebuilt for Boost 1.78 - -* Mon Feb 21 2022 Jerry James - 1.19.1-1 -- Version 1.19.1 -- Disable LTO to work around segfaults - -* Wed Jan 19 2022 Fedora Release Engineering - 1.19-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Wed Nov 24 2021 Jerry James - 1.19-1 -- Version 1.19 - -* Fri Aug 06 2021 Jonathan Wakely - 1.18-4 -- Rebuilt for Boost 1.76 - -* Wed Jul 21 2021 Fedora Release Engineering - 1.18-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Tue Jun 29 2021 Jerry James - 1.18-2 -- Rebuild for ntl 11.5.1 - -* Thu Jun 17 2021 Jerry James - 1.18-1 -- Version 1.18 - -* Thu Feb 18 2021 Jerry James - 1.17-2 -- Reduce optimization level on s390x to work around FTBFS -- Install metainfo -- Add -mathic patch to silence GCC warnings -- Add -lto patch to silence LTO warnings - -* Mon Jan 25 2021 Fedora Release Engineering - 1.17-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Sat Jan 16 2021 Jerry James - 1.17-1 -- Version 1.17 -- Drop upstreamed patches: -nauty-paths, -format -- Merge -gcc11 patch into mathicgb-1.0.patch - -* Thu Oct 15 2020 Jeff Law - 1.16-2 -- Add missing #includes for gcc-11 - -* Mon Aug 31 2020 Jerry James - 1.16-1 -- Version 1.16 -- Drop upstreamed patch: -xdg_open -- Add -ulimit patch for the slower builders -- Add -format and -rightarrow patches -- Bundle packages due to garbage collector crashes: linbox, memtailor, mathic -- Drop the XEmacs subpackage; XEmacs support no longer works - -* Sun Aug 16 2020 Iñaki Úcar - 1.15.1.0-5 -- https://fedoraproject.org/wiki/Changes/FlexiBLAS_as_BLAS/LAPACK_manager - -* Sat Aug 01 2020 Fedora Release Engineering - 1.15.1.0-4 -- Second attempt - Rebuilt for - https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Mon Jul 27 2020 Fedora Release Engineering - 1.15.1.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Wed Jul 1 2020 Jeff Law - 1.15.1.0-2 -- Disable LTO - -* Wed Jun 3 2020 Jerry James - 1.15.1.0-1 -- Version 1.15.1.0 -- Drop upstreamed patches: -no_Werror, -mpir, -pthreads, -fflas-ffpack, - -fno-common, -gtest, -pthreads - -* Tue Feb 11 2020 Jerry James - 1.14.0.1-4 -- Add -fno-common patch to fix FTBFS with GCC 10 - -* Tue Jan 28 2020 Fedora Release Engineering - 1.14.0.1-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Fri Jan 10 2020 Jerry James - 1.14.0.1-3 -- Rebuild for ntl 11.4.3 - -* Fri Nov 1 2019 Jerry James - 1.14.0.1-2 -- Rebuild for givaro 4.1.1, fflas-ffpack 2.4.3, and linbox 1.6.3 - -* Thu Sep 26 2019 Jerry James - 1.14.0.1-1 -- Macaulay2-1.14.0.1 -- Drop upstreamed -format and -exception patches -- Also bundle libmpc since it is linked with mpfr -- Drop fix for F26 symlink-file snafu -- Build with python 3 instead of python 2 - -* Wed Jul 24 2019 Fedora Release Engineering - 1.12.0.1-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Sun Feb 17 2019 Igor Gnatenko - 1.12.0.1-5 -- Rebuild for readline 8.0 - -* Thu Jan 31 2019 Fedora Release Engineering - 1.12.0.1-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Tue Nov 20 2018 Jerry James - 1.12.0.1-3 -- Rebuild for lrslib 070 - -* Wed Oct 10 2018 Jerry James - 1.12.0.1-2 -- Rebuild for ntl 11.3.0 -- Build with openblas instead of atlas (bz 1618938) - -* Fri Aug 10 2018 Jerry James - 1.12.0.1-1 -- Macaulay2-1.12.0.1 -- Replace tiny icon of unknown origin with various sizes of upstream's icon -- Remove deprecated entries from the desktop file -- Add upstream mpfr 3.1.6 patches - -* Thu Jul 12 2018 Fedora Release Engineering - 1.11-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Tue Jul 3 2018 Jerry James - 1.11-2 -- Rebuild for ntl 11.1.0 -- Remove scriptlets that call install-info -- Do not byte compile python files in the examples - -* Sat Jun 2 2018 Jerry James - 1.11-1 -- Macaulay2-1.11 -- Drop upstreamed patches: -verbose_build, -givaro, -pari, -endian -- New patches: -fflas-ffpack, -format, -exception, -fplll, -configure -- Update bundled software -- Refresh INFO_FILES list - -* Fri Feb 09 2018 Igor Gnatenko - 1.9.2-8 -- Escape macros in %%changelog - -* Wed Feb 07 2018 Fedora Release Engineering - 1.9.2-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Thu Jan 18 2018 Igor Gnatenko - 1.9.2-6 -- Remove obsolete scriptlets - -* Wed Oct 11 2017 Jerry James - 1.9.2-5 -- Link rather than copy the normaliz binary -- Fix accidental replacement of factory symlink with a directory - -* Sat Sep 30 2017 Jerry James - 1.9.2-4 -- Rebuild for ntl 10.5.0 - -* Wed Aug 02 2017 Fedora Release Engineering - 1.9.2-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Wed Jul 26 2017 Fedora Release Engineering - 1.9.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Wed Apr 5 2017 Jerry James - 1.9.2-1 -- Macaulay2-1.9.2 -- Drop upstreamed patches: -disable_broken_debug_functions, -gc, -rpath, - -rh_configure_hack -- Add patches: -givaro, -gtest, -pari -- Create fake library and submodule tarballs to fool the build system into - building in support for system libraries -- Bundle mpfr, flint, and factory to avoid garbage collector crashes -- Replace the (X)Emacs triggers with (x)emacs-filesystem dependencies -- New URLs - -* Fri Feb 10 2017 Fedora Release Engineering - 1.6-34 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Thu Jan 12 2017 Igor Gnatenko - 1.6-33 -- Rebuild for readline 7.x - -* Thu Oct 20 2016 Jerry James - 1.6-32 -- Rebuild for ntl 10.1.0 - -* Mon Sep 5 2016 Jerry James - 1.6-31 -- Rebuild for ntl 9.11.0 - -* Fri Aug 12 2016 Jerry James - 1.6-30 -- Rebuild for fflas-ffpack 2.2.2, givaro 4.0.2, and linbox 1.4.2 - -* Mon Jul 25 2016 Jerry James - 1.6-29 -- Rebuild for ntl 9.10.0 - -* Thu Jun 2 2016 Jerry James - 1.6-28 -- Rebuild for ntl 9.9.1 - -* Fri Apr 29 2016 Jerry James - 1.6-27 -- Rebuild for ntl 9.8.0 -- Nauty is now available -- Drop -gcc-template-bug patch; gcc bug has been fixed - -* Sat Mar 19 2016 Jerry James - 1.6-26 -- Rebuild for ntl 9.7.0 - -* Sat Feb 20 2016 Jerry James - 1.6-25 -- Rebuild for ntl 9.6.4 -- Add -gcc-template-bug patch to work around gcc bug (bz 1307282) - -* Wed Feb 03 2016 Fedora Release Engineering - 1.6-24 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Thu Jan 14 2016 Jonathan Wakely - 1.6-23 -- Rebuilt for Boost 1.60 - -* Fri Dec 4 2015 Jerry James - 1.6-22 -- Rebuild for ntl 9.6.2 -- Add python2 BR for the tests - -* Sat Oct 17 2015 Kalev Lember - 1.6-21 -- Rebuilt for libntl soname bump - -* Fri Oct 16 2015 Jerry James - 1.6-20 -- Rebuild for ntl 9.4.0 - -* Tue Sep 29 2015 Rex Dieter 1.6-19 -- refresh config.guess/config.sub hack, fix FTBFS on aarch64 - -* Sat Sep 19 2015 Jerry James - 1.6-18 -- Rebuild for flint 2.5.2 and ntl 9.3.0 - -* Thu Aug 27 2015 Jonathan Wakely - 1.6-17 -- Rebuilt for Boost 1.59 - -* Wed Jul 29 2015 Fedora Release Engineering - 1.6-16 -- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159 - -* Wed Jul 22 2015 David Tardon - 1.6-15 -- rebuild for Boost 1.58 - -* Tue Jun 16 2015 Fedora Release Engineering - 1.6-14 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Mon May 18 2015 Jerry James - 1.6-13 -- Rebuild for ntl 9.1.1 and cddlib-094h - -* Fri May 15 2015 Jerry James - 1.6-12 -- Bump and rebuild - -* Sat May 9 2015 Jerry James - 1.6-11 -- Rebuild for ntl 9.1.0 - -* Mon Feb 2 2015 Jerry James - 1.6-10 -- Rebuild for ntl 8.1.2 - -* Mon Jan 26 2015 Petr Machata - 1.6-9 -- Rebuild for boost 1.57.0 - -* Thu Jan 15 2015 Jerry James - 1.6-8 -- Rebuild for ntl 8.1.0 -- Fix the desktop file name - -* Wed Oct 29 2014 Jerry James - 1.6-7 -- Rebuild for ntl 6.2.1 -- Revert Apr 8 HTML creation timeout, now handled upstream -- Revert use of -common subpkg; various arches timeout differently - -* Wed Sep 24 2014 Rex Dieter 1.6-6 -- enable -common subpkg (to be more compatible with upstream packaging) - -* Fri Aug 15 2014 Fedora Release Engineering - 1.6-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Wed Jun 25 2014 Rex Dieter 1.6-4 -- restore --build/--host configure options lost in 1.6 update, should help arm - -* Fri Jun 06 2014 Fedora Release Engineering - 1.6-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Fri May 23 2014 Petr Machata - 1.6-2 -- Rebuild for boost 1.55.0 - -* Mon May 19 2014 Rex Dieter 1.6-1 -- Macaulay2-1.6 (#1074594) -- ExcludeArch: %%arm (#1099598) - -* Wed May 14 2014 Rex Dieter 1.5-8 -- rebuild (gc) - -* Tue Apr 8 2014 Jerry James - 1.5-7 -- Build for all arches -- Increase HTML creation timeouts for slower processors, such as ARM -- Add --build and --host invocations to configure to fix mismatched ARM names - -* Wed Apr 2 2014 Jerry James - 1.5-6 -- Rebuild for ntl 6.1.0 - -* Fri Mar 21 2014 Jerry James - 1.5-5 -- The normaliz patch was used; bring it back -- Complete the removal of the system_normaliz variable -- Link with RPM_LD_FLAGS -- Due to use of a static library, explicitly link with -lflint - -* Fri Jan 24 2014 Rex Dieter - 1.5-5 -- drop unused patches (4ti2, normalize) - -* Tue Jan 21 2014 Rex Dieter - 1.5-4 -- utilize %%_libexecdir/Macaulay2/... for helper/system binaries -- libdir: %%_libdir => %%_prefix/lib -- -common subpkg option (not used yet) - -* Tue Jan 14 2014 Jerry James - 1.5-3 -- Update normaliz interface for normaliz 2.8 and later - -* Tue Jul 30 2013 Petr Machata - 1.5-2 -- Rebuild for boost 1.54.0 - -* Thu May 23 2013 Rex Dieter 1.5-1 -- Release: 1 (using non-snapshot release tarball now) - -* Tue May 21 2013 Rex Dieter - 1.5-0.7.20130401 -- update to 20130401 r15955 snapshot release -- (Build)Requires: factory-gftables (see bug #965655) -- refresh INFO_FILES content - -* Mon May 6 2013 Jerry James - 1.5-0.6.20130214 -- Rebuild for m4ri 20130416 - -* Fri Feb 15 2013 Rex Dieter 1.5-0.5.20130214 -- r15838 (20130214 snapshot) - -* Wed Feb 13 2013 Rex Dieter 1.5-0.4.20120807 -- BR: doxygen-latex - -* Wed Feb 13 2013 Fedora Release Engineering - 1.5-0.3.20120807 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Tue Aug 07 2012 Rex Dieter 1.5-0.2.20120807 -- 1.5 20120807 r15022 snapshot - -* Thu Jul 19 2012 Rex Dieter 1.4-9 -- rebuild against (Singular's) libfac/factory 3.1.3 - -* Wed Jul 18 2012 Fedora Release Engineering - 1.4-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Tue Jul 03 2012 Rex Dieter 1.4-7 -- rebuild (pari) - -* Sun Jul 1 2012 pcpa - 1.4-6 -- Link to gmp not mpir. -- Rebuild with pari 2.5. - -* Wed May 30 2012 Rex Dieter -- 1.4-5 -- License: GPLv2 or GPLv3 (#821036) -- pkgconfig-style deps - -* Tue Feb 28 2012 Fedora Release Engineering - 1.4-4 -- Rebuilt for c++ ABI breakage - -* Thu Jan 12 2012 Fedora Release Engineering - 1.4-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Fri Sep 30 2011 Rex Dieter 1.4-2 -- rebuild (gdbm) - -* Thu May 26 2011 Rex Dieter 1.4-1 -- 1.4 - -* Thu May 26 2011 Rex Dieter 1.3.1-9 -- Typo in INFO_FILES (#708086) - -* Mon Feb 07 2011 Fedora Release Engineering - 1.3.1-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Wed Jun 30 2010 Rex Dieter - 1.3.1-7 -- BR: cddlib-static (#609698) - -* Tue Mar 16 2010 Rex Dieter - 1.3.1-6 -- rebuild (factory/libfac) - -* Tue Mar 16 2010 Mark Chappell - 1.3.1-5 -- Run install-info on all of the .info files we installed -- Re-enable the now functional ppc64 build - -* Wed Mar 10 2010 Mark Chappell - 1.3.1-4 -- Add in missing Requires runtime dependancies - -* Wed Mar 10 2010 Mark Chappell - 1.3.1-3 -- GPLv3/GPLv2 conflict, use compat-readline5 - bz#511299 - -* Tue Mar 09 2010 Mark Chappell - 1.3.1-2 -- Replace DSO patch with one accepted upstream -- Completely disable static linking - -* Wed Feb 24 2010 Mark Chappell - 1.3.1-1 -- Upstream version increment -- Remove unused patch -- Remove patch applied upstream -- Ensure consistent use of buildroot macro instead of RPM_BUILD_ROOT -- Fix implicit linking DSO failure -- Don't package empty .okay files which simply indicate test passes - -* Tue Dec 8 2009 Michael Schwendt - 1.2-7 -- Explicitly BR factory-static and libfac-static in accordance with the - Packaging Guidelines (factory-devel/libfac-devel are still static-only). - -* Tue Sep 22 2009 Rex Dieter - 1.2-6 -- fixup/optimize scriplets - -* Fri Jul 24 2009 Fedora Release Engineering - 1.2-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Fri Apr 17 2009 Rex Dieter - 1.2-4 -- rebuild for ntl-devel (shared) - -* Wed Feb 25 2009 Rex Dieter - 1.2-3 -- BR: libfac-devel,factory-devel >= 3.1 -- restore ExcludeArch: ppc64 (#253847) - -* Mon Feb 23 2009 Fedora Release Engineering - 1.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Fri Feb 13 2009 Rex Dieter 1.2-1 -- Macaulay-1.2 - -* Thu Oct 02 2008 Rex Dieter 1.1-2 -- respin (factory/libfac) - -* Tue Mar 11 2008 Rex Dieter 1.1-1 -- Macaulay2-1.1 -- Obsoletes/Provides: Macaulay2-common (upstream compatibility) -- re-enable ppc64 (#253847) -- IgnoreExampleErrors=true - -* Tue Feb 19 2008 Fedora Release Engineering - 0.9.95-10 -- Autorebuild for GCC 4.3 - -* Tue Dec 18 2007 Rex Dieter 0.9.95-9 -- Provides: macaulay2 -- respin against new(er) factory,libfac,ntl - -* Wed Aug 22 2007 Rex Dieter 0.9.95-8 -- ExcludeArch: ppc64 (#253847) - -* Tue Aug 21 2007 Rex Dieter 0.9.95-7 -- BR: gawk - -* Tue Aug 21 2007 Rex Dieter 0.9.95-6 -- gc-7.0 patches - -* Sat Aug 11 2007 Rex Dieter 0.9.95-5 -- License: GPLv2 - -* Mon Jan 15 2007 Rex Dieter 0.9.95-4 -- Ob/Pr: Macaulay2-doc, not -docs (#222609) - -* Sat Jan 06 2007 Rex Dieter 0.9.95-3 -- re-enable ppc build (#201739) - -* Tue Jan 02 2007 Rex Dieter 0.9.95-2 -- ./configure --disable-strip, for usable -debuginfo (#220893) - -* Mon Dec 18 2006 Rex Dieter 0.9.95-1 -- Macaulay2-0.9.95 - -* Wed Nov 22 2006 Rex Dieter 0.9.20-0.5.20060808svn -- .desktop Categories: -Application,Scientific,X-Fedora +ConsoleOnly - -* Tue Aug 29 2006 Rex Dieter 0.9.20-0.4.20060808svn -- fc6 respin - -* Tue Aug 08 2006 Rex Dieter 0.9.20-0.3.20060808svn -- ExcludeArch: ppc (bug #201739) -- %%ghost (x)emacs site-lisp bits (using hints from fedora-rpmdevtools) - -* Tue Aug 08 2006 Rex Dieter 0.9.20-0.2.20060808svn -- 20060808 snapshot - -* Mon Jul 24 2006 Rex Dieter 0.9.20-0.1.20060724svn -- 2006-07-15-0.9.20 - -* Wed Jul 12 2006 Rex Dieter 0.9.10-0.6.20060710svn -- 0.9.10 - --* Mon Jul 10 2006 Rex Dieter 0.9.8-0.6.cvs20060327 -- BR: ncurses-devel - -* Fri May 05 2006 Rex Dieter 0.9.8-0.4.cvs20060327 -- 64bit patch (#188709) - -* Wed Apr 12 2006 Rex Dieter 0.9.8-0.3.cvs20060327 -- omit x86_64, for now (#188709) - -* Tue Apr 11 2006 Rex Dieter 0.9.8-0.2.cvs20060327 -- 0.9.8 (cvs, no tarball yet) -- drop -doc subpkg (in main now) - -* Mon Apr 10 2006 Rex Dieter 0.9.2-22 -- fix icon location (#188384) - -* Thu Mar 30 2006 Rex Dieter 0.9.2-21 -- really disable %%check (fails on fc5+ anyway) - -* Fri Jan 20 2006 Rex Dieter 0.9.2-20 -- .desktop: drop Category=Development -- app icon: follow icon spec -- drop -emacs subpkg (in main now) - -* Fri Sep 16 2005 Rex Dieter - 0.9.2-19 -- disable 'make check' (fc5/buildsystem error), besides, we get a - good consistency check when M2 builds all the doc examples. - -* Wed Sep 14 2005 Rex Dieter - 0.9.2-18 -- rebuild against gc-6.6 - -* Thu May 26 2005 Michael Schwendt - 0.9.2-17 -- rebuild (build system x86_64 repository access failed for 0.9.2-16) -- fix build for GCC 4 (#156223) - -* Thu Apr 7 2005 Michael Schwendt - 0.9.2-15 -- rebuilt - -* Mon Feb 21 2005 Rex Dieter 0:0.9.2-14 -- x86_64 issues (%%_libdir -> %%_prefix/lib ) -- remove desktop_file macro usage - -* Sat Oct 23 2004 Rex Dieter 0:0.9.2-0.fdr.13 -- BR: time (again) -- omit m2_dir/setup (not needed/wanted) - -* Mon Oct 18 2004 Rex Dieter 0:0.9.2-0.fdr.12 -- actually *apply* gcc34 patch this time. - -* Mon Oct 18 2004 Rex Dieter 0:0.9.2-0.fdr.11 -- gcc34 patch - -* Fri Oct 1 2004 Rex Dieter 0:0.9.2-0.fdr.10 -- explicit BR versions for gc-devel, libfac-devel, factory-devel - -* Tue Aug 10 2004 Rex Dieter 0:0.9.2-0.fdr.9 -- BR: time - -* Thu Jun 03 2004 Rex Dieter 0:0.9.2-0.fdr.8 -- .desktop: remove Terminaloptions to be desktop agnostic -- .desktop: Categories += Education;Math;Development (Devel only - added so it shows *somewhere* in gnome menus) - -* Tue Jun 01 2004 Rex Dieter 0:0.9.2-0.fdr.7 -- disable default 'make check' (util/screen fails on fc2) - -* Tue Mar 30 2004 Rex Dieter 0:0.9.2-0.fdr.6 -- desktop-file is now on by default -- use separate (not inline) .desktop file - -* Mon Jan 05 2004 Rex Dieter 0:0.9.2-0.fdr.5 -- fix BuildRequires: desktop-file-utils to satisfy rpmlint. -- put emacs files in emacs subdir too (to follow supplied docs) -- *really* nuke .cvsignore files -- fix desktop-file-install --add-cateagories usage - -* Tue Dec 23 2003 Rex Dieter 0:0.9.2-0.fdr.4 -- -emacs: use %%defattr -- -emacs: fix M2-init.el - -* Mon Nov 17 2003 Rex Dieter 0:0.9.2-0.fdr.3 -- update/simplify macros -- desktop_file support. -- emacs subpkg. -- relax Req's on subpkgs to just: Requires: %%name = %%epoch:%%version -- use non-versioned BuildRequires -- remove redundant BuildRequires: gmp-devel -- remove gc patch, no longer needed. -- delete/not-package a bunch of unuseful files. -- use --disable-strip when debug_package is in use. - -* Thu Nov 13 2003 Rex Dieter 0:0.9.2-0.fdr.2 -- no longer explictly Requires: emacs - -* Wed Nov 05 2003 Rex Dieter 0:0.9.2-0.fdr.1 -- missing Epoch: 0 - -* Fri Sep 12 2003 Rex Dieter 0.9.2-0.fdr.0 -- fedora'ize - +%autochangelog diff --git a/changelog b/changelog new file mode 100644 index 0000000..f52a894 --- /dev/null +++ b/changelog @@ -0,0 +1,682 @@ +* Mon Oct 13 2025 Jerry James - 1.25.06-4 +- Drop unused atomic_ops dependency + +* Wed Oct 08 2025 Terje Rosten - 1.25.06-4 +- Move to C++17 for gtest 1.17.0 + +* Sat Aug 23 2025 Benjamin A. Beasley - 1.25.06-3 +- Rebuilt for tinyxml2 11.0.0 + +* Wed Aug 20 2025 Jerry James - 1.25.06-2 +- Rebuild for tbb 2022.2.0 + +* Fri Aug 08 2025 Jerry James - 1.25.06-1 +- Version 1.25.06 + +* Wed Jul 23 2025 Fedora Release Engineering - 1.25.05-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Fri Jun 13 2025 Jerry James - 1.25.05-4 +- Unbundle factory-gftables (bz 2372455) + +* Wed Jun 11 2025 Jerry James - 1.25.05-3 +- Rebuild for normaliz 3.10.5 + +* Tue Jun 03 2025 Python Maint - 1.25.05-2 +- Rebuilt for Python 3.14 + +* Thu May 29 2025 Jerry James - 1.25.05-1 +- Version 1.25.05 +- Drop upstreamed patches: no_gftables, fplll, codim-option, rightarrow +- Add patch to avoid the deprecated strstream C++ header +- Unbundle memtailor, mathic, and mathicgb + +* Thu Feb 20 2025 Jerry James - 1.24.11-1 +- Version 1.24.11 +- Drop upstreamed vector overrun patch +- Add patch to fix mismatched options to codim +- BR e-antic-devel +- BR and Recommend msolve +- Move configuration steps to %%conf +- Remove pessimization on s390x + +* Thu Jan 16 2025 Fedora Release Engineering - 1.24.05-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Fri Nov 22 2024 Benjamin A. Beasley - 1.24.05-5 +- Rebuild for libfplll 5.5.0 + +* Mon Sep 23 2024 Jerry James - 1.24.05-4 +- Rebuild for nauty 2.8.9 + +* Sat Aug 24 2024 Jerry James - 1.24.05-3 +- Rebuild for Singular 4.4.0p4 + +* Wed Jul 17 2024 Fedora Release Engineering - 1.24.05-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Wed Jun 19 2024 Jerry James - 1.24.05-1 +- Version 1.24.05 + +* Fri Feb 23 2024 Jerry James - 1.22-6 +- Build the polymake and scip examples +- Recommend scip +- Disable ppc64le build until segfaults can be diagnosed + +* Mon Jan 22 2024 Fedora Release Engineering - 1.22-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jan 19 2024 Fedora Release Engineering - 1.22-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Wed Jan 17 2024 Jonathan Wakely - 1.22-3 +- Rebuilt for Boost 1.83 + +* Fri Nov 10 2023 Benjamin A. Beasley - 1.22-2 +- Correct appstreamcli invocation (--nonet no longer works) +- Ask appstreamcli to explain validation findings +- Also validate AppStream XML with appstream-util, required by guidelines + +* Thu Oct 26 2023 Jerry James - 1.22-1 +- Version 1.22 +- Drop upstreamed Macaulay2-configure-c99.patch +- Build against mariadb-connector-c instead of the server package + +* Wed Jul 19 2023 Fedora Release Engineering - 1.21-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Sat Apr 15 2023 Florian Weimer - 1.21-5 +- Port configure script to C99 + +* Mon Feb 20 2023 Jonathan Wakely - 1.21-4 +- Rebuilt for Boost 1.81 + +* Wed Jan 18 2023 Fedora Release Engineering - 1.21-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Thu Jan 12 2023 Jerry James - 1.21-2 +- Rebuild for libfplll 5.4.4 + +* Thu Dec 22 2022 Jerry James - 1.21-1 +- Version 1.21 +- Drop upstreamed patch for crash when building documentation +- Use rdns names for the desktop and metainfo files + +* Tue Dec 20 2022 Jerry James - 1.20-2 +- Convert License tag to SPDX + +* Sun Sep 25 2022 Rich Mattes - 1.20-2 +- Rebuild for tinyxml2-9.0.0 + +* Thu Aug 4 2022 Jerry James - 1.20-1 +- Version 1.20 + +* Wed Jul 20 2022 Fedora Release Engineering - 1.19.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Wed May 04 2022 Thomas Rodgers - 1.19.1-2 +- Rebuilt for Boost 1.78 + +* Mon Feb 21 2022 Jerry James - 1.19.1-1 +- Version 1.19.1 +- Disable LTO to work around segfaults + +* Wed Jan 19 2022 Fedora Release Engineering - 1.19-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Wed Nov 24 2021 Jerry James - 1.19-1 +- Version 1.19 + +* Fri Aug 06 2021 Jonathan Wakely - 1.18-4 +- Rebuilt for Boost 1.76 + +* Wed Jul 21 2021 Fedora Release Engineering - 1.18-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue Jun 29 2021 Jerry James - 1.18-2 +- Rebuild for ntl 11.5.1 + +* Thu Jun 17 2021 Jerry James - 1.18-1 +- Version 1.18 + +* Thu Feb 18 2021 Jerry James - 1.17-2 +- Reduce optimization level on s390x to work around FTBFS +- Install metainfo +- Add -mathic patch to silence GCC warnings +- Add -lto patch to silence LTO warnings + +* Mon Jan 25 2021 Fedora Release Engineering - 1.17-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Sat Jan 16 2021 Jerry James - 1.17-1 +- Version 1.17 +- Drop upstreamed patches: -nauty-paths, -format +- Merge -gcc11 patch into mathicgb-1.0.patch + +* Thu Oct 15 2020 Jeff Law - 1.16-2 +- Add missing #includes for gcc-11 + +* Mon Aug 31 2020 Jerry James - 1.16-1 +- Version 1.16 +- Drop upstreamed patch: -xdg_open +- Add -ulimit patch for the slower builders +- Add -format and -rightarrow patches +- Bundle packages due to garbage collector crashes: linbox, memtailor, mathic +- Drop the XEmacs subpackage; XEmacs support no longer works + +* Sun Aug 16 2020 Iñaki Úcar - 1.15.1.0-5 +- https://fedoraproject.org/wiki/Changes/FlexiBLAS_as_BLAS/LAPACK_manager + +* Sat Aug 01 2020 Fedora Release Engineering - 1.15.1.0-4 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon Jul 27 2020 Fedora Release Engineering - 1.15.1.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Jul 1 2020 Jeff Law - 1.15.1.0-2 +- Disable LTO + +* Wed Jun 3 2020 Jerry James - 1.15.1.0-1 +- Version 1.15.1.0 +- Drop upstreamed patches: -no_Werror, -mpir, -pthreads, -fflas-ffpack, + -fno-common, -gtest, -pthreads + +* Tue Feb 11 2020 Jerry James - 1.14.0.1-4 +- Add -fno-common patch to fix FTBFS with GCC 10 + +* Tue Jan 28 2020 Fedora Release Engineering - 1.14.0.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Fri Jan 10 2020 Jerry James - 1.14.0.1-3 +- Rebuild for ntl 11.4.3 + +* Fri Nov 1 2019 Jerry James - 1.14.0.1-2 +- Rebuild for givaro 4.1.1, fflas-ffpack 2.4.3, and linbox 1.6.3 + +* Thu Sep 26 2019 Jerry James - 1.14.0.1-1 +- Macaulay2-1.14.0.1 +- Drop upstreamed -format and -exception patches +- Also bundle libmpc since it is linked with mpfr +- Drop fix for F26 symlink-file snafu +- Build with python 3 instead of python 2 + +* Wed Jul 24 2019 Fedora Release Engineering - 1.12.0.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sun Feb 17 2019 Igor Gnatenko - 1.12.0.1-5 +- Rebuild for readline 8.0 + +* Thu Jan 31 2019 Fedora Release Engineering - 1.12.0.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Tue Nov 20 2018 Jerry James - 1.12.0.1-3 +- Rebuild for lrslib 070 + +* Wed Oct 10 2018 Jerry James - 1.12.0.1-2 +- Rebuild for ntl 11.3.0 +- Build with openblas instead of atlas (bz 1618938) + +* Fri Aug 10 2018 Jerry James - 1.12.0.1-1 +- Macaulay2-1.12.0.1 +- Replace tiny icon of unknown origin with various sizes of upstream's icon +- Remove deprecated entries from the desktop file +- Add upstream mpfr 3.1.6 patches + +* Thu Jul 12 2018 Fedora Release Engineering - 1.11-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Tue Jul 3 2018 Jerry James - 1.11-2 +- Rebuild for ntl 11.1.0 +- Remove scriptlets that call install-info +- Do not byte compile python files in the examples + +* Sat Jun 2 2018 Jerry James - 1.11-1 +- Macaulay2-1.11 +- Drop upstreamed patches: -verbose_build, -givaro, -pari, -endian +- New patches: -fflas-ffpack, -format, -exception, -fplll, -configure +- Update bundled software +- Refresh INFO_FILES list + +* Fri Feb 09 2018 Igor Gnatenko - 1.9.2-8 +- Escape macros in %%changelog + +* Wed Feb 07 2018 Fedora Release Engineering - 1.9.2-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Jan 18 2018 Igor Gnatenko - 1.9.2-6 +- Remove obsolete scriptlets + +* Wed Oct 11 2017 Jerry James - 1.9.2-5 +- Link rather than copy the normaliz binary +- Fix accidental replacement of factory symlink with a directory + +* Sat Sep 30 2017 Jerry James - 1.9.2-4 +- Rebuild for ntl 10.5.0 + +* Wed Aug 02 2017 Fedora Release Engineering - 1.9.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 1.9.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Wed Apr 5 2017 Jerry James - 1.9.2-1 +- Macaulay2-1.9.2 +- Drop upstreamed patches: -disable_broken_debug_functions, -gc, -rpath, + -rh_configure_hack +- Add patches: -givaro, -gtest, -pari +- Create fake library and submodule tarballs to fool the build system into + building in support for system libraries +- Bundle mpfr, flint, and factory to avoid garbage collector crashes +- Replace the (X)Emacs triggers with (x)emacs-filesystem dependencies +- New URLs + +* Fri Feb 10 2017 Fedora Release Engineering - 1.6-34 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Jan 12 2017 Igor Gnatenko - 1.6-33 +- Rebuild for readline 7.x + +* Thu Oct 20 2016 Jerry James - 1.6-32 +- Rebuild for ntl 10.1.0 + +* Mon Sep 5 2016 Jerry James - 1.6-31 +- Rebuild for ntl 9.11.0 + +* Fri Aug 12 2016 Jerry James - 1.6-30 +- Rebuild for fflas-ffpack 2.2.2, givaro 4.0.2, and linbox 1.4.2 + +* Mon Jul 25 2016 Jerry James - 1.6-29 +- Rebuild for ntl 9.10.0 + +* Thu Jun 2 2016 Jerry James - 1.6-28 +- Rebuild for ntl 9.9.1 + +* Fri Apr 29 2016 Jerry James - 1.6-27 +- Rebuild for ntl 9.8.0 +- Nauty is now available +- Drop -gcc-template-bug patch; gcc bug has been fixed + +* Sat Mar 19 2016 Jerry James - 1.6-26 +- Rebuild for ntl 9.7.0 + +* Sat Feb 20 2016 Jerry James - 1.6-25 +- Rebuild for ntl 9.6.4 +- Add -gcc-template-bug patch to work around gcc bug (bz 1307282) + +* Wed Feb 03 2016 Fedora Release Engineering - 1.6-24 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Thu Jan 14 2016 Jonathan Wakely - 1.6-23 +- Rebuilt for Boost 1.60 + +* Fri Dec 4 2015 Jerry James - 1.6-22 +- Rebuild for ntl 9.6.2 +- Add python2 BR for the tests + +* Sat Oct 17 2015 Kalev Lember - 1.6-21 +- Rebuilt for libntl soname bump + +* Fri Oct 16 2015 Jerry James - 1.6-20 +- Rebuild for ntl 9.4.0 + +* Tue Sep 29 2015 Rex Dieter 1.6-19 +- refresh config.guess/config.sub hack, fix FTBFS on aarch64 + +* Sat Sep 19 2015 Jerry James - 1.6-18 +- Rebuild for flint 2.5.2 and ntl 9.3.0 + +* Thu Aug 27 2015 Jonathan Wakely - 1.6-17 +- Rebuilt for Boost 1.59 + +* Wed Jul 29 2015 Fedora Release Engineering - 1.6-16 +- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159 + +* Wed Jul 22 2015 David Tardon - 1.6-15 +- rebuild for Boost 1.58 + +* Tue Jun 16 2015 Fedora Release Engineering - 1.6-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Mon May 18 2015 Jerry James - 1.6-13 +- Rebuild for ntl 9.1.1 and cddlib-094h + +* Fri May 15 2015 Jerry James - 1.6-12 +- Bump and rebuild + +* Sat May 9 2015 Jerry James - 1.6-11 +- Rebuild for ntl 9.1.0 + +* Mon Feb 2 2015 Jerry James - 1.6-10 +- Rebuild for ntl 8.1.2 + +* Mon Jan 26 2015 Petr Machata - 1.6-9 +- Rebuild for boost 1.57.0 + +* Thu Jan 15 2015 Jerry James - 1.6-8 +- Rebuild for ntl 8.1.0 +- Fix the desktop file name + +* Wed Oct 29 2014 Jerry James - 1.6-7 +- Rebuild for ntl 6.2.1 +- Revert Apr 8 HTML creation timeout, now handled upstream +- Revert use of -common subpkg; various arches timeout differently + +* Wed Sep 24 2014 Rex Dieter 1.6-6 +- enable -common subpkg (to be more compatible with upstream packaging) + +* Fri Aug 15 2014 Fedora Release Engineering - 1.6-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Wed Jun 25 2014 Rex Dieter 1.6-4 +- restore --build/--host configure options lost in 1.6 update, should help arm + +* Fri Jun 06 2014 Fedora Release Engineering - 1.6-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Fri May 23 2014 Petr Machata - 1.6-2 +- Rebuild for boost 1.55.0 + +* Mon May 19 2014 Rex Dieter 1.6-1 +- Macaulay2-1.6 (#1074594) +- ExcludeArch: %%arm (#1099598) + +* Wed May 14 2014 Rex Dieter 1.5-8 +- rebuild (gc) + +* Tue Apr 8 2014 Jerry James - 1.5-7 +- Build for all arches +- Increase HTML creation timeouts for slower processors, such as ARM +- Add --build and --host invocations to configure to fix mismatched ARM names + +* Wed Apr 2 2014 Jerry James - 1.5-6 +- Rebuild for ntl 6.1.0 + +* Fri Mar 21 2014 Jerry James - 1.5-5 +- The normaliz patch was used; bring it back +- Complete the removal of the system_normaliz variable +- Link with RPM_LD_FLAGS +- Due to use of a static library, explicitly link with -lflint + +* Fri Jan 24 2014 Rex Dieter - 1.5-5 +- drop unused patches (4ti2, normalize) + +* Tue Jan 21 2014 Rex Dieter - 1.5-4 +- utilize %%_libexecdir/Macaulay2/... for helper/system binaries +- libdir: %%_libdir => %%_prefix/lib +- -common subpkg option (not used yet) + +* Tue Jan 14 2014 Jerry James - 1.5-3 +- Update normaliz interface for normaliz 2.8 and later + +* Tue Jul 30 2013 Petr Machata - 1.5-2 +- Rebuild for boost 1.54.0 + +* Thu May 23 2013 Rex Dieter 1.5-1 +- Release: 1 (using non-snapshot release tarball now) + +* Tue May 21 2013 Rex Dieter - 1.5-0.7.20130401 +- update to 20130401 r15955 snapshot release +- (Build)Requires: factory-gftables (see bug #965655) +- refresh INFO_FILES content + +* Mon May 6 2013 Jerry James - 1.5-0.6.20130214 +- Rebuild for m4ri 20130416 + +* Fri Feb 15 2013 Rex Dieter 1.5-0.5.20130214 +- r15838 (20130214 snapshot) + +* Wed Feb 13 2013 Rex Dieter 1.5-0.4.20120807 +- BR: doxygen-latex + +* Wed Feb 13 2013 Fedora Release Engineering - 1.5-0.3.20120807 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Tue Aug 07 2012 Rex Dieter 1.5-0.2.20120807 +- 1.5 20120807 r15022 snapshot + +* Thu Jul 19 2012 Rex Dieter 1.4-9 +- rebuild against (Singular's) libfac/factory 3.1.3 + +* Wed Jul 18 2012 Fedora Release Engineering - 1.4-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Tue Jul 03 2012 Rex Dieter 1.4-7 +- rebuild (pari) + +* Sun Jul 1 2012 pcpa - 1.4-6 +- Link to gmp not mpir. +- Rebuild with pari 2.5. + +* Wed May 30 2012 Rex Dieter +- 1.4-5 +- License: GPLv2 or GPLv3 (#821036) +- pkgconfig-style deps + +* Tue Feb 28 2012 Fedora Release Engineering - 1.4-4 +- Rebuilt for c++ ABI breakage + +* Thu Jan 12 2012 Fedora Release Engineering - 1.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Fri Sep 30 2011 Rex Dieter 1.4-2 +- rebuild (gdbm) + +* Thu May 26 2011 Rex Dieter 1.4-1 +- 1.4 + +* Thu May 26 2011 Rex Dieter 1.3.1-9 +- Typo in INFO_FILES (#708086) + +* Mon Feb 07 2011 Fedora Release Engineering - 1.3.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Wed Jun 30 2010 Rex Dieter - 1.3.1-7 +- BR: cddlib-static (#609698) + +* Tue Mar 16 2010 Rex Dieter - 1.3.1-6 +- rebuild (factory/libfac) + +* Tue Mar 16 2010 Mark Chappell - 1.3.1-5 +- Run install-info on all of the .info files we installed +- Re-enable the now functional ppc64 build + +* Wed Mar 10 2010 Mark Chappell - 1.3.1-4 +- Add in missing Requires runtime dependancies + +* Wed Mar 10 2010 Mark Chappell - 1.3.1-3 +- GPLv3/GPLv2 conflict, use compat-readline5 - bz#511299 + +* Tue Mar 09 2010 Mark Chappell - 1.3.1-2 +- Replace DSO patch with one accepted upstream +- Completely disable static linking + +* Wed Feb 24 2010 Mark Chappell - 1.3.1-1 +- Upstream version increment +- Remove unused patch +- Remove patch applied upstream +- Ensure consistent use of buildroot macro instead of RPM_BUILD_ROOT +- Fix implicit linking DSO failure +- Don't package empty .okay files which simply indicate test passes + +* Tue Dec 8 2009 Michael Schwendt - 1.2-7 +- Explicitly BR factory-static and libfac-static in accordance with the + Packaging Guidelines (factory-devel/libfac-devel are still static-only). + +* Tue Sep 22 2009 Rex Dieter - 1.2-6 +- fixup/optimize scriplets + +* Fri Jul 24 2009 Fedora Release Engineering - 1.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Fri Apr 17 2009 Rex Dieter - 1.2-4 +- rebuild for ntl-devel (shared) + +* Wed Feb 25 2009 Rex Dieter - 1.2-3 +- BR: libfac-devel,factory-devel >= 3.1 +- restore ExcludeArch: ppc64 (#253847) + +* Mon Feb 23 2009 Fedora Release Engineering - 1.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Fri Feb 13 2009 Rex Dieter 1.2-1 +- Macaulay-1.2 + +* Thu Oct 02 2008 Rex Dieter 1.1-2 +- respin (factory/libfac) + +* Tue Mar 11 2008 Rex Dieter 1.1-1 +- Macaulay2-1.1 +- Obsoletes/Provides: Macaulay2-common (upstream compatibility) +- re-enable ppc64 (#253847) +- IgnoreExampleErrors=true + +* Tue Feb 19 2008 Fedora Release Engineering - 0.9.95-10 +- Autorebuild for GCC 4.3 + +* Tue Dec 18 2007 Rex Dieter 0.9.95-9 +- Provides: macaulay2 +- respin against new(er) factory,libfac,ntl + +* Wed Aug 22 2007 Rex Dieter 0.9.95-8 +- ExcludeArch: ppc64 (#253847) + +* Tue Aug 21 2007 Rex Dieter 0.9.95-7 +- BR: gawk + +* Tue Aug 21 2007 Rex Dieter 0.9.95-6 +- gc-7.0 patches + +* Sat Aug 11 2007 Rex Dieter 0.9.95-5 +- License: GPLv2 + +* Mon Jan 15 2007 Rex Dieter 0.9.95-4 +- Ob/Pr: Macaulay2-doc, not -docs (#222609) + +* Sat Jan 06 2007 Rex Dieter 0.9.95-3 +- re-enable ppc build (#201739) + +* Tue Jan 02 2007 Rex Dieter 0.9.95-2 +- ./configure --disable-strip, for usable -debuginfo (#220893) + +* Mon Dec 18 2006 Rex Dieter 0.9.95-1 +- Macaulay2-0.9.95 + +* Wed Nov 22 2006 Rex Dieter 0.9.20-0.5.20060808svn +- .desktop Categories: -Application,Scientific,X-Fedora +ConsoleOnly + +* Tue Aug 29 2006 Rex Dieter 0.9.20-0.4.20060808svn +- fc6 respin + +* Tue Aug 08 2006 Rex Dieter 0.9.20-0.3.20060808svn +- ExcludeArch: ppc (bug #201739) +- %%ghost (x)emacs site-lisp bits (using hints from fedora-rpmdevtools) + +* Tue Aug 08 2006 Rex Dieter 0.9.20-0.2.20060808svn +- 20060808 snapshot + +* Mon Jul 24 2006 Rex Dieter 0.9.20-0.1.20060724svn +- 2006-07-15-0.9.20 + +* Wed Jul 12 2006 Rex Dieter 0.9.10-0.6.20060710svn +- 0.9.10 + +-* Mon Jul 10 2006 Rex Dieter 0.9.8-0.6.cvs20060327 +- BR: ncurses-devel + +* Fri May 05 2006 Rex Dieter 0.9.8-0.4.cvs20060327 +- 64bit patch (#188709) + +* Wed Apr 12 2006 Rex Dieter 0.9.8-0.3.cvs20060327 +- omit x86_64, for now (#188709) + +* Tue Apr 11 2006 Rex Dieter 0.9.8-0.2.cvs20060327 +- 0.9.8 (cvs, no tarball yet) +- drop -doc subpkg (in main now) + +* Mon Apr 10 2006 Rex Dieter 0.9.2-22 +- fix icon location (#188384) + +* Thu Mar 30 2006 Rex Dieter 0.9.2-21 +- really disable %%check (fails on fc5+ anyway) + +* Fri Jan 20 2006 Rex Dieter 0.9.2-20 +- .desktop: drop Category=Development +- app icon: follow icon spec +- drop -emacs subpkg (in main now) + +* Fri Sep 16 2005 Rex Dieter - 0.9.2-19 +- disable 'make check' (fc5/buildsystem error), besides, we get a + good consistency check when M2 builds all the doc examples. + +* Wed Sep 14 2005 Rex Dieter - 0.9.2-18 +- rebuild against gc-6.6 + +* Thu May 26 2005 Michael Schwendt - 0.9.2-17 +- rebuild (build system x86_64 repository access failed for 0.9.2-16) +- fix build for GCC 4 (#156223) + +* Thu Apr 7 2005 Michael Schwendt - 0.9.2-15 +- rebuilt + +* Mon Feb 21 2005 Rex Dieter 0:0.9.2-14 +- x86_64 issues (%%_libdir -> %%_prefix/lib ) +- remove desktop_file macro usage + +* Sat Oct 23 2004 Rex Dieter 0:0.9.2-0.fdr.13 +- BR: time (again) +- omit m2_dir/setup (not needed/wanted) + +* Mon Oct 18 2004 Rex Dieter 0:0.9.2-0.fdr.12 +- actually *apply* gcc34 patch this time. + +* Mon Oct 18 2004 Rex Dieter 0:0.9.2-0.fdr.11 +- gcc34 patch + +* Fri Oct 1 2004 Rex Dieter 0:0.9.2-0.fdr.10 +- explicit BR versions for gc-devel, libfac-devel, factory-devel + +* Tue Aug 10 2004 Rex Dieter 0:0.9.2-0.fdr.9 +- BR: time + +* Thu Jun 03 2004 Rex Dieter 0:0.9.2-0.fdr.8 +- .desktop: remove Terminaloptions to be desktop agnostic +- .desktop: Categories += Education;Math;Development (Devel only + added so it shows *somewhere* in gnome menus) + +* Tue Jun 01 2004 Rex Dieter 0:0.9.2-0.fdr.7 +- disable default 'make check' (util/screen fails on fc2) + +* Tue Mar 30 2004 Rex Dieter 0:0.9.2-0.fdr.6 +- desktop-file is now on by default +- use separate (not inline) .desktop file + +* Mon Jan 05 2004 Rex Dieter 0:0.9.2-0.fdr.5 +- fix BuildRequires: desktop-file-utils to satisfy rpmlint. +- put emacs files in emacs subdir too (to follow supplied docs) +- *really* nuke .cvsignore files +- fix desktop-file-install --add-cateagories usage + +* Tue Dec 23 2003 Rex Dieter 0:0.9.2-0.fdr.4 +- -emacs: use %%defattr +- -emacs: fix M2-init.el + +* Mon Nov 17 2003 Rex Dieter 0:0.9.2-0.fdr.3 +- update/simplify macros +- desktop_file support. +- emacs subpkg. +- relax Req's on subpkgs to just: Requires: %%name = %%epoch:%%version +- use non-versioned BuildRequires +- remove redundant BuildRequires: gmp-devel +- remove gc patch, no longer needed. +- delete/not-package a bunch of unuseful files. +- use --disable-strip when debug_package is in use. + +* Thu Nov 13 2003 Rex Dieter 0:0.9.2-0.fdr.2 +- no longer explictly Requires: emacs + +* Wed Nov 05 2003 Rex Dieter 0:0.9.2-0.fdr.1 +- missing Epoch: 0 + +* Fri Sep 12 2003 Rex Dieter 0.9.2-0.fdr.0 +- fedora'ize From fb8c264465981dc89d41efd36ef02faf7ab30893 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Wed, 19 Nov 2025 20:54:05 -0700 Subject: [PATCH 67/70] Version 1.25.11 - Add msolve support --- Macaulay2-1.25-c++17.patch | 11 - Macaulay2-1.25-default_make_targets.patch | 8 +- Macaulay2-1.25-optflags.patch | 16 +- Macaulay2-1.25-strstream.patch | 10 - Macaulay2.spec | 46 +- flint-3.1.3.patch | 17 - linbox-1.7.0.patch | 644 ---------------------- sources | 15 +- 8 files changed, 43 insertions(+), 724 deletions(-) delete mode 100644 Macaulay2-1.25-c++17.patch delete mode 100644 Macaulay2-1.25-strstream.patch delete mode 100644 flint-3.1.3.patch delete mode 100644 linbox-1.7.0.patch diff --git a/Macaulay2-1.25-c++17.patch b/Macaulay2-1.25-c++17.patch deleted file mode 100644 index 7c1cc08..0000000 --- a/Macaulay2-1.25-c++17.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- M2/configure.ac -+++ M2/configure.ac -@@ -262,7 +262,7 @@ AC_SUBST(M2_CFLAGS) - AC_SUBST(M2_CXXFLAGS) - - dnl Fix standards, apply everywhere --CXXFLAGS="-std=gnu++14 $CXXFLAGS" -+CXXFLAGS="-std=gnu++17 $CXXFLAGS" - CFLAGS="-std=gnu11 $CFLAGS" - - AC_PROG_CC() # set CFLAGS before this diff --git a/Macaulay2-1.25-default_make_targets.patch b/Macaulay2-1.25-default_make_targets.patch index 3f97dc6..3daf8c7 100644 --- a/Macaulay2-1.25-default_make_targets.patch +++ b/Macaulay2-1.25-default_make_targets.patch @@ -1,12 +1,12 @@ ---- M2/Macaulay2/Makefile.in.orig 2025-05-15 13:11:03.000000000 -0600 -+++ M2/Macaulay2/Makefile.in 2025-05-27 07:06:53.335036043 -0600 +--- M2/Macaulay2/Makefile.in.orig 2025-11-14 04:03:48.000000000 -0700 ++++ M2/Macaulay2/Makefile.in 2025-11-14 13:59:26.630241856 -0700 @@ -3,8 +3,7 @@ VPATH = @srcdir@ include ../include/config.Makefile all: @pre_docdir@/COPYING-GPL-2 @pre_docdir@/COPYING-GPL-3 @pre_docdir@/LAYOUT --SUBDIRS = util c d e system bin m2 man packages editors \ +-SUBDIRS = c d e system bin m2 man packages editors \ - $(if $(filter html, @DOCUMENTATION@), html-check-links) tests -+SUBDIRS = util c d e system bin m2 man packages editors tests ++SUBDIRS = c d e system bin m2 man packages editors tests define do-in-subdirs $(foreach d,$(SUBDIRS), diff --git a/Macaulay2-1.25-optflags.patch b/Macaulay2-1.25-optflags.patch index 1210bda..5c93b1c 100644 --- a/Macaulay2-1.25-optflags.patch +++ b/Macaulay2-1.25-optflags.patch @@ -1,6 +1,6 @@ ---- M2/configure.ac.orig 2025-05-15 13:11:03.000000000 -0600 -+++ M2/configure.ac 2025-05-27 10:03:26.646029450 -0600 -@@ -314,12 +314,12 @@ fi +--- M2/configure.ac.orig 2025-11-14 04:03:48.000000000 -0700 ++++ M2/configure.ac 2025-11-14 13:57:06.905244494 -0700 +@@ -318,12 +318,12 @@ fi ] if test "$OPTIMIZE" = yes @@ -19,19 +19,19 @@ fi AC_SUBST(GCCVERSION) ---- M2/libraries/factory/Makefile.in.orig 2025-05-15 13:11:03.000000000 -0600 -+++ M2/libraries/factory/Makefile.in 2025-05-27 10:06:05.923689632 -0600 +--- M2/libraries/factory/Makefile.in.orig 2025-11-14 04:03:48.000000000 -0700 ++++ M2/libraries/factory/Makefile.in 2025-11-14 13:57:56.926954878 -0700 @@ -7,7 +7,7 @@ URL = https://macaulay2.com/Downloads/OtherSourceCode VERSION = 4.4.1 - #PATCHFILE = @abs_srcdir@/patch-$(VERSION) + PATCHFILE = @abs_srcdir@/patch-$(VERSION) -PRECONFIGURE = autoreconf -vif +PRECONFIGURE = sed -i 's/-g0 -O3 //' m4/flags.m4 && autoreconf -vif BUILDTARGET = all ftmpl_inst.o LIBRARIES = ftmpl_inst.o ---- M2/libraries/mpfr/Makefile.in.orig 2025-05-15 13:11:03.000000000 -0600 -+++ M2/libraries/mpfr/Makefile.in 2025-05-28 10:00:08.231129391 -0600 +--- M2/libraries/mpfr/Makefile.in.orig 2025-11-14 04:03:48.000000000 -0700 ++++ M2/libraries/mpfr/Makefile.in 2025-11-14 13:57:06.905816340 -0700 @@ -36,6 +36,7 @@ CONFIGOPTIONS += --disable-shared # endif diff --git a/Macaulay2-1.25-strstream.patch b/Macaulay2-1.25-strstream.patch deleted file mode 100644 index a451e15..0000000 --- a/Macaulay2-1.25-strstream.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- M2/Macaulay2/e/f4/f4.cpp.orig 2025-05-15 13:11:03.000000000 -0600 -+++ M2/Macaulay2/e/f4/f4.cpp 2025-05-27 14:07:27.737228269 -0600 -@@ -26,7 +26,6 @@ - #include // for stable_sort - #include // for swap, vector - #include // for atomic ints in gauss_reduce --#include - #include - - class RingElement; diff --git a/Macaulay2.spec b/Macaulay2.spec index e81b2f2..1fed78d 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -18,7 +18,7 @@ # We have to bundle the linbox package. It has global constructors that cause # the same problem as libfplll. -%global emacscommit 6d0db52505c524d02c2270059767644aea360fd0 +%global emacscommit 524968452e95d010769ece30092edaa09d1e814f %global emacsurl https://github.com/Macaulay2/M2-emacs %global emacsshort %(cut -b -7 <<< %{emacscommit}) %global m2url https://github.com/Macaulay2/M2 @@ -47,7 +47,7 @@ Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 -Version: 1.25.06 +Version: 1.25.11 Release: %autorelease # GPL-2.0-only OR GPL-3.0-only: @@ -173,7 +173,7 @@ Source20: etags.sh ## BUNDLED code # Normaliz must sometimes be bundled due to version differences %if ! %system_normaliz -%global normalizver 3.10.4 +%global normalizver 3.11.0 Source100: http://www.math.uiuc.edu/Macaulay2/Downloads/OtherSourceCode/normaliz-%{normalizver}.tar.gz Provides: bundled(normaliz) = %{normalizver} %endif @@ -184,7 +184,7 @@ Source101: https://www.mpfr.org/mpfr-%{mpfrver}/mpfr-%{mpfrver}.tar.gz Provides: bundled(mpfr) = %{mpfrver} # FLINT is bundled because it must be linked with the specially-built MPFR -%global flintver 3.2.2 +%global flintver 3.3.1 Source102: https://github.com/flintlib/flint/archive/v%{flintver}/flint-%{flintver}.tar.gz Provides: bundled(flint) = %{flintver} @@ -194,29 +194,31 @@ Source103: https://www.singular.uni-kl.de/ftp/pub/Math/Factory/factory-%{factory Provides: bundled(factory) = %{factoryver} # LINBOX is bundled because it introduces static global objects -%global linboxver 1.7.0 +%global linboxver 1.7.1 Source104: https://github.com/linbox-team/linbox/releases/download/v%{linboxver}/linbox-%{linboxver}.tar.gz Provides: bundled(linbox) = %{linboxver} ## PATCHES FOR BUNDLED code -# This is a conglomeration of all current patches for the Fedora linbox package -Source200: linbox-1.7.0.patch +# No patches ## FAKE library tarballs that convince Macaulay2 to use the system versions Source300: frobby_v0.9.5.tar.gz Source301: cddlib-094m.tar.gz # lapack Source302: v3.12.1.tar.gz -Source303: 4ti2-1.6.10.tar.gz +Source303: 4ti2-1.6.13.tar.gz Source304: fplll-5.5.0.tar.gz Source305: gfan0.6.2.tar.gz -Source306: givaro-4.2.0.tar.gz +Source306: givaro-4.2.1.tar.gz Source307: lrslib-073.tar.gz Source308: TOPCOM-1.1.2.tar.gz Source309: cohomCalg-0.32.tar.gz Source310: glpk-5.0.tar.gz Source311: Csdp-6.2.0.tgz -Source312: mpsolve-3.2.1.tar.gz +Source312: mpsolve-3.2.3.tar.gz +# msolve +%global msolvever 0.9.2 +Source313: v%{msolvever}.tar.gz # let Fedora optflags override the defaults Patch: %{name}-1.25-optflags.patch @@ -228,10 +230,6 @@ Patch: %{name}-1.25-default_make_targets.patch Patch: %{name}-1.17-configure.patch # Fix LTO warnings about mismatched declarations and definitions Patch: %{name}-1.18-lto.patch -# Avoid use of the deprecated strstream C++ header -Patch: %{name}-1.25-strstream.patch -# Move to C++17 for gtest 1.17.0 -Patch: %{name}-1.25-c++17.patch BuildRequires: 4ti2 BuildRequires: appstream @@ -283,7 +281,6 @@ BuildRequires: msolve BuildRequires: msolve-devel BuildRequires: nauty BuildRequires: normaliz -BuildRequires: ntl-devel BuildRequires: ocl-icd-devel BuildRequires: pari-devel BuildRequires: pkgconfig(bdw-gc) >= 8.2.6 @@ -304,6 +301,7 @@ BuildRequires: pkgconfig(mathicgb) BuildRequires: pkgconfig(memtailor) BuildRequires: pkgconfig(mpfi) BuildRequires: pkgconfig(ncurses) +BuildRequires: pkgconfig(ntl) BuildRequires: pkgconfig(qd) BuildRequires: pkgconfig(readline) BuildRequires: pkgconfig(tbb) @@ -382,6 +380,9 @@ tar -C Macaulay2/editors/emacs --strip-components=1 -xzf %{SOURCE1} install -p -m755 %{SOURCE20} ./etags +## TODO: Remove this when Fedora moves to normaliz 3.11.0 +sed -i 's/3\.11\.0/3.10.5/' libraries/normaliz/Makefile.in + ## bundled code %if ! %system_normaliz install -p -m644 %{SOURCE100} BUILD/tarfiles/ @@ -400,13 +401,12 @@ sed -e 's,--disable-shared,& --disable-arch --with-blas-include=%{_includedir}/f -e 's/-pedantic-errors/& -fno-strict-aliasing/' \ -e "s,PRECONFIGURE.*,& \&\& sed -i 's/openblas/flexiblas/' configure," \ -i libraries/flint/Makefile.in -cp -p %{SOURCE200} libraries/linbox/patch-%{linboxver} -sed -i 's/^#\(PATCHFILE\)/\1/' libraries/linbox/Makefile.in ## fake library tarballs install -p -m644 %{SOURCE300} %{SOURCE301} %{SOURCE302} %{SOURCE303} \ %{SOURCE304} %{SOURCE305} %{SOURCE306} %{SOURCE307} %{SOURCE308} \ - %{SOURCE309} %{SOURCE310} %{SOURCE311} %{SOURCE312} BUILD/tarfiles/ + %{SOURCE309} %{SOURCE310} %{SOURCE311} %{SOURCE312} %{SOURCE313} \ + BUILD/tarfiles/ sed -i '/PRECONFIGURE/d' libraries/{4ti2,cddlib,givaro,normaliz,topcom}/Makefile.in sed -i '/PATCHFILE/d' libraries/{csdp,frobby,gfan,givaro,mpsolve,normaliz,topcom}/Makefile.in sed -i '/INSTALLCMD/,/stdinc/d' libraries/frobby/Makefile.in @@ -444,11 +444,6 @@ sed -e 's/BUILD_cddlib=yes/BUILD_cddlib=no/' \ -e 's,\$added_fclibs != yes,"$added_fclibs" != yes,' \ -i configure.ac -# Avoid obsolescence warnings -sed -i 's/egrep/grep -E/g' Makefile.in Macaulay2/bin/Makefile.in \ - Macaulay2/tests/Makefile{,.test}.in libraries/Makefile.library.in -sed -i 's/fgrep/grep -F/g' Macaulay2/util/linkexec-alternative - # Do not try to download tarballs sed -i '/^fetch: download-enabled/d' libraries/Makefile.library.in @@ -510,6 +505,11 @@ for fil in $(grep -Erl -e '-lfplll|-lgivaro' .); do rm -f $fil.orig done +# Do not try to checkout submodules with git +mkdir -p BUILD/%{_target_platform}/libraries/{flint,givaro} +touch BUILD/%{_target_platform}/libraries/{flint,givaro}/.submodule-updated + +# Build make -C BUILD/%{_target_platform} VERBOSE=true Verbose=true IgnoreExampleErrors=true # log errors diff --git a/flint-3.1.3.patch b/flint-3.1.3.patch deleted file mode 100644 index 932be7b..0000000 --- a/flint-3.1.3.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- flint-3.1.3/src/flint.h.in.orig -+++ flint-3.1.3/src/flint.h.in -@@ -141,12 +141,10 @@ typedef struct __FLINT_FILE FLINT_FILE; - # define FLINT_CONSTANT_P(x) 0 - #endif - --#if defined(__cplusplus) -+#if defined(__cplusplus) || ( __STDC_VERSION__ >= 202300L ) - # define FLINT_NORETURN [[noreturn]] --#elif __STDC_VERSION__ < 202300L --# define FLINT_NORETURN _Noreturn - #else --# define FLINT_NORETURN noreturn -+# define FLINT_NORETURN _Noreturn - #endif - - #if FLINT_USES_TLS diff --git a/linbox-1.7.0.patch b/linbox-1.7.0.patch deleted file mode 100644 index 74da7d0..0000000 --- a/linbox-1.7.0.patch +++ /dev/null @@ -1,644 +0,0 @@ ---- linbox-1.7.0/linbox/algorithms/gauss/gauss-nullspace.inl.orig 2020-09-10 03:26:43.000000000 -0600 -+++ linbox-1.7.0/linbox/algorithms/gauss/gauss-nullspace.inl 2025-02-18 20:18:35.488279051 -0700 -@@ -2,7 +2,7 @@ - * Copyright (C) LinBox 2008 - * - * Written by Jean-Guillaume Dumas -- * Time-stamp: <27 Aug 20 15:17:09 Jean-Guillaume.Dumas@imag.fr> -+ * Time-stamp: <26 Jan 24 16:05:55 Jean-Guillaume.Dumas@imag.fr> - * - * - * ========LICENCE======== -@@ -104,11 +104,11 @@ namespace LinBox - - Permutation P(field(),(int)Nj); - -- // A.write( std::cerr << "A:=", Tag::FileFormat::Maple ) << ';' << std::endl; -+// A.write( std::cerr << "A:=", Tag::FileFormat::Maple ) << ';' << std::endl; - this->InPlaceLinearPivoting(Rank, Det, A, P, Ni, Nj ); - -- // P.write( std::cerr << "P:=", Tag::FileFormat::Maple ) << ';' << std::endl; -- // A.write( std::cerr << "Ua:=", Tag::FileFormat::Maple ) << ';' << std::endl; -+// P.write( std::cerr << "P:=", Tag::FileFormat::Maple ) << ';' << std::endl; -+// A.write( std::cerr << "Ua:=", Tag::FileFormat::Maple ) << ';' << std::endl; - - for(size_t i=0; i< Ni; ++i) { - if (A[i].size() == 0) { -@@ -123,7 +123,7 @@ namespace LinBox - } - } - -- // A.write( std::cerr << "Ub:=", Tag::FileFormat::Maple ) << ';' << std::endl; -+// A.write( std::cerr << "Ub:=", Tag::FileFormat::Maple ) << ';' << std::endl; - - return this->nullspacebasis(x, Rank, A, P); - } ---- linbox-1.7.0/linbox/blackbox/apply.h.orig 2021-12-13 13:01:21.000000000 -0700 -+++ linbox-1.7.0/linbox/blackbox/apply.h 2025-02-18 20:17:28.073199632 -0700 -@@ -593,8 +593,10 @@ namespace LinBox - */ - int rclen = (int)num_chunks*2 + 5; - -- unsigned char* combined = new unsigned char[(size_t)rc*_n*(size_t)rclen]; -- memset(combined, 0, (size_t)rc*_n*(size_t)rclen); -+ // https://github.com/linbox-team/linbox/issues/304#issuecomment-1766621021 -+ size_t combined_size = (size_t)rc*_n*(size_t)rclen + 1; -+ unsigned char* combined = new unsigned char[combined_size]; -+ memset(combined, 0, combined_size); - - //order from major index to minor: combining index, component of sol'n, byte - //compute a product (chunk times x) for each chunk ---- linbox-1.7.0/linbox/matrix/matrixdomain/opencl-domain.h.orig 2021-12-10 07:36:06.000000000 -0700 -+++ linbox-1.7.0/linbox/matrix/matrixdomain/opencl-domain.h 2025-02-18 20:17:41.112021598 -0700 -@@ -208,8 +208,8 @@ namespace LinBox{ - * @param j Column index of entry, 0...coldim() - 1 - * @param a_ij Element to set - */ -- const Element& setEntry(size_t i, size_t j, const Element& a_ij){ -- return _Mat->setEntry(_r0 + i, _c0 + j, a_ij); -+ const void setEntry(size_t i, size_t j, const Element& a_ij){ -+ _Mat->setEntry(_r0 + i, _c0 + j, a_ij); - } - - /** Get a writeable reference to an entry in the matrix. ---- linbox-1.7.0/linbox/matrix/sparsematrix/sparse-ell-matrix.h.orig 2020-06-26 09:09:12.000000000 -0600 -+++ linbox-1.7.0/linbox/matrix/sparsematrix/sparse-ell-matrix.h 2025-02-18 20:18:35.488279051 -0700 -@@ -1210,10 +1210,10 @@ namespace LinBox - _colid_beg = iter._colid_beg ; - _colid_it = iter._colid_it ; - _data_it = iter._data_it ; -- _data_beg = iter._data_beg ; -- _data_end = iter._data_end ; -- _field = iter._field ; -- _ld = iter._ld ; -+ const_cast(_data_beg) = iter._data_beg ; -+ const_cast(_data_end) = iter._data_end ; -+ const_cast(_field) = iter._field ; -+ const_cast(ld) = iter._ld ; - _row = iter._row ; - - return *this; ---- linbox-1.7.0/linbox/matrix/sparsematrix/sparse-ellr-matrix.h.orig 2020-06-26 09:09:12.000000000 -0600 -+++ linbox-1.7.0/linbox/matrix/sparsematrix/sparse-ellr-matrix.h 2025-02-18 20:18:35.488279051 -0700 -@@ -1102,11 +1102,11 @@ namespace LinBox - _Iterator &operator = (const _Iterator &iter) - { - _data_it = iter._data_it ; -- _data_beg = iter._data_beg ; -- _data_end = iter._data_end ; -- _field = iter._field ; -- _rowid = iter._rowid; -- _ld = iter._ld ; -+ const_cast(_data_beg) = iter._data_beg ; -+ const_cast(_data_end)= iter._data_end ; -+ const_cast(_field) = iter._field ; -+ const_cast&>(_rowid) = iter._rowid; -+ const_cast(ld) = iter._ld ; - _row = iter._row ; - - return *this; -@@ -1252,10 +1252,10 @@ namespace LinBox - _colid_beg = iter._colid_beg ; - _colid_it = iter._colid_it ; - _data_it = iter._data_it ; -- _data_beg = iter._data_beg ; -- _data_end = iter._data_end ; -- _field = iter._field ; -- _ld = iter._ld ; -+ const_cast(_data_beg) = iter._data_beg ; -+ const_cast(_data_end) = iter._data_end ; -+ const_cast(_field) = iter._field ; -+ const_cast(ld)= iter._ld ; - _row = iter._row ; - - return *this; ---- linbox-1.7.0/linbox/matrix/sparsematrix/sparse-tpl-matrix-omp.h.orig 2020-06-26 09:09:12.000000000 -0600 -+++ linbox-1.7.0/linbox/matrix/sparsematrix/sparse-tpl-matrix-omp.h 2025-02-18 20:19:35.886454322 -0700 -@@ -318,9 +318,9 @@ class SparseMatrixelt, v_p->elt); - } - }; ---- linbox-1.7.0/linbox/ring/ntl/ntl-lzz_pe.h.orig 2021-12-13 13:01:21.000000000 -0700 -+++ linbox-1.7.0/linbox/ring/ntl/ntl-lzz_pe.h 2025-02-18 20:18:35.488279051 -0700 -@@ -96,18 +96,18 @@ namespace LinBox - NTL::zz_pE::init(irredPoly); - _f = irredPoly; - } -- -+ - NTL_zz_pE_Initialiser( const Integer & p, const NTL::zz_pX & f) { - NTL::zz_p::init((int64_t) p); - NTL::zz_pE::init(f); - _f = f; - } -- -+ - NTL_zz_pE_Initialiser(const NTL::zz_pX &f) { - NTL::zz_pE::init(f); - _f = f; - } -- -+ - const NTL::zz_pX& modulus() const { - return _f; - } -@@ -143,22 +143,22 @@ namespace LinBox - NTL_zz_pE (const integer &p, const integer &k) : - NTL_zz_pE_Initialiser(p,k),Father_t () - { -- init(const_cast(zero), 0); -- init(const_cast(one), 1); -- init(const_cast(mOne), p-1); -+ init(const_cast(zero), 0); -+ init(const_cast(one), 1); -+ init(const_cast(mOne), p-1); - } -- -+ - NTL_zz_pE (const integer &p, const NTL::zz_pX &f) : - NTL_zz_pE_Initialiser(p,f), Father_t() - { - init(const_cast(zero), 0); -- init(const_cast(one), 1); -- init(const_cast(mOne), p-1); -+ init(const_cast(one), 1); -+ init(const_cast(mOne), p-1); - } -- -+ - NTL_zz_pE(const NTL_zz_pE &F) : -- NTL_zz_pE_Initialiser(F.modulus()), Father_t(), -- zero(NTL::to_zz_pE(0)), one(NTL::to_zz_pE(1)), mOne(-one) -+ NTL_zz_pE_Initialiser(F.modulus()), Father_t(), -+ zero(NTL::to_zz_pE(0)), one(NTL::to_zz_pE(1)), mOne(-one) - { - } - -@@ -182,15 +182,15 @@ namespace LinBox - - bool isUnit (const Element& x) const - { -- if (isZero(x)) { -- return false; -- } -- -- NTL::zz_pX g, tmp; -- tmp = NTL::conv(x); -- NTL::GCD(g, tmp, modulus()); -- -- return g == 1; -+ if (isZero(x)) { -+ return false; -+ } -+ -+ NTL::zz_pX g, tmp; -+ tmp = NTL::conv(x); -+ NTL::GCD(g, tmp, modulus()); -+ -+ return g == 1; - } - - bool isMOne (const Element& x) const -@@ -207,7 +207,9 @@ namespace LinBox - return f; - } - -- Element & init(Element & x, integer n = 0) const -+ Element & init(Element & x) const { return x; } -+ -+ Element & init(Element & x, integer n) const - { // assumes n >= 0. - int e = exponent(); - n %= cardinality(); -@@ -215,14 +217,14 @@ namespace LinBox - //write(std::cout << "init-ed ", x) << std::endl; - return x; - } -- -+ - // documentation of NTL::conv: - // http://www.shoup.net/ntl/doc/conversions.txt - // XXX = long, ZZ, ZZ_p, ZZ_pE, ZZ_pX - template - Element &init(Element &x, const XXX &y) const { -- x = NTL::conv(y); -- return x; -+ x = NTL::conv(y); -+ return x; - } - - integer & convert(integer & x, const Element & y) const -@@ -279,81 +281,80 @@ namespace LinBox - x=one/x; - return x; - } -- -+ - Element& div(Element &x, const Element &y, const Element &z) const { -- NTL::zz_pX g, zx; -- conv(zx, z); -- NTL::GCD(g, zx, modulus()); -- -- NTL::zz_pE zg; -- conv(zg, zx / g); -- x = NTL::conv(NTL::conv(y) / g); -- x /= zg; -- -- return x; -+ NTL::zz_pX g, zx; -+ conv(zx, z); -+ NTL::GCD(g, zx, modulus()); -+ -+ NTL::zz_pE zg; -+ conv(zg, zx / g); -+ x = NTL::conv(NTL::conv(y) / g); -+ x /= zg; -+ -+ return x; - } -- -+ - Element& divin(Element &x, const Element &y) const { -- Element r; -- div(r, x, y); -- return x = r; -+ Element r; -+ div(r, x, y); -+ return x = r; - } - - bool isDivisor(const Element &x, const Element &y) const { -- if (isZero(y)) { -- return false; -- } -- -- if (isUnit(y)) { -- return true; -- } -- -- NTL::zz_pX a, b; -- conv(a, x); -- conv(b, y); -- -- NTL::zz_pX ga, gb; -- NTL::GCD(ga, a, modulus()); -- NTL::GCD(gb, b, modulus()); -- -- NTL::zz_pX r; -- r = ga % gb; -- return isZero(NTL::conv(r)); -+ if (isZero(y)) { -+ return false; -+ } -+ -+ if (isUnit(y)) { -+ return true; -+ } -+ -+ NTL::zz_pX a, b; -+ conv(a, x); -+ conv(b, y); -+ -+ NTL::zz_pX ga, gb; -+ NTL::GCD(ga, a, modulus()); -+ NTL::GCD(gb, b, modulus()); -+ NTL::zz_pX r; -+ r = ga % gb; -+ return isZero(NTL::conv(r)); - } -- -+ - Element& gcd(Element &g, const Element &a, const Element &b) const { - NTL::zz_pX r1, r2, x, y; - conv(x, a); - conv(y, b); -- -+ - NTL::GCD(r1, x, modulus()); - NTL::GCD(r2, y, r1); -- -+ - return g = NTL::conv(r2); - } -- -+ - Element& gcdin(Element &a, const Element &b) const { - NTL::zz_pE g; - gcd(g, a, b); - return a = g; - } -- -+ - Element& dxgcd(Element &g, Element &s, Element &t, Element &u, Element &v, const Element &a, const Element &b) const { - NTL::zz_pX gx, sx, tx, ux, vx, ax, bx; - conv(ax, a); - conv(bx, b); -- -+ - NTL::XGCD(gx, sx, tx, ax, bx); -- -+ - ux = ax / gx; - vx = bx / gx; -- -+ - conv(g, gx); - conv(s, sx); - conv(t, tx); - conv(u, ux); - conv(v, vx); -- -+ - return g; - } - -@@ -364,12 +365,12 @@ namespace LinBox - x=NTL::to_zz_pE(tmp); - return is; - } -- -+ - std::ostream& write( std::ostream& os ) const - { - return os << "Polynomial quotient ring using NTL::zz_pE"; - } -- -+ - std::ostream& write( std::ostream& os, const Element& x) const { - os << x; - return os; -@@ -429,7 +430,7 @@ namespace LinBox - uint64_t _seed; - const NTL_zz_pE& _ring; - }; // class UnparametricRandIters -- -+ - } // LinBox - - #endif //__LINBOX_ntl_lzz_pe_H ---- linbox-1.7.0/linbox/ring/ntl/ntl-lzz_p.h.orig 2021-12-13 13:01:21.000000000 -0700 -+++ linbox-1.7.0/linbox/ring/ntl/ntl-lzz_p.h 2025-02-18 20:18:35.488279051 -0700 -@@ -85,7 +85,7 @@ namespace Givaro - * @param x reference to Integer to contain output (reference returned). - * @param y constant reference to field element. - */ -- template <> -+ template <> - Integer& Caster(Integer& x, const NTL::zz_p& y) - { - return x = int64_t(rep(y)); -@@ -130,7 +130,7 @@ namespace LinBox - typedef NTL::zz_p Element ; - typedef Givaro::UnparametricOperations Father_t ; - typedef UnparametricRandIter RandIter; -- -+ - const Element zero,one,mOne ; - - -@@ -145,6 +145,11 @@ namespace LinBox - ,zero( NTL::to_zz_p(0)),one( NTL::to_zz_p(1)),mOne(-one) - {} - -+ Element &init (Element &x) const -+ { -+ return x = NTL::to_zz_p(0); -+ } -+ - Element& init(Element& x, const double& y) const - { - double z = fmod(y,(double)Element::modulus()); -@@ -153,7 +158,7 @@ namespace LinBox - return x = NTL::to_zz_p(static_cast(z)); //rounds towards 0 - } - -- Element &init (Element &x, const integer &y=0) const -+ Element &init (Element &x, const integer &y) const - { - NTL::ZZ tmp= NTL::to_ZZ(std::string(y).data()); - return x = NTL::to_zz_p(tmp); ---- linbox-1.7.0/linbox/ring/ntl/ntl-zz_px.h.orig 2020-06-26 09:09:12.000000000 -0600 -+++ linbox-1.7.0/linbox/ring/ntl/ntl-zz_px.h 2025-02-18 20:18:35.488279051 -0700 -@@ -104,6 +104,12 @@ namespace LinBox - ,_CField(cf) - {} - -+ /** Initialize p to 0 */ -+ Element& init( Element& p ) const -+ { -+ return p = 0; -+ } -+ - /** Initialize p to the constant y (p = y*x^0) */ - template - Element& init( Element& p, const ANY& y ) const ---- linbox-1.7.0/linbox/vector/blas-subvector.h.orig 2020-09-10 03:26:43.000000000 -0600 -+++ linbox-1.7.0/linbox/vector/blas-subvector.h 2025-02-18 20:19:06.510855483 -0700 -@@ -1,6 +1,6 @@ - /* linbox/matrix/blas-vector.h - * Copyright (C) 2013 the LinBox group -- * 2019 Pascal Giorgi -+ * 2019 Pascal Giorgi - * - * Written by : - * Pascal Giorgi pascal.giorgi@lirmm.fr -@@ -45,7 +45,7 @@ namespace LinBox { - // forward declaration - template - class BlasVector; -- -+ - - template - class VectorEltPointer { -@@ -61,7 +61,7 @@ namespace LinBox { - typedef typename _Vector::Storage::const_reference reference; - using Element=const typename _Vector::Field::Element; - }; -- -+ - template - class BlasSubvector { - -@@ -88,7 +88,7 @@ namespace LinBox { - typedef std::reverse_iterator const_reverse_iterator; - - protected: -- pointer _ptr; -+ pointer _ptr; - size_t _size; - size_t _inc; - Field const*_field; -@@ -101,7 +101,7 @@ namespace LinBox { - ////////////////// - - BlasSubvector(){} -- -+ - /** Constructor from an existing @ref BlasVector and dimensions. - * \param V Pointer to @ref BlasVector of which to construct subvector - * \param beg Starting idx -@@ -110,7 +110,7 @@ namespace LinBox { - */ - BlasSubvector (vectorType &V, size_t beg, size_t inc, size_t dim) : - _ptr(V.getPointer()+beg), _size(dim), _inc(inc), _field(&V.field()) {} -- -+ - /** Constructor from an existing @ref BlasSubvector and dimensions. - * \param V Pointer to @ref DenseSubector of which to construct subvector - * \param beg Starting idx -@@ -118,9 +118,9 @@ namespace LinBox { - * \param inc distance between two element - */ - BlasSubvector (Self_t &V, size_t beg, size_t inc, size_t dim) : -- _ptr(V.data()+beg), _size(dim), _inc(inc), _field(&V.field()) {} -+ _ptr(V.getPointer()+beg), _size(dim), _inc(inc), _field(&V.field()) {} -+ - -- - /** Constructor from an existing @ref BlasVector - * \param V Pointer to @ref BlasVector of which to construct submatrix - */ -@@ -132,17 +132,17 @@ namespace LinBox { - */ - BlasSubvector (const Field& F, pointer ptr, size_t inc, size_t dim) : - _ptr(ptr), _size(dim), _inc(inc), _field(&F) {} -- -- -+ -+ - - BlasSubvector (const Field& F, std::vector& v) : -- _ptr(v.data()), _size(v.size()), _inc(1), _field(&F) -+ _ptr(v.data()), _size(v.size()), _inc(1), _field(&F) - { - std::cerr<<"WARNING "<<__LINE__<<" ("<<__FILE__<<") : creating a BlasSubvector from a std::vector -> MUST BE DEPRECATED"< - Self_t& copy(const Vect& A){ -- assert(_size == A.size()); -+ assert(_size == A.size()); - auto it=A.begin(); auto jt=begin(); - for( ; it!=A.end();++it,++jt) - field().assign(*jt,*it); - return *this; - } -- -+ - //! Rebind operator - template::other> - struct rebind { - typedef BlasVector<_Tp1, _Rep2> other; -- -+ - void operator() (other & Ap, const Self_t& A) { - typedef typename Self_t::const_iterator ConstSelfIterator ; - typedef typename other::iterator OtherIterator ; -@@ -180,14 +180,14 @@ namespace LinBox { - } - }; - -- -+ - - ///////////////// - // ACCESSORS // - ///////////////// - - const Field& field() const { return *_field;} -- -+ - // dimension of the vector - size_t size() const{ return _size; } - size_t max_size() const{ return _size; } -@@ -203,14 +203,14 @@ namespace LinBox { - * @return the inc value of the subvector - */ - size_t getInc() const {return _inc;} -- -+ - - void setEntry (size_t i, const Element &a_i){ field().assign(_ptr[i],a_i); } -- -+ - reference refEntry (size_t i){ return _ptr[i]; } - - const_reference getEntry (size_t i) const { return _ptr[i]; } -- -+ - Element& getEntry (Element &x, size_t i) const{ return field().assign(x,_ptr[i]); } - - // write -@@ -226,7 +226,7 @@ namespace LinBox { - case (Tag::FileFormat::Maple) : - { - os << '<' ; -- for(size_t i=0; i<_size; i++){ -+ for(size_t i=0; i<_size; i++){ - field().write(os, *(_ptr+_inc*i)); - if (i != _size-1) - os << ',' ; -@@ -237,7 +237,7 @@ namespace LinBox { - return os << "not implemented" ; - } - } -- -+ - //read - std::istream &read ( std::istream &is, Tag::FileFormat fmt = Tag::FileFormat::Pretty ) { - return is; -@@ -275,10 +275,10 @@ namespace LinBox { - const_reference front (void) const { return _ptr[0];} - reference back (void) { return _ptr[(_size-1)*_inc];} - const_reference back (void) const { return _ptr[(_size-1)*_inc];} -- -+ - bool empty() const {return (_size==0);} - }; -- -+ - template - std::ostream& operator<< (std::ostream & os, const BlasSubvector & V) { - return V.write(os); -@@ -296,7 +296,7 @@ namespace LinBox { - - - -- -+ - } // LinBox - #endif - // Local Variables: ---- linbox-1.7.0/tests/test-subvector.C.orig 2020-06-26 09:09:12.000000000 -0600 -+++ linbox-1.7.0/tests/test-subvector.C 2025-02-18 20:19:06.510855483 -0700 -@@ -752,6 +752,12 @@ static bool testSubvector3(Field &F, siz - //vector ww(3, 77); - w = ww; - report << ww << std::endl; -+ -+ report << "Constructing subvectors from subvector: "; -+ subVector ww1(w, 0, 0, Length); -+ report << ww1 << std::endl; -+ -+ - #if 0 - report << "Constructing subvector from iterators: "; - Subvect www(w.begin(), w.end()); diff --git a/sources b/sources index d32f616..96f74cc 100644 --- a/sources +++ b/sources @@ -1,20 +1,21 @@ SHA512 (Macaulay2-icons.tar.xz) = 069aa0ad70a0253583b00091c094da9b79d2a2f0f2d38aa97f543081f5df5fd3b5a9e1463febd6947c3151cf01844133174c7372f57e158c2d3faba6baed5d1d -SHA512 (Macaulay2-1.25.06.tar.gz) = 4493fd9142ea78d3a30f289f7bd03666f646858798b93feb7c8a96669a6ef1a47b30914ba9be34af5b36d1623aba6c8394d795b6688b36ac1b7fbccb96e34fea -SHA512 (4ti2-1.6.10.tar.gz) = 0bdf73a8885fe03258a903f0bfb45b8271dcf755d8033b57b8d5620daba7fc25b51031ffb2c8609e40bc19508e07ba028de035d8c193caeffe6400457fc0e3e1 +SHA512 (Macaulay2-1.25.11.tar.gz) = 7ae9ced76fa17e37715165976348b0e93793a6fc9d6f6f46af4f54513e2e81be648d3f462d403af373dd7cc62a675a2f3c946b70668f9cabbe7b379e3b42adff +SHA512 (4ti2-1.6.13.tar.gz) = 3e6335e5e539594d121e8b38972e6d4e3aec51f8b6b617ae308200142c8f79407d5b64e7ef246aa47ee2b7cf4006647a860ea7e2fd498ca34d001470ec06b2f8 SHA512 (cddlib-094m.tar.gz) = d140d57391b1c963d68ca2e344fbda723a5077004bace322a18362fdc1fff8b50fdc4b598ca8cdf131158e07afc96c5d9aafd7abde082a9e241701e403310b9f SHA512 (cohomCalg-0.32.tar.gz) = b76d8de00b13a8fe8881222178247c5e99c15075c46290830f6c3afffb9dfc18af0d57f738ac5a0d7c00044db81b4465d1e0563c95f7f656a2440be5765c6818 SHA512 (Csdp-6.2.0.tgz) = 6f6c44abcb7b0e277f5a42a1e31acbd41c8fbdce0c1641982a48199fe1d922b28d86433d1a98ac71ae521bea04188a830c441db1e9d8eebf174debf501430e82 SHA512 (factory-4.4.1.tar.gz) = a6ebed7cc0dea06a40c596f8845194633b6175670119afc11cb93269940ff6866a270549b9796929c1cc216645d01386ddea455a07d9ea033ce937baa4a05dfe -SHA512 (flint-3.2.2.tar.gz) = 6856e617efb0369a3b90c8d3a7eb734cfad263c1450f1c2d92236d61294dd8e9c3da3769d10e28aa42d4340c979ad01ee665deef68c0666c7ef48d831e308c8b +SHA512 (flint-3.3.1.tar.gz) = c426655868fd104c7c9fb95ba1ed199f63168cfda6f2379ba7f249344fee32660a095f20ecf11666f47ee0c59e350213e16706ce13eb6c3cb41967f1eec81166 SHA512 (fplll-5.5.0.tar.gz) = ffeeeb55c2e4dccb9c7fd2753e49fa3514ae0c88a119131fa6281b213566813c481f95befe0acde344c8c032d8341ef1ec074cd66b130de4f8b8f6eb20f40613 SHA512 (frobby_v0.9.5.tar.gz) = 321da2c83ddd1e1364a2e97cdf69c9b7bc6d2a59583aeab93526030151222049bb7b7e32287e7575cab4d0d22593a92a1f926092b1ed8f9da6b4d68118371bdb SHA512 (gfan0.6.2.tar.gz) = 08a9cc543967771af959a506b79db5b55e0e4942e4170dad8691db35ef7d381d878e1ea6534a3cacc0f5d30ec31564ec94cc20b46792d06f18a3a8a3c0aac91d -SHA512 (givaro-4.2.0.tar.gz) = 8258507f4ac2643ab39d1802ec79cf24051e7a70e167fcee1362c1a8ac12f924e831ce24450055cea96a8824f34fa83ad344d240a55571f7d522787db16afdfc +SHA512 (givaro-4.2.1.tar.gz) = 9ab55e19d6c205832ddb8f712691b79ea7ae796848fb2cb73ff8fcd2fd3ce06ec0d2b86c3e1ba4a0b9992156777524b26e754615d7b9809daeab9ff284be5885 SHA512 (glpk-5.0.tar.gz) = 36bcba534ed69b0f5328f4626018359efe07f802322c0821db75c7d1935f760af8cb907189d7d7c5b2f134a8b6214ae747ca004acc4c5ceccf157f6fc311523d -SHA512 (linbox-1.7.0.tar.gz) = cb4e848186d1f6357f498d1e3bda6484b4c789c02440f9614a227a2ae206a31fb20b32be40bda74da3f2f8f981bbd58d80fc97c95499b5151bb06eafb867ef9e +SHA512 (linbox-1.7.1.tar.gz) = f13f607c4e7c4b6eb569d03007b96bc6ab4d57f520cfa557fda71c62eec43e23c24260c7495dbed9c39ddff18674c22eb72e43cff43fe7d0396f848f19df7595 SHA512 (lrslib-073.tar.gz) = f5d283c3c9bcc8ea83c1f6a0ce184202ccd0818987caaa7cf32fe8287cf8277802587f5001dc44878658c962c48fe6ae1250e9a522bb2bf0fa1d0ca8b84e1b9a -SHA512 (M2-emacs-6d0db52.tar.gz) = e0bc13093ad931c19673c1ea6adb279d6b7934cc38caf3d5359c6241e349b2d22695db6c35a9c7e12c943863f8923da25c9d4b4f35e0b7bffc52a9bdd376e402 +SHA512 (M2-emacs-5249684.tar.gz) = 11c59430232e206b70042f0d365174a80f613ac528c18275cafaf28db32c06be7afe535ee61b10810caa7b5a21023abb0bd0ce30ee2e31fcf56565c20551d8df SHA512 (mpfr-4.2.2.tar.gz) = 373c5ce2c9636e45685dfa94f45bc4f8f6c2c0512d634b9e065ec33cb29da727b3ea13cf23aff307c1da765a40064f0fd4a347a3849ebd97252984fc85a0a400 -SHA512 (mpsolve-3.2.1.tar.gz) = 8f0cb1be303767bf5a68c150df01c98f7f5e17bfaee685ea4cb9300c0dbf740069c774d647f141a4a1eb46fa54f23d9e75a800ce195cd522527c72e3c6aeed0f +SHA512 (mpsolve-3.2.3.tar.gz) = 27f3966f9ba6d96fd19551f574c4e917258f45f0f25c183b714a8a64a7fa9e4764c2466770dc78240ec431a745f3659c2acbff68ff1a9c89a81106eb25eb51fc SHA512 (TOPCOM-1.1.2.tar.gz) = 8f0d6dcfe5d83b260f671d4fd231a8e5a902668d2bf02d0977fbfa6a1d49e0ba3f1f51f2305267a4cbc0591c183c07642ef3d9613aae8f27f1832fe96ca90abb +SHA512 (v0.9.2.tar.gz) = 2d205f1b74c445059f3b4ad6af45b10fc2eff2a0d41b373f71199965237dea200342702d0a0b5027f0d7e323d89d3317a89ef9ebe9f00a7f6341c37b436360bb SHA512 (v3.12.1.tar.gz) = eedfbae0447a965da66fea6dcd1a561717faede85e0f2e19a794d3947f6b8b4649b3415786ceba65914755766fafc0c2ff4ba80dfd309230145f879e6b900284 From 8dcde7a520fe79f8b8ea710c12b3205bde590f7f Mon Sep 17 00:00:00 2001 From: Jerry James Date: Tue, 13 Jan 2026 21:35:44 -0700 Subject: [PATCH 68/70] Reflow the description text --- Macaulay2.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Macaulay2.spec b/Macaulay2.spec index 1fed78d..5d65215 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -362,8 +362,8 @@ ExcludeArch: %{ix86} %{power64} %description Macaulay 2 is a new software system devoted to supporting research in -algebraic geometry and commutative algebra written by Daniel R. Grayson -and Michael E. Stillman +algebraic geometry and commutative algebra written by Daniel R. Grayson and +Michael E. Stillman. %package common Summary: Common files for %{name} From 49c93575dba4848bbc07611b55e723c99cb48027 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Thu, 15 Jan 2026 02:03:22 +0000 Subject: [PATCH 69/70] Rebuilt for Boost 1.90 From 9add745d4ea03ab028e1029b43edefb1ee2483ce Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 16 Jan 2026 02:36:51 +0000 Subject: [PATCH 70/70] Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild