cschwan / sage-on-gentoo

(Unofficial) Gentoo Overlay for Sage- and Sage-related ebuilds
84 stars 26 forks source link

singular-4.0.3_p5 associated doctest failure in Prefix [sage-9999 (sage-7.5.beta4)] #444

Closed strogdon closed 7 years ago

strogdon commented 7 years ago

I have the following which hangs and prevents running the testsuite. This is the first doctest that's run.

sage -t --long usr/lib64/python2.7/site-packages/sage/schemes/curves/constructor.py
**********************************************************************
File "usr/lib64/python2.7/site-packages/sage/schemes/curves/constructor.py", line 108, in sage.schemes.curves.constructor.Curve
Failed example:
    C.genus()
Exception raised:
    Traceback (most recent call last):
      File "/storage/strogdon/gentoo-rap/usr/lib64/python2.7/site-packages/sage/doctest/forker.py", line 501, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/storage/strogdon/gentoo-rap/usr/lib64/python2.7/site-packages/sage/doctest/forker.py", line 864, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.schemes.curves.constructor.Curve[10]>", line 1, in <module>
        C.genus()
      File "/storage/strogdon/gentoo-rap/usr/lib64/python2.7/site-packages/sage/schemes/curves/curve.py", line 133, in genus
        return self.geometric_genus()
      File "/storage/strogdon/gentoo-rap/usr/lib64/python2.7/site-packages/sage/schemes/curves/curve.py", line 181, in geometric_genus
        self.__genus = self.defining_ideal().genus()
      File "/storage/strogdon/gentoo-rap/usr/lib64/python2.7/site-packages/sage/rings/polynomial/multi_polynomial_ideal.py", line 295, in __call__
        return self.f(self._instance, *args, **kwds)
      File "/storage/strogdon/gentoo-rap/usr/lib64/python2.7/site-packages/sage/rings/polynomial/multi_polynomial_ideal.py", line 1501, in genus
        self.__genus = Integer(genus(self))
      File "sage/libs/singular/function.pyx", line 1323, in sage.libs.singular.function.SingularFunction.__call__ (/storage/strogdon/gentoo-rap/var/tmp/portage/sci-mathematics/sage-9999/work/sage-9999/src-python2_7/build/cythonized/sage/libs/singular/function.cpp:15144)
        return call_function(self, args, ring, interruptible, attributes)
      File "sage/libs/singular/function.pyx", line 1516, in sage.libs.singular.function.call_function (/storage/strogdon/gentoo-rap/var/tmp/portage/sci-mathematics/sage-9999/work/sage-9999/src-python2_7/build/cythonized/sage/libs/singular/function.cpp:17184)
        raise RuntimeError("error in Singular function call %r:\n%s"%
    RuntimeError: error in Singular function call 'genus':
    univariate factorization over Z depends on NTL(missing)
    univariate factorization over Z depends on NTL(missing)
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    zero divisor found - your minpoly is not irreducible
    error occurred in or before normal.lib::deltaLoc line 2735: `      f=cleardenom(f);`
    leaving normal.lib::deltaLoc
    leaving normal.lib::genus

Initially, ntl had not been upgraded and I though maybe that was the issue. With the ntl upgrade eclib was a upgraded and sage had to be rebuilt. An emerge @preserved-rebuild didn't rebuild sage - it had to be done manually. After all this the failure is still there. The latest tested Sage without a failure is 7.4.beta3, I did test 7.5.beta3 with singular-4.1.0 and the failure was there also, which timed out. So maybe if I wait long enough the testsuite will proceed.

strogdon commented 7 years ago

For info

ldd -r ~/usr/lib/libSingular.so 
    linux-vdso.so.1 (0x00007ffc251f0000)
    libpolys-4.0.3.so => /storage/strogdon/gentoo-rap/usr/lib64/libpolys-4.0.3.so (0x00007ff471996000)
    libfactory-4.0.3.so => /storage/strogdon/gentoo-rap/usr/lib64/libfactory-4.0.3.so (0x00007ff4716b9000)
    libsingular_resources-4.0.3.so => /storage/strogdon/gentoo-rap/usr/lib64/libsingular_resources-4.0.3.so (0x00007ff4714b4000)
    libomalloc-0.9.6.so => /storage/strogdon/gentoo-rap/usr/lib64/libomalloc-0.9.6.so (0x00007ff4712a8000)
    libflint.so.13 => /storage/strogdon/gentoo-rap/usr/lib64/libflint.so.13 (0x00007ff470c43000)
    libgmp.so.10 => /storage/strogdon/gentoo-rap/usr/lib64/libgmp.so.10 (0x00007ff4709a5000)
    libreadline.so.6 => /storage/strogdon/gentoo-rap/usr/lib64/libreadline.so.6 (0x00007ff470753000)
    libpthread.so.0 => /storage/strogdon/gentoo-rap/lib64/libpthread.so.0 (0x00007ff470537000)
    libstdc++.so.6 => /storage/strogdon/gentoo-rap/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/libstdc++.so.6 (0x00007ff47013f000)
    libm.so.6 => /storage/strogdon/gentoo-rap/lib64/libm.so.6 (0x00007ff46fe3c000)
    libc.so.6 => /storage/strogdon/gentoo-rap/lib64/libc.so.6 (0x00007ff46faa3000)
    libdl.so.2 => /storage/strogdon/gentoo-rap/lib64/libdl.so.2 (0x00007ff46f89f000)
    libgcc_s.so.1 => /storage/strogdon/gentoo-rap/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/libgcc_s.so.1 (0x00007ff46f689000)
    libmpfr.so.4 => /storage/strogdon/gentoo-rap/usr/lib/libmpfr.so.4 (0x00007ff46f3fe000)
    libntl.so.31 => /storage/strogdon/gentoo-rap/usr/lib/libntl.so.31 (0x00007ff46eee2000)
    /storage/strogdon/gentoo-rap/lib64/ld-linux-x86-64.so.2 (0x00007ff472270000)
    libncurses.so.6 => /storage/strogdon/gentoo-rap/usr/lib64/libncurses.so.6 (0x00007ff46ec87000)
    libgf2x.so.1 => /storage/strogdon/gentoo-rap/usr/lib64/libgf2x.so.1 (0x00007ff46ea63000)
strogdon commented 7 years ago

From singular

> ring r=32003,(x,y,z),dp;
> factorize(9*(x-1)^2*(y+z),1);
   ? multivariate factorization depends on NTL(missing)
_[1]=9x2y+9x2z-18xy-18xz+9y+9z
kiwifb commented 7 years ago

Output of readelf -d ~/usr/lib/libSingular.so and possibly libfactory.so because I have a felling you have libntl in the output through flint rather than libSingular itself.

strogdon commented 7 years ago
readelf -d ~/usr/lib/libSingular.so

Dynamic section at offset 0x3526d0 contains 36 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libpolys-4.0.3.so]
 0x0000000000000001 (NEEDED)             Shared library: [libfactory-4.0.3.so]
 0x0000000000000001 (NEEDED)             Shared library: [libsingular_resources-4.0.3.so]
 0x0000000000000001 (NEEDED)             Shared library: [libomalloc-0.9.6.so]
 0x0000000000000001 (NEEDED)             Shared library: [libflint.so.13]
 0x0000000000000001 (NEEDED)             Shared library: [libgmp.so.10]
 0x0000000000000001 (NEEDED)             Shared library: [libreadline.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libpthread.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libstdc++.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libm.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x000000000000000e (SONAME)             Library soname: [libSingular-4.0.3.so]
 0x000000000000000f (RPATH)              Library rpath: [/storage/strogdon/gentoo-rap/usr/lib64]
 0x000000000000000c (INIT)               0x47130
 0x000000000000000d (FINI)               0x306518
 0x0000000000000019 (INIT_ARRAY)         0x54e000
 0x000000000000001b (INIT_ARRAYSZ)       96 (bytes)
 0x000000000000001a (FINI_ARRAY)         0x54e060
 0x000000000000001c (FINI_ARRAYSZ)       8 (bytes)
 0x0000000000000004 (HASH)               0x158
 0x0000000000000005 (STRTAB)             0x17340
 0x0000000000000006 (SYMTAB)             0x43c8
 0x000000000000000a (STRSZ)              106851 (bytes)
 0x000000000000000b (SYMENT)             24 (bytes)
 0x0000000000000003 (PLTGOT)             0x5536d8
 0x0000000000000002 (PLTRELSZ)           48120 (bytes)
 0x0000000000000014 (PLTREL)             RELA
 0x0000000000000017 (JMPREL)             0x3b538
 0x0000000000000007 (RELA)               0x32f10
 0x0000000000000008 (RELASZ)             34344 (bytes)
 0x0000000000000009 (RELAENT)            24 (bytes)
 0x000000006ffffffe (VERNEED)            0x32df0
 0x000000006fffffff (VERNEEDNUM)         4
 0x000000006ffffff0 (VERSYM)             0x314a4
 0x000000006ffffff9 (RELACOUNT)          866
 0x0000000000000000 (NULL)               0x0
readelf -d ~/usr/lib/libfactory.so

Dynamic section at offset 0xdad40 contains 32 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libsingular_resources-4.0.3.so]
 0x0000000000000001 (NEEDED)             Shared library: [libomalloc-0.9.6.so]
 0x0000000000000001 (NEEDED)             Shared library: [libflint.so.13]
 0x0000000000000001 (NEEDED)             Shared library: [libgmp.so.10]
 0x0000000000000001 (NEEDED)             Shared library: [libstdc++.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libm.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x000000000000000e (SONAME)             Library soname: [libfactory-4.0.3.so]
 0x000000000000000f (RPATH)              Library rpath: [/storage/strogdon/gentoo-rap/usr/lib64]
 0x000000000000000c (INIT)               0x210d8
 0x000000000000000d (FINI)               0xa7860
 0x0000000000000019 (INIT_ARRAY)         0x2da0f8
 0x000000000000001b (INIT_ARRAYSZ)       64 (bytes)
 0x000000000000001a (FINI_ARRAY)         0x2da138
 0x000000000000001c (FINI_ARRAYSZ)       8 (bytes)
 0x0000000000000004 (HASH)               0x158
 0x0000000000000005 (STRTAB)             0xc3f8
 0x0000000000000006 (SYMTAB)             0x2ac8
 0x000000000000000a (STRSZ)              55100 (bytes)
 0x000000000000000b (SYMENT)             24 (bytes)
 0x0000000000000003 (PLTGOT)             0x2db198
 0x0000000000000002 (PLTRELSZ)           16560 (bytes)
 0x0000000000000014 (PLTREL)             RELA
 0x0000000000000017 (JMPREL)             0x1d028
 0x0000000000000007 (RELA)               0x1a898
 0x0000000000000008 (RELASZ)             10128 (bytes)
 0x0000000000000009 (RELAENT)            24 (bytes)
 0x000000006ffffffe (VERNEED)            0x1a7f8
 0x000000006fffffff (VERNEEDNUM)         3
 0x000000006ffffff0 (VERSYM)             0x19b34
 0x000000006ffffff9 (RELACOUNT)          11
 0x0000000000000000 (NULL)               0x0

No libntl and this is the way it is on Gentoo also.

kiwifb commented 7 years ago

Yes a check on a regular gentoo box says that libfactory.so should have libntl in the needed section. Probably a configuration problem. Don't use singular 4.1.0 yet. This is definitely not working with sage yet.

strogdon commented 7 years ago

Yes, I only used 4.1.0 to test. Here on Gentoo libfactory.so needs libntl but no for libSingular.so.

kiwifb commented 7 years ago

Do you have build logs for singular?

kiwifb commented 7 years ago

That's a stupid macro to detect ntl, your build log if you have one may show that ntl wasn't found at configuration. You can grep for checking for NTL.

kiwifb commented 7 years ago

The macro for flint is barely better but it's been tweaked quite heavily. The whole lot should get a serious rewrite.

kiwifb commented 7 years ago

I just pushed an update to the singular ebuilds. Can you sync and merge 4.0.3p5 and try again.

strogdon commented 7 years ago

That was apparently it. Now,

sage -t --long usr/lib64/python2.7/site-packages/sage/schemes/curves/constructor.py
    [32 tests, 1.91 s]
----------------------------------------------------------------------
All tests passed!
----------------------------------------------------------------------
Total time for all tests: 1.9 seconds
    cpu time: 1.9 seconds
    cumulative wall time: 1.9 seconds
kiwifb commented 7 years ago

closed by 932f9f54954a019d452c04067c010c05de16cc1c