GithubHelp home page GithubHelp logo

Wheels broken on OS-X about skia-python HOT 16 CLOSED

kyamagu avatar kyamagu commented on July 19, 2024
Wheels broken on OS-X

from skia-python.

Comments (16)

justvanrossum avatar justvanrossum commented on July 19, 2024 2

You can check if the statically linked libexpat solves this issue

It does!

from skia-python.

kyamagu avatar kyamagu commented on July 19, 2024

Thanks for reporting this, is this related to xcode issue?
pyenv/pyenv#544

from skia-python.

ChrisBarker-NOAA avatar ChrisBarker-NOAA commented on July 19, 2024

related, maybe, but I don't think it's the same.

I just took a look at the setup.py, and can't find an issue. I also looked at what the extension is linked to:

otool -L skia.cpython-39-darwin.so
skia.cpython-39-darwin.so:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.100.1)
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1894.60.100)
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 52.0.0)
/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 902.1.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1677.104.0)
/System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics (compatibility version 64.0.0, current version 1355.22.0)
/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 1069.24.0)
/System/Library/Frameworks/CoreText.framework/Versions/A/CoreText (compatibility version 1.0.0, current version 1.0.0)

And I don't see anything that looks odd.

But apparently, it's looking for expat somewhere that it's not finding it, or it's finding a different version.

How are the wheels built? i.e. what Python version, what OS-X version? IN your tox setup you have tests, so presumably it's working somewhere.

Are you linking in expat anywhere explicitly? I can't find that in the setup.py

from skia-python.

kyamagu avatar kyamagu commented on July 19, 2024

from skia-python.

ChrisBarker-NOAA avatar ChrisBarker-NOAA commented on July 19, 2024

OK -- so I see that it's using "macos-latest", I wonder what that is?

Then I see:

  •   matrix:
      python-version: [3.7]
    

but how do the other wheels get built ?

Anyway, I see no reference to expat in the skia build command. and in here:

https://github.com/google/skia/blob/master/third_party/expat/BUILD.gn

I see: ```
declare_args() {
skia_use_system_expat = is_official_build
}

and in the CI skia build line, I see: `is_official_build=true` -- so I think that means that it's using the "system" expat.

I theory, expat has shipped with OS-X for quite some time, so it should be there, and setting teh deployment target is supposed to work, but apparently not in this case :-(

Maybe setting skia_use_system_expat to false will bundle it and solve this issue ?


from skia-python.

ChrisBarker-NOAA avatar ChrisBarker-NOAA commented on July 19, 2024

One more noteL I tried the wheels with python3.7 -- same error.

from skia-python.

kyamagu avatar kyamagu commented on July 19, 2024

Bundling expat might work, but I suspect something is not working in the system side in your environment, like Xcode.
CI testing works normal https://github.com/kyamagu/skia-python/actions/workflows/build.yml

According to Github Actions, macos-latest runner uses macOS Catalina 10.15 with 3-core CPU https://docs.github.com/en/actions/reference/specifications-for-github-hosted-runners

from skia-python.

ChrisBarker-NOAA avatar ChrisBarker-NOAA commented on July 19, 2024

Well, I have yet to get it to build locally -- is there a script for the whole thing, or do I need to replicate what I see in the CI?

Anyway, I'm running on 10.14 right now, and if it was built with 10.15 that might be the problem. However, the wheels are:

skia_python-87.1-cp38-cp38-macosx_10_14_x86_64.whl

which means they should run on any 10.14 or greater mac -- XCode should not need to be installed. So there's something not quite right with the wheel building.

from skia-python.

kyamagu avatar kyamagu commented on July 19, 2024

CI description are the exact steps to reproduce https://github.com/kyamagu/skia-python/blob/master/.github/workflows/build.yml

You might want to try a local runner tool https://github.com/nektos/act

In any case, build requires clang which does require Xcode command line tools.

from skia-python.

ChrisBarker-NOAA avatar ChrisBarker-NOAA commented on July 19, 2024

The CI is building and testing on 10.5, so maybe the wheels work there, but not on 10.14 :-(

I do see a lot of these warnings:

warning: object file (skia/out/Release/libskia.a(libjpeg.jutils.o)) was built for newer macOS version (10.15) than being linked (10.9)

So perhaps that's the source of the problem.

I was wanting to give this a quick try to see if it was worth pursing -- so I'm not sure if I'll be able to get around to debugging these build issues -- but good luck!

from skia-python.

justvanrossum avatar justvanrossum commented on July 19, 2024

I can confirm that the skia-python wheels provided by PyPI currently do not work on 10.14, with the error as reported by Chris: justvanrossum/drawbot-skia#37

from skia-python.

kyamagu avatar kyamagu commented on July 19, 2024

v87.3 might have fixed this issue, though I cannot test

from skia-python.

justvanrossum avatar justvanrossum commented on July 19, 2024

v87.3 might have fixed this issue

Feedback in justvanrossum/drawbot-skia#37 (comment) suggests this is not the case.

from skia-python.

kyamagu avatar kyamagu commented on July 19, 2024

from skia-python.

kyamagu avatar kyamagu commented on July 19, 2024

You can check if the statically linked libexpat solves this issue. Download the artifact of this build:
https://github.com/kyamagu/skia-python/actions/runs/1209672577

from skia-python.

kyamagu avatar kyamagu commented on July 19, 2024

Fixed in #152

from skia-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.