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

Linux wheels do not work #51

Closed
oscarbenjamin opened this issue Aug 13, 2023 · 12 comments · Fixed by #57
Closed

Linux wheels do not work #51

oscarbenjamin opened this issue Aug 13, 2023 · 12 comments · Fixed by #57

Comments

@oscarbenjamin
Copy link
Collaborator

See the discussion at #1 (comment) for background.

Following #1 and the release of python-flint 0.4.1 the situation is now that there are binary wheels for python-flint available on PyPI for Windows and for OSX (x86-64 and arm64).

However the wheels for Linux are not on PyPI because they seem to be broken: they crash immediately when I try to use them on my own Linux computer after downloading them. There are Linux wheels being built in CI (for every pull request and commit to master). The wheels are tested in CI and they apparently work there. Since they don't work on my computer I have not uploaded them to PyPI though.

I tried a few things to investigate this but I'm basically stuck and also out of time to work on this so for now on Linux you should build from source and I have updated the instructions for doing this in the README and added CI tests that those instructions do actually work.

The problem is somehow to do with ABI compatibility and possibly something to do with libc. Theoretically the CI setup with cibuildwheel, the manylinux docker containers and auditwheel should prevent this sort of problem from happening but somehow that does not work. I don't know if that is somehow a bug in one of those tools or if it is something that can be fixed easily in python-flint itself.

I'm leaving this here as an open issue if anyone would like to work on it but I have no immediate suggestions to fix the problem and I am not going to spend any more time trying right now.

@isuruf
Copy link
Member

isuruf commented Aug 15, 2023

Do you have a link to download the broken linux wheels?

@oscarbenjamin
Copy link
Collaborator Author

Do you have a link to download the broken linux wheels?

Can you see the artifacts in CI? Wheels are built in CI for every PR and every master commit. The files are too large for me to attach directly in this comment but I could perhaps upload them somewhere else.

@isuruf isuruf mentioned this issue Aug 15, 2023
@NathanDunfield
Copy link

NathanDunfield commented Aug 15, 2023

I was able to download the wheels from the CI, specifically this version. They worked for me, with all tests passing, on the four platforms I tried (all x86_64):

  1. The official Python 3.11 Docker image based on Debian 12 bookworm.

  2. Ubuntu 22.04 (running as a virtual machine on an iMacPro) with Python 3.10.

  3. Centos 7.9 with Python 3.11 from condaforge.

  4. An official Python 3.9 Docker image, based on Debian 11 bullseye.

@oscarbenjamin
Copy link
Collaborator Author

Thanks @isuruf !

Thanks also @NathanDunfield, I am testing them now myself and seems good so far!

(39venv) oscar@nuc:~/current/active/python-flint/release/isuru$ python -m flint.test
Running tests...
test_pyflint...OK
test_fmpz...OK
test_fmpz_factor...OK
test_fmpz_functions...OK
test_fmpz_poly...OK
test_fmpz_poly_factor...OK
test_fmpz_poly_functions...OK
test_fmpz_mat...OK
test_fmpz_series...OK
test_fmpq...OK
test_fmpq_poly...OK
test_fmpq_mat...OK
test_fmpq_series...OK
test_nmod...OK
test_nmod_poly...OK
test_nmod_mat...OK
test_arb...OK
Running doctests...
flint.test: all 17 tests passed!
flint.test: all 1619 doctests passed!
----------------------------------------
OK: Your installation of python-flint seems to be working just fine!
----------------------------------------

I will do a bit more testing but then put out a new 0.4.2 release with this I think.

@oscarbenjamin
Copy link
Collaborator Author

So the problem then was due to a typo in the bash code that prevented the --host argument being set from here:

--host x86_64-pc-linux-gnu\

I guess I should use set -u in bash:

@oscarbenjamin
Copy link
Collaborator Author

I will do a bit more testing but then put out a new 0.4.2 release with this I think.

@isuruf are any changes needed for python-flint to get a conda package of the latest release out?

@isuruf
Copy link
Member

isuruf commented Aug 15, 2023

Nope. There's already a 0.4.1 conda package out.

@oscarbenjamin
Copy link
Collaborator Author

There's already a 0.4.1 conda package out.

Nice! Thanks again and I'll ping back here once 0.4.2 is on PyPI (just need to change versions, README, etc).

@oscarbenjamin
Copy link
Collaborator Author

@isuruf is the conda package only for OSX and Linux?

I don't see any mention of Windows here:
https://anaconda.org/conda-forge/python-flint/files

I'm just writing installation instructions in the README and I'm not quite sure what I should say about conda (it should probably be mentioned if Windows is not yet supported):

For Windows (x86-64) or OSX (x86-64 or arm64) or Linux (x86-64
`manylinux_2_17`) there are binary wheels for python-flint on PyPI. These can
be installed with `pip` as

    pip install python-flint

Alternatively python-flint can be installed using `conda`

    conda install -c conda-forge python-flint

@oscarbenjamin
Copy link
Collaborator Author

I see from conda-forge/python-flint-feedstock#27 that Windows is being added to conda. I'll put the README as shown above and not mention anything about Windows because presumably anything I say would be out of date quickly.

@isuruf
Copy link
Member

isuruf commented Aug 15, 2023

Windows packages were not added because the tests were failing. Now that the windows issues are fixed, we can add them back.

@oscarbenjamin
Copy link
Collaborator Author

I've opened #58 for releasing 0.4.2. Once CI passes I will merge and then immediately push to PyPI.

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

Successfully merging a pull request may close this issue.

3 participants