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

Big Sur no longer has a libc library, so ttfautohint.memory fails #6

Closed
simoncozens opened this issue Jan 22, 2021 · 7 comments
Closed

Comments

@simoncozens
Copy link
Contributor

ttfautohint.memory does this:

    libc_path = find_library("c")
    if libc_path is None:
        raise OSError("Could not find the libc shared library")

On Big Sur there is no libc(!) I know there are efforts to fix ctypes loading on Python 3.8 and 3.9 but I'm not clear if that includes a workaround to the missing libc issue.

See fonttools/fontbakery#3107 for more context.

@anthrotype
Copy link
Member

Ouch. Which python version? I hear it should be fixed with the latest python 3.9.1.
Less than 3.9, I don't think Bug Sur is even supported upstream.

@anthrotype
Copy link
Member

oh maybe I misunderstood and it's only fixed on cpython master. Well, I don't think we can do much, besides monkeypatching ctypes.find_library maybe. Not sure it's worth the hassle. Let's just wait until next python bugfix is released

@simoncozens
Copy link
Contributor Author

FWIW, python 3.9.5 in homebrew seems to have this fixed.

@m4rc1e
Copy link

m4rc1e commented Aug 25, 2021

This is still an issue for me.

If I do a fresh env and install the latest ttfa, I still get

>>> import ttfautohint
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/marcfoley/Desktop/ttfa/venv/lib/python3.9/site-packages/ttfautohint/__init__.py", line 13, in <module>
    from ttfautohint import memory
  File "/Users/marcfoley/Desktop/ttfa/venv/lib/python3.9/site-packages/ttfautohint/memory.py", line 18, in <module>
    raise OSError("Could not find the libc shared library")
OSError: Could not find the libc shared library

I'm running Python 3.9.5 (non homebrew). Shall we try and fix this so it works on other versions of Python which are not from homebrew?

I'll test 3.9.6 as well since the release notes seem to cover this issue.

@anthrotype
Copy link
Member

If it works with 3.9.6 I would consider this a wontfix, given it is an upstream Apple/Python issue. Also Python 3.10 is in release candidate and about to launch. People with relatively new macOS versions should be willing to also upgrade their Pythons accordingly.

@m4rc1e
Copy link

m4rc1e commented Aug 26, 2021

Auch, I just downloaded 3.6.9 and got the following:

(venv) Marcs-Air:ttfa marcfoley$ pip freeze
ttfautohint-py==0.4.3.post1

(venv) Marcs-Air:ttfa marcfoley$ python 
Python 3.9.6 (v3.9.6:db3ff76da1, Jun 28 2021, 11:49:53) 
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

>>> from ttfautohint import ttfautohint
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/marcfoley/Desktop/ttfa/venv/lib/python3.9/site-packages/ttfautohint/__init__.py", line 13, in <module>
    from ttfautohint import memory
  File "/Users/marcfoley/Desktop/ttfa/venv/lib/python3.9/site-packages/ttfautohint/memory.py", line 18, in <module>
    raise OSError("Could not find the libc shared library")
OSError: Could not find the libc shared library

No joy for 3.9.6. I have a patch which works but I wrote this a while back so I need to retrace my steps so I can explain how it works.

@sursly
Copy link

sursly commented Jan 21, 2022

Just checking in, I'm still getting hung up on this same issue. Would love any help, as I can't build much without a workaround.

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

No branches or pull requests

4 participants