-
Notifications
You must be signed in to change notification settings - Fork 523
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
[Question] mupdf, mupdf-third: static libs or dynamic libs needed? ? #1396
Comments
I am not sure embarrassingly. All I know is that MuPDF needs to be built with CLAGS="-fPIC". Sounds like dynamic to me. |
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? |
Since 1.18.0, mupdf no longer produced libmupdf-third.so in its build, so I tried removing |
Ok, thanks for digging this out. |
Just tried to compile under Linux: that does not work:
|
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,
}
... |
What I did are:
|
But this is a major change: What I am doing is creating one self-contained binary. |
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
|
Confirmed: |
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]. |
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. |
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 |
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:
|
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 |
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.] |
…th system MuPDF. This may help with pymupdf#1396.
…th system MuPDF. This may help with #1396.
I think this no longer an open issue and can safely be transferred to "Discussions". |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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.The text was updated successfully, but these errors were encountered: