Skip to content

pypy3.8 (new formula) pypy3.9 (new formula)#126697

Closed
mattip wants to merge 31 commits into
Homebrew:masterfrom
mattip:pypy3-updates-revisited
Closed

pypy3.8 (new formula) pypy3.9 (new formula)#126697
mattip wants to merge 31 commits into
Homebrew:masterfrom
mattip:pypy3-updates-revisited

Conversation

@mattip

@mattip mattip commented Mar 26, 2023

Copy link
Copy Markdown
Contributor
  • Have you followed the guidelines for contributing?
  • Have you ensured that your commits follow the commit style guide?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?

Replaces #117699, by adding a single commit to avoid the tklib tcl/tk package (like CPython) since there is a problem with the Apple-provided libraries.

@BrewTestBot BrewTestBot added the automerge-skip `brew pr-automerge` will skip this pull request label Mar 26, 2023
@mattip

mattip commented Mar 26, 2023

Copy link
Copy Markdown
Contributor Author

@tonybaloney: thanks for the first 30 commits, I built on that to remove the tklib library

@mattip

mattip commented Mar 26, 2023

Copy link
Copy Markdown
Contributor Author

The recipe is failing with

==> brew linkage --test pypy3.8
==> FAILED
Full linkage --test pypy3.8 output
Truncated linkage --test pypy3.8 output
  Error: Broken dependencies:
    /opt/homebrew/opt/tcl-tk/lib/libtcl8.6.dylib (tcl-tk)
    /opt/homebrew/opt/tcl-tk/lib/libtk8.6.dylib (tcl-tk)

but there should be no use of libtcl in the recipe. How can I find out what is going on?

@tonybaloney

Copy link
Copy Markdown

The recipe is failing with

==> brew linkage --test pypy3.8
==> FAILED
Full linkage --test pypy3.8 output
Truncated linkage --test pypy3.8 output
  Error: Broken dependencies:
    /opt/homebrew/opt/tcl-tk/lib/libtcl8.6.dylib (tcl-tk)
    /opt/homebrew/opt/tcl-tk/lib/libtk8.6.dylib (tcl-tk)

but there should be no use of libtcl in the recipe. How can I find out what is going on?

My understanding of the issue is that PyPy will link to TCL-TK if it is installed, regardless of whether the environment variable is set. https://foss.heptapod.net/pypy/pypy/-/blob/branch/default/lib_pypy/_tkinter/tklib_build.py#L22-28

The issue you're seeing in the build means that PyPy has linked to TCL-TK when it was installed as a dependency of another package (which it shouldn't).

The environment variable, PYPY_PACKAGE_WITHOUTTK only seems to impact Windows builds looking at the source and how options.no__tkinter is used https://foss.heptapod.net/pypy/pypy/-/blob/branch/default/pypy/tool/release/package.py

@mattip

mattip commented Mar 27, 2023

Copy link
Copy Markdown
Contributor Author

There is additional logic to skip package building when the no_<package> option is set. Is there a way to increase verbosity and/or run the recipe locally?

@SMillerDev

Copy link
Copy Markdown
Member

There is additional logic to skip package building when the no_ option is set. Is there a way to increase verbosity and/or run the recipe locally?

brew install --debug --verbose <package> is the most verbose you can get.

@carlocab

Copy link
Copy Markdown
Member

Just keep tklib, TBH. I'm not sure it's worth the effort trying to excise it.

While you're at it, could you try to clean up your branch a little? At minimum, each commit should modify at most one formula at a time.

Finally, let's not delete pypy3. I suggest renaming it to pypy3.7 and adding a pypy3 alias pointing to pypy3.9.

@mattip

mattip commented Mar 28, 2023

Copy link
Copy Markdown
Contributor Author

Just keep tklib, TBH. I'm not sure it's worth the effort trying to excise it.

That was where #117699 ended up. But it seems there is no way to use the homebrew tk/tcl libraries in a recipe. Is there a way to fix that?

@carlocab

Copy link
Copy Markdown
Member

I'm not sure I understand -- the linkage failure is precisely because the build is using Homebrew tcl-tk, so trying to use it is broken because Homebrew tcl-tk is not installed.

@mattip

mattip commented Mar 29, 2023

Copy link
Copy Markdown
Contributor Author

When installing homebrew tcl-tk, the build complains

Dependency 'tcl-tk' is provided by macOS; please replace 'depends_on' with 'uses_from_macos'

But when using macos tcl-tk, there is an error about missing X11 headers

In file included from _tkinter/__pycache__/_cffi__gd50bda0axe0f95f31.c:56:
  /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/tk.h:86:11: \
    fatal error: 'X11/Xlib.h' file not found
  #       include <X11/Xlib.h>

I don't have MacOSX13 headers on my machine. I do have MacOSX11.3, MacOSX12.1, and MacOSX12.3, and all those have X11 headers.

@carlocab

Copy link
Copy Markdown
Member

When installing homebrew tcl-tk, the build complains


Dependency 'tcl-tk' is provided by macOS; please replace 'depends_on' with 'uses_from_macos'

That's fine. We can ignore that failure because we know the system one doesn't work.

@mattip

mattip commented Mar 29, 2023

Copy link
Copy Markdown
Contributor Author

We can ignore that failure

Such a fix would allow #117699 to pass tests, and then I can close this PR.

@mattip

mattip commented Apr 9, 2023

Copy link
Copy Markdown
Contributor Author

@carlocab what is the incantation to ignore the "Dependency 'tcl-tk' is provided by macOS; please replace 'depends_on' with 'uses_from_macos'" error?

@carlocab carlocab added the CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. label Apr 9, 2023
@carlocab

carlocab commented Apr 9, 2023

Copy link
Copy Markdown
Member

Just leave it be; we can merge this if that's the only error.

Please do clean up your branch though.

@ywwry66

ywwry66 commented Apr 13, 2023

Copy link
Copy Markdown
Contributor

Such a fix would allow #117699 to pass tests, and then I can close this PR.

Linux build failed in the previous PR.

@github-actions

github-actions Bot commented May 4, 2023

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions Bot added the stale No recent activity label May 4, 2023
@github-actions github-actions Bot closed this May 11, 2023
@github-actions github-actions Bot added the outdated PR was locked due to age label Jun 13, 2023
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jun 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

automerge-skip `brew pr-automerge` will skip this pull request CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. outdated PR was locked due to age stale No recent activity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants