Date: Friday, October 23, 2015 @ 19:46:05 Author: arojas Revision: 144812
NTL 9.5 rebuild, update SageMath patches Modified: singular/trunk/PKGBUILD singular/trunk/ntl8.patch singular/trunk/templates.patch -----------------+ PKGBUILD | 6 +-- ntl8.patch | 105 +++++++++++++++++------------------------------------- templates.patch | 41 +++++++++++++++++++++ 3 files changed, 78 insertions(+), 74 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2015-10-23 17:25:53 UTC (rev 144811) +++ PKGBUILD 2015-10-23 17:46:05 UTC (rev 144812) @@ -5,7 +5,7 @@ pkgname=singular pkgver=3.1.7.p1 _majver=3-1-7 -pkgrel=10 +pkgrel=11 pkgdesc="Computer Algebra System for polynomial computations" arch=(i686 x86_64) url="http://www.singular.uni-kl.de/" @@ -16,8 +16,8 @@ "http://git.sagemath.org/sage.git/plain/build/pkgs/singular/patches/currring.patch") md5sums=('ce369519d1c5d07342722e78240ea044' 'b9177c00e95ee21b137984bade9fc481' - 'a267423f3b25f0b91853f9cf607974a7' - '38ff8896595626d657fd386ea9408419' + '8ca8ba06c846a8de189fff322d557705' + '2c028bbda467b437d5598ac07cd7211f' '1fe968092b5e98878cd9b47c7d9acc81') prepare() { Modified: ntl8.patch =================================================================== --- ntl8.patch 2015-10-23 17:25:53 UTC (rev 144811) +++ ntl8.patch 2015-10-23 17:46:05 UTC (rev 144812) @@ -1,84 +1,47 @@ ---- Singular-3-1-6/factory/NTLconvert.cc.orig 2012-12-19 14:01:16.000000000 -0700 -+++ Singular-3-1-6/factory/NTLconvert.cc 2015-01-12 20:00:00.000000000 -0700 -@@ -55,6 +55,63 @@ - NTL_CLIENT - #endif - -+// Needed explicit template instantiations for NTL 8.x.x -+template mat_zz_p::Mat(const mat_zz_p&); -+template mat_zz_pE::Mat(const mat_zz_pE&); -+ -+template class Vec<Pair<GF2X, long> >; -+template class Vec<Pair<GF2EX, long> >; -+template class Vec<Pair<zz_pX, long> >; -+template class Vec<Pair<zz_pEX, long> >; -+template class Vec<Pair<ZZ_pX, long> >; -+template class Vec<Pair<ZZ_pEX, long> >; -+template class Vec<Pair<ZZX, long> >; -+template class Vec<Vec<zz_p> >; -+template class Vec<Vec<zz_pE> >; -+template class Vec<zz_p>; -+template class Vec<zz_pEX>; -+ -+template long operator==<zz_p>(const vec_zz_p&, const vec_zz_p&); -+ -+template void BlockConstruct<Pair<GF2X, long> >(Pair<GF2X, long>* p, long n); -+template void BlockConstruct<Pair<GF2EX, long> >(Pair<GF2EX, long>* p, long n); -+template void BlockConstruct<Pair<zz_pX, long> >(Pair<zz_pX, long>* p, long n); -+template void BlockConstruct<Pair<zz_pEX, long> >(Pair<zz_pEX, long>* p, long n); -+template void BlockConstruct<Pair<ZZ_pX, long> >(Pair<ZZ_pX, long>* p, long n); -+template void BlockConstruct<Pair<ZZ_pEX, long> >(Pair<ZZ_pEX, long>* p, long n); -+template void BlockConstruct<Pair<ZZX, long> >(Pair<ZZX, long>* p, long n); -+template void BlockConstruct<Vec<zz_p> >(Vec<zz_p>* p, long n); -+template void BlockConstruct<Vec<zz_pE> >(Vec<zz_pE>* p, long n); -+template void BlockConstruct<zz_pEX>(zz_pEX* p, long n); -+ -+template void BlockConstructFromVec<Pair<GF2X, long> >(Pair<GF2X, long>* p, long n, const Pair<GF2X, long>* q); -+template void BlockConstructFromVec<Pair<GF2EX, long> >(Pair<GF2EX, long>* p, long n, const Pair<GF2EX, long>* q); -+template void BlockConstructFromVec<Pair<zz_pX, long> >(Pair<zz_pX, long>* p, long n, const Pair<zz_pX, long>* q); -+template void BlockConstructFromVec<Pair<zz_pEX, long> >(Pair<zz_pEX, long>* p, long n, const Pair<zz_pEX, long>* q); -+template void BlockConstructFromVec<Pair<ZZ_pX, long> >(Pair<ZZ_pX, long>* p, long n, const Pair<ZZ_pX, long>* q); -+template void BlockConstructFromVec<Pair<ZZ_pEX, long> >(Pair<ZZ_pEX, long>* p, long n, const Pair<ZZ_pEX, long>* q); -+template void BlockConstructFromVec<Pair<ZZX, long> >(Pair<ZZX, long>* p, long n, const Pair<ZZX, long>* q); -+template void BlockConstructFromVec<Vec<zz_p> >(Vec<zz_p>* p, long n, const Vec<zz_p>* q); -+template void BlockConstructFromVec<Vec<zz_pE> >(Vec<zz_pE>* p, long n, const Vec<zz_pE>* q); -+template void BlockConstructFromVec<zz_p>(zz_p* p, long n, const zz_p* q); -+template void BlockConstructFromVec<zz_pE>(zz_pE* p, long n, const zz_pE* q); -+template void BlockConstructFromVec<zz_pEX>(zz_pEX* p, long n, const zz_pEX* q); -+ -+template void BlockConstructFromObj<Pair<GF2X, long> >(Pair<GF2X, long>* p, long n, const Pair<GF2X, long>& q); -+template void BlockConstructFromObj<Pair<GF2EX, long> >(Pair<GF2EX, long>* p, long n, const Pair<GF2EX, long>& q); -+template void BlockConstructFromObj<Pair<zz_pX, long> >(Pair<zz_pX, long>* p, long n, const Pair<zz_pX, long>& q); -+template void BlockConstructFromObj<Pair<zz_pEX, long> >(Pair<zz_pEX, long>* p, long n, const Pair<zz_pEX, long>& q); -+template void BlockConstructFromObj<Pair<ZZ_pX, long> >(Pair<ZZ_pX, long>* p, long n, const Pair<ZZ_pX, long>& q); -+template void BlockConstructFromObj<Pair<ZZ_pEX, long> >(Pair<ZZ_pEX, long>* p, long n, const Pair<ZZ_pEX, long>& q); -+template void BlockConstructFromObj<Pair<ZZX, long> >(Pair<ZZX, long>* p, long n, const Pair<ZZX, long>& q); -+template void BlockConstructFromObj<Vec<zz_p> >(Vec<zz_p>* p, long n, const Vec<zz_p>& q); -+template void BlockConstructFromObj<Vec<zz_pE> >(Vec<zz_pE>* p, long n, const Vec<zz_pE>& q); -+template void BlockConstructFromObj<zz_pEX>(zz_pEX* p, long n, const zz_pEX& q); -+ -+template SmartPtr<GF2EInfoT> MakeSmart<GF2EInfoT, GF2X>(const GF2X &ptr); -+template SmartPtr<zz_pEInfoT> MakeSmart<zz_pEInfoT, zz_pX>(const zz_pX &ptr); -+template SmartPtr<ZZ_pInfoT> MakeSmart<ZZ_pInfoT, ZZ>(const ZZ &ptr); -+ - //////////////////////////////////////////////////////////////////////////////// - // NAME: convertFacCF2NTLZZpX // - // // -@@ -511,7 +568,7 @@ +From de688442dfe449992dc14a000bca0691ecc7e106 Mon Sep 17 00:00:00 2001 +From: Oleksandr Motsak <mot...@mathematik.uni-kl.de> +Date: Sat, 14 Mar 2015 16:58:01 +0100 +Subject: [PATCH] Fixing incompatibility with NTL8 + +--- + factory/NTLconvert.cc | 13 ++++++++++--- + 1 file changed, 10 insertions(+), 3 deletions(-) + +diff --git a/factory/NTLconvert.cc b/factory/NTLconvert.cc +index 41ce9b2..e32093d 100644 +--- a/factory/NTLconvert.cc ++++ b/factory/NTLconvert.cc +@@ -30,6 +30,7 @@ + #include <NTL/GF2EXFactoring.h> + #include <NTL/tools.h> + #include <NTL/mat_ZZ.h> ++#include <NTL/version.h> + #include "int_int.h" + #include <limits.h> + #include "NTLconvert.h" +@@ -500,8 +501,14 @@ convertZZ2CF (const ZZ & a) + return CanonicalForm(coeff_long); } else - { +- { - long sizeofrep= ((long *) a.rep) [1]; -+ long sizeofrep= ((long *) &a) [1]; ++ { ++ const long * rep = ++#if NTL_MAJOR_VERSION <= 6 ++ static_cast<long *>( a.rep ); ++#else ++ static_cast<long *>( a.rep.rep ); // what about NTL7? ++#endif ++ long sizeofrep= rep[1]; bool lessZero= false; if (sizeofrep < 0) { -@@ -529,7 +586,7 @@ +@@ -519,7 +526,7 @@ convertZZ2CF (const ZZ & a) cf_stringtemp_l= sizeofrep*sizeof(mp_limb_t)*2; cf_stringtemp= (unsigned char*) Alloc (cf_stringtemp_l); } - int cc= mpn_get_str (cf_stringtemp, 16, (mp_limb_t *) (((long *) (a.rep)) + 2), sizeofrep); -+ int cc= mpn_get_str (cf_stringtemp, 16, (mp_limb_t *) (((long *) &a) + 2), sizeofrep); ++ int cc= mpn_get_str (cf_stringtemp, 16, (mp_limb_t *) ((rep) + 2), sizeofrep); char* cf_stringtemp2; if (lessZero) Modified: templates.patch =================================================================== --- templates.patch 2015-10-23 17:25:53 UTC (rev 144811) +++ templates.patch 2015-10-23 17:46:05 UTC (rev 144812) @@ -17,3 +17,44 @@ -I. -I.. -I$(srcdir) -I${prefix} -I$(includedir) \ @FLINT_CFLAGS@ $(DEFS) $(CPPFLAGS) +diff -druN latest.orig/Singular/claptmpl.cc latest.new/Singular/claptmpl.cc +--- latest.orig/Singular/claptmpl.cc 2014-11-19 05:06:05.000000000 -0800 ++++ latest.new/Singular/claptmpl.cc 2014-11-21 08:58:02.514808678 -0800 +@@ -122,37 +122,3 @@ + template class std::list<PolyMinorValue>; + template class Cache<MinorKey, IntMinorValue>; + template class Cache<MinorKey, PolyMinorValue>; +- +-#ifdef HAVE_NTL +-#include<NTL/version.h> +-#if NTL_MAJOR_VERSION == 6 +- +-#include<NTL/tools.h> +-#include<NTL/lzz_pE.h> +-#include<NTL/lzz_pEX.h> +-#include<NTL/lzz_p.h> +-#include<NTL/vector.h> +-#include<NTL/pair.h> +-#include<NTL/GF2X.h> +-#include<NTL/GF2EX.h> +-#include<NTL/ZZ.h> +-#include<NTL/ZZX.h> +-#include<NTL/ZZ_pX.h> +-#ifdef NTL_CLIENT // in <NTL/tools.h>: using of name space NTL +-NTL_CLIENT +-#endif +-//template class Vec<zz_p>; +-//template class Vec<zz_pE>; +-template class Mat<zz_p>; +-template class Mat<zz_pE>; +-template class Mat<ZZ>; +-template class Vec<Pair<zz_pEX, long> >; +-template class Vec<Pair<GF2EX, long> >; +-//template class Vec<Pair<ZZX, long> >; +-//template class Vec<Pair<ZZ_pX, long> >; +-//template class Vec<Pair<GF2X, long> >; +-//template void swap<zz_pE>(Vec<zz_pE>&, Vec<zz_pE>&); +-//template long operator==<zz_p>(Vec<zz_p> const&, Vec<zz_p> const&); +-#endif +- +-#endif