Skip to content

Update for muPDF 1.17.0 #503

@wamserma

Description

@wamserma

Please provide all mandatory information!

Describe the bug (mandatory)

PyMuPDF does not compile against mupdf-1.17.0 as structs in fitz have been renamed.

To Reproduce (mandatory)

nix-build -A python37Packages.pymupdf https://github.com/r-ryantm/nixpkgs/archive/f51b59383bdb13d70cc564e904baeacb75dc95c3.tar.gz
In file included from /nix/store/ir2fvcbsvmskdzv6c6y98cx1hbzdyzx7-mupdf-1.17.0-dev/include/mupdf/pdf.h:11,
                 from fitz/fitz_wrap.c:2732:
/nix/store/ir2fvcbsvmskdzv6c6y98cx1hbzdyzx7-mupdf-1.17.0-dev/include/mupdf/pdf/document.h:91:15: note: expected ‘fz_document *’ {aka ‘struct fz_document *’} but argument is of type ‘struct fz_document_s *’
   91 | pdf_document *pdf_specifics(fz_context *ctx, fz_document *doc);
      |               ^~~~~~~~~~~~~
fitz/fitz_wrap.c:11835:20: warning: returning ‘pdf_graft_map *’ {aka ‘struct pdf_graft_map *’} from a function with incompatible return type ‘struct pdf_graft_map_s *’ [-Wincompatible-pointer-types]
11835 |             return map;
      |                    ^~~
fitz/fitz_wrap.c: In function ‘Tools_store_shrink’:
fitz/fitz_wrap.c:11870:56: error: dereferencing pointer to incomplete type ‘fz_store’ {aka ‘struct fz_store’}
11870 |             return Py_BuildValue("i", (int) gctx->store->size);
      |                                                        ^~

Expected behavior (optional)

PyMuPDF compiles. :)

Your configuration (mandatory)

  • NixOS, x64_64
  • tested with Python 3.7
  • PyMuPDF 1.17.0, from source

Additional context (optional)

I am fully aware that PyMuPDF is explicitly advertised as being compatible to 1.16.*, nevertheless, this issue is for keeping track and cross-referencing for downstream packaging.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions