Summary: | MuPDF fails to build against OpenJPEG 2.0 | ||
---|---|---|---|
Product: | MuPDF | Reporter: | Charlie Sharpsteen <source> |
Component: | fitz | Assignee: | MuPDF bugs <mupdf-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | jackie.rosen, michael, pipping, robin.watts, tor.andersson |
Priority: | P4 | ||
Version: | 1.1 | ||
Hardware: | All | ||
OS: | All | ||
Customer: | Word Size: | --- | |
Attachments: |
openjpeg-2 pkgconfig patch
0001-Update-Makerules-use-of-pkg-config-we-need-openjpeg-.patch |
Description
Charlie Sharpsteen
2012-12-29 19:55:37 UTC
I have an OpenJPEG2 branch on my git repo that updates MuPDF to work with OpenJPEG2. Unfortunately various files that work under 1.5.0 are broken under 2.0, so until these are fixed, we can't really upgrade. Created attachment 9938 [details] openjpeg-2 pkgconfig patch with [1], and openjpeg-2 now supporting pkg-config, your makerules [3] should also refer to openjpeg-2 lines 55 and 56 should refer to openjp2 [1] http://git.ghostscript.com/?p=mupdf.git;a=commit;h=a1c8ba17f74180c5e05c4eb7b67912d14ea7b080 [2] http://code.google.com/p/openjpeg/source/detail?r=2250 [3] http://git.ghostscript.com/?p=mupdf.git;a=blob;f=Makerules;h=9dd6717aa7ebeef522c26661ab01ad3b913ac3df;hb=HEAD We now require openjpeg 2.0 or the link will fail. Our version contains several patches to avoid SEGVs and other nasties - as always linking with a system version will miss those out, and we do not support that configuration. Having said that it would make sense for us to update Makerules to ask for the correct version of the system lib from pkg-config. Unfortunately, it's not entirely clear to me how to do this. According to Tor, on debian "libopenjpeg2" gets you version 1.3. "libopenjpeg-dev" gets you a later version. We can't find "libopenjp2" on ubuntu either, so we're at a loss here. What distro was this patch made on please? Created attachment 9939 [details]
0001-Update-Makerules-use-of-pkg-config-we-need-openjpeg-.patch
The above patch in git format.
(In reply to comment #3) > We now require openjpeg 2.0 or the link will fail. Our version contains > several patches to avoid SEGVs and other nasties - as always linking with a > system version will miss those out, and we do not support that configuration. can you push these fixes upstream, pls. so "we all" can enjoy them. > Having said that it would make sense for us to update Makerules to ask for > the correct version of the system lib from pkg-config. > > Unfortunately, it's not entirely clear to me how to do this. According to > Tor, on debian "libopenjpeg2" gets you version 1.3. "libopenjpeg-dev" gets > you a later version. We can't find "libopenjp2" on ubuntu either, so we're > at a loss here. um, http://patch-tracker.debian.org/package/openjpeg reveals some versions around 1.3 and 1.5.1, but no version 2.0.0. What does `pkg-config --list-all | grep jpeg` say? > What distro was this patch made on please? Gentoo main repository. As mentioned, openjpeg release 2.0.0 per se has no pkg-config file, but it was later added (see the referred svn repo commit) named libopenjp2.pc . p.s. your static debian/mupdf.pc needs an update, too. http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-text/mupdf/files/mupdf-9999-openjpeg2.patch?revision=1.2&view=markup (In reply to comment #5) > (In reply to comment #3) > > We now require openjpeg 2.0 or the link will fail. Our version contains > > several patches to avoid SEGVs and other nasties - as always linking with a > > system version will miss those out, and we do not support that configuration. > can you push these fixes upstream, pls. so "we all" can enjoy them. I added your patches to the Gentoo openjpeg-9999 (live vcs version) package http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-libs/openjpeg/files/openjpeg-9999-mupdf.patch?revision=1.1&view=markup I did not look into the other submodules, any significant patches? I admire your ability to patch/improve your "thirdparties", but from a source-distro point, it's pure compile time madness to accept (cascaded) bundled libs. llpp checks commit 42db34aa08 of mupdf, which bundles openjpeg, which bundles zlib et al. We can't just boot-strap the whole dependency try for every single (top level) program. Btw. current llpp works with current mupdf after this patch http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-text/llpp/files/llpp-9999-mupdf-trailer.patch?revision=1.1&view=markup while you're at it, bug 694301 http://bugs.ghostscript.com/show_bug.cgi?id=694301 Fixed in commit 11cd137420d45f795b67f54f73cbf97010206d7a Author: Tor Andersson <tor.andersson@artifex.com> Date: Thu Apr 17 17:45:45 2014 +0200 Fix 693518: update Makerules and debian/control Debian doesn't have libopenjp2 as a package (whereas gentoo does) so I've removed it from the control file. You'll need to use the thirdparty submodule for openjpeg2 until such a time as it exists. |