Date: Wednesday, July 25, 2018 @ 11:04:27 Author: arojas Revision: 363374
Move NTL error handler out of libsingular so it doesn't conflict with Sage's one Added: singular/trunk/singular-ntl-error-handler.patch Modified: singular/trunk/PKGBUILD ----------------------------------+ PKGBUILD | 13 +++++- singular-ntl-error-handler.patch | 72 +++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+), 3 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2018-07-25 10:35:33 UTC (rev 363373) +++ PKGBUILD 2018-07-25 11:04:27 UTC (rev 363374) @@ -7,7 +7,7 @@ _patchver=2 pkgver=${_majver//-/.}.p${_patchver} #pkgver=${_majver//-/.} -pkgrel=6 +pkgrel=7 pkgdesc="Computer Algebra System for polynomial computations" arch=(x86_64) url="http://www.singular.uni-kl.de/" @@ -15,11 +15,18 @@ depends=(flint cddlib) # polymake makedepends=(doxygen python2) optdepends=('python2: Python interface') -source=("http://www.mathematik.uni-kl.de/ftp/pub/Math/Singular/SOURCES/$_majver/singular-${_majver//-/.}p${_patchver}.tar.gz") +source=("http://www.mathematik.uni-kl.de/ftp/pub/Math/Singular/SOURCES/$_majver/singular-${_majver//-/.}p${_patchver}.tar.gz" + singular-ntl-error-handler.patch) #source=("http://www.mathematik.uni-kl.de/ftp/pub/Math/Singular/SOURCES/$_majver/singular-${_majver//-/.}.tar.gz") -sha256sums=('8e1f67c0a940ae772231dc5f700ab2a1b08199be26d33323558fd08d629ea91f') +sha256sums=('8e1f67c0a940ae772231dc5f700ab2a1b08199be26d33323558fd08d629ea91f' + '2f318d9d712fc12e77c6d7e78a2cf6d4077f180c29789b4a3eb9f536056b8857') options=(!zipman) +prepare() { + cd singular-${_majver//-/.} + patch -p1 -i ../singular-ntl-error-handler.patch # Move NTL error handler out of libsingular so it doesn't conflict with Sage's one +} + build() { cd singular-${_majver//-/.} ./configure --prefix=/usr --libexecdir=/usr/lib Added: singular-ntl-error-handler.patch =================================================================== --- singular-ntl-error-handler.patch (rev 0) +++ singular-ntl-error-handler.patch 2018-07-25 11:04:27 UTC (rev 363374) @@ -0,0 +1,72 @@ +From 502cf86d0bb2a96715be6764774b64a69c1ca34c Mon Sep 17 00:00:00 2001 +From: Hans Schoenemann <han...@mathematik.uni-kl.de> +Date: Wed, 25 Jul 2018 11:03:32 +0200 +Subject: [PATCH] move error handler for factory,NTL to the non-libSingular + part + +(see forum: "NTL error handling", for SAGE) + +diff --git a/Singular/cntrlc.cc b/Singular/cntrlc.cc +index 622495490c..874a5deb79 100644 +--- a/Singular/cntrlc.cc ++++ b/Singular/cntrlc.cc +@@ -20,6 +20,14 @@ + #include "Singular/links/silink.h" + #include "Singular/links/ssiLink.h" + ++#ifdef HAVE_NTL ++#include <NTL/version.h> ++#include <NTL/tools.h> ++#ifdef NTL_CLIENT ++NTL_CLIENT ++#endif ++#endif ++ + /* undef, if you don't want GDB to come up on error */ + + #define CALL_GDB +@@ -549,11 +557,20 @@ static void stack_trace (char *const*args) + + # endif /* !__OPTIMIZE__ */ + +-/*2 +-* init signal handlers +-*/ ++/// init signal handlers and error handling for libraries: NTL, factory + void init_signals() + { ++// NTL error handling (>= 9.3.0) ---------------------------------------- ++#ifdef HAVE_NTL ++#if (((NTL_MAJOR_VERSION==9)&&(NTL_MINOR_VERSION>=3))||(NTL_MAJOR_VERSION>=10)) ++ ErrorMsgCallback=WerrorS; ++ ErrorCallback=HALT; ++#endif ++#endif ++// factory error handling: ----------------------------------------------- ++ factoryError=WerrorS; ++ ++// signal handler ------------------------------------------------------- + #ifdef SIGSEGV + si_set_signal(SIGSEGV,(si_hdl_typ)sigsegv_handler); + #endif +diff --git a/Singular/misc_ip.cc b/Singular/misc_ip.cc +index 49eddaae6f..3d5775edd7 100644 +--- a/Singular/misc_ip.cc ++++ b/Singular/misc_ip.cc +@@ -1316,16 +1316,6 @@ static BOOLEAN iiCrossProd(leftv res, leftv args) + On(SW_USE_EZGCD_P); + On(SW_USE_QGCD); + Off(SW_USE_NTL_SORT); // may be changed by an command line option +- factoryError=WerrorS; +- +-// NTL error handling (>= 9.3.0) +-#ifdef HAVE_NTL +-#if (((NTL_MAJOR_VERSION==9)&&(NTL_MINOR_VERSION>=3))||(NTL_MAJOR_VERSION>=10)) +- ErrorMsgCallback=WerrorS; +- ErrorCallback=HALT; +-#endif +-#endif +- + // memory initialization: ----------------------------------------------- + om_Opts.OutOfMemoryFunc = omSingOutOfMemoryFunc; + #ifndef OM_NDEBUG