Skip to content

mupdf: 1.23.6 -> 1.24.0#298783

Closed
dotlambda wants to merge 3 commits intoNixOS:stagingfrom
dotlambda:mupdf
Closed

mupdf: 1.23.6 -> 1.24.0#298783
dotlambda wants to merge 3 commits intoNixOS:stagingfrom
dotlambda:mupdf

Conversation

@dotlambda
Copy link
Member

@dotlambda dotlambda commented Mar 25, 2024

Description of changes

Changelog: https://git.ghostscript.com/?p=mupdf.git;a=blob_plain;f=CHANGES;hb=1.24.0

cc #298509

fixes #298551

closes #274882
closes #290651

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

cc @stuebinm


Add a 👍 reaction to pull requests you find important.

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Mar 25, 2024
@dotlambda dotlambda changed the title mupdf-headless: fix meta.mainProgram mupdf: 1.23.6 -> 1.24.0 Mar 25, 2024
@dotlambda dotlambda changed the base branch from master to staging March 25, 2024 17:33
@dotlambda dotlambda marked this pull request as draft March 25, 2024 18:06
@github-actions github-actions bot added the 6.topic: python Python is a high-level, general-purpose programming language. label Mar 25, 2024
@dotlambda
Copy link
Member Author

pymupdf import fails with

Traceback (most recent call last):
  File "/nix/store/inmx8af946vr0lnvrcjd393mxh54sqbp-python3.11-pymupdf-1.24.0/lib/python3.11/site-packages/fitz/extra.py", line 14, in swig_import_helper
    return importlib.import_module(mname)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/7wz6hm9i8wljz0hgwz1wqmn2zlbgavrq-python3-3.11.8/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 676, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 573, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 1233, in create_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
ImportError: libmupdfcpp.so.24.0: cannot open shared object file: No such file or directory

Help is appreciated!

@ofborg ofborg bot added 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 1001-2500 This PR causes many rebuilds on Darwin and should most likely target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 1001-2500 This PR causes many rebuilds on Linux and should target the staging branches. and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Mar 25, 2024
@dotlambda dotlambda requested a review from thiagokokada March 25, 2024 18:22
Copy link
Contributor

@l0b0 l0b0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, untested (I never used this package directly).

Thank you!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need env.USE_SONAME = "no", the python wrap script doesn't get the memo otherwise and that is (indirectly) causing the pymupdf imports to fail

There's also pymupdf test failures, but I don't have time to dig further right now

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have an idea why https://github.com/ArtifexSoftware/mupdf/blob/1.24.0/Makefile#L644 doesn't have an effect? The non-version shared library is supposed to be created even without setting USE_SONAME=no.

Copy link
Member

@lilyinstarlight lilyinstarlight Mar 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The makefile gets the memo, but this snippet does not: https://github.com/ArtifexSoftware/mupdf/blob/1.24.0/scripts/wrap/__main__.py#L1165-L1166

If you don't use the env var, then the libmupdfcpp.so file gets a SONAME that does not exist because the makefile does not link it

Copy link
Member

@lilyinstarlight lilyinstarlight Mar 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lilyinstarlight Let me express myself more clearly. If I don't set USE_SONAME=no I expect there to be a versioned shared library and a non-versioned link to it, because of the makefile snippet I shared above. However that link is never created. I don't understand why.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lilyinstarlight Let me express myself more clearly. If I don't set USE_SONAME=no I expect there to be a versioned shared library and a non-versioned link to it, because of the makefile snippet I shared above. However that link is never created. I don't understand why.

Ohhh, yeah that's because it's not added in the postInstall, apologies for misunderstanding 😅

cp build/*/libmupdfcpp.so $out/lib

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@lilyinstarlight lilyinstarlight Mar 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't use the makefile to install the cpp lib because make target dependencies try to rebuild everything as not-shared iirc

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm talking about libmupdf.so, not libmupdfcpp.so.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I really shouldn't be computering when I'm so tired... the makefile doesn't seem to use the install-shared-c target when doing make install and the install-libs target doesn't create the link by itself: https://github.com/ArtifexSoftware/mupdf/blob/1.24.0/Makefile#L478

@ofborg ofborg bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Mar 26, 2024
@sdht0
Copy link
Contributor

sdht0 commented Mar 27, 2024

Are you able to build pymupdf? Tests are still failing for me.

@SuperSandro2000
Copy link
Member

FYI #332385

@thiagokokada
Copy link
Contributor

Fixed by #332385.

@dotlambda dotlambda deleted the mupdf branch August 14, 2024 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.status: merge conflict This PR has merge conflicts with the target branch 6.topic: python Python is a high-level, general-purpose programming language. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 1001-2500 This PR causes many rebuilds on Darwin and should most likely target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 1001-2500 This PR causes many rebuilds on Linux and should target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants