[Question] mupdf, mupdf-third: static libs or dynamic libs needed? ? #2421
Replies: 17 comments
-
I am not sure embarrassingly. All I know is that MuPDF needs to be built with CLAGS="-fPIC". Sounds like dynamic to me. |
Beta Was this translation helpful? Give feedback.
-
It seems that from 1.18, mupdf no longer provide libmupdf-third.so (dynamic lib): https://www.mail-archive.com/pld-cvs-commit@lists.pld-linux.org/msg475799.html In my build, to get pymupdf compiled successfully, I had to build libmupdf-third.a separately from libmupdf.so If it may not be required, could you please remove mupdf-third from setup.py? |
Beta Was this translation helpful? Give feedback.
-
Since 1.18.0, mupdf no longer produced libmupdf-third.so in its build, so I tried removing |
Beta Was this translation helpful? Give feedback.
-
Ok, thanks for digging this out. |
Beta Was this translation helpful? Give feedback.
-
Just tried to compile under Linux: that does not work:
|
Beta Was this translation helpful? Give feedback.
-
Tried with this setup.py: DEFAULT = [
"mupdf",
# "mupdf-third",
]
ALPINE = DEFAULT + [
"jbig2dec",
"jpeg",
"openjp2",
"harfbuzz",
]
ARCH_LINUX = DEFAULT + [
"jbig2dec",
"openjp2",
"jpeg",
"freetype",
"gumbo",
]
OPENSUSE = ARCH_LINUX + [
"harfbuzz",
"png16",
]
FEDORA = ARCH_LINUX + [
"harfbuzz",
"leptonica",
"tesseract",
]
NIX = ARCH_LINUX + ["harfbuzz"]
LIBRARIES = {
"default": DEFAULT,
"ubuntu": DEFAULT,
"arch": ARCH_LINUX,
"manjaro": ARCH_LINUX,
"artix": ARCH_LINUX,
"opensuse": OPENSUSE,
"fedora": FEDORA,
"alpine": ALPINE,
"nix": NIX,
}
... |
Beta Was this translation helpful? Give feedback.
-
What I did are:
|
Beta Was this translation helpful? Give feedback.
-
But this is a major change: What I am doing is creating one self-contained binary. |
Beta Was this translation helpful? Give feedback.
-
I have a workaround in my system. To avoid compiling static lib
Now I don't have to modify setup.py. I want to confirm one thing though. Could you try deleting /usr/lib/libmupdf.so, then do
|
Beta Was this translation helpful? Give feedback.
-
Confirmed: |
Beta Was this translation helpful? Give feedback.
-
I got bitten by the "missing mupdf-third library" bug too! I kept on getting
I am on Gentoo. Finally, I had to look into setup.py...and I realized it was...heuristic - to put it nicely. Many questions arose:
Questions over questions...To make it short, I just commented
from the DEFAULT list and moved on. I can only hope that this is not going to bite me when I actually try to run PyMuPDF! [Edit: Just formatted it nicely, didn't add or remove anything]. |
Beta Was this translation helpful? Give feedback.
-
Just saw this https://en.wikipedia.org/wiki/Darwin_(operating_system) so it's that Darwin, after all, not "Ubuntu Darwin"...so I take my comment regarding naming of the 'darwin' variable back. |
Beta Was this translation helpful? Give feedback.
-
Please post the exact command (including any environmental variable settings) you are using to build PyMuPDF. It would also be useful to know the values of [As of |
Beta Was this translation helpful? Give feedback.
-
Indeed, that slipped off, sorry...so the command I used was
the reason behind it being that I already have the latest (1.21.0) mupdf installed, so I saw no reason to violate the DRY (Don't Repeat Yourself) principle.
Right again, sorry for the omission. Here they are:
|
Beta Was this translation helpful? Give feedback.
-
Thanks for that information. So my understanding is:
However, for example, https://packages.debian.org/sid/amd64/libmupdf-dev/filelist includes Before doing this, could you try removing |
Beta Was this translation helpful? Give feedback.
-
Sorry for the delay...As I said intially, I just deleted that In #1396 (comment) @Mark-Joy said that starting 1.18.0 mupdf stopped building mupdf-third. So it seems that the correct way to do it is to check the version of installed mupdf and act accordingly, either by specifying mupdf-third, or by dropping it. [Edit: Formatting only.] |
Beta Was this translation helpful? Give feedback.
-
I think this no longer an open issue and can safely be transferred to "Discussions". |
Beta Was this translation helpful? Give feedback.
-
When compiling
pymupdf
from source, it needsmupdf
andmupdf-third
libs. Could you please clarify which kind of libs they are?As per my experience,
mupdf-third
is static lib whilemupdf
is dynamic lib.Beta Was this translation helpful? Give feedback.
All reactions