Open 8573 opened 3 years ago
According to https://git.ghostscript.com/?p=mupdf.git;a=commit;h=06c999fec01863a90824ba2f9f3ce98ea1a967d3, they bundle a modified version of FreeGLUT. They probably bumped the GLUT_API_VERSION
in that bundled version..
@xaverdh wrote—
According to https://git.ghostscript.com/?p=mupdf.git;a=commit;h=06c999fec01863a90824ba2f9f3ce98ea1a967d3, they bundle a modified version of FreeGLUT. They probably bumped the
GLUT_API_VERSION
in that bundled version..
Ah, that explains it. Their FreeGLUT looks to be here and to be ten patches atop a 2015 version of FreeGLUT, 3.0.0, with the following years' worth of upstream development not merged in, except for a single patch to make it build under GCC 10.
Tor Andersson wrote—
Linux distribution maintainers build MuPDF without linking to our modified FreeGLUT, so miss out on important features. I'm tired of educating users that the bug is with the distribution shipped mupdf, not on our end.
Perhaps more than one of us on the distro side find this dependency bundling and insistence on it tiresome too.... I wouldn't mind if this issue were resolved simply by patching out the warning. (We're not big enough that they might find out and add some code just to take revenge on us, riiight...?)
(Accidentally closed)
Well I think a more polite approach might be to ask them, if they plan to upstream these patches. If they have no interest in doing so, we can still patch out the warning.
I looked a bit into this. There seems to be an attempt at upstreaming here, which got stuck in discussions on API changes (not a trivial decision as freeGLUT already tries to replace a given API). The patches used for MuPDF basically add Unicode input and Clipboard access and only a subset is required for *nix/X11: https://git.ghostscript.com/?p=thirdparty-freeglut.git;a=commitdiff;h=21c0cc45140637c7fa558a040c7360837b22fa1f https://git.ghostscript.com/?p=thirdparty-freeglut.git;a=commitdiff;h=850d2102eb302bdd03fd81af6b6becdb1f3ae2e0 https://git.ghostscript.com/?p=thirdparty-freeglut.git;a=commitdiff;h=2ba99eb5264fcc0c3c817dc515aef4b630b419b1 https://git.ghostscript.com/?p=thirdparty-freeglut.git;a=commitdiff;h=0167cb31430c9de8e0beca41ffec6fea17d987e5 https://git.ghostscript.com/?p=thirdparty-freeglut.git;a=commitdiff;h=036b32e52c59b968ce639e94740e684b3cf6cba9 https://git.ghostscript.com/?p=thirdparty-freeglut.git;a=commitdiff;h=21f059e4b1489d3fab3f94a65ebebc0f80886237 These include the API version change to 6, compared to upstream. It should be possible to rebase this patchset from freeGLUT 3.0.0 to the current 3.2.1 (we can drop the Windows-related parts). Maybe @ccxvii is also interested in rebasing the patchset. That said, for those that prefer browsing code on GitHub, the patchset is also mirrored here.
I marked this as stale due to inactivity. → More info
Is there any way to advance this? I really would like to use mupdf with clipboard support? If the above referenced merge request is not merged, shall we go ahead and include the patches by hand in nixpkgs?
i don't expect https://github.com/dcnieho/FreeGLUT/pull/62 to be merged. I quickly tried to rebase the mupdf patch series on the latest FreeGLUT, but somewhere made a mistake (mupdf launches, but crashes at first keypress). I probably won't get things fixed before 22.11 branch-off, but backports should be possible at any time.
Hello
First of all many thanks to the maintainer of mupdf which is a wonderful pdf reader. It is definitely my favorite one and most used pdf reader as it is super light weight and super fast. I could not successfully copy paste some text from a pdf using mupdf. May I ask you if this feature is now available? Many thanks in advance! Best regards
MUPDF needs to built with its own fork of freeglut that adds clipboard access for copy & paste to work. I've tried to get those patches merged upstream, but was not successful.
ok many thanks for your quick answer @ccxvii . Do you think that you could provide the link of the source to be built?
From the same place you got mupdf. It's included in the release tarballs, and is available from the same gits as mupdf itself.
https://github.com/ArtifexSoftware/thirdparty-freeglut http://cgit.ghostscript.com/cgi-bin/cgit.cgi/thirdparty-freeglut.git/
Describe the bug Although the Nix expression for MuPDF does provide FreeGLUT to its build— https://github.com/NixOS/nixpkgs/blob/3bf2464a68ee3f9c258cd503078c7e6c0f5349b4/pkgs/applications/misc/mupdf/default.nix#L53 —
mupdf-gl
issues the following warning when run——which, grepping the source code, I see is issued if a macro
FREEGLUT
is not defined orGLUT_API_VERSION
is less than 6. Grepping the source of the FreeGLUT version that nixpkgs provides, 3.2.1, the only mention I see ofGLUT_API_VERSION
is the following at line 123 of its fileinclude/GL/freeglut_std.h
:3.2.1 seems to be the most recent version of FreeGLUT, so I'm afraid I don't know what MuPDF is thinking to expect a
GLUT_API_VERSION
of 6 or higher.Expected behavior
mupdf-gl
should run without issuing warnings about its packaging.Notify maintainers @vrthra and @fpletz as package maintainers for MuPDF, @wamserma who recently updated the MuPDF expression, and @bjornfor as package maintainer for FreeGLUT
Metadata
"x86_64-linux"
Linux 5.4.75-hardened, NixOS, 21.03pre251971.a371c107116 (Okapi)
yes
yes
nix-env (Nix) 2.3.8
"nixos-21.03pre251971.a371c107116"
/nix/var/nix/profiles/per-user/root/channels/nixos
Maintainer information: