OCRmyPDF: ocrmypdf 11.4.4 failed to build on apple silicon
Describe the bug ocrmypdf 11.4.4 failed to build on apple silicon
build error message (run log url):
==> /opt/homebrew/Cellar/ocrmypdf/11.4.4/bin/ocrmypdf -f -q --deskew /opt/homebrew/Library/Homebrew/test/support/fixtures/test.pdf ocr.pdf
Traceback (most recent call last):
File "/opt/homebrew/Cellar/ocrmypdf/11.4.4/bin/ocrmypdf", line 5, in <module>
from ocrmypdf.__main__ import run
File "/opt/homebrew/Cellar/ocrmypdf/11.4.4/libexec/lib/python3.9/site-packages/ocrmypdf/__init__.py", line 10, in <module>
from ocrmypdf import helpers, hocrtransform, leptonica, pdfa, pdfinfo
File "/opt/homebrew/Cellar/ocrmypdf/11.4.4/libexec/lib/python3.9/site-packages/ocrmypdf/leptonica.py", line 174, in <module>
def _stderr_handler(cstr):
MemoryError: Cannot allocate write+execute memory for ffi.callback(). You might be running on a system that prevents this. For more information, see https://cffi.readthedocs.io/en/latest/using.html#callbacks
To Reproduce pip installation and run on darwin arm64 system?
Expected behavior build successfuly
System (please complete the following information):
- OS: OSX darwin arm64
- Python version: python 3.9
- OCRmyPDF version: Ocrmypdf 11.4.4
Additional context relates to https://github.com/Homebrew/homebrew-core/pull/68159
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 25
Commits related to this issue
- Fallback to LeptonicaErrorTrap_Redirect if ffi.callback fails Might fix issue #709, Apple silicon support. — committed to ocrmypdf/OCRmyPDF by jbarlow83 3 years ago
- Fallback to LeptonicaErrorTrap_Redirect if ffi.callback fails Might fix issue #709, Apple silicon support. — committed to ocrmypdf/OCRmyPDF by jbarlow83 3 years ago
Nice. I also noticed today that brew had a new version of ocrmypdf. It worked 😃