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

Update for muPDF 1.17.0 #503

Closed
wamserma opened this issue May 8, 2020 · 2 comments
Closed

Update for muPDF 1.17.0 #503

wamserma opened this issue May 8, 2020 · 2 comments
Assignees

Comments

@wamserma
Copy link

wamserma commented May 8, 2020

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.

@JorjMcKie
Copy link
Collaborator

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.

I am working on a new PyMuPDF version since MuPDF 1.17.0-rc1 has been published (21st April). As you say, those API changes are a pain in the neck.
But I have a clean compile now and most of the tests are running successfully. I think I will be able to publish in about a week.

@JorjMcKie JorjMcKie added enhancement and removed bug labels May 13, 2020
@JorjMcKie
Copy link
Collaborator

New v1.17.0 is uploaded.

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

No branches or pull requests

2 participants