Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 520774 - =app-text/mupdf-1.5 w/ =media-libs/openjpeg-2.1.0: source/fitz/load-jpx.c:119:2: error: too few arguments to function ‘opj_stream_set_user_data’
Summary: =app-text/mupdf-1.5 w/ =media-libs/openjpeg-2.1.0: source/fitz/load-jpx.c:119...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Michael Weber (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-24 15:44 UTC by Samuli Suominen (RETIRED)
Modified: 2014-08-25 17:12 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,62.04 KB, text/plain)
2014-08-24 15:44 UTC, Samuli Suominen (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Samuli Suominen (RETIRED) gentoo-dev 2014-08-24 15:44:06 UTC
Created attachment 383524 [details]
build.log

Looks like mupdf is not compatible with openjpeg-2.1.0 API:

x86_64-pc-linux-gnu-gcc -O2 -pipe -march=native -frecord-gcc-switches -Wimplicit-function-declaration -fpic -Iinclude -Igenerated -Wall -DDEBUG -I/usr/include/freetype2    -DSHARE_JPEG -I/usr/include/openjpeg-2.1  -DHAVE_OPENSSL   -o build/debug/fitz/buffer.o -c source/fitz/buffer.c
In file included from /usr/include/openjpeg-2.1/opj_stdint.h:34:0,
                 from /usr/include/openjpeg-2.1/openjpeg.h:115,
                 from source/fitz/load-jpx.c:11:
/usr/include/openjpeg-2.1/opj_config.h:2:0: warning: "OPJ_HAVE_STDINT_H" redefined [enabled by default]
 #define OPJ_HAVE_STDINT_H   1
 ^
source/fitz/load-jpx.c:8:0: note: this is the location of the previous definition
 #define OPJ_HAVE_STDINT_H
 ^
source/fitz/load-jpx.c: In function ‘fz_load_jpx’:
source/fitz/load-jpx.c:119:2: error: too few arguments to function ‘opj_stream_set_user_data’
  opj_stream_set_user_data(stream, &sb);
  ^
In file included from source/fitz/load-jpx.c:11:0:
/usr/include/openjpeg-2.1/openjpeg.h:1154:27: note: declared here
 OPJ_API void OPJ_CALLCONV opj_stream_set_user_data (opj_stream_t* p_stream, void * p_data, opj_stream_free_user_data_fn p_function);
                           ^
Makefile:151: recipe for target 'build/debug/fitz/load-jpx.o' failed
Comment 1 drunkenbatman 2014-08-24 23:23:41 UTC
Seeing the same build failure in source/fitz/load-jpx.c
Comment 2 Michael Weber (RETIRED) gentoo-dev 2014-08-25 09:07:14 UTC
+  25 Aug 2014; Michael Weber <xmw@gentoo.org> mupdf-1.1_p20121127.ebuild,
+  mupdf-1.3_p20140118.ebuild, mupdf-1.4-r1.ebuild, mupdf-1.5.ebuild:
+  Restrict openjpeg-2.1 (bug 520774).
+
Comment 3 Michael Weber (RETIRED) gentoo-dev 2014-08-25 09:38:36 UTC
+  25 Aug 2014; Michael Weber <xmw@gentoo.org>
+  +files/mupdf-1.5-openjpeg-2.1.patch, mupdf-1.5.ebuild, mupdf-9999.ebuild:
+  Fix for openjpeg-2.1 (bug 520774).
+


% cat files/mupdf-1.5-openjpeg-2.1.patch 
--- mupdf-1.5/source/fitz/load-jpx.c
+++ mupdf-1.5/source/fitz/load-jpx.c
@@ -116,7 +116,7 @@
        opj_stream_set_read_function(stream, fz_opj_stream_read);
        opj_stream_set_skip_function(stream, fz_opj_stream_skip);
        opj_stream_set_seek_function(stream, fz_opj_stream_seek);
-       opj_stream_set_user_data(stream, &sb);
+       opj_stream_set_user_data(stream, &sb, NULL);
        /* Set the length to avoid an assert */
        opj_stream_set_user_data_length(stream, size);