Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't build - Don't understand error #429

Closed
Tanje123 opened this issue Jan 16, 2020 · 3 comments
Closed

Can't build - Don't understand error #429

Tanje123 opened this issue Jan 16, 2020 · 3 comments
Assignees
Labels

Comments

@Tanje123
Copy link

Please provide all mandatory information!
I am trying to build PyMuPDF version 16.10. I installed mupdf however I keep getting the same error. This error doesn't show any information about what is going wrong.

ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-v3o9cbp6/PyMuPDF/setup.py'"'"'; file='"'"'/tmp/pip-install-v3o9cbp6/PyMuPDF/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-qsig25xd --python-tag cp38
cwd: /tmp/pip-install-v3o9cbp6/PyMuPDF/
Complete output (419 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
creating build/lib.linux-x86_64-3.8/fitz
copying fitz/init.py -> build/lib.linux-x86_64-3.8/fitz
copying fitz/fitz.py -> build/lib.linux-x86_64-3.8/fitz
copying fitz/utils.py -> build/lib.linux-x86_64-3.8/fitz
copying fitz/main.py -> build/lib.linux-x86_64-3.8/fitz
running build_ext
building 'fitz._fitz' extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/fitz
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/usr/include/mupdf -I/usr/local/include/mupdf -I/usr/local/include/python3.8 -c fitz/fitz_wrap.c -o build/temp.linux-x86_64-3.8/fitz/fitz_wrap.o
fitz/fitz_wrap.c: In function 'JM_EscapeStrFromBuffer':
fitz/fitz_wrap.c:3317:51: warning: pointer targets in passing argument 1 of 'PyUnicode_DecodeUnicodeEscape' differ in signedness [-Wpointer-sign]
PyObject *val = PyUnicode_DecodeUnicodeEscape(s, (Py_ssize_t) len, "replace");
^
In file included from /usr/local/include/python3.8/Python.h:97,
from fitz/fitz_wrap.c:154:
/usr/local/include/python3.8/unicodeobject.h:599:23: note: expected 'const char *' but argument is of type 'unsigned char '
PyAPI_FUNC(PyObject
) PyUnicode_DecodeUnicodeEscape(
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fitz/fitz_wrap.c: In function 'JM_BinFromBuffer':
fitz/fitz_wrap.c:3564:50: warning: passing argument 3 of 'fz_buffer_storage' from incompatible pointer type [-Wincompatible-pointer-types]
size_t len = fz_buffer_storage(gctx, buffer, &c);
^~
In file included from /usr/include/mupdf/fitz/output.h:6,
from /usr/include/mupdf/fitz/hash.h:6,
from /usr/include/mupdf/fitz.h:16,
from fitz/fitz_wrap.c:2732:
/usr/include/mupdf/fitz/buffer.h:18:75: note: expected 'unsigned char **' but argument is of type 'char **'
size_t fz_buffer_storage(fz_context *ctx, fz_buffer *buf, unsigned char **datap);
~~~~~~~~~~~~~~~~^~~~~
fitz/fitz_wrap.c: In function 'JM_BArrayFromBuffer':
fitz/fitz_wrap.c:3578:49: warning: passing argument 3 of 'fz_buffer_storage' from incompatible pointer type [-Wincompatible-pointer-types]
size_t len = fz_buffer_storage(ctx, buffer, &c);
^~
In file included from /usr/include/mupdf/fitz/output.h:6,
from /usr/include/mupdf/fitz/hash.h:6,
from /usr/include/mupdf/fitz.h:16,
from fitz/fitz_wrap.c:2732:
/usr/include/mupdf/fitz/buffer.h:18:75: note: expected 'unsigned char **' but argument is of type 'char **'
size_t fz_buffer_storage(fz_context *ctx, fz_buffer *buf, unsigned char **datap);
~~~~~~~~~~~~~~~~^~~~~
fitz/fitz_wrap.c: In function 'JM_B64FromBuffer':
fitz/fitz_wrap.c:3592:53: warning: passing argument 3 of 'fz_buffer_storage' from incompatible pointer type [-Wincompatible-pointer-types]
size_t len = fz_buffer_storage(ctx, buffer, &c);
^~
In file included from /usr/include/mupdf/fitz/output.h:6,
from /usr/include/mupdf/fitz/hash.h:6,
from /usr/include/mupdf/fitz.h:16,
from fitz/fitz_wrap.c:2732:
/usr/include/mupdf/fitz/buffer.h:18:75: note: expected 'unsigned char **' but argument is of type 'char **'
size_t fz_buffer_storage(fz_context *ctx, fz_buffer *buf, unsigned char **datap);
~~~~~~~~~~~~~~~~^~~~~
fitz/fitz_wrap.c:3596:51: warning: passing argument 3 of 'fz_buffer_storage' from incompatible pointer type [-Wincompatible-pointer-types]
size_t nlen = fz_buffer_storage(ctx, res, &b64);
^~~~
In file included from /usr/include/mupdf/fitz/output.h:6,
from /usr/include/mupdf/fitz/hash.h:6,
from /usr/include/mupdf/fitz.h:16,
from fitz/fitz_wrap.c:2732:
/usr/include/mupdf/fitz/buffer.h:18:75: note: expected 'unsigned char **' but argument is of type 'char **'
size_t fz_buffer_storage(fz_context *ctx, fz_buffer *buf, unsigned char **datap);
~~~~~~~~~~~~~~~~^~~~~
fitz/fitz_wrap.c: In function 'JM_BufferFromBytes':
fitz/fitz_wrap.c:3706:58: warning: pointer targets in passing argument 2 of 'fz_new_buffer_from_copied_data' differ in signedness [-Wpointer-sign]
if (c) res = fz_new_buffer_from_copied_data(ctx, c, len);
^
In file included from /usr/include/mupdf/fitz/output.h:6,
from /usr/include/mupdf/fitz/hash.h:6,
from /usr/include/mupdf/fitz.h:16,
from fitz/fitz_wrap.c:2732:
/usr/include/mupdf/fitz/buffer.h:28:12: note: expected 'const unsigned char *' but argument is of type 'char *'
fz_buffer *fz_new_buffer_from_copied_data(fz_context *ctx, const unsigned char *data, size_t size);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fitz/fitz_wrap.c: In function 'merge_range':
fitz/fitz_wrap.c:3859:26: warning: variable 'count' set but not used [-Wunused-but-set-variable]
int page, afterpage, count;
^~~~~
fitz/fitz_wrap.c: In function 'fontbuffer':
fitz/fitz_wrap.c:3914:11: warning: variable 'ext' set but not used [-Wunused-but-set-variable]
char *ext = "";
^~~
fitz/fitz_wrap.c: In function 'JM_invert_pixmap_rect':
fitz/fitz_wrap.c:4204:19: warning: operation on 's' may be undefined [-Wsequence-point]
*s++ = 255 - *s;
^
fitz/fitz_wrap.c:4205:30: warning: value computed is not used [-Wunused-value]
if (dest->alpha) *s++;
^~~~
fitz/fitz_wrap.c: In function 'JM_image_profile':
fitz/fitz_wrap.c:4231:11: warning: pointer targets in assignment from 'char *' to 'unsigned char *' differ in signedness [-Wpointer-sign]
c = PyBytes_AS_STRING(imagedata);
^
fitz/fitz_wrap.c:4236:11: warning: pointer targets in assignment from 'char *' to 'unsigned char *' differ in signedness [-Wpointer-sign]
c = PyByteArray_AS_STRING(imagedata);
^
fitz/fitz_wrap.c: In function 'JM_make_annot_DA':
fitz/fitz_wrap.c:4534:50: warning: passing argument 3 of 'fz_buffer_storage' from incompatible pointer type [-Wincompatible-pointer-types]
size_t len = fz_buffer_storage(ctx, buf, &da);
^~~
In file included from /usr/include/mupdf/fitz/output.h:6,
from /usr/include/mupdf/fitz/hash.h:6,
from /usr/include/mupdf/fitz.h:16,
from fitz/fitz_wrap.c:2732:
/usr/include/mupdf/fitz/buffer.h:18:75: note: expected 'unsigned char **' but argument is of type 'char **'
size_t fz_buffer_storage(fz_context *ctx, fz_buffer *buf, unsigned char **datap);
~~~~~~~~~~~~~~~~^~~~~
fitz/fitz_wrap.c: In function 'JM_repl_char':
fitz/fitz_wrap.c:4956:40: warning: pointer targets in passing argument 1 of 'PyUnicode_FromStringAndSize' differ in signedness [-Wpointer-sign]
return PyUnicode_FromStringAndSize(data, 2);
^~~~
In file included from /usr/local/include/python3.8/Python.h:97,
from fitz/fitz_wrap.c:154:
/usr/local/include/python3.8/unicodeobject.h:130:23: note: expected 'const char *' but argument is of type 'const unsigned char '
PyAPI_FUNC(PyObject
) PyUnicode_FromStringAndSize(
^~~~~~~~~~~~~~~~~~~~~~~~~~~
fitz/fitz_wrap.c: In function 'JM_make_spanlist':
fitz/fitz_wrap.c:5107:25: error: 'fz_stext_char' {aka 'struct fz_stext_char_s'} has no member named 'color'
style.color = ch->color;
^~
fitz/fitz_wrap.c: In function 'JM_make_image_block':
fitz/fitz_wrap.c:5216:73: warning: passing argument 3 of 'fz_new_buffer_from_image_as_png' from incompatible pointer type [-Wincompatible-pointer-types]
buf = freebuf = fz_new_buffer_from_image_as_png(ctx, image, fz_default_color_params);
^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/mupdf/fitz.h:63,
from fitz/fitz_wrap.c:2732:
/usr/include/mupdf/fitz/write-pixmap.h:78:12: note: expected 'const fz_color_params *' {aka 'const struct fz_color_params_s '} but argument is of type 'const fz_color_params * ()(fz_context )' {aka 'const struct fz_color_params_s * ()(struct fz_context_s *)'}
fz_buffer *fz_new_buffer_from_image_as_png(fz_context *ctx, fz_image *image, const fz_color_params *color_params);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fitz/fitz_wrap.c: In function 'JM_get_widget_properties':
fitz/fitz_wrap.c:5606:17: warning: implicit declaration of function 'pdf_signature_is_signed'; did you mean 'pdf_signature_set_value'? [-Wimplicit-function-declaration]
if (pdf_signature_is_signed(ctx, pdf, annot->obj))
^~~~~~~~~~~~~~~~~~~~~~~
pdf_signature_set_value
fitz/fitz_wrap.c: In function 'JM_set_widget_properties':
fitz/fitz_wrap.c:5871:9: warning: variable 'result' set but not used [-Wunused-but-set-variable]
int result = 0;
^~~~~~
fitz/fitz_wrap.c: In function 'JM_embed_file':
fitz/fitz_wrap.c:5960:64: warning: pointer targets in passing argument 2 of 'fz_new_buffer_from_copied_data' differ in signedness [-Wpointer-sign]
fz_new_buffer_from_copied_data(ctx, " ", 1),
^~~~
In file included from /usr/include/mupdf/fitz/output.h:6,
from /usr/include/mupdf/fitz/hash.h:6,
from /usr/include/mupdf/fitz.h:16,
from fitz/fitz_wrap.c:2732:
/usr/include/mupdf/fitz/buffer.h:28:12: note: expected 'const unsigned char *' but argument is of type 'char *'
fz_buffer *fz_new_buffer_from_copied_data(fz_context *ctx, const unsigned char *data, size_t size);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fitz/fitz_wrap.c: In function 'string_in_names_list':
fitz/fitz_wrap.c:5994:17: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
char *str = pdf_to_text_string(ctx, p);
^~~~~~~~~~~~~~~~~~
fitz/fitz_wrap.c: In function 'JM_xobject_from_page':
fitz/fitz_wrap.c:6395:22: warning: unused variable 'contents' [-Wunused-variable]
pdf_obj *xobj1, *contents = NULL, *resources = NULL, *o, *spageref;
^~~~~~~~
fitz/fitz_wrap.c: In function 'JM_convert_to_pdf':
fitz/fitz_wrap.c:6836:51: warning: passing argument 3 of 'fz_buffer_storage' from incompatible pointer type [-Wincompatible-pointer-types]
size_t len = fz_buffer_storage(gctx, res, &c);
^~
In file included from /usr/include/mupdf/fitz/output.h:6,
from /usr/include/mupdf/fitz/hash.h:6,
from /usr/include/mupdf/fitz.h:16,
from fitz/fitz_wrap.c:2732:
/usr/include/mupdf/fitz/buffer.h:18:75: note: expected 'unsigned char **' but argument is of type 'char **'
size_t fz_buffer_storage(fz_context *ctx, fz_buffer *buf, unsigned char **datap);
~~~~~~~~~~~~~~~~^~~~~
fitz/fitz_wrap.c: In function 'new_fz_document_s':
fitz/fitz_wrap.c:7092:24: error: 'gctx->error' is a pointer; did you mean to use '->'?
gctx->error.errcode = 0; // reset any error code
^
->
fitz/fitz_wrap.c:7093:24: error: 'gctx->error' is a pointer; did you mean to use '->'?
gctx->error.message[0] = 0; // reset any error message
^
->
fitz/fitz_wrap.c:7112:49: warning: pointer targets in passing argument 2 of 'fz_open_memory' differ in signedness [-Wpointer-sign]
data = fz_open_memory(gctx, c, len);
^
In file included from /usr/include/mupdf/fitz/output.h:8,
from /usr/include/mupdf/fitz/hash.h:6,
from /usr/include/mupdf/fitz.h:16,
from fitz/fitz_wrap.c:2732:
/usr/include/mupdf/fitz/stream.h:25:12: note: expected 'const unsigned char *' but argument is of type 'char *'
fz_stream *fz_open_memory(fz_context *ctx, const unsigned char *data, size_t len);
^~~~~~~~~~~~~~
fitz/fitz_wrap.c: In function 'fz_document_s__embeddedFileAdd':
fitz/fitz_wrap.c:7461:54: warning: passing argument 3 of 'fz_buffer_storage' from incompatible pointer type [-Wincompatible-pointer-types]
size = fz_buffer_storage(gctx, data, &buffdata);
^~~~~~~~~
In file included from /usr/include/mupdf/fitz/output.h:6,
from /usr/include/mupdf/fitz/hash.h:6,
from /usr/include/mupdf/fitz.h:16,
from fitz/fitz_wrap.c:2732:
/usr/include/mupdf/fitz/buffer.h:18:75: note: expected 'unsigned char **' but argument is of type 'char **'
size_t fz_buffer_storage(fz_context *ctx, fz_buffer *buf, unsigned char **datap);
~~~~~~~~~~~~~~~~^~~~~
fitz/fitz_wrap.c:7454:20: warning: variable 'size' set but not used [-Wunused-but-set-variable]
size_t size = 0;
^~~~
fitz/fitz_wrap.c:7453:17: warning: unused variable 'entry' [-Wunused-variable]
int entry = 0;
^~~~~
fitz/fitz_wrap.c: In function 'fz_document_s__getPDFfileid':
fitz/fitz_wrap.c:7704:57: warning: passing argument 3 of 'fz_buffer_storage' from incompatible pointer type [-Wincompatible-pointer-types]
fz_buffer_storage(gctx, buffer, &hex);
^~~~
In file included from /usr/include/mupdf/fitz/output.h:6,
from /usr/include/mupdf/fitz/hash.h:6,
from /usr/include/mupdf/fitz.h:16,
from fitz/fitz_wrap.c:2732:
/usr/include/mupdf/fitz/buffer.h:18:75: note: expected 'unsigned char **' but argument is of type 'char **'
size_t fz_buffer_storage(fz_context *ctx, fz_buffer *buf, unsigned char **datap);
~~~~~~~~~~~~~~~~^~~~~
fitz/fitz_wrap.c: In function 'fz_document_s_save':
fitz/fitz_wrap.c:7746:38: error: 'pdf_default_write_options' undeclared (first use in this function); did you mean 'pdf_parse_write_options'?
pdf_write_options opts = pdf_default_write_options;
^~~~~~~~~~~~~~~~~~~~~~~~~
pdf_parse_write_options
fitz/fitz_wrap.c:7746:38: note: each undeclared identifier is reported only once for each function it appears in
fitz/fitz_wrap.c:7758:18: error: 'pdf_write_options' {aka 'struct pdf_write_options_s'} has no member named 'do_encrypt'; did you mean 'do_decrypt'?
opts.do_encrypt = encryption;
^~~~~~~~~~
do_decrypt
fitz/fitz_wrap.c:7759:17: error: 'pdf_write_options' {aka 'struct pdf_write_options_s'} has no member named 'permissions'
opts.permissions = permissions;
^
fitz/fitz_wrap.c:7762:29: error: 'pdf_write_options' {aka 'struct pdf_write_options_s'} has no member named 'opwd_utf8'
memcpy(&opts.opwd_utf8, owner_pw, strlen(owner_pw)+1);
^
fitz/fitz_wrap.c:7767:29: error: 'pdf_write_options' {aka 'struct pdf_write_options_s'} has no member named 'upwd_utf8'
memcpy(&opts.upwd_utf8, user_pw, strlen(user_pw)+1);
^
fitz/fitz_wrap.c: In function 'fz_document_s_write':
fitz/fitz_wrap.c:7785:38: error: 'pdf_default_write_options' undeclared (first use in this function); did you mean 'pdf_parse_write_options'?
pdf_write_options opts = pdf_default_write_options;
^~~~~~~~~~~~~~~~~~~~~~~~~
pdf_parse_write_options
fitz/fitz_wrap.c:7797:18: error: 'pdf_write_options' {aka 'struct pdf_write_options_s'} has no member named 'do_encrypt'; did you mean 'do_decrypt'?
opts.do_encrypt = encryption;
^~~~~~~~~~
do_decrypt
fitz/fitz_wrap.c:7798:17: error: 'pdf_write_options' {aka 'struct pdf_write_options_s'} has no member named 'permissions'
opts.permissions = permissions;
^
fitz/fitz_wrap.c:7801:29: error: 'pdf_write_options' {aka 'struct pdf_write_options_s'} has no member named 'opwd_utf8'
memcpy(&opts.opwd_utf8, owner_pw, strlen(owner_pw)+1);
^
fitz/fitz_wrap.c:7806:29: error: 'pdf_write_options' {aka 'struct pdf_write_options_s'} has no member named 'upwd_utf8'
memcpy(&opts.upwd_utf8, user_pw, strlen(user_pw)+1);
^
fitz/fitz_wrap.c: In function 'fz_document_s__deletePage':
fitz/fitz_wrap.c:7914:21: warning: unused variable 'count' [-Wunused-variable]
int count = fz_count_pages(gctx, self);
^~~~~
fitz/fitz_wrap.c: In function 'fz_document_s__getCharWidths':
fitz/fitz_wrap.c:7962:26: warning: pointer targets in assignment from 'const unsigned char *' to 'const char *' differ in signedness [-Wpointer-sign]
data = fz_lookup_cjk_font(gctx, ordering, &size, &index);
^
fitz/fitz_wrap.c:7963:64: warning: pointer targets in passing argument 3 of 'fz_new_font_from_memory' differ in signedness [-Wpointer-sign]
font = fz_new_font_from_memory(gctx, NULL, data, size, index, 0);
^~~~
In file included from /usr/include/mupdf/fitz.h:40,
from fitz/fitz_wrap.c:2732:
/usr/include/mupdf/fitz/font.h:178:10: note: expected 'const unsigned char *' but argument is of type 'const char *'
fz_font *fz_new_font_from_memory(fz_context *ctx, const char *name, const unsigned char *data, int len, int index, int use_glyph_bbox);
^~~~~~~~~~~~~~~~~~~~~~~
fitz/fitz_wrap.c:7966:22: warning: pointer targets in assignment from 'const unsigned char *' to 'const char *' differ in signedness [-Wpointer-sign]
data = fz_lookup_base14_font(gctx, bfname, &size);
^
fitz/fitz_wrap.c:7969:66: warning: pointer targets in passing argument 3 of 'fz_new_font_from_memory' differ in signedness [-Wpointer-sign]
font = fz_new_font_from_memory(gctx, bfname, data, size, 0, 0);
^~~~
In file included from /usr/include/mupdf/fitz.h:40,
from fitz/fitz_wrap.c:2732:
/usr/include/mupdf/fitz/font.h:178:10: note: expected 'const unsigned char *' but argument is of type 'const char *'
fz_font *fz_new_font_from_memory(fz_context *ctx, const char *name, const unsigned char *data, int len, int index, int use_glyph_bbox);
^~~~~~~~~~~~~~~~~~~~~~~
fitz/fitz_wrap.c:7954:36: warning: unused variable 'fb_font' [-Wunused-variable]
fz_font *font = NULL, *fb_font= NULL;
^~~~~~~
fitz/fitz_wrap.c:7951:17: warning: unused variable 'lang' [-Wunused-variable]
int lang = 0;
^~~~
fitz/fitz_wrap.c:7950:17: warning: unused variable 'cwlen' [-Wunused-variable]
int cwlen = 0;
^~~~~
fitz/fitz_wrap.c: In function 'fz_document_s_extractFont':
fitz/fitz_wrap.c:8064:24: warning: unused variable 'len' [-Wunused-variable]
Py_ssize_t len = 0;
^~~
fitz/fitz_wrap.c: In function 'fz_document_s_extractImage':
fitz/fitz_wrap.c:8185:89: warning: passing argument 3 of 'fz_new_buffer_from_image_as_png' from incompatible pointer type [-Wincompatible-pointer-types]
buffer = freebuf = fz_new_buffer_from_image_as_png(gctx, image, fz_default_color_params);
^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/mupdf/fitz.h:63,
from fitz/fitz_wrap.c:2732:
/usr/include/mupdf/fitz/write-pixmap.h:78:12: note: expected 'const fz_color_params *' {aka 'const struct fz_color_params_s '} but argument is of type 'const fz_color_params * ()(fz_context )' {aka 'const struct fz_color_params_s * ()(struct fz_context_s *)'}
fz_buffer *fz_new_buffer_from_image_as_png(fz_context *ctx, fz_image *image, const fz_color_params *color_params);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fitz/fitz_wrap.c: In function 'fz_document_s_fullcopyPage':
fitz/fitz_wrap.c:8643:69: warning: pointer targets in passing argument 2 of 'fz_new_buffer_from_copied_data' differ in signedness [-Wpointer-sign]
fz_new_buffer_from_copied_data(gctx, " ", 1), NULL, 0);
^~~~
In file included from /usr/include/mupdf/fitz/output.h:6,
from /usr/include/mupdf/fitz/hash.h:6,
from /usr/include/mupdf/fitz.h:16,
from fitz/fitz_wrap.c:2732:
/usr/include/mupdf/fitz/buffer.h:28:12: note: expected 'const unsigned char *' but argument is of type 'char *'
fz_buffer *fz_new_buffer_from_copied_data(fz_context *ctx, const unsigned char *data, size_t size);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fitz/fitz_wrap.c:8623:22: warning: unused variable 'page2' [-Wunused-variable]
pdf_obj *page2 = NULL;
^~~~~
fitz/fitz_wrap.c: In function 'fz_document_s__move_copy_page':
fitz/fitz_wrap.c:8679:26: warning: unused variable 'page2' [-Wunused-variable]
pdf_obj *page2 = pdf_lookup_page_loc(gctx, pdf, nb, &parent2, &i2);
^~~~~
fitz/fitz_wrap.c: In function 'fz_page_s_getSVGimage':
fitz/fitz_wrap.c:8779:29: warning: unused variable 'seps' [-Wunused-variable]
fz_separations *seps = NULL;
^~~~
fitz/fitz_wrap.c: In function 'fz_page_s_addCaretAnnot':
fitz/fitz_wrap.c:8815:31: warning: unused variable 'pdf' [-Wunused-variable]
pdf_document *pdf = page->doc;
^~~
fitz/fitz_wrap.c: In function 'fz_page_s_addFileAnnot':
fitz/fitz_wrap.c:8966:20: warning: unused variable 'len' [-Wunused-variable]
size_t len = 0;
^~~
fitz/fitz_wrap.c:8963:19: warning: unused variable 'data' [-Wunused-variable]
char *data = NULL, *uf = ufilename, *d = desc;
^~~~
fitz/fitz_wrap.c: In function 'fz_page_s__insertImage':
fitz/fitz_wrap.c:9535:77: error: incompatible type for argument 6 of 'fz_convert_pixmap'
pm = fz_convert_pixmap(gctx, pix, NULL, NULL, NULL, color_params, 1);
^~~~~~~~~~~~
In file included from /usr/include/mupdf/fitz.h:35,
from fitz/fitz_wrap.c:2732:
/usr/include/mupdf/fitz/pixmap.h:77:12: note: expected 'const fz_color_params *' {aka 'const struct fz_color_params_s *'} but argument is of type 'fz_color_params' {aka 'struct fz_color_params_s'}
fz_pixmap *fz_convert_pixmap(fz_context *ctx, fz_pixmap *pix, fz_colorspace *cs_des, fz_colorspace *prf, fz_default_colorspaces *default_cs, const fz_color_params *color_params, int keep_alpha);
^~~~~~~~~~~~~~~~~
fitz/fitz_wrap.c:9551:80: error: incompatible type for argument 6 of 'fz_convert_pixmap'
pm = fz_convert_pixmap(gctx, pixmap, NULL, NULL, NULL, color_params, 1);
^~~~~~~~~~~~
In file included from /usr/include/mupdf/fitz.h:35,
from fitz/fitz_wrap.c:2732:
/usr/include/mupdf/fitz/pixmap.h:77:12: note: expected 'const fz_color_params *' {aka 'const struct fz_color_params_s *'} but argument is of type 'fz_color_params' {aka 'struct fz_color_params_s'}
fz_pixmap *fz_convert_pixmap(fz_context *ctx, fz_pixmap *pix, fz_colorspace *cs_des, fz_colorspace *prf, fz_default_colorspaces *default_cs, const fz_color_params *color_params, int keep_alpha);
^~~~~~~~~~~~~~~~~
fitz/fitz_wrap.c:9504:19: warning: unused variable 'cont' [-Wunused-variable]
char *cont = NULL;
^~~~
fitz/fitz_wrap.c:9500:24: warning: unused variable 'res' [-Wunused-variable]
fz_buffer *res = NULL, *nres = NULL, *imgbuf = NULL;
^~~
fitz/fitz_wrap.c:9498:29: warning: unused variable 'seps' [-Wunused-variable]
fz_separations *seps = NULL;
^~~~
fitz/fitz_wrap.c: In function 'new_fz_pixmap_s__SWIG_1':
fitz/fitz_wrap.c:9798:68: error: incompatible type for argument 6 of 'fz_convert_pixmap'
pm = fz_convert_pixmap(gctx, spix, cs, NULL, NULL, color_params, 1);
^~~~~~~~~~~~
In file included from /usr/include/mupdf/fitz.h:35,
from fitz/fitz_wrap.c:2732:
/usr/include/mupdf/fitz/pixmap.h:77:12: note: expected 'const fz_color_params *' {aka 'const struct fz_color_params_s *'} but argument is of type 'fz_color_params' {aka 'struct fz_color_params_s'}
fz_pixmap *fz_convert_pixmap(fz_context *ctx, fz_pixmap *pix, fz_colorspace *cs_des, fz_colorspace *prf, fz_default_colorspaces *default_cs, const fz_color_params *color_params, int keep_alpha);
^~~~~~~~~~~~~~~~~
fitz/fitz_wrap.c: In function 'new_fz_pixmap_s__SWIG_4':
fitz/fitz_wrap.c:9874:32: warning: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'long unsigned int'} [-Wsign-compare]
if (stride * h != size) THROWMSG("bad samples length");
^~
fitz/fitz_wrap.c: In function 'pdf_annot_s_fileUpd':
fitz/fitz_wrap.c:10643:21: warning: unused variable 'size' [-Wunused-variable]
int64_t size = 0;
^~~~
fitz/fitz_wrap.c:10640:19: warning: unused variable 'data' [-Wunused-variable]
char *data = NULL; // for new file content
^~~~
fitz/fitz_wrap.c: In function 'fz_stext_page_s__extractText':
fitz/fitz_wrap.c:11146:25: error: too many arguments to function 'fz_print_stext_page_as_html'
fz_print_stext_page_as_html(gctx, out, self, 0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/mupdf/fitz.h:48,
from fitz/fitz_wrap.c:2732:
/usr/include/mupdf/fitz/structured-text.h:114:6: note: declared here
void fz_print_stext_page_as_html(fz_context *ctx, fz_output *out, fz_stext_page *page);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
fitz/fitz_wrap.c:11149:25: error: too many arguments to function 'fz_print_stext_page_as_xml'
fz_print_stext_page_as_xml(gctx, out, self, 0);
^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/mupdf/fitz.h:48,
from fitz/fitz_wrap.c:2732:
/usr/include/mupdf/fitz/structured-text.h:122:6: note: declared here
void fz_print_stext_page_as_xml(fz_context *ctx, fz_output *out, fz_stext_page *page);
^~~~~~~~~~~~~~~~~~~~~~~~~~
fitz/fitz_wrap.c:11152:25: error: too many arguments to function 'fz_print_stext_page_as_xhtml'
fz_print_stext_page_as_xhtml(gctx, out, self, 0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/mupdf/fitz.h:48,
from fitz/fitz_wrap.c:2732:
/usr/include/mupdf/fitz/structured-text.h:118:6: note: declared here
void fz_print_stext_page_as_xhtml(fz_context *ctx, fz_output *out, fz_stext_page *page);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
fitz/fitz_wrap.c: In function 'PyInit__fitz':
fitz/fitz_wrap.c:21373:3: warning: implicit declaration of function 'fz_set_warning_callback'; did you mean 'pdf_set_doc_event_callback'? [-Wimplicit-function-declaration]
fz_set_warning_callback(gctx, JM_mupdf_warning, &user);
^~~~~~~~~~~~~~~~~~~~~~~
pdf_set_doc_event_callback
fitz/fitz_wrap.c:21374:3: warning: implicit declaration of function 'fz_set_error_callback'; did you mean 'pdf_set_doc_event_callback'? [-Wimplicit-function-declaration]
fz_set_error_callback(gctx, JM_mupdf_error, &user);
^~~~~~~~~~~~~~~~~~~~~
pdf_set_doc_event_callback
error: command 'gcc' failed with exit status 1

ERROR: Failed building wheel for PyMuPDF

@JorjMcKie
Copy link
Collaborator

This error means that pip decided that your configuration does not fit any of the prepared wheels. So it tries to install from sources, which must fails, because you have not installed the base library, MuPDF.
So:
Please provide your system config: OS, version, bitness, Python version, bitness.
Then I am able to track what is going on on your machine.

@JorjMcKie
Copy link
Collaborator

I now realized that you did install some MuPDF version.
You are obviously trying to generate PyMuPDF from source intentionally, right?
In that case you need to make sure that PyMuPDF and the installed MuPDF are compatible: same major an minor version, same bitness as your Python installation, correct pointers to MuPDF include and library folders.
Did you follow all instructions for correctly installing MuPDF? Downloaded it from the documented site (not GitHub!), etc.

@JorjMcKie
Copy link
Collaborator

Closed for lack of reaction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants