fonttools / skia-pathops

Python bindings for the Skia library's Path Ops
https://skia.org/docs/dev/present/pathops/
BSD 3-Clause "New" or "Revised" License
47 stars 14 forks source link

import error Symbol not found: ____chkstk_darwin #41

Closed typemytype closed 3 years ago

typemytype commented 3 years ago

not sure what happens

on python3.7 (macOS)

Traceback (most recent call last):
  File "<untitled>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pathops/__init__.py", line 1, in <module>
    from ._pathops import (
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pathops/_pathops.cpython-37m-darwin.so, 2): Symbol not found: ____chkstk_darwin
  Referenced from: /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pathops/_pathops.cpython-37m-darwin.so
  Expected in: /usr/lib/libSystem.B.dylib
 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pathops/_pathops.cpython-37m-darwin.so
anthrotype commented 3 years ago

are you using macOS High Sierra 10.13 perhaps? it might be that we are building the wheel on a too recent macOS after we switched to the new Github Actions CI workflow https://github.com/nodegui/nodegui/issues/391

I have a hunch that Github CI is using 10.15. In that case we probably need to set a lower MACOSX_DEPLOYMENT_TARGET when building skia.

Are you at least able to build from source for the time being?

anthrotype commented 3 years ago

digging deeper, I fear that it might not be enough to set MACOS_DEPLOYMENT_TARGET=10.13. According to this thread,

it is not possible using the Python versions installed on the Github Actions workers, because they are compiled on macOS 10.15 or newer.

https://github.com/actions/virtual-environments/issues/1256#issuecomment-770270252

The suggested workaround is to use python binaries from official python.org installers to build the wheels.. Argh.

anthrotype commented 3 years ago

forget the last comment, we are already using multibuild to compile the mac wheels, and multibuild already downloads and installs the mac python from python.org, so we're not using Github Actions pythons. So that's not the issue.

So that leaves us with needing to set the MACOS_DEPLOYMENT_TARGET, probably both in this repository (where we build the cython extension module) and in the https://github.com/fonttools/skia-builder repository where we build the libskia.so library.

anthrotype commented 3 years ago

@typemytype I don't have a macos 10.13 to test this. I rebuilt from source skia-pathops using MACOSX_DEPLOYMENT_TARGET=10.9 in #42. Can you please download this zip https://github.com/fonttools/skia-pathops/suites/1994292972/artifacts/39787608 which contains the built wheel file and install from that and see if it works for you? If it does work, I'll tag a new release with the fix.

typemytype commented 3 years ago

yes Im on 10.13

DrawBot and FontGoggles github actions installs python from python.org see https://github.com/typemytype/drawbot/blob/master/.github/workflows/build.yml#L30-L31

I would recommend this as other issues will popup, like validation and notarisation and hard crashes during startup see fontGoggles custom wheels install https://github.com/justvanrossum/fontgoggles/blob/master/.github/workflows/buildapp.yml#L55

typemytype commented 3 years ago

and yes your download zip works on 10.13!

thanks

anthrotype commented 3 years ago

i'm glad that it works. In that case I will cut a new release shortly with that one

anthrotype commented 3 years ago

I pushed a new tag v0.6.0.post2 but github is having some hiccups, and deployment to pypi failed. I'll try again tomorrow, sorry

anthrotype commented 3 years ago

@typemytype please let me know if this new release fixed the issue, thanks! https://pypi.org/project/skia-pathops/0.6.0.post2

typemytype commented 3 years ago

perfect thanks!!

image