Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spkg-configure.m4 for eclib does not check for correct version of the system installed library #28943

Closed
strogdon opened this issue Jan 2, 2020 · 17 comments

Comments

@strogdon
Copy link

strogdon commented Jan 2, 2020

Sage-9.0 is out which requires at least eclib-20190909. spkg-configure.m4 for eclib checks for version >=20190226. With system eclib-20190226-r1 installed Sage builds without complaint. From config.log

configure:18419: result: yes; use eclib from the system

But with version 20190226 this doctest fails

sage -t --long src/sage/libs/eclib/interface.py
**********************************************************************
File "src/sage/libs/eclib/interface.py", line 359, in sage.libs.eclib.interface.mwrank_EllipticCurve.?
Failed example:
    EllipticCurve([0, prod(prime_range(100))]).mwrank_curve().two_descent()
Expected:
    Traceback (most recent call last):
    ...
    RuntimeError: A 2-descent did not complete successfully.
Got:
    Basic pair: I=0, J=-62250335026528997468333757977957413890
    disc=-3875104210915102959939644358548402200900731760187126282616072842416764932100
    2-adic index bound = 2
    2-adic index = 2
    Two (I,J) pairs
    Looking for quartics with I = 0, J = -62250335026528997468333757977957413890
    Looking for Type 3 quartics:
    Trying positive a from 1 up to 1144080564738 (square a first...)
    Traceback (most recent call last):
      File "/64bitdev/storage/sage-git_develop/sage/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 681, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/64bitdev/storage/sage-git_develop/sage/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 1123, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.libs.eclib.interface.mwrank_EllipticCurve.?[1]>", line 1, in <module>
        EllipticCurve([Integer(0), prod(prime_range(Integer(100)))]).mwrank_curve().two_descent()
      File "/64bitdev/storage/sage-git_develop/sage/local/lib/python3.7/site-packages/sage/libs/eclib/interface.py", line 386, in two_descent
        second_descent)
      File "sage/libs/eclib/mwrank.pyx", line 1062, in sage.libs.eclib.mwrank._two_descent.do_descent (build/cythonized/sage/libs/eclib/mwrank.cpp:5092)
        sig_on()
    RuntimeError: Aborted
**********************************************************************
File "src/sage/libs/eclib/interface.py", line 597, in sage.libs.eclib.interface.mwrank_EllipticCurve.saturate
Failed example:
    E.saturation([Q1,Q2])
Expected:
    ([(1 : -27 : 1), (157 : 1950 : 1)], 3, 0.801588644684981)
Got:
    Attempt to round -0.2617840677e25 to a long int fails, aborting!
    ([(1 : -27 : 1), (157 : 1950 : 1)], 3, 0.801588644684981)
**********************************************************************
2 items had failures:
   1 of   6 in sage.libs.eclib.interface.mwrank_EllipticCurve.?
   1 of   9 in sage.libs.eclib.interface.mwrank_EllipticCurve.saturate
    [192 tests, 2 failures, 10.93 s]

CC: @dimpase @embray @kiwifb @isuruf @orlitzky

Component: build: configure

Keywords: configure, eclib

Reviewer: Steven Trogdon

Issue created by migration from https://trac.sagemath.org/ticket/28943

@strogdon strogdon added this to the sage-9.1 milestone Jan 2, 2020
@strogdon
Copy link
Author

strogdon commented Jan 2, 2020

comment:1

From the linking:

ldd -r local/lib/python3.7/site-packages/sage/libs/eclib/mwrank.cpython-37m-x86_64-linux-gnu.so 
	linux-vdso.so.1 (0x00007ffc0ddb8000)
	libec.so.5 => /usr/lib64/libec.so.5 (0x00007fa536d6a000)
	libntl.so.42 => /usr/lib64/libntl.so.42 (0x00007fa53691b000)
	libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/libstdc++.so.6 (0x00007fa5364a8000)
	libpython3.7m.so.1.0 => /64bitdev/storage/sage-git_develop/sage/local/lib/libpython3.7m.so.1.0 (0x00007fa535f68000)
	libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/libgcc_s.so.1 (0x00007fa535d51000)
	libc.so.6 => /lib64/libc.so.6 (0x00007fa535981000)
	libflint.so.13 => /usr/lib64/libflint.so.13 (0x00007fa53541a000)
	libpari-gmp.so.6 => /usr/lib64/libpari-gmp.so.6 (0x00007fa534a68000)
	libm.so.6 => /lib64/libm.so.6 (0x00007fa534723000)
	libgmp.so.10 => /usr/lib64/libgmp.so.10 (0x00007fa5344ae000)
	libgf2x.so.1 => /usr/lib64/libgf2x.so.1 (0x00007fa534294000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fa537453000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fa534073000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007fa533e6f000)
	libutil.so.1 => /lib64/libutil.so.1 (0x00007fa533c6c000)
	libmpfr.so.6 => /usr/lib64/libmpfr.so.6 (0x00007fa5339ef000)

This was mentioned as a potential problem in ticket #28333.

@dimpase
Copy link
Member

dimpase commented Jan 3, 2020

comment:3

In Sept 2019 I proposed a PR adding pkg-configure support to eclib: JohnCremona/eclib#58

which is now in upstream. It should make version detection trivial.

Anyway, these failing tests are not something to worry about too much, as far as I can see, there are about not very graceful error recovery or some warnings printed in wrong moments.

@mkoeppe
Copy link
Member

mkoeppe commented Mar 22, 2020

comment:4

See also #29389

@kliem
Copy link
Contributor

kliem commented Apr 10, 2020

comment:5

To me those failures don't look like a good reason to reject eclib-20190226-r1. How about just fixing those doctests?

@dimpase
Copy link
Member

dimpase commented Apr 12, 2020

comment:6

I don't know how to make these tests to work for this and later versions at the same time, without making them weaker.

@kliem
Copy link
Contributor

kliem commented Apr 12, 2020

comment:7

I see your point. E.g. in the first example we are really checking that something with the API works correctly. If we accept any type of RuntimeError, we don't check this anymore.

@jhpalmieri
Copy link
Member

comment:8

I don't if this is the right ticket for this comment: on an Ubuntu virtual machine, I happened to have libec-dev installed but not eclib-tools, so there was no mwrank executable. Sage did not detect this and used the system's eclib installation, make succeeded, but then there were naturally doctest failures. I don't know m4 syntax, but it looks like it's checking for headers and libraries, not the presence of mwrank.

@kiwifb
Copy link
Member

kiwifb commented Apr 16, 2020

comment:9

That could be done with AC_CHECK_PROG[MWRANK,mwrank,has_mwrank=yes,has_mwrank=no,,] or something like that. Using AC_PATH_PROG is also an option (the main difference is that it returns an absolute path to the executable).

@mkoeppe
Copy link
Member

mkoeppe commented Apr 17, 2020

comment:12

The check for mwrank definitely needs to be added for 9.1. I don't know about the other failures described on this ticket.

@mkoeppe
Copy link
Member

mkoeppe commented Apr 18, 2020

comment:13

I have created #29526 for this.

@mkoeppe mkoeppe modified the milestones: sage-9.1, sage-9.2 Apr 18, 2020
@mkoeppe
Copy link
Member

mkoeppe commented Aug 7, 2020

comment:14

Does anything remain to be fixed on this ticket?

@mkoeppe
Copy link
Member

mkoeppe commented Aug 15, 2020

comment:15

Replying to @mkoeppe:

Does anything remain to be fixed on this ticket?

Yes. The errors in the ticket description are reproduced on ubuntu-eoan-standard (https://github.com/mkoeppe/sage/runs/985563520)

@strogdon
Copy link
Author

comment:16

Replying to @mkoeppe:

Replying to @mkoeppe:

Does anything remain to be fixed on this ticket?

Yes. The errors in the ticket description are reproduced on ubuntu-eoan-standard (https://github.com/mkoeppe/sage/runs/985563520)

If JohnCremona/eclib#58 solves the issue then perhaps eclib should be patched until a newer version is available.

@mkoeppe
Copy link
Member

mkoeppe commented Aug 15, 2020

comment:17

This calls for a bug report to the distribution that is packaging the faulty eclib.

@mkoeppe mkoeppe modified the milestones: sage-9.2, sage-9.3 Oct 24, 2020
@strogdon
Copy link
Author

strogdon commented Mar 1, 2021

comment:19

Replying to @mkoeppe:

This calls for a bug report to the distribution that is packaging the faulty eclib.

The pull request JohnCremona/eclib#58 appears to be in eclib-20210226, the current version at https://github.com/JohnCremona/eclib. Perhaps this ticket should be closed and work started on upgrading eclib, i.e. #31443.

@slel
Copy link
Member

slel commented Mar 20, 2021

comment:20

Superseded by #31443.

@slel slel removed this from the sage-9.3 milestone Mar 20, 2021
@strogdon
Copy link
Author

Reviewer: Steven Trogdon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants