Skip to content

mupdf: 1.23.0 -> 1.23.5; only build and install shared libraries - #261113

Merged
RaitoBezarius merged 9 commits into
NixOS:staging-nextfrom
lilyinstarlight:fix/mupdf-hell
Nov 15, 2023
Merged

RaitoBezarius merged 9 commits into
NixOS:staging-nextfrom
lilyinstarlight:fix/mupdf-hell

Conversation

@lilyinstarlight

@lilyinstarlight lilyinstarlight commented Oct 14, 2023 •

Copy link
Copy Markdown
Member

Description of changes

Second attempt at #237199

Things done

  • Built on platform(s)
    • x86_64-linux (only direct dependents of mupdf and tested that they function)
    • aarch64-linux (all reverse dependencies via nixpkgs-review and confirmed no regressions against master)
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • 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/)
  • 23.11 Release Notes (or backporting 23.05 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.

@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. labels Oct 14, 2023
@lilyinstarlight

lilyinstarlight commented Oct 15, 2023 •

Copy link
Copy Markdown
Member Author

So, uh, it turns out pymupdf is broken on staging independent of this PR after it was bumped in the last python-updates cycle (my test builds were against these commits picked on top of master, so I didn't experience the breakage when running nixpkgs-review)

It's not really related to this PR, but I'll probably still push a fix in the next day or so (but it can go in a new PR since it is orthogonal to this one, mostly)

Edit: PyMuPDF is actually building from it's own vendored version right now anyway and can't use our MuPDF since it doesn't build C++ bindings...

Comment thread pkgs/desktops/arcan/arcan/default.nix Resolved
@github-actions github-actions Bot added the 6.topic: python Python is a high-level, general-purpose programming language. label Oct 27, 2023
@lilyinstarlight

Copy link
Copy Markdown
Member Author

Okay so I've rebased this to fix a merge conflict, I added support for building the C++ and Python bindings to MuPDF and fixed PyMuPDF to use our own MuPDF build rather than building it's own

I think I've untangled as much MuPDF stuff as I can at this point and I added myself as a maintainer for the package

@ofborg ofborg Bot added the 8.has: package (new) This PR adds a new package label Oct 28, 2023
@ofborg
ofborg Bot requested review from AndersonTorres and teto October 28, 2023 00:00
@lilyinstarlight lilyinstarlight changed the title mupdf: actually build and install the shared libraries version mupdf: 1.23.0 -> 1.23.4; only build and install shared libraries Oct 28, 2023
@lilyinstarlight lilyinstarlight linked an issue Nov 2, 2023 that may be closed by this pull request
@ofborg
ofborg Bot requested a review from teto November 2, 2023 15:33
@lilyinstarlight lilyinstarlight changed the title mupdf: 1.23.0 -> 1.23.4; only build and install shared libraries mupdf: 1.23.0 -> 1.23.5; only build and install shared libraries Nov 9, 2023
@lilyinstarlight
lilyinstarlight changed the base branch from staging to staging-next November 15, 2023 00:01
@RaitoBezarius
RaitoBezarius merged commit ed2b1fe into NixOS:staging-next Nov 15, 2023
@lilyinstarlight
lilyinstarlight deleted the fix/mupdf-hell branch November 15, 2023 00:09
@rrbutani rrbutani added the 6.topic: llvm/clang Issues related to llvmPackages, clangStdenv and related label May 27, 2024
@happysalada

Copy link
Copy Markdown
Contributor

Alright I've tried everything I could, so just writing my thoughts here in case someone has an idea.
pymupdf is broken on master because somehow when mupdf builds with ocr enabled, pkg-config is not able to find leptonica.
You can tell the compiler (USE_SYSTEM_LEPTONICA=no) to build with the thirdparty leptonica included, but somehow the build of pymupdf will fail with a circular import error. So I'm guessing that something else needs to be done for the build to actually work.
The best would be to have pkg-config detect leptonica, but I don't understand why it's not happening.
the build will conveniently fail quickly but the error message just points
https://github.com/ArtifexSoftware/mupdf/blob/b426d88c7f77ece0cca739af403d191066357b1f/Makethird#L57
and it's not immediately obvious that leptonica wasn't found.
I'm reaching out here as I'm guessing this is where someone more familiar with the build process than I am might be.
If everyone is busy, no worries of course.

@lilyinstarlight

Copy link
Copy Markdown
Member Author

@happysalada That issue has nothing to do with pkg-config+leptonica (which works just fine if you actually test it) and has nothing to do with this PR. See #338680 (comment)

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

Labels

6.topic: llvm/clang Issues related to llvmPackages, clangStdenv and related 6.topic: python Python is a high-level, general-purpose programming language. 8.has: package (new) This PR adds a new package 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.

clang python bindings

9 participants