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

Installation fails on Python 3.11 #60

Open
jenskutilek opened this issue Oct 26, 2022 · 1 comment · Fixed by #61
Open

Installation fails on Python 3.11 #60

jenskutilek opened this issue Oct 26, 2022 · 1 comment · Fixed by #61

Comments

@jenskutilek
Copy link

  × Building wheel for skia-pathops (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [190 lines of output]
      /private/var/folders/0p/363b1k3m8xj25y001s62jj8r0000gq/T/pip-build-env-alqh853m/overlay/lib/python3.11/site-packages/setuptools/config/setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
        warnings.warn(msg, warning_class)
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-10.9-universal2-cpython-311
      creating build/lib.macosx-10.9-universal2-cpython-311/pathops
      copying src/python/pathops/_version.py -> build/lib.macosx-10.9-universal2-cpython-311/pathops
      copying src/python/pathops/__init__.py -> build/lib.macosx-10.9-universal2-cpython-311/pathops
      copying src/python/pathops/operations.py -> build/lib.macosx-10.9-universal2-cpython-311/pathops
      running build_ext
      building 'pathops._pathops' extension
      creating build/temp.macosx-10.9-universal2-cpython-311
      creating build/temp.macosx-10.9-universal2-cpython-311/src
      creating build/temp.macosx-10.9-universal2-cpython-311/src/python
      creating build/temp.macosx-10.9-universal2-cpython-311/src/python/pathops
      clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -Isrc/cpp/skia-builder/skia -Isrc/cpp/skia-builder/skia/src -I/Users/kuti/Code/lfFontTools/.tox/p311/include -I/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c src/python/pathops/_pathops.cpp -o build/temp.macosx-10.9-universal2-cpython-311/src/python/pathops/_pathops.o -std=c++14 -stdlib=libc++ -mmacosx-version-min=10.9
      src/python/pathops/_pathops.cpp:39778:21: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
                          CYTHON_FALLTHROUGH;
                          ^
      src/python/pathops/_pathops.cpp:364:34: note: expanded from macro 'CYTHON_FALLTHROUGH'
            #define CYTHON_FALLTHROUGH [[fallthrough]]
                                       ^
      src/python/pathops/_pathops.cpp:39789:21: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
                          CYTHON_FALLTHROUGH;
                          ^
      src/python/pathops/_pathops.cpp:364:34: note: expanded from macro 'CYTHON_FALLTHROUGH'
            #define CYTHON_FALLTHROUGH [[fallthrough]]
                                       ^
      src/python/pathops/_pathops.cpp:39902:21: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
                          CYTHON_FALLTHROUGH;
                          ^
      src/python/pathops/_pathops.cpp:364:34: note: expanded from macro 'CYTHON_FALLTHROUGH'
            #define CYTHON_FALLTHROUGH [[fallthrough]]
                                       ^
      src/python/pathops/_pathops.cpp:39913:21: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
                          CYTHON_FALLTHROUGH;
                          ^
      src/python/pathops/_pathops.cpp:364:34: note: expanded from macro 'CYTHON_FALLTHROUGH'
            #define CYTHON_FALLTHROUGH [[fallthrough]]
                                       ^
      4 warnings generated.
      src/python/pathops/_pathops.cpp:39778:21: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
                          CYTHON_FALLTHROUGH;
                          ^
      src/python/pathops/_pathops.cpp:364:34: note: expanded from macro 'CYTHON_FALLTHROUGH'
            #define CYTHON_FALLTHROUGH [[fallthrough]]
                                       ^
      src/python/pathops/_pathops.cpp:39789:21: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
                          CYTHON_FALLTHROUGH;
                          ^
      src/python/pathops/_pathops.cpp:364:34: note: expanded from macro 'CYTHON_FALLTHROUGH'
            #define CYTHON_FALLTHROUGH [[fallthrough]]
                                       ^
      src/python/pathops/_pathops.cpp:39902:21: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
                          CYTHON_FALLTHROUGH;
                          ^
      src/python/pathops/_pathops.cpp:364:34: note: expanded from macro 'CYTHON_FALLTHROUGH'
            #define CYTHON_FALLTHROUGH [[fallthrough]]
                                       ^
      src/python/pathops/_pathops.cpp:39913:21: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
                          CYTHON_FALLTHROUGH;
                          ^
      src/python/pathops/_pathops.cpp:364:34: note: expanded from macro 'CYTHON_FALLTHROUGH'
            #define CYTHON_FALLTHROUGH [[fallthrough]]
                                       ^
      4 warnings generated.
      building 'skia' library
      created virtual environment CPython3.11.0.final.0-64 in 185ms
        creator CPython3Posix(dest=/private/var/folders/0p/363b1k3m8xj25y001s62jj8r0000gq/T/pip-install-sgm87cmf/skia-pathops_f07b8d2efa8943679f04d003eac5b166/build/temp.macosx-10.9-universal2-cpython-311/src/cpp/skia-builder/skia/venv, clear=False, no_vcs_ignore=False, global=False)
        seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/Users/kuti/Library/Application Support/virtualenv)
          added seed packages: pip==22.2.2, setuptools==65.3.0, wheel==0.37.1
        activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
      Collecting ninja
        Using cached ninja-1.10.2.4-py2.py3-none-macosx_10_9_universal2.macosx_10_9_x86_64.macosx_11_0_arm64.macosx_11_0_universal2.whl (231 kB)
      Installing collected packages: ninja
      Successfully installed ninja-1.10.2.4

      [notice] A new release of pip available: 22.2.2 -> 22.3
      [notice] To update, run: python -m pip install --upgrade pip
      Done. Made 89 targets from 31 files in 72ms
      ninja: Entering directory `/private/var/folders/0p/363b1k3m8xj25y001s62jj8r0000gq/T/pip-install-sgm87cmf/skia-pathops_f07b8d2efa8943679f04d003eac5b166/build/temp.macosx-10.9-universal2-cpython-311/src/cpp/skia-builder/skia/x64'
      [1/620] stamp obj/skvm_jit.stamp
      [2/620] stamp obj/sse2.stamp
      [3/620] stamp obj/typeface_freetype.stamp
      [4/620] stamp obj/webp_decode.stamp
      [5/620] stamp obj/webp_encode.stamp
      [6/620] stamp obj/wuffs.stamp
      [7/620] stamp obj/xml.stamp
      [8/620] stamp obj/xps.stamp
      [9/620] stamp obj/experimental/ffmpeg/video_encoder.stamp
      [10/620] stamp obj/experimental/sktext/bench.stamp
      [11/620] stamp obj/experimental/ffmpeg/video_decoder.stamp
      [12/620] compile ../../../../../../../src/cpp/skia-builder/skia/src/opts/SkOpts_skx.cpp
      FAILED: obj/src/opts/skx.SkOpts_skx.o
      c++ -MD -MF obj/src/opts/skx.SkOpts_skx.o.d -DNDEBUG -DSK_SUPPORT_GPU=0 -DSK_ENABLE_SKSL -DSK_ASSUME_GL=1 -DSK_ENABLE_API_AVAILABLE -DSK_GAMMA_APPLY_TO_A8 -DSKIA_IMPLEMENTATION=1 -I../../../../../../../src/cpp/skia-builder/skia -march=skylake-avx512 -Wno-attributes -fstrict-aliasing -fPIC -fvisibility=hidden -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -O3 -std=c++17 -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -c ../../../../../../../src/cpp/skia-builder/skia/src/opts/SkOpts_skx.cpp -o obj/src/opts/skx.SkOpts_skx.o
      clang: error: the clang compiler does not support '-march=skylake-avx512'
      [13/620] stamp obj/experimental/sktext/gm.stamp
      [14/620] stamp obj/experimental/sktext/tests.stamp
      [15/620] stamp obj/experimental/sktext/samples.stamp
      [16/620] stamp obj/experimental/sktext/sktext.stamp
      [17/620] compile ../../../../../../../src/cpp/skia-builder/skia/src/opts/SkOpts_sse41.cpp
      clang: warning: argument unused during compilation: '-msse4.1' [-Wunused-command-line-argument]
      [18/620] compile ../../../../../../../src/cpp/skia-builder/skia/src/ports/SkDebug_stdio.cpp
      [19/620] compile ../../../../../../../src/cpp/skia-builder/skia/experimental/c-api-example/skia-c-example.c
      [20/620] compile ../../../../../../../src/cpp/skia-builder/skia/src/opts/SkOpts_sse42.cpp
      clang: warning: argument unused during compilation: '-msse4.2' [-Wunused-command-line-argument]
      [21/620] compile ../../../../../../../src/cpp/skia-builder/skia/src/opts/SkOpts_ssse3.cpp
      clang: warning: argument unused during compilation: '-mssse3' [-Wunused-command-line-argument]
      [22/620] compile ../../../../../../../src/cpp/skia-builder/skia/src/ports/SkImageEncoder_CG.cpp
      [23/620] compile ../../../../../../../src/cpp/skia-builder/skia/src/ports/SkImageGeneratorCG.cpp
      ninja: build stopped: subcommand failed.
      Traceback (most recent call last):
        File "/private/var/folders/0p/363b1k3m8xj25y001s62jj8r0000gq/T/pip-install-sgm87cmf/skia-pathops_f07b8d2efa8943679f04d003eac5b166/src/cpp/skia-builder/build_skia.py", line 238, in <module>
          build_skia(
        File "/private/var/folders/0p/363b1k3m8xj25y001s62jj8r0000gq/T/pip-install-sgm87cmf/skia-pathops_f07b8d2efa8943679f04d003eac5b166/src/cpp/skia-builder/build_skia.py", line 157, in build_skia
          subprocess.check_call(["ninja", "-C", build_dir], env=env)
        File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 413, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['ninja', '-C', '/private/var/folders/0p/363b1k3m8xj25y001s62jj8r0000gq/T/pip-install-sgm87cmf/skia-pathops_f07b8d2efa8943679f04d003eac5b166/build/temp.macosx-10.9-universal2-cpython-311/src/cpp/skia-builder/skia/x64']' returned non-zero exit status 1.
      Traceback (most recent call last):
        File "/Users/kuti/Code/lfFontTools/.tox/p311/lib/python3.11/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 351, in <module>
          main()
        File "/Users/kuti/Code/lfFontTools/.tox/p311/lib/python3.11/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 333, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/kuti/Code/lfFontTools/.tox/p311/lib/python3.11/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 249, in build_wheel
          return _build_backend().build_wheel(wheel_directory, config_settings,
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/0p/363b1k3m8xj25y001s62jj8r0000gq/T/pip-build-env-alqh853m/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 412, in build_wheel
          return self._build_with_temp_dir(['bdist_wheel'], '.whl',
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/0p/363b1k3m8xj25y001s62jj8r0000gq/T/pip-build-env-alqh853m/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 397, in _build_with_temp_dir
          self.run_setup()
        File "/private/var/folders/0p/363b1k3m8xj25y001s62jj8r0000gq/T/pip-build-env-alqh853m/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 484, in run_setup
          self).run_setup(setup_script=setup_script)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/0p/363b1k3m8xj25y001s62jj8r0000gq/T/pip-build-env-alqh853m/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 335, in run_setup
          exec(code, locals())
        File "<string>", line 409, in <module>
        File "/private/var/folders/0p/363b1k3m8xj25y001s62jj8r0000gq/T/pip-build-env-alqh853m/overlay/lib/python3.11/site-packages/setuptools/__init__.py", line 87, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/0p/363b1k3m8xj25y001s62jj8r0000gq/T/pip-build-env-alqh853m/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/0p/363b1k3m8xj25y001s62jj8r0000gq/T/pip-build-env-alqh853m/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/private/var/folders/0p/363b1k3m8xj25y001s62jj8r0000gq/T/pip-build-env-alqh853m/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 968, in run_commands
          self.run_command(cmd)
        File "/private/var/folders/0p/363b1k3m8xj25y001s62jj8r0000gq/T/pip-build-env-alqh853m/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 1217, in run_command
          super().run_command(command)
        File "/private/var/folders/0p/363b1k3m8xj25y001s62jj8r0000gq/T/pip-build-env-alqh853m/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
          cmd_obj.run()
        File "/private/var/folders/0p/363b1k3m8xj25y001s62jj8r0000gq/T/pip-build-env-alqh853m/overlay/lib/python3.11/site-packages/wheel/bdist_wheel.py", line 299, in run
          self.run_command('build')
        File "/private/var/folders/0p/363b1k3m8xj25y001s62jj8r0000gq/T/pip-build-env-alqh853m/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
          self.distribution.run_command(command)
        File "/private/var/folders/0p/363b1k3m8xj25y001s62jj8r0000gq/T/pip-build-env-alqh853m/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 1217, in run_command
          super().run_command(command)
        File "/private/var/folders/0p/363b1k3m8xj25y001s62jj8r0000gq/T/pip-build-env-alqh853m/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
          cmd_obj.run()
        File "/private/var/folders/0p/363b1k3m8xj25y001s62jj8r0000gq/T/pip-build-env-alqh853m/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/build.py", line 132, in run
          self.run_command(cmd_name)
        File "/private/var/folders/0p/363b1k3m8xj25y001s62jj8r0000gq/T/pip-build-env-alqh853m/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
          self.distribution.run_command(command)
        File "/private/var/folders/0p/363b1k3m8xj25y001s62jj8r0000gq/T/pip-build-env-alqh853m/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 1217, in run_command
          super().run_command(command)
        File "/private/var/folders/0p/363b1k3m8xj25y001s62jj8r0000gq/T/pip-build-env-alqh853m/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
          cmd_obj.run()
        File "<string>", line 216, in run
        File "/private/var/folders/0p/363b1k3m8xj25y001s62jj8r0000gq/T/pip-build-env-alqh853m/overlay/lib/python3.11/site-packages/setuptools/command/build_ext.py", line 84, in run
          _build_ext.run(self)
        File "/private/var/folders/0p/363b1k3m8xj25y001s62jj8r0000gq/T/pip-build-env-alqh853m/overlay/lib/python3.11/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
          _build_ext.build_ext.run(self)
        File "/private/var/folders/0p/363b1k3m8xj25y001s62jj8r0000gq/T/pip-build-env-alqh853m/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 346, in run
          self.build_extensions()
        File "/private/var/folders/0p/363b1k3m8xj25y001s62jj8r0000gq/T/pip-build-env-alqh853m/overlay/lib/python3.11/site-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions
          _build_ext.build_ext.build_extensions(self)
        File "/private/var/folders/0p/363b1k3m8xj25y001s62jj8r0000gq/T/pip-build-env-alqh853m/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 466, in build_extensions
          self._build_extensions_serial()
        File "/private/var/folders/0p/363b1k3m8xj25y001s62jj8r0000gq/T/pip-build-env-alqh853m/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 492, in _build_extensions_serial
          self.build_extension(ext)
        File "<string>", line 193, in build_extension
        File "<string>", line 210, in get_libraries
        File "<string>", line 279, in build_skia
        File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 569, in run
          raise CalledProcessError(retcode, process.args,
      subprocess.CalledProcessError: Command '['/Users/kuti/Code/lfFontTools/.tox/p311/bin/python', 'src/cpp/skia-builder/build_skia.py', 'build/temp.macosx-10.9-universal2-cpython-311/src/cpp/skia-builder/skia', '--no-sync-deps', '--target-cpu', 'universal2']' returned non-zero exit status 1.
@anthrotype
Copy link
Member

i'm not sure why that happens, I'm getting similar errors locally on my machine running macOS 12.6.1. I even tried to reinstall the latest developer command line tools.

For some reasons the Github CI that builds the skia library completed successfully, I tried to push an empty commit to trigger the build and it did not fail:
https://github.com/fonttools/skia-builder/actions/runs/3347705512/jobs/5545980271

Anyway, I have build pre-compiled wheels for python 3.11 in #61 so the issue should be kind of fixed now -- unless one wants to install skia-pathops from source.
I'll investigate next time I get to update the embedded skia library.

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.

2 participants