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

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

Merged
merged 9 commits into from
Nov 15, 2023

Conversation

lilyinstarlight
Copy link
Member

@lilyinstarlight lilyinstarlight commented Oct 14, 2023

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.

@lilyinstarlight
Copy link
Member Author

lilyinstarlight commented Oct 15, 2023

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...

@lilyinstarlight
Copy link
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 teto and AndersonTorres 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
11 checks passed
@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
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
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

clang python bindings
9 participants