Opened 7 years ago

Closed 6 years ago

#13237 closed enhancement (fixed)

Upgrade Singular

Reported by: jdemeyer Owned by: tbd
Priority: critical Milestone: sage-5.4
Component: packages: standard Keywords: Singular spkg
Cc: fbissey, malb, jpflori Merged in: sage-5.4.beta0
Authors: Jeroen Demeyer, Alexander Dreyer, Dmitrii Pasechnik, Karl-Dieter Crisman, Jean-Pierre Flori Reviewers: Alexander Dreyer, François Bissey
Report Upstream: None of the above - read trac for reasoning. Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by jdemeyer)

Upgrade Singular to version 3-1-5 (released 12 July 2012).

Upstream bugs discovered:

This new version fixes #13129, #12918, #12928, #12846, #12089, #13344.

Apply 13237_singular_3_1_5.patch and 13237_tests.patch to the Sage library.

New spkg: http://boxen.math.washington.edu/home/jdemeyer/spkg/singular-3-1-5.p1.spkg

singular-3-1-5.p1 (Simon King, 29 August 2012)

  • Trac #13237: add patch install_table.patch

singular-3-1-5.p0 (Jeroen Demeyer, Alexander Dreyer, 10 August 2012)

  • Trac #13237: Upgrade to version 3-1-5.
  • Removed patches which are now upstreamed:
    • patches/Singular.Makefile.in.shared.patch
    • patches/Singular.configure.patch
    • patches/factory.GNUmakefile.in.patch
    • patches/factory_configure
    • patches/make_parallel.patch
    • patches/os_x_ppc.patch
  • In spkg-install, simplify apply_patches(), automatically apply all patches in patches/*.patch, move conditional patches to patches/conditional
  • Rename some patches such that they all have the extension '.patch'
  • Put the two patches for SAGE_DEBUG (Singular.Makefile.in.debug.patch and kernel.Makefile.in.debug.patch) into one file conditional/sage_debug.patch.
  • Add several patches (see above):
    • NTL_negate.patch
    • singular_trac_439.patch
    • singular_trac_440.patch
    • singular_trac_441.patch
    • singular_trac_443.patch
    • sage_trac_12089.patch
    • slibdir.patch
  • When building Singular, don't first make install and then make install-nolns. Instead, only do the latter.
  • Don't create the LIB->lib symlink, which is no longer needed.
  • In spkg-install, remove distclean() step; merge clean_headers() and part of the old distclean() into remove_old_version().
  • Only unset LD on Darwin.
  • Remove the unsetting of TMPDIR (bug fixed upstream).
  • Do not override user-set CFLAGS and CXXFLAGS.
  • Echo all error messages to stderr instead of stdout.
  • Fix various ./configure options and remove some unsupported options.
  • Always configure --with-debug, as --without-debug doesn't work, see http://www.singular.uni-kl.de:8002/trac/ticket/438
  • Don't create sage_singular symlink, which wasn't used anyway.
  • Replace the $SAGE_LOCAL/bin/Singular script by a symlink.
  • Remove workaround for GCC-4.0.x on Darwin (obsolete by the GCC spkg).
  • Fix formatting of spkg-install (consistent indentation, no TABs).

Attachments (4)

13237_singular_3_1_5.patch (15.7 KB) - added by jdemeyer 7 years ago.
Patch for the Sage library
singular-3-1-5.p0.diff (229.2 KB) - added by jdemeyer 7 years ago.
Diff for the singular spkg. For reference / review only.
13237_tests.patch (1.7 KB) - added by jdemeyer 6 years ago.
Additional patch
singular-3-1-5.p1.diff (1.7 KB) - added by jdemeyer 6 years ago.
Diff for the singular spkg p0->p1. For reference / review only.

Download all attachments as: .zip

Change History (92)

comment:1 Changed 7 years ago by leif

  • Description modified (diff)
  • Keywords spkg added

comment:2 Changed 7 years ago by leif

  • Description modified (diff)

comment:3 Changed 7 years ago by fbissey

  • Cc fbissey added

comment:4 Changed 7 years ago by jdemeyer

  • Authors set to Jeroen Demeyer
  • Cc malb added
  • Description modified (diff)
  • Keywords Singular added

comment:5 Changed 7 years ago by jdemeyer

  • Description modified (diff)

comment:6 follow-up: Changed 7 years ago by leif

checking for FLINT >= 2.3... not found
configure: WARNING: Unable to find FLINT (which is strongly recommended) on your machine: please use --with-flint=PATH_TO_DIR_CONTAINING_LIB_AND_INCLUDE (see also ./configure --help if you do not understand what we are talking about)

:P

And lots of other warnings...

comment:7 in reply to: ↑ 6 ; follow-up: Changed 7 years ago by leif

Replying to leif:

And lots of other warnings...

These are the ones I get from configure and config.status:

configure: warning: Building of doc might fail. Need Texinfo
configure: WARNING: unrecognized options: --with-apint, --with-ntl, --without-MP, --without-lex, --without-bison, --without-Boost, --enable-Singular, --enable-factory, --enable-libfac, --enable-IntegerProgramming, --disable-doc, --with-malloc, --disable-debug, --enable-omalloc, --with-external-config_h, --with-track-custom, --enable-Plural, --with-factory, --with-libfac
configure: WARNING: Unable to find FLINT (which is strongly recommended) on your machine: please use --with-flint=PATH_TO_DIR_CONTAINING_LIB_AND_INCLUDE (see also ./configure --help if you do not understand what we are talking about)
config.status: WARNING:  'GNUmakefile.in' seems to ignore the --datarootdir setting
configure: WARNING: unrecognized options: --with-apint, --with-ntl, --without-MP, --without-lex, --without-bison, --without-Boost, --enable-Singular, --enable-factory, --enable-libfac, --enable-IntegerProgramming, --disable-doc, --with-malloc, --disable-debug, --enable-omalloc, --with-external-config_h, --with-track-custom, --enable-Plural, --with-factory, --with-libfac
configure: warning: factory.h not found! Install factory before building libfac!
configure: WARNING: unrecognized options: --with-gmp, --with-ntl, --without-bison, --enable-gmp, --enable-Singular, --enable-factory, --enable-libfac, --enable-IntegerProgramming, --disable-doc, --with-malloc, --disable-debug, --enable-omalloc, --with-external-config_h, --with-track-custom, --enable-Plural, --with-Singular
configure: WARNING: building without lex -- make might fail
configure: WARNING: building without python support
configure: WARNING: Unable to find FLINT (which is strongly recommended) on your machine: please use --with-flint=PATH_TO_DIR_CONTAINING_LIB_AND_INCLUDE (see also ./configure --help if you do not understand what we are talking about)
configure: WARNING: unrecognized options: --with-gmp, --with-ntl, --without-bison, --enable-gmp, --enable-Singular, --enable-factory, --enable-libfac, --enable-IntegerProgramming, --disable-doc, --with-malloc, --disable-debug, --enable-omalloc, --with-external-config_h, --with-track-custom, --enable-Plural, --with-Singular
configure: warning: Building of doc might fail. Need Texinfo
configure: WARNING: unrecognized options: --with-apint, --with-ntl, --without-MP, --without-lex, --without-bison, --without-Boost, --enable-Singular, --enable-factory, --enable-libfac, --enable-IntegerProgramming, --disable-doc, --with-malloc, --disable-debug, --enable-omalloc, --with-external-config_h, --with-track-custom, --enable-Plural, --with-factory, --with-libfac
configure: WARNING: Unable to find FLINT (which is strongly recommended) on your machine: please use --with-flint=PATH_TO_DIR_CONTAINING_LIB_AND_INCLUDE (see also ./configure --help if you do not understand what we are talking about)
config.status: WARNING:  'GNUmakefile.in' seems to ignore the --datarootdir setting
configure: WARNING: unrecognized options: --with-apint, --with-ntl, --without-MP, --without-lex, --without-bison, --without-Boost, --enable-Singular, --enable-factory, --enable-libfac, --enable-IntegerProgramming, --disable-doc, --with-malloc, --disable-debug, --enable-omalloc, --with-external-config_h, --with-track-custom, --enable-Plural, --with-factory, --with-libfac
configure: warning: factory.h not found! Install factory before building libfac!
configure: WARNING: unrecognized options: --with-gmp, --with-ntl, --without-bison, --enable-gmp, --enable-Singular, --enable-factory, --enable-libfac, --enable-IntegerProgramming, --disable-doc, --with-malloc, --disable-debug, --enable-omalloc, --with-external-config_h, --with-track-custom, --enable-Plural, --with-Singular
configure: WARNING: building without lex -- make might fail
configure: WARNING: building without python support
configure: WARNING: Unable to find FLINT (which is strongly recommended) on your machine: please use --with-flint=PATH_TO_DIR_CONTAINING_LIB_AND_INCLUDE (see also ./configure --help if you do not understand what we are talking about)
configure: WARNING: unrecognized options: --with-gmp, --with-ntl, --without-bison, --enable-gmp, --enable-Singular, --enable-factory, --enable-libfac, --enable-IntegerProgramming, --disable-doc, --with-malloc, --disable-debug, --enable-omalloc, --with-external-config_h, --with-track-custom, --enable-Plural, --with-Singular
configure: WARNING: unrecognized options: --with-apint, --with-ntl, --disable-debug
configure: WARNING: Unable to find FLINT (which is strongly recommended) on your machine: please use --with-flint=PATH_TO_DIR_CONTAINING_LIB_AND_INCLUDE (see also ./configure --help if you do not understand what we are talking about)
config.status: WARNING:  'GNUmakefile.in' seems to ignore the --datarootdir setting
configure: WARNING: unrecognized options: --with-apint, --with-ntl, --disable-debug

The unrecognized options should be addressed I think.

No idea how to interpret "factory.h not found! Install factory before building libfac!", as the build succeeded.

"Building without python support" can safely be ignored I guess, as we use our own Cython wrappers.

comment:8 in reply to: ↑ 7 Changed 7 years ago by jdemeyer

Replying to leif:

The unrecognized options should be addressed I think.

I fixed the fixable warnings. Many of them are caused by recursive calling of configure, for example, the top-level configure calls omalloc/configure. Many options are supported by some (but not all) configure scripts. These will give warnings and I don't see how to avoid these.

comment:9 Changed 7 years ago by jdemeyer

  • Description modified (diff)

comment:10 follow-up: Changed 7 years ago by leif

I assume that this is work in progress (i.e., you haven't tried to fix doctest errors yet).

Anyway, here's what I got on Ubuntu 10.04.4 LTS x86_64, with Sage 5.2.rc0 and GCC 4.7.0:

The following tests failed:

	sage -t  --long -force_lib devel/sage/doc/en/constructions/polynomials.rst # 1 doctests failed
	sage -t  --long -force_lib devel/sage/sage/rings/function_field/function_field.py # 1 doctests failed
	sage -t  --long -force_lib devel/sage/sage/rings/polynomial/multi_polynomial_libsingular.pyx # 3 doctests failed
	sage -t  --long -force_lib devel/sage/sage/rings/polynomial/multi_polynomial_ideal.py # 1 doctests failed
	sage -t  --long -force_lib devel/sage/sage/calculus/wester.py # 1 doctests failed
	sage -t  --long -force_lib devel/sage/sage/libs/singular/function.pyx # 2 doctests failed
	sage -t  --long -force_lib devel/sage/sage/combinat/words/words.py # 0 doctests failed

(The last failure was a segfault with a large traceback IIRC. Somewhat surprisingly successfully compiled with -O3, although many if not most compile commands override this by -O2; looks as if they use CPPFLAGS instead of CXXFLAGS in some parts.)

Let me know in case you're interested in further output; I guess you can reproduce most of the errors.

comment:11 in reply to: ↑ 10 Changed 7 years ago by jdemeyer

Replying to leif:

I assume that this is work in progress (i.e., you haven't tried to fix doctest errors yet).

Exactly, I mainly worked on spkg-install.

comment:12 follow-up: Changed 7 years ago by jdemeyer

This is a new bug, the new answer is incorrect:

sage -t  --long -force_lib devel/sage/sage/rings/polynomial/multi_polynomial_libsingular.pyx
**********************************************************************
File "/release/merger/sage-5.2.rc1/devel/sage-main/sage/rings/polynomial/multi_polynomial_libsingular.pyx", line 3856:
    sage: p.factor()
Expected:
    (-2*v^2*u + 4*u^3 + v^2)^2
Got:
    (4) * (-2*v^2*u + 4*u^3 + v^2)^2
**********************************************************************

comment:13 in reply to: ↑ 12 Changed 7 years ago by leif

Replying to jdemeyer:

This is a new bug, the new answer is incorrect:

Expected:
    (-2*v^2*u + 4*u^3 + v^2)^2
Got:
    (4) * (-2*v^2*u + 4*u^3 + v^2)^2

Yes, the most obvious one... :-)

Just noticed the failure in words.py apparently isn't reproducible. Traceback was

${SAGE_LOCAL}/lib/libcsage.so(print_backtrace+0x31)[0x2abd9e8f6664]
${SAGE_LOCAL}/lib/libcsage.so(sigdie+0x14)[0x2abd9e8f6696]
${SAGE_LOCAL}/lib/libcsage.so(sage_signal_handler+0x218)[0x2abd9e8f6250]
/lib/libpthread.so.0(+0xf8f0)[0x2abd9c9158f0]
${SAGE_LOCAL}/lib/libpython2.7.so.1.0(+0x135020)[0x2abd9c628020]
${SAGE_LOCAL}/lib/libpython2.7.so.1.0(+0x76aa7)[0x2abd9c569aa7]
${SAGE_LOCAL}/lib/libpython2.7.so.1.0(+0x1352b7)[0x2abd9c6282b7]
${SAGE_LOCAL}/lib/libpython2.7.so.1.0(_PyObject_GC_Malloc+0x115)[0x2abd9c6292b5]
${SAGE_LOCAL}/lib/libpython2.7.so.1.0(_PyObject_GC_New+0xd)[0x2abd9c6292ed]
${SAGE_LOCAL}/lib/libpython2.7.so.1.0(PyCFunction_NewEx+0xc5)[0x2abd9c584f05]
${SAGE_LOCAL}/lib/libpython2.7.so.1.0(Py_InitModule4_64+0x140)[0x2abd9c60bc60]
${SAGE_LOCAL}/lib/python/site-packages/numpy/core/multiarray.so(initmultiarray+0x2b)[0x2abdcd07186b]
${SAGE_LOCAL}/lib/libpython2.7.so.1.0(_PyImport_LoadDynamicModule+0x99)[0x2abd9c6073b9]
...
Segmentation fault

comment:14 Changed 7 years ago by jdemeyer

  • Description modified (diff)

comment:15 Changed 7 years ago by jdemeyer

  • Description modified (diff)

Another Singular bug:

sage -t --long "devel/sage/sage/rings/function_field/function_field.py"
**********************************************************************
File "/release/merger/sage-5.2.rc1/devel/sage/sage/rings/function_field/function_field.py", line 1132:
    sage: f.factor()
Expected:
    (1/t) * (X + 3*t) * (X + 5*t) * (X + 6*t) * (X^2 + 1/t) * (X^2 + 6/t)
Got:
    (1/t) * (X + 3*t) * (X + 5*t) * (X + 6*t) * (X^4 + 6/t^2)
**********************************************************************

Reported upstream at http://www.singular.uni-kl.de:8002/trac/ticket/440.

comment:16 Changed 7 years ago by jdemeyer

  • Description modified (diff)

comment:17 Changed 7 years ago by jdemeyer

  • Description modified (diff)
  • Report Upstream changed from N/A to None of the above - read trac for reasoning.

New spkg, adds fixes for Singular bugs 439 and 440.

comment:18 Changed 7 years ago by jdemeyer

  • Description modified (diff)

comment:19 Changed 7 years ago by jdemeyer

  • Description modified (diff)

comment:20 Changed 7 years ago by jdemeyer

Reproducible doctest failure:

**********************************************************************
File "/release/merger/sage-5.3.beta0/devel/sage-main/sage/libs/singular/function.pyx", line 1569:
    sage: singular_list(2, 3, 6, ring=P)
Exception raised:
    Traceback (most recent call last):
      File "/release/merger/sage-5.3.beta0/local/bin/ncadoctest.py", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/release/merger/sage-5.3.beta0/local/bin/sagedoctest.py", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/release/merger/sage-5.3.beta0/local/bin/ncadoctest.py", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_72[16]>", line 1, in <module>
        singular_list(Integer(2), Integer(3), Integer(6), ring=P)###line 1569:
    sage: singular_list(2, 3, 6, ring=P)
      File "function.pyx", line 1248, in sage.libs.singular.function.SingularFunction.__call__ (sage/libs/singular/function.cpp:11875)
        return call_function(self, args, ring, interruptible, attributes)
      File "function.pyx", line 1438, in sage.libs.singular.function.call_function (sage/libs/singular/function.cpp:13425)
        raise RuntimeError("Error in Singular function call '%s':\n%s"%(self._name,
    RuntimeError: Error in Singular function call 'list':
     list(`int`,`int`,`int`) failed
**********************************************************************
File "/release/merger/sage-5.3.beta0/devel/sage-main/sage/libs/singular/function.pyx", line 1585:
    sage: singular_list((1,2,3),3,[1,2,3], ring=P)
Exception raised:
    Traceback (most recent call last):
      File "/release/merger/sage-5.3.beta0/local/bin/ncadoctest.py", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/release/merger/sage-5.3.beta0/local/bin/sagedoctest.py", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/release/merger/sage-5.3.beta0/local/bin/ncadoctest.py", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_72[26]>", line 1, in <module>
        singular_list((Integer(1),Integer(2),Integer(3)),Integer(3),[Integer(1),Integer(2),Integer(3)], ring=P)###line 1585:
    sage: singular_list((1,2,3),3,[1,2,3], ring=P)
      File "function.pyx", line 1248, in sage.libs.singular.function.SingularFunction.__call__ (sage/libs/singular/function.cpp:11875)
        return call_function(self, args, ring, interruptible, attributes)
      File "function.pyx", line 1438, in sage.libs.singular.function.call_function (sage/libs/singular/function.cpp:13425)
        raise RuntimeError("Error in Singular function call '%s':\n%s"%(self._name,
    RuntimeError: Error in Singular function call 'list':
     list(`intvec`,`int`,`list`) failed
**********************************************************************

Non-reproducible doctest failure:

**********************************************************************
File "/release/merger/sage-5.3.beta0/devel/sage-main/sage/rings/polynomial/multi_polynomial_libsingular.pyx", line 3921:
    sage: f.factor()
Expected:
    x * y^3 * (y^8 + (a)*y^7 + (a + 1)*x) * (x^7*y^3 + x*y^9 + (a)*x^8 + (a)*y^4)
Got:
    x * y^3 * (y^8 + (a)*y^7 + (a + 1)*x) * (x^7*y^3 + x*y^9 + (a + 1)*x^8 + (a + 1)*y^4)
**********************************************************************

comment:21 follow-up: Changed 7 years ago by leif

So far I only tested the files that previously failed for me (with the new spkg and the Sage library patch applied).

I get the same list() errors (although prepended by some debug output it seems, before the doctest error is printed), and sporadically the f.factor() error -- with varying results:

sage -t --long -force_lib "devel/sage/sage/rings/polynomial/multi_polynomial_libsingular.pyx"
**********************************************************************
File "${SAGE_ROOT}/devel/sage/sage/rings/polynomial/multi_polynomial_libsingular.pyx", line 3910:
    sage: f.factor()
Expected:
    x * y^3 * (y^8 + (a)*y^7 + (a + 1)*x) * (x^7*y^3 + x*y^9 + (a)*x^8 + (a)*y^4)
Got:
    x * y^3 * (y^8 + (a)*y^7 + (a + 1)*x) * (x^7*y^3 + x*y^9 + (a + 1)*x^8 + (a + 1)*y^4)
**********************************************************************
1 items had failures:
   1 of  86 in __main__.example_77
***Test Failed*** 1 failures.

sage -t --long -force_lib "devel/sage/sage/rings/polynomial/multi_polynomial_libsingular.pyx"
**********************************************************************
File "${SAGE_ROOT}/devel/sage/sage/rings/polynomial/multi_polynomial_libsingular.pyx", line 3910:
    sage: f.factor()
Expected:
    x * y^3 * (y^8 + (a)*y^7 + (a + 1)*x) * (x^7*y^3 + x*y^9 + (a)*x^8 + (a)*y^4)
Got:
    x * y^3 * (y^8 + (a)*y^7 + (a + 1)*x) * (x^7*y^3 + x*y^9)
**********************************************************************
1 items had failures:
   1 of  86 in __main__.example_77
***Test Failed*** 1 failures.

sage -t --long -force_lib "devel/sage/sage/rings/polynomial/multi_polynomial_libsingular.pyx"
**********************************************************************
File "${SAGE_ROOT}/devel/sage/sage/rings/polynomial/multi_polynomial_libsingular.pyx", line 3910:
    sage: f.factor()
Expected:
    x * y^3 * (y^8 + (a)*y^7 + (a + 1)*x) * (x^7*y^3 + x*y^9 + (a)*x^8 + (a)*y^4)
Got:
    x * y^3 * (y^8 + (a)*y^7 + (a + 1)*x) * (x^7*y^3 + x*y^9 + x^8 + y^4)
**********************************************************************
1 items had failures:
   1 of  86 in __main__.example_77
***Test Failed*** 1 failures.

(For me it's line 3910; presumably due to some other patch. The first variant seems to occur more often. All tests run sequentially, FWIW.)

P.S.: Run 100 times from the shell, the test failed 51 times.

comment:22 in reply to: ↑ 21 Changed 7 years ago by leif

Replying to leif:

P.S.: Run 100 times from the shell, the test failed 51 times.

(Running sage -t ... in a for loop.)

25x
    x * y^3 * (y^8 + (a)*y^7 + (a + 1)*x) * (x^7*y^3 + x*y^9 + (a + 1)*x^8 + (a + 1)*y^4)

15x
    x * y^3 * (y^8 + (a)*y^7 + (a + 1)*x) * (x^7*y^3 + x*y^9 + x^8 + y^4)

11x
    x * y^3 * (y^8 + (a)*y^7 + (a + 1)*x) * (x^7*y^3 + x*y^9)

comment:23 Changed 7 years ago by jdemeyer

  • Description modified (diff)

Non-reproducible factoring bug reported upstream: http://www.singular.uni-kl.de:8002/trac/ticket/441

Changed 7 years ago by jdemeyer

Patch for the Sage library

comment:24 Changed 7 years ago by jdemeyer

New patch fixes all doctest errors (except for the upstream factoring bug).

comment:25 Changed 7 years ago by jdemeyer

  • Description modified (diff)

comment:26 Changed 7 years ago by jdemeyer

  • Description modified (diff)

comment:27 Changed 7 years ago by jdemeyer

  • Description modified (diff)

comment:28 Changed 7 years ago by jdemeyer

  • Status changed from new to needs_review

I added a patch for Singular Trac 441 (which is in the git sources, even though Trac hasn't been updated yet).

Needs review (the spkg will be committed after positive_review if that's okay).

comment:29 Changed 7 years ago by jdemeyer

  • Description modified (diff)

comment:30 Changed 7 years ago by jdemeyer

  • Description modified (diff)

comment:31 Changed 7 years ago by jdemeyer

  • Description modified (diff)

comment:32 Changed 7 years ago by jdemeyer

  • Description modified (diff)

comment:33 Changed 7 years ago by jpflori

  • Cc jpflori added

comment:34 Changed 7 years ago by AlexanderDreyer

spkg and patch apply/install fine. Also the tests are fine. So I'm close to a positive review, just waiting for the patch from #12089.

comment:35 follow-ups: Changed 7 years ago by leif

Just for the record: Did pass ptestlong (with a bit of luck, cf. the "random" factoring) with Sage 5.2[.rc0] (Ubuntu 10.04.4 LTS x86_64, FSF GCC 4.7.0, with -O3, see above).

Patch applies to Sage 5.3.beta0 as well (a few lines offset, never mind).

Only just noticed that old installations get removed before we even attempt to build the new one; this should in general only be done if the build succeeded.

(Haven't yet closely looked at [the changes to] spkg-install.)

comment:36 in reply to: ↑ 35 Changed 7 years ago by leif

Replying to leif:

Patch applies to Sage 5.3.beta0 as well (a few lines offset, never mind).

ptestlong also passed without errors, but took longer than usual (despite the machine being otherwise idle).

comment:37 follow-up: Changed 7 years ago by jpflori

It would be nice to fix #13344 as well in this ticket. Hopefully the problem should be tracked down quite quickly.

Last edited 7 years ago by jpflori (previous) (diff)

comment:38 in reply to: ↑ 37 ; follow-up: Changed 7 years ago by dimpase

  • Status changed from needs_review to needs_work

Replying to jpflori:

It would be nice to fix #13344 as well in this ticket. Hopefully the problem should be tracked down quite quickly.

yes, I can confirm that installing this spkg on MacOSX one gets Singular LIB files into SAGELOCAL/lib/, as well as in the right place, i.e. SAGELOCAL/share/singular/, which is certainly not what one would want.

comment:39 in reply to: ↑ 38 Changed 7 years ago by AlexanderDreyer

Replying to dimpase:

yes, I can confirm that installing this spkg on MacOSX one gets Singular LIB files into SAGELOCAL/lib/, as well as in the right place, i.e. SAGELOCAL/share/singular/, which is certainly not what one would want.

It think the best solution would be to replace $MAKE by "$MAKE slibdir=$SAGE_LOCAL/share/singular" in the spkg.

comment:40 Changed 7 years ago by AlexanderDreyer

Or maybe "$MAKE slibdir=\"$SAGE_LOCAL/share/singular\""?

comment:41 Changed 7 years ago by AlexanderDreyer

@jdemeyer I could take care for the changes, if you don't mind?

comment:42 Changed 7 years ago by AlexanderDreyer

Just in case (won't have time tomorrow), I was so free to propose a changed spkg here: http://boxen.math.washington.edu/home/dreyer/spkg/singular-3-1-5.p0.spkg

As before, the changes are not committed yet. Also I haven't changes the URL in the description, as Jeroen might continue with other fixes.

The changes are as follows (for review):

  • singular-3-1-5.p0.

    old new  
    99diff -r 1275ac543b53 SPKG.txt
    1010--- a/SPKG.txt  Sat Mar 17 11:18:23 2012 +0100
    1111+++ b/SPKG.txt  Sun Aug 05 22:36:36 2012 +0200
    12 @@ -30,14 +30,17 @@
     12@@ -30,14 +30,19 @@
    1313 See spkg-changes for how to delete unnecessary stuff under src/
    1414 
    1515 Several patches are applied.
     
    3232+   http://www.singular.uni-kl.de:8002/trac/ticket/440
    3333+ * singular_trac_441.patch: fix taken from upstream for
    3434+   http://www.singular.uni-kl.de:8002/trac/ticket/441
     35+ * sage_trac_12089.patch: fix (also reported upstream) from
     36+   https://github.com/alexanderdreyer/SingularSources/commit/7902222
    3537 
    3638 Other notes
    3739  * The option '--without-dynamic-kernel' is used on *all*
    38 @@ -51,9 +54,51 @@
     40@@ -51,9 +56,54 @@
    3941    investigated as a possible cause later.
    4042  * Be sure that Singular/Singular.rc.in is present, as occasionally this
    4143    was missing, which caused problems on Cygwin (e.g., see #10235)
     
    4951 
    5052 == ChangeLog ==
    5153 
    52 +=== singular-3-1-5.p0 (Jeroen Demeyer, 2 August 2012) ===
     54+=== singular-3-1-5.p0 (Jeroen Demeyer, 5 August 2012) ===
    5355+ * Trac #13237: Upgrade to version 3-1-5.
    5456+ * Removed patches which are now upstreamed:
    5557+    - patches/Singular.Makefile.in.shared.patch
     
    7072+    - singular_trac_439.patch
    7173+    - singular_trac_440.patch
    7274+    - singular_trac_441.patch
     75+    - sage_trac_12089.patch
    7376+ * In spkg-install, remove distclean() step; merge clean_headers() and
    7477+   part of the old distclean() into remove_old_version().
     78+ * In spkg-install, added slibdir="$SAGE_LOCAL/share/singular" to
     79+   $MAKE install-libsingular .
    7580+ * Only unset LD on Darwin.
    7681+ * Remove the unsetting of TMPDIR (bug fixed upstream).
    7782+ * Do not override user-set CFLAGS and CXXFLAGS.
     
    68126817- #if defined(ix86Mac_darwin)
    68136818- #define HAVE_ELF_SYSTEM
    68146819- #endif
     6820diff -r 1275ac543b53 patches/sage_trac_12089.patch
     6821--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
     6822+++ b/patches/sage_trac_12089.patch     Sun Aug 05 22:36:36 2012 +0200
     6823@@ -0,0 +1,29 @@
     6824+From 7902222c6e73d452b3d75576bd9bc0140f5e827a Mon Sep 17 00:00:00 2001
     6825+From: Alexander Dreyer <alexander.dreyer@itwm.fraunhofer.de>
     6826+Date: Sat, 4 Aug 2012 21:53:32 +0200
     6827+Subject: [PATCH] fix: apply LDFLAGS fixes from svn#13210/git#b1dfafe to cygwin-specific flags (Sage's trac #12089; reported by Jean-Pierre Flori)
     6828+
     6829+---
     6830+ Singular/Makefile.in |    6 +++---
     6831+ 1 files changed, 3 insertions(+), 3 deletions(-)
     6832+
     6833+diff --git a/Singular/Makefile.in b/Singular/Makefile.in
     6834+index c4a6e78..b907085 100644
     6835+--- a/Singular/Makefile.in
     6836++++ b/Singular/Makefile.in
     6837+@@ -90,9 +90,9 @@ LDFLAGSG     = -L@prefix@/kernel -L../kernel -lkernel_g @LD_DYN_FLAGS1@ @LDFLAGS@
     6838+ LDFLAGSP      = -L@prefix@/kernel -L../kernel -lkernel_p @LD_DYN_FLAGS1@ @LDFLAGS@
     6839+ else
     6840+ ## -L/usr/local/lib -L@prefix@/modules/python --> PySingular
     6841+-LDFLAGS               = -L@prefix@/kernel -L/bin -lkernel @LDFLAGS@ -L/usr/local/lib -L../modules/python
     6842+-LDFLAGSG      = -L@prefix@/kernel -L/bin -lkernel_g @LDFLAGS@
     6843+-LDFLAGSP      = -L@prefix@/kernel -L/bin -lkernel_p @LDFLAGS@
     6844++LDFLAGS               = -L@prefix@/kernel -L../kernel -L/bin -lkernel @LDFLAGS@ -L/usr/local/lib -L../modules/python
     6845++LDFLAGSG      = -L@prefix@/kernel -L../kernel -L/bin -lkernel_g @LDFLAGS@
     6846++LDFLAGSP      = -L@prefix@/kernel -L../kernel -L/bin -lkernel_p @LDFLAGS@
     6847+ endif
     6848+ LD_DYN_FLAGS1 = @LD_DYN_FLAGS1@
     6849+ LD_DYN_FLAGS2 = @LD_DYN_FLAGS2@
     6850+--
     6851+1.6.0.2
     6852+
    68156853diff -r 1275ac543b53 patches/sing_win.cc.diff
    68166854--- a/patches/sing_win.cc.diff  Sat Mar 17 11:18:23 2012 +0100
    68176855+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
     
    73307368+    config || return $?
    73317369 
    73327370     $MAKE clean
    7333      $MAKE install-libsingular
     7371-    $MAKE install-libsingular
     7372+    $MAKE slibdir="$SAGE_LOCAL/share/singular" install-libsingular
    73347373 
    73357374     if [ $? -ne 0 ]; then
    73367375-        echo "Unable to install libsingular."

comment:43 Changed 7 years ago by jdemeyer

  • Authors changed from Jeroen Demeyer to Jeroen Demeyer, Alexander Dreyer, Dmitrii Pasechnik, Karl-Dieter Crisman, Jean-Pierre Flori

comment:44 Changed 7 years ago by jdemeyer

For the slibdir issue, I am patching Makefile.in instead, I think this is the best solution.

comment:45 Changed 7 years ago by jpflori

Just a reminder for not forgetting to close #12089 and #13344. when this one is closed.

comment:46 Changed 7 years ago by jdemeyer

  • Description modified (diff)
  • Status changed from needs_work to needs_review

comment:47 Changed 7 years ago by AlexanderDreyer

  • Description modified (diff)

comment:48 follow-up: Changed 7 years ago by AlexanderDreyer

Just nitpicking: there a typo in my name.

comment:49 in reply to: ↑ 48 Changed 7 years ago by jdemeyer

Replying to AlexanderDreyer:

Just nitpicking: there a typo in my name.

Apologies, fixed.

comment:50 Changed 7 years ago by jdemeyer

  • Status changed from needs_review to needs_work

comment:51 follow-up: Changed 7 years ago by jdemeyer

  • Status changed from needs_work to needs_review

comment:52 in reply to: ↑ 35 Changed 7 years ago by jdemeyer

Replying to leif:

Only just noticed that old installations get removed before we even attempt to build the new one; this should in general only be done if the build succeeded.

Unfortunately, Singular doesn't have separate build and install targets. So building and installing must happen together.

comment:53 in reply to: ↑ 51 ; follow-up: Changed 7 years ago by dimpase

Replying to jdemeyer: I can confirm that the latest spkg installs cleanly on MacOSX 10.6.8 and on Cygwin.

comment:54 in reply to: ↑ 53 Changed 7 years ago by jpflori

Replying to dimpase:

Replying to jdemeyer: I can confirm that the latest spkg installs cleanly on MacOSX 10.6.8 and on Cygwin.

Same here on Cygwin and Linux (Ubuntu 12.04 x86_64). And I'm happy with the changes related to #13344. I've given it positive review.

comment:55 Changed 7 years ago by jdemeyer

  • Description modified (diff)
  • Status changed from needs_review to needs_work

comment:56 Changed 7 years ago by AlexanderDreyer

Hannes Schönemann of the Singular team has provided a patch for this: https://github.com/Singular/Sources/commit/cf39407a525018da4baffd05e88315bd83075f8c.patch

comment:57 Changed 7 years ago by jdemeyer

  • Description modified (diff)
  • Status changed from needs_work to needs_review

Seems to build fine on Solaris now, needs review again.

Changed 7 years ago by jdemeyer

Diff for the singular spkg. For reference / review only.

comment:58 Changed 7 years ago by AlexanderDreyer

Installs and tests sage/rings without any problems. So positive review from my side.

comment:59 Changed 7 years ago by jdemeyer

  • Reviewers set to Alexander Dreyer

comment:60 Changed 7 years ago by jdemeyer

Anybody willing to fully review this ticket?

comment:61 follow-up: Changed 7 years ago by fbissey

  • Reviewers changed from Alexander Dreyer to Alexander Dreyer, François Bissey
  • Status changed from needs_review to positive_review

I will push the button. There is a lot of clean up and of course new issues (like one of my colleagues says: exchange old bugs for new ones). I looked carefully at all the changes in spkg-install (make that very carefully for the last 2 days - but I could still have missed something) and am happy with them. Happy with the new patches too.

comment:62 in reply to: ↑ 61 Changed 7 years ago by jdemeyer

Replying to fbissey:

I looked carefully at all the changes in spkg-install (make that very carefully for the last 2 days - but I could still have missed something) and am happy with them. Happy with the new patches too.

Thanks a lot for this.

comment:63 Changed 7 years ago by fbissey

That's annoying now that I have pushed the button I found something (that obviously is not impacting sage) that should be reported upstream. The header factory/assert.h is not installed and it is included in factory/templates/ftmpl_{matrix,array,list}.cc. I don't think there are anymore missing headers.

comment:64 follow-up: Changed 7 years ago by fbissey

Spoke too soon from factory/templates/ftmpl_inst.cc

#include "canonicalform.h"
#include "cf_map.h"
#include "cf_reval.h"

None of these are installed either.

comment:65 in reply to: ↑ 64 Changed 7 years ago by AlexanderDreyer

Replying to fbissey: Thanks for the hint, I just reported that upstream: http://www.singular.uni-kl.de:8002/trac/ticket/446

comment:66 Changed 7 years ago by fbissey

Just to be clear. I don't think we should delay this ticket for these headers. If there was an effect on sage we would know by now. But we should definitely have a follow up ticket to pick any upstream patch. Thanks Alexander I was counting on you picking it up :).

comment:67 Changed 7 years ago by jdemeyer

  • Milestone changed from sage-5.3 to sage-5.4

comment:68 follow-up: Changed 6 years ago by zimmerma

I'd like to see non-regression tests in this patch, for all tickets solved by this one: #13129, #12918, #12928, #12846, #12089, #13344.

Paul

comment:69 in reply to: ↑ 68 Changed 6 years ago by jdemeyer

  • Status changed from positive_review to needs_work

Replying to zimmerma:

I'd like to see non-regression tests in this patch, for all tickets solved by this one: #13129, #12918, #12928, #12846, #12089, #13344.

Good suggestion, however #12089, #13344 are about compiling Singular so I don't think we should add a regression test for that (the real test is just checking that any upgrades don't break the build). Then #12846 is also tricky because it is about a computation which randomly runs slow or gets stuck.

For the other 3 tickets, we should indeed add a regression test. I'll take care of the patch.

comment:70 Changed 6 years ago by jpflori

We could test existence of *.lib files in the LIB directory for #13344, or of $SAGE_LOCAL/LIB directory. The problem is critical on Cygwin where LIB resolves to lib and messes PyOpenSSL compilation (although that package won't be built anymore soon), but was also present on every platform.

I agree that #12089 cannot really be tested, except for the fact that Singular succeeded to build.

comment:71 Changed 6 years ago by zimmerma

sorry I meant I'd like to see non-regression tests if possible. Thank you Jeroen for taking care of them.

Paul

Changed 6 years ago by jdemeyer

Additional patch

comment:72 follow-up: Changed 6 years ago by jdemeyer

  • Description modified (diff)
  • Priority changed from major to critical
  • Status changed from needs_work to needs_review

Additional patch 13237_tests.patch needs review.

comment:73 in reply to: ↑ 72 Changed 6 years ago by AlexanderDreyer

  • Status changed from needs_review to positive_review

Replying to jdemeyer:

Additional patch 13237_tests.patch needs review.

Indeed, I can confirm that the tests check for recurrence of the solved problems.

comment:74 follow-up: Changed 6 years ago by SimonKing

There is a small thing that I'd like to change: There is a header table.h, that is currently not installed. However, it is needed by libsing (not libsingular).

libsing is a package allowing GAP to use Singular natively. I don't know if it would be of general interest to have it in Sage. Anyway: Should there be a new ticket for the installation of table.h, or should it be done here?

comment:75 in reply to: ↑ 74 ; follow-up: Changed 6 years ago by AlexanderDreyer

Replying to SimonKing:

There is a small thing that I'd like to change: There is a header table.h, that is currently not installed. However, it is needed by libsing (not libsingular).

libsing is a package allowing GAP to use Singular natively. I don't know if it would be of general interest to have it in Sage. Anyway: Should there be a new ticket for the installation of table.h, or should it be done here?

I think this is not related tot he upgrade, so this should be a feature request to the Singular-team. But of course, any resulting patch could be integrated in the next spkg eventually.

comment:76 follow-up: Changed 6 years ago by SimonKing

It seems to me that the spkg contains uncommitted changes.

comment:77 in reply to: ↑ 76 Changed 6 years ago by jdemeyer

Replying to SimonKing:

It seems to me that the spkg contains uncommitted changes.

You are very right, I forgot to do sage --pkg after committing the changes. Should be fixed now.

comment:78 in reply to: ↑ 75 Changed 6 years ago by SimonKing

Replying to AlexanderDreyer:

Replying to SimonKing: I think this is not related tot he upgrade,

Granted. But if we upgrade Singular anyway, we could as well use a little patch that installs just one additional header.

so this should be a feature request to the Singular-team. But of course, any resulting patch could be integrated in the next spkg eventually.

Here is the suggested change, anyway. Add a file patches/install_table.patch containing

--- src/Singular/Makefile.in    2012-07-11 11:00:13.000000000 +0100
+++ src/Singular/Makefile.in    2012-08-27 16:22:26.013159361 +0100
@@ -599,7 +599,7 @@
          ${INSTALL_PROGRAM}  $$file ${libdir}; \
        done
        ${INSTALL_PROGRAM} libsingular.h ${includedir}
-       for file in subexpr.h tok.h grammar.h ipid.h lists.h ipshell.h attrib.h; do \
+       for file in subexpr.h tok.h grammar.h ipid.h lists.h ipshell.h attrib.h table.h; do \
        sed -e "s:<kernel/:<singular/:" < $$file |sed -e "s:<Singular/:<singular/:"|sed -e "s:<omalloc/:<:"|sed -e "s:<factory/:<:" >${includedir}/singular/$$file ;\
        done

comment:79 follow-up: Changed 6 years ago by jdemeyer

I agree with AlexanderDreyer that you should make a request to upstream for table.h to be installed. If the patch gets accepted upstream, it will also be easier to review this ticket.

comment:80 in reply to: ↑ 79 Changed 6 years ago by SimonKing

Replying to jdemeyer:

I agree with AlexanderDreyer that you should make a request to upstream for table.h to be installed. If the patch gets accepted upstream, it will also be easier to review this ticket.

I asked Hans Schönemann today, and he answered: "Meinetwegen."

In English, I guess that's: "I don't mind."

comment:81 Changed 6 years ago by jdemeyer

  • Description modified (diff)
  • Status changed from positive_review to needs_work

comment:82 follow-up: Changed 6 years ago by jdemeyer

  • Status changed from needs_work to needs_review

Changed 6 years ago by jdemeyer

Diff for the singular spkg p0->p1. For reference / review only.

comment:83 in reply to: ↑ 82 Changed 6 years ago by AlexanderDreyer

  • Status changed from needs_review to positive_review

Replying to jdemeyer: I'll give a positive review to this (was discussed before),

comment:84 Changed 6 years ago by SimonKing

One questions regarding Alexander's comment on #7797: Has it really been the case on Solaris SPARC that an outdated Singular/tok.h was hanging around? And if the answer is yes, a second question: Has the new singular spkg not properly installed the new one?

comment:85 follow-up: Changed 6 years ago by jdemeyer

I am currently doing a complete build from scratch on Solaris SPARC with the new Singular to find out what's going on.

comment:86 in reply to: ↑ 85 ; follow-up: Changed 6 years ago by SimonKing

Replying to jdemeyer:

I am currently doing a complete build from scratch on Solaris SPARC with the new Singular to find out what's going on.

What came out of it?

comment:87 in reply to: ↑ 86 Changed 6 years ago by jdemeyer

Replying to SimonKing:

What came out of it?

I'll answer at #7797 when it's finished compiling (which should be soon now) :-)

comment:88 Changed 6 years ago by jdemeyer

  • Merged in set to sage-5.4.beta0
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.