conda-forge / pillow-feedstock

A conda-smithy repository for pillow.
BSD 3-Clause "New" or "Revised" License
2 stars 30 forks source link

Rebuild for PyPy3.8 and PyPy3.9 #116

Closed regro-cf-autotick-bot closed 2 years ago

regro-cf-autotick-bot commented 2 years ago

This PR has been triggered in an effort to update pypy38.

Notes and instructions for merging this PR:

  1. Please merge the PR only after the tests have passed.
  2. Feel free to push to the bot's branch to update this PR if needed.

Please note that if you close this PR we presume that the feedstock has been rebuilt, so if you are going to perform the rebuild yourself don't close this PR until the your rebuild has been merged.

If this PR was opened in error or needs to be updated please add the bot-rerun label to this PR. The bot will close this PR and schedule another one. If you do not have permissions to add this label, you can use the phrase code>@<space/conda-forge-admin, please rerun bot in a PR comment to have the conda-forge-admin add it for you.

This PR was created by the regro-cf-autotick-bot. The regro-cf-autotick-bot is a service to automatically track the dependency graph, migrate packages, and propose package version updates for conda-forge. Feel free to drop us a line if there are any issues! This PR was generated by https://github.com/regro/autotick-bot/actions/runs/2087506005, please use this URL for debugging.

conda-forge-linter commented 2 years ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

h-vetinari commented 2 years ago

Something is off with tk on osx:

        # Version sanity checks
        tk_version = self.tk.getvar('tk_version')
        if tk_version != _tkinter.TK_VERSION:
>           raise RuntimeError("tk.h version (%s) doesn't match libtk.a version (%s)"
                               % (_tkinter.TK_VERSION, tk_version))
E           RuntimeError: tk.h version (8.6) doesn't match libtk.a version (8.5)

The environment contains

tk:                 8.6.12-h5dbffcc_0         conda-forge

so not sure where libtk.a is coming from - is pypy vendoring that? Also, why is a static library being used for anything at runtime...? 🤔

CC @mattip

jakirkham commented 2 years ago

Is it trying to use the macOS TK Framework?

mattip commented 2 years ago

is pypy vendoring that

I don't have a good answer for the rest of the questions: but at least I can say that I do not see libtk.a in a pypy conda environment via conda create -n pypy38 pypy python=3.8.

h-vetinari commented 2 years ago

so not sure where libtk.a is coming from

It's probably just coming from the error message. I checked that tk does not come with a libtk.a, but still the loader manages to think that the header and the lib are out of sync. This seems to be purely a tk issue though, not a pillow one.

jakirkham commented 2 years ago

This is why I'm wondering about Frameworks. Am on macOS 12.2 and the included Tk Framework is 8.5 (IIRC it has been 8.5 for a long time).

mattip commented 2 years ago

On macOS 12.3 I could not reproduce the problem. Maybe I need to install some framework first? I ran

conda debug -m .ci_support/osx_64_python3.8.____73_pypy.yaml recipe

then following the directions to enter the build environment with

cd /Users/matti/mambaforge-pypy3/envs/conda-build/conda-bld/debug_1649244354273/work && \
    source /Users/matti/mambaforge-pypy3/envs/conda-build/conda-bld/debug_1649244354273/work/build_env_setup.sh

and ran ./conda_build.sh which successfully built Pillow. Then I tried

conda install boa
conda  mambabuild ./recipe -m ./.ci_support/osx_64_python3.9.____73_pypy.yaml --suppress-variables \
    --clobber-file ./.ci_support/clobber_osx_64_python3.9.____73_pypy.yaml

which successfully built the package, and failed a single test.

jakirkham commented 2 years ago

Sorry if this seems like an obvious question, but do you have Xcode installed? Also Xcode's command line tools? Ask as these would contain the build components related to system frameworks

h-vetinari commented 2 years ago

This is why I'm wondering about Frameworks. Am on macOS 12.2 and the included Tk Framework is 8.5

And - for whatever reason - this only seems to affect pypy, not cpython (as the jobs are run in the same images).

mattip commented 2 years ago

do you have Xcode installed? Also Xcode's command line tools?

Yes. This is an M1 machine so I am using the x86_64 conda to run the commands. Here is gcc:

% arch -arch x86_64 gcc --version
Apple clang version 13.1.6 (clang-1316.0.21.2)
Target: x86_64-apple-darwin21.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
mattip commented 2 years ago

Could it be the addition of -isystem when compiling on PyPy? In a successful run on CPython, the compilation looks like

creating build/temp.macosx-10.9-x86_64-3.7/src/Tk
x86_64-apple-darwin13.4.0-clang \
    -fno-strict-aliasing -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O3 -Wall \
    -Wstrict-prototypes -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC \ 
    -fPIE -fstack-protector-strong -O3 -pipe \
    -fdebug-prefix-map=${SRC_DIR}=/usr/local/src/conda/${PKG_NAME}-${PKG_VERSION} \
    -fdebug-prefix-map=/Users/runner/miniforge3/conda-bld/pillow_1649048758441

In a unsuccessful run on PyPy, the compilation looks like

creating build/temp.macosx-10.9-x86_64-3.8/src/Tk
x86_64-apple-darwin13.4.0-clang \
    -DNDEBUG -O2 -march=core2 -mtune=haswell -mssse3 -ftree-vectorize \
    -fPIC -fPIE -fstack-protector-strong -O2 -pipe \
    -isystem /Users/runner/miniforge3/conda-bld/pillow_1649048796111

I can't find isystem in PyPy nor in Pillow.

isuruf commented 2 years ago

With the new file layout, https://foss.heptapod.net/pypy/pypy/-/blob/branch/py3.8/lib_pypy/_tkinter/app.py#L47 seems to need an extra dirname

mattip commented 2 years ago

With the new file layout, https://foss.heptapod.net/pypy/pypy/-/blob/branch/py3.8/lib_pypy/_tkinter/app.py#L47 seems to need an extra dirname

Wow, good catch. I opened conda-forge/pypy3.6-feedstock#80

mattip commented 2 years ago

Linux cannot open a gui on CI, so the check root=tkinter.Tk() cannot succeed. On macOS something is wrong with the runtimes:

version conflict for package "Tcl": have 8.6.12, need exactly 8.6.6
mattip commented 2 years ago

@conda-forge-admin, please restart ci

mattip commented 2 years ago

whoops, I needed to wait till CDN replicates after merging conda-forge/pypy3.6-feedstock#81

jakirkham commented 2 years ago

Restarting to see if this is now fixed 🍀

h-vetinari commented 2 years ago

Better to fully restart CI to make sure the other platforms also work with https://github.com/conda-forge/pypy3.6-feedstock/pull/81, now that the builds are through the CDN.

h-vetinari commented 2 years ago

One cpython build on aarch seems stuck (or extremely slow), but that's not an issue. Merging.