-
Notifications
You must be signed in to change notification settings - Fork 72
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
M1 macOS 11 pip3 install gftools
ERROR: Failed building wheel for skia-pathops
#415
Comments
On an Intel mac running macOS 11 |
pip3 install gftools
ERROR: Failed building wheel for skia-pathopspip3 install gftools
ERROR: Failed building wheel for skia-pathops
there are no precompiled wheels for skia-pathops for the arm64 platform used by M1 macs yet, so it's trying to build from source (we should add them at some point, just haven't found the time to update the CI workflow yet). The build_skia.py script (https://github.com/fonttools/skia-builder/blob/master/build_skia.py) uses virtualenv to being able to temporarily install ninja using pip, without modifying the system environment. One way to fix this when building libskia for M1 is to not use virtualenv but instead ensure ninja is preinstalled and available on PATH. I filed an issue at fonttools/skia-builder#1 @eliheuer if you want to try building skia-pathops from source manually, you can try these steps (untested because I don't have M1 machine available to try these out).
|
I'm assuming this is because some dependencies are 2.7 only? |
yes, the |
https://bugs.chromium.org/p/skia/issues/detail?id=9079 looks like it should now work with either py2 or py3, I'm gonna try and confirm that's the case |
I'm working on this branch on skia-pathops repository to update internal skia to chrome/m95 which also includes some fixes for building skia with py3.
|
Thank you for the detailed help @anthrotype! I tried the above command on a M1 macOS 11.6 machine and got the following error: $ pip install -v git+https://github.com/fonttools/skia-pathops.git@chrome/m95-py3#egg=skia-pathops
Using pip 21.2.4 from /Users/eli/Py/venvs/python3-venv-google-fonts/lib/python3.9/site-packages/pip (python 3.9)
Collecting skia-pathops
Cloning https://github.com/fonttools/skia-pathops.git (to revision chrome/m95-py3) to /private/var/folders/ht/8b6qb9pj7csc3pn8bgwwx3j80000gn/T/pip-install-642dwyyf/skia-pathops_94e494234e5a4b839e63e5383439cc6e
Running command git clone -q https://github.com/fonttools/skia-pathops.git /private/var/folders/ht/8b6qb9pj7csc3pn8bgwwx3j80000gn/T/pip-install-642dwyyf/skia-pathops_94e494234e5a4b839e63e5383439cc6e
Running command git show-ref chrome/m95-py3
8f8e6ecffb67ba693a075233b666bd91876e9adc refs/remotes/origin/chrome/m95-py3
Running command git symbolic-ref -q HEAD
refs/heads/master
Running command git checkout -b chrome/m95-py3 --track origin/chrome/m95-py3
Switched to a new branch 'chrome/m95-py3'
Branch 'chrome/m95-py3' set up to track remote branch 'chrome/m95-py3' from 'origin'.
Resolved https://github.com/fonttools/skia-pathops.git to commit 8f8e6ecffb67ba693a075233b666bd91876e9adc
Running command git submodule update --init --recursive -q
From https://github.com/fonttools/skia-builder
* branch 9488b82670ca155563aa5af46effbfd8f2edabce -> FETCH_HEAD
error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
fatal: clone of 'https://github.com/fonttools/skia' into submodule path '/private/var/folders/ht/8b6qb9pj7csc3pn8bgwwx3j80000gn/T/pip-install-642dwyyf/skia-pathops_94e494234e5a4b839e63e5383439cc6e/src/cpp/skia-builder/skia' failed
Failed to clone 'skia'. Retry scheduled
error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
fatal: clone of 'https://github.com/fonttools/skia' into submodule path '/private/var/folders/ht/8b6qb9pj7csc3pn8bgwwx3j80000gn/T/pip-install-642dwyyf/skia-pathops_94e494234e5a4b839e63e5383439cc6e/src/cpp/skia-builder/skia' failed
Failed to clone 'skia' a second time, aborting
Failed to recurse into submodule path 'src/cpp/skia-builder'
WARNING: Discarding git+https://github.com/fonttools/skia-pathops.git@chrome/m95-py3#egg=skia-pathops. Command errored out with exit status 1: git submodule update --init --recursive -q Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement skia-pathops (unavailable) (from versions: 0.1.0.dev0, 0.1.0.dev1, 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.2.0.post2, 0.2.1, 0.3.0, 0.4.0, 0.4.1, 0.4.2, 0.5.0, 0.5.1, 0.5.1.post1, 0.5.2b2, 0.6.0, 0.6.0.post1, 0.6.0.post2, 0.6.0.post3)
ERROR: No matching distribution found for skia-pathops (unavailable) |
I'm trying to follow the directions in this post as well, but |
hm, cloning skia (recursively) may take a while, but it should complete. That looks like a network error to me. If you like I can try to send you a zip file containing the source distribution as created by |
|
So, standard troubleshooting advice. Step one, get more information:
Step two, change the parameters and see which makes a difference:
|
I'm having some mild success attempting to build a universal wheel for skia-pathops by cross-compiling for arm64 from my intel x86_64 machine, but I'd like to know if what I have so far works on an actual M1 machine. @eliheuer can you please try to pip install from the attached wheel and let me know if you can Thanks! skia_pathops-0.6.0.post4.dev6+gbc5aa20-cp39-cp39-macosx_10_9_universal2.whl.zip EDIT: you need to use Python 3.9 for the above wheel to work |
@eliheuer another thing I'd like you to try for me is if you could download the source distribution package below and try to build a wheel from it with the following command:
If the build completes, you should see a new wheel file in the The file is big (around 60MB) so I can't upload it to Github, I put it in my Google Drive at this link: https://drive.google.com/file/d/1wbxRFBhjdPHLWa6AyhPK94MdO1xnEBWB/view?usp=sharing Thanks! |
@anthrotype Thank you! I just tried the wheel from this post and it seems to have worked: (test-venv)
MINI-M1 🌎 ~/Temp/skia-test
11379 ◯ : pip3 install skia_pathops-0.6.0.post4.dev6+gbc5aa20-cp39-cp39-macosx_10_9_universal2.whl [~]
Processing ./skia_pathops-0.6.0.post4.dev6+gbc5aa20-cp39-cp39-macosx_10_9_universal2.whl
Installing collected packages: skia-pathops
Successfully installed skia-pathops-0.6.0.post4.dev6+gbc5aa20
(test-venv)
MINI-M1 🌎 ~/Temp/skia-test
11380 ◯ : python3 [~]
Python 3.9.7 (default, Sep 3 2021, 04:31:11)
[Clang 12.0.5 (clang-1205.0.22.9)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pathops
>>> dir(pathops)
['ArcSize', 'Direction', 'FillType', 'LineCap', 'LineJoin', 'OpBuilder', 'OpenPathError', 'Path', 'PathOp', 'PathOpsError', 'PathPen', 'PathVerb', 'UnsupportedVerbError', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', '__version__', '_pathops', '_version', 'bits2float', 'decompose_quadratic_segment', 'difference', 'float2bits', 'intersection', 'op', 'operations', 'simplify', 'union', 'xor']
>>> The fontmake flag also worked for me:
|
I have just released skia-pathops v0.7.0 which should finally work with M1 Macs. Please |
Thank you @anthrotype ! This is huge, it looks like all the GF CLI tools work on M1 now! I was able to install gftools after |
Hello @anthrotype, one last thing, I forgot to respond to this request. $ pip wheel -v --use-feature=in-tree-build -w dist skia-pathops-0.6.0.post4.dev8+gcaeaeb1.zip Worked for me and produced a wheel in the
I was able to import this in a venv: Thanks again for all your help with this! |
That's a Skia build issue. If you look where it says |
hello,I tried 6 times and it always came out like this。
|
Sorry, just saw:
|
In a Python3
v3.9.7
venv on macOS 11.6,pip3 install gftools
gives me the following error:The text was updated successfully, but these errors were encountered: