Repository navigation
mupdf: 1.24.8 -> 1.24.9, fixes - #342894
Conversation
6f50b5a to
1c9359a
Compare
b156786 to
234c7d6
Compare
|
As a double-check, also build |
There was a problem hiding this comment.
Failure while building python311Packages.pymupdf on aarch64-Darwin:
error: builder for '/nix/store/4l9j0zyl7h7nvkp8ml1kci064p7hm9ah-mupdf-1.24.9.drv' failed with exit code 1;
last 10 log lines:
> Traceback (most recent call last):
> scripts/mupdfwrap.py:6:<module>(): wrap.__main__.main()
> scripts/wrap/__main__.py:3062:main(): jlib.exception_info()
> ^except raise:
> scripts/wrap/__main__.py:3060:main(): main2()
> scripts/wrap/__main__.py:2445:main2(): build( build_dirs, swig_command, args, vs_upgrade, make_command)
> scripts/wrap/__main__.py:1637:build(): build_0(
> scripts/wrap/__main__.py:1413:build_0(): cpp.cpp_source(
> scripts/wrap/cpp.py:5024:cpp_source(): raise Exception(f'libclang does not appear to be installed') from e
> Exception: libclang does not appear to be installed
For full logs, run 'nix log /nix/store/4l9j0zyl7h7nvkp8ml1kci064p7hm9ah-mupdf-1.24.9.drv'.
error: 1 dependencies of derivation '/nix/store/k5wqx2jc6z43ixgy5qfz8m066sh33lcd-python3.11-pymupdf-1.24.8.drv' failed to build|
This still needs some more changes (e.g. |
Yes, that made its way into |
|
This looks salient (from the gist): (+0.0s): parse.py:14:<module>: Warning, could not import clang: No module named 'clang'
(+0.1s): state.py:18:<module>: Warning: failed to import clang.cindex: e=ModuleNotFoundError("No module named 'clang'")
(+0.1s): state.py:18:<module>: We need Clang Python to build MuPDF python.
(+0.1s): state.py:18:<module>: Install with `pip install libclang` (typically inside a Python venv),
(+0.1s): state.py:18:<module>: or (OpenBSD only) `pkg_add py3-llvm.` |
234c7d6 to
8012150
Compare
|
It should work on everything now (including cross). |
8012150 to
65564f0
Compare
|
What seems to be happening is that |
Can you share how you are testing and details on your host system? (e.g. what exact command you are running to checkout the commit from this PR, what command to build, what macOS version, is sandbox enabled, etc) |
❯ nix-shell -p nix-info --run "nix-info -m"
- system: `"aarch64-darwin"`
- host os: `Darwin 23.6.0, macOS 14.6.1`
- multi-user?: `yes`
- sandbox: `no`
- version: `nix-env (Nix) 2.18.5`
- channels(root): `"nixpkgs"`
- nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`
|
The cross-compilation error is gone, and I think the issue may be that the python interface build is missing |
Ah! I'd only tested |
|
@ofborg build python311Packages.pymupdf |
|
@sarahec Well I couldn't sleep. So I remember this issue now. Darwin will always fail for any Python package that uses an alternate version of the Until we have a more proper fix for Python environment management when needing just bins from a python package, the easiest general fix for every package in this situation would be to do this diff (which has been in my nixpkgs diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 1254d45dda59..ca71039f4293 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -1341,7 +1341,7 @@ with pkgs;
desktopToDarwinBundle = makeSetupHook {
name = "desktop-to-darwin-bundle-hook";
- propagatedBuildInputs = [ writeDarwinBundle librsvg imagemagick python3Packages.icnsutil ];
+ propagatedBuildInputs = [ writeDarwinBundle librsvg imagemagick (onlyBin python3Packages.icnsutil) ];
} ../build-support/setup-hooks/desktop-to-darwin-bundle.sh;
keepBuildTree = makeSetupHook { |
|
@lilyinstarlight I hope you managed to get some sleep. Thank you for unpacking the issue for Darwin. Is there something I should do here? |
|
@lilyinstarlight I tested the dozen or so packages that use |
|
I think it would be best just to open a PR with the |
|
Going to merge this so that it gets in for the next |
Description of changes
All credit goes to @lilyinstarlight. Built
mupdf,python3Packages.mupdf,mupdf.tests.mupdf-all.cc @drupol @GaetanLepage
cc @sarahec I think this should fix the issue you were running into, and you should be able to bump cleanly on top of this.
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.