Skip to content

Conversation

@agriyakhetarpal
Copy link
Member

@agriyakhetarpal agriyakhetarpal commented May 16, 2025

For some reason python-flint failed on main: https://github.com/pyodide/pyodide-recipes/actions/runs/15062463362/job/42340019530

In pyodide/pyodide#5626, we pinned Cython<3.1, but this seems to be resolved as python-flint 0.7.1 (which is being updated to here) is now compatible with Cython 3.1.0a1.

This PR updates the versions of python-flint and FLINT, and updates FLINT's build script for WASM compilation.

@agriyakhetarpal
Copy link
Member Author

agriyakhetarpal commented May 16, 2025

So I think there's a bug here in calc_diff.py that didn't come up before—or we could maybe call it a missing feature—as I would have expected that the script would automatically calculate that building python-flint also requires flint, libgmp, and libmpfr to be built, too. I don't think there is a nice way to grab all the dependencies from the recipe file as a list and pass it along to pyodide build-recipes <...>, or is there? Because even if we were to do it and ask it to build flint,libgmp,libmpfr,python-flint, it would have seen that the first three were built already and stored in the repodata, and would proceed to build just python-flint (as intended).

@agriyakhetarpal agriyakhetarpal changed the title Fix python-flint build failure Fix python-flint build failure [full build] May 16, 2025
@agriyakhetarpal
Copy link
Member Author

Should we also allow full builds on labels and on commit messages? I didn't look too closely and I noticed that it applies only to the PR title.

@agriyakhetarpal
Copy link
Member Author

FLINT is definitely found, the error from the Meson logs is here:

  -----------                                                                     
  Command line:                                                                   
  `/home/runner/work/pyodide-recipes/pyodide-recipes/packages/python-flint/build/p
  ywasmcross_symlinks/cc                                                          
  /home/runner/work/pyodide-recipes/pyodide-recipes/packages/python-flint/build/py
  thon-flint-0.7.1/.mesonpy-7oz5c94k/meson-private/tmpg2r5r3gk/testfile.c -o      
  /home/runner/work/pyodide-recipes/pyodide-recipes/packages/python-flint/build/py
  thon-flint-0.7.1/.mesonpy-7oz5c94k/meson-private/tmpg2r5r3gk/output.o -c        
  -D_FILE_OFFSET_BITS=64 -O0 -Werror=implicit-function-declaration                
  -Werror=unknown-warning-option -Werror=unused-command-line-argument             
  -Werror=ignored-optimization-argument` -> 1                                     
  stderr:                                                                         
  /home/runner/work/pyodide-recipes/pyodide-recipes/packages/python-flint/build/py
  thon-flint-0.7.1/.mesonpy-7oz5c94k/meson-private/tmpg2r5r3gk/testfile.c:3:39:   
  error: 'a' declared as an array with a negative size                            
      3 |         int main(void) { static int a[1-2*!(sizeof(void *) > 7)];       
  a[0]=0; return 0; }                                                             
        |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~         
  1 error generated.                                                              
  -----------

@agriyakhetarpal
Copy link
Member Author

Okay, so python-flint is building perfectly now: https://github.com/pyodide/pyodide-recipes/actions/runs/15077583734/job/42388339511?pr=91#step:15:371

The tests are still running, so we should be good to merge once they pass, or I'll have more things to do here :)

@agriyakhetarpal
Copy link
Member Author

Okay, the python-flint tests are passing but I don't see why the other failures don't show up in other PRs; these packages are not related to python-flint in any way. I'll debug them later today.

Copy link
Member

@ryanking13 ryanking13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Okay, the python-flint tests are passing but I don't see why the other failures don't show up in other PRs; these packages are not related to python-flint in any way. I'll debug them later today.

@agriyakhetarpal Those are because of a new Cython version. pyodide/pyodide#5626.

You can run ./tools/sync_packages.sh to apply the changes from the pyodide/pyodide repository. It may remove some changes like #90. So you'll cherry-pick some changes though.

@ryanking13
Copy link
Member

I'll go ahead and merge this, so I can fix other cython related issues. Thanks @agriyakhetarpal!

@ryanking13 ryanking13 marked this pull request as ready for review May 19, 2025 06:24
@ryanking13 ryanking13 merged commit 01f133c into pyodide:main May 19, 2025
2 of 3 checks passed
@agriyakhetarpal agriyakhetarpal deleted the python-flint-update branch May 19, 2025 06:31
@agriyakhetarpal
Copy link
Member Author

Thanks for the review and for getting to them before I could! :)

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 this pull request may close these issues.

2 participants