FS#34590 - [mupdf] mupdf-1.2 is building with the wrong libjpeg header

Attached to Project: Community Packages
Opened by Kazuo Teramoto (kazuo) - Wednesday, 03 April 2013, 20:21 GMT
Last edited by Bartłomiej Piotrowski (Barthalion) - Friday, 05 April 2013, 21:05 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Bartłomiej Piotrowski (Barthalion)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


mupdf is building with the libjpeg header from the thirdparty directory, this header set the version to 90:

mupdf-1.2-source/thirdparty/jpeg/jpeglib.h:40:#define JPEG_LIB_VERSION 90 /* Compatibility version 9.0 */

This break zathura-pdf-mupdf because libjpeg-turbo (that Arch Linux ships) only support version 80 (jconfig.h:5), this is the error msg when opening a pdf file with zathura:

error: jpeg error: Wrong JPEG library version: library is 80, caller expects 90

This is really an error, not a warning, as jpeg images are not rendered.

The msg come from the libjpeg-turbo library that check for versions missmatchs (lines 983:988 of jpeglib.h and jpeg_CreateDecompress() defined in jdapimin.c file from libjpeg-turbo).

If I apply the following diff to the PKGBUILD, rebuild mupdf AND zathura-pdf-mupdf jpeg images in pdf is rendered correctly. I don't know if this is a packaging bug and/or a upstream build system problem.

--- /var/abs/community/mupdf/PKGBUILD 2013-04-02 19:07:12.000000000 -0300
+++ PKGBUILD 2013-04-03 17:15:23.837008176 -0300
@@ -22,6 +22,7 @@

cd "$srcdir"/$pkgname-$pkgver-source
+ rm -rf thirdparty
make build=release prefix=/usr
This task depends upon

Closed by  Bartłomiej Piotrowski (Barthalion)
Friday, 05 April 2013, 21:05 GMT
Reason for closing:  Fixed
Additional comments about closing:  mupdf 1.2-2