The package rpms/Macaulay2.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/Macaulay2.git/commit/?id=0a0ed4ab...
https://src.fedoraproject.org/cgit/rpms/Macaulay2.git/commit/?id=15c2dabd....
Change:
+ExcludeArch: %{ix86} ppc64le
+ExcludeArch: %{ix86}
Thanks.
Full change:
============
commit 0a0ed4abf77ebbfe664af7acef641dce72b69547
Author: Jerry James <loganjerry(a)gmail.com>
Date: Sat Feb 24 11:36:16 2024 -0700
Disable ppc64le build until segfaults can be diagnosed
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 <loganjerry(a)gmail.com> - 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 <releng(a)fedoraproject.org> - 1.22-5
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
commit 15c2dabd0d0c70e5514c7127633acba67561e314
Author: Jerry James <loganjerry(a)gmail.com>
Date: Fri Feb 23 19:54:52 2024 -0700
Build the polymake and scip examples
- Recommend scip
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 <loganjerry(a)gmail.com> - 1.22-6
+- Build the polymake and scip examples
+- Recommend scip
+
* Mon Jan 22 2024 Fedora Release Engineering <releng(a)fedoraproject.org> - 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 <Jean-Guillaume.Dumas(a)imag.fr>
+- * Time-stamp: <27 Aug 20 15:17:09 Jean-Guillaume.Dumas(a)imag.fr>
++ * Time-stamp: <26 Jan 24 16:05:55 Jean-Guillaume.Dumas(a)imag.fr>
+ *
+ *
+ * ========LICENCE========
+@@ -104,11 +104,11 @@ namespace LinBox
+
+ Permutation<Field> 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_it>(_data_beg) = iter._data_beg ;
++ const_cast<data_it>(_data_end) = iter._data_end ;
++ const_cast<Field &>(_field) = iter._field ;
++ const_cast<size_t&>(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<element_iterator>(_data_beg) = iter._data_beg ;
++ const_cast<element_iterator>(_data_end)= iter._data_end ;
++ const_cast<Field &>(_field) = iter._field ;
++ const_cast<std::vector<size_t>&>(_rowid) = iter._rowid;
++ const_cast<size_t&>(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_it>(_data_beg) = iter._data_beg ;
++ const_cast<data_it>(_data_end) = iter._data_end ;
++ const_cast<Field &>(_field) = iter._field ;
++ const_cast<size_t&>(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<Element> Father_t ;
+ typedef UnparametricRandIter<NTL::zz_p> 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<long>(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<Element &>(zero), 0);
+- init(const_cast<Element &>(one), 1);
+- init(const_cast<Element &>(mOne), p-1);
++ init(const_cast<Element &>(zero), 0);
++ init(const_cast<Element &>(one), 1);
++ init(const_cast<Element &>(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<Element &>(zero), 0);
+- init(const_cast<Element &>(one), 1);
+- init(const_cast<Element &>(mOne), p-1);
++ init(const_cast<Element &>(one), 1);
++ init(const_cast<Element &>(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<NTL::zz_pX>(x);
+- NTL::GCD(g, tmp, modulus());
+-
+- return g == 1;
++ if (isZero(x)) {
++ return false;
++ }
++
++ NTL::zz_pX g, tmp;
++ tmp = NTL::conv<NTL::zz_pX>(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<class XXX>
+ Element &init(Element &x, const XXX &y) const {
+- x = NTL::conv<NTL::zz_pE>(y);
+- return x;
++ x = NTL::conv<NTL::zz_pE>(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::zz_pE>(NTL::conv<NTL::zz_pX>(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::zz_pE>(NTL::conv<NTL::zz_pX>(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<Element>(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<Element>(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<Element>(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 <class ANY>
+ Element& init( Element& p, const ANY& y ) const
+--
+2.43.0
+