Problem running pymupdf

rainer_d

Active Member

Reaction score: 4
Messages: 117

Hi,

pymupdf does compile (in a virtualenv), but when I try to use it:

Code:
(mu) (python-test <mu>) 0 # python
Python 2.7.16 (default, Oct 23 2019, 15:53:49)
[GCC 4.2.1 Compatible FreeBSD Clang 8.0.0 (tags/RELEASE_800/final 356365)] on freebsd11
Type "help", "copyright", "credits" or "license" for more information.
>>> import fitz
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/root/mu/lib/python2.7/site-packages/fitz/__init__.py", line 3, in <module>
    from fitz.fitz import *
  File "/root/mu/lib/python2.7/site-packages/fitz/fitz.py", line 18, in <module>
    from . import _fitz
ImportError: /usr/local/lib/libmupdf.so.1.16.0: Undefined symbol "FT_Get_Advance"
mupdf itself is build from the 2019Q4 cut in a FreeBSD amd64 11.3 jail on a poudriere server (running 12.0).


What does that error mean? How can this be fixed?



Rainer
 

mark_j

Active Member

Reaction score: 41
Messages: 111

Speaking generally, you probably have dependency issues. Assuming you're doing the install from ports, run portsnap fetch update. Once completed run portsnap fetch install
 
OP
OP
R

rainer_d

Active Member

Reaction score: 4
Messages: 117

Yes, I solved it in the meantime.
One has to manually add libfreetype and libharfbuzz in the list of libraries to link against in setup.py.

I have an issue open on the projects github pages so this gets added and it works for FreeBSD out of the box.

My customer who actually needs this says that for his case, those two libraries are enough.

However, I wonder if I need to link against everything else that mupdf (mu-tools) is linked against, which is quite a lot?
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,969
Messages: 31,368

Assuming you're doing the install from ports, run portsnap fetch update. Once completed run portsnap fetch install
There is no install for portsnap(8). A portsnap fetch update is enough to fetch and update the ports tree and is exactly the same as running portsnap fetch && portsnap update.
 
Top