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

Compilation Issues (pymupdf dependency) on Apple M1 (ARM) #188

Closed
phutelmyer opened this issue Dec 9, 2021 · 2 comments
Closed

Compilation Issues (pymupdf dependency) on Apple M1 (ARM) #188

phutelmyer opened this issue Dec 9, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@phutelmyer
Copy link
Contributor

Describe the bug
While compiling the current version of Strelka on a Macbook M1 (using ARM), an error is thrown while compiling pymupdf

#43 107.9     Running setup.py install for PyMuPDF: started
#43 108.1     Running setup.py install for PyMuPDF: finished with status 'error'
#43 108.1     ERROR: Command errored out with exit status 1:
#43 108.1      command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-exfn5fk_/pymupdf_48028f1220064d828bfdd4a85b07f456/setup.py'"'"'; __file__='"'"'/tmp/pip-install-exfn5fk_/pymupdf_48028f1220064d828bfdd4a85b07f456/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-iekrbeh6/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/PyMuPDF
#43 108.1          cwd: /tmp/pip-install-exfn5fk_/pymupdf_48028f1220064d828bfdd4a85b07f456/
#43 108.1     Complete output (20 lines):
#43 108.1     running install
#43 108.1     running build
#43 108.1     running build_py
#43 108.1     creating build
#43 108.1     creating build/lib.linux-aarch64-3.9
#43 108.1     creating build/lib.linux-aarch64-3.9/fitz
#43 108.1     copying fitz/__init__.py -> build/lib.linux-aarch64-3.9/fitz
#43 108.1     copying fitz/fitz.py -> build/lib.linux-aarch64-3.9/fitz
#43 108.1     copying fitz/utils.py -> build/lib.linux-aarch64-3.9/fitz
#43 108.1     copying fitz/__main__.py -> build/lib.linux-aarch64-3.9/fitz
#43 108.1     running build_ext
#43 108.1     building 'fitz._fitz' extension
#43 108.1     creating build/temp.linux-aarch64-3.9
#43 108.1     creating build/temp.linux-aarch64-3.9/fitz
#43 108.1     aarch64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/mupdf -I/usr/local/include/mupdf -I/usr/include/python3.9 -c fitz/fitz_wrap.c -o build/temp.linux-aarch64-3.9/fitz/fitz_wrap.o
#43 108.1     fitz/fitz_wrap.c:2733:10: fatal error: fitz.h: No such file or directory
#43 108.1      2733 | #include <fitz.h>
#43 108.1           |          ^~~~~~~~
#43 108.1     compilation terminated.
#43 108.1     error: command '/usr/bin/aarch64-linux-gnu-gcc' failed with exit code 1
#43 108.1     ----------------------------------------
#43 108.1 ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-exfn5fk_/pymupdf_48028f1220064d828bfdd4a85b07f456/setup.py'"'"'; __file__='"'"'/tmp/pip-install-exfn5fk_/pymupdf_48028f1220064d828bfdd4a85b07f456/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-iekrbeh6/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/PyMuPDF Check the logs for full command output.

Steps to reproduce
Steps to reproduce the behavior:

  1. Run docker-compose -f build/docker-compose.yml build on an ARM host with docker and docker-compose installed.

Expected behavior
No compilation errors

Screenshots
See error above

Release

  • Release: 0.21.12.9

Additional context
N/A

@phutelmyer phutelmyer added the bug Something isn't working label Dec 9, 2021
@phutelmyer phutelmyer self-assigned this Dec 9, 2021
@phutelmyer
Copy link
Contributor Author

phutelmyer commented May 15, 2022

Updating to note that this still remains an issue as PyMuPDF still does not support the M1 architecture.
pymupdf/PyMuPDF#875

@phutelmyer
Copy link
Contributor Author

Testing this again on an M1. Seems to be building now.

colindean added a commit to colindean/strelka that referenced this issue Aug 15, 2022
target#188 resolved the known issue, so perhaps it can be removed.

I've added a link to the bugs as a fallback.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant