Bug 693010

Summary: fitz/image_jpx.c fails to build on Debian testing
Product: MuPDF Reporter: Cyril Hrubis <metan>
Component: fitzAssignee: Tor Andersson <tor.andersson>
Status: RESOLVED INVALID    
Severity: normal CC: ghostscript, robin.watts, yugiohjcj
Priority: P4    
Version: unspecified   
Hardware: All   
OS: Linux   
Customer: Word Size: ---
Attachments: [PATCH] Fix build with newer openjpeg library.

Description Cyril Hrubis 2012-04-30 18:05:43 UTC
While compiling MuPDF sources on ARM running Debian testing the build process fails with:

------------------------------------------------------------------------------
    CC build/debug/image_jpx.o
fitz/image_jpx.c: In function 'fz_load_jpx':
fitz/image_jpx.c:54:9: error: 'opj_dparameters_t' has no member named 'flags'
fitz/image_jpx.c:54:19: error: 'OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG' undeclared (first use in this function)
fitz/image_jpx.c:54:19: note: each undeclared identifier is reported only once for each function it appears in
make: *** [build/debug/image_jpx.o] Error 1
------------------------------------------------------------------------------

The openjpeg library version:

libopenjpeg-2.1.3.0.so

After commenting out the:

------------------------------------------------------------------------------
        if (indexed)
                params.flags |= OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG;
------------------------------------------------------------------------------

The library compiles and seems to run fine.
Comment 1 Robin Watts 2012-04-30 20:01:39 UTC
We expect muPDF to be built using the thirdparty libraries that we supply, or (at a push) by the same versions of those libraries in the system.

Thus, if you hit problems compiling MuPDF with older (or in this case newer, still beta) versions of the libraries, we don't consider this a bug.
Comment 2 Cyril Hrubis 2012-05-01 10:36:23 UTC
Created attachment 8555 [details]
[PATCH] Fix build with newer openjpeg library.
Comment 3 Cyril Hrubis 2012-05-01 10:37:51 UTC
What about attached patch? It's pretty straightforward and works well with both older and newer openjpeg library.
Comment 4 Casey Jones 2012-06-13 03:45:29 UTC
Just wanted to say thanks a lot for your patch, Cyril -- it helped me compile MuPDF on the Nokia N900 with Maemo 5. [-:
Comment 5 YuGiOhJCJ 2012-07-19 07:17:55 UTC
*** Bug 693191 has been marked as a duplicate of this bug. ***
Comment 6 YuGiOhJCJ 2012-07-19 07:22:41 UTC
I must manually apply this patch after cloning the last mupdf version on git.

Why mupdf isn't yet corrected on git whereas we have the patch ?

Regards.
Comment 7 Robin Watts 2012-07-19 14:23:16 UTC
See comment #2.