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

Build failure: python312Packages.pymupdf #331934

Closed
idlip opened this issue Aug 3, 2024 · 3 comments · Fixed by #342894
Closed

Build failure: python312Packages.pymupdf #331934

idlip opened this issue Aug 3, 2024 · 3 comments · Fixed by #342894
Labels

Comments

@idlip
Copy link
Contributor

idlip commented Aug 3, 2024

Steps To Reproduce

Steps to reproduce the behavior:

  1. build python312Packages.pymupdf

Build log

builder for '/nix/store/0ibrmx5mkr625p2n5972n7426k6fq5yp-mupdf-1.23.6.drv' failed with exit code 1;
       last 20 log lines:
       > (+5.7s): -b: 1: __main__.py:1638:build: [returned e=1]
       > Traceback (most recent call last):
       >     scripts/mupdfwrap.py:6:<module>(): wrap.__main__.main()
       >     scripts/wrap/__main__.py:2902:main(): jlib.exception_info()
       >     ^except raise:
       >     scripts/wrap/__main__.py:2900:main(): main2()
       >     scripts/wrap/__main__.py:2310:main2(): build( build_dirs, swig_command, args, vs_upgrade)
       >     scripts/wrap/__main__.py:1638:build(): jlib.build(
       >     scripts/jlib.py:2213:build(): system( command, out=out, verbose=verbose, executable=executable, caller=2)
       >     scripts/jlib.py:1682:system(): raise Exception( message)
       > Exception: Command failed: c++ \
       >     -o build/shared-release/libmupdfcpp.so \
       >  \
       >     -O2 -DNDEBUG \
       >     -fPIC -shared \
       >     -I /build/mupdf-1.23.6-source/include \
       >     -I /build/mupdf-1.23.6-source/platform/c++/include \
       >      platform/c++/implementation/classes.cpp platform/c++/implementation/classes2.cpp platform/c++/implementation/exceptions.cpp platform/c++/implementation/extra.cpp platform/c++/implementation/functions.cpp platform/c++/implementation/internal.cpp \
       >     -L build/shared-release -l mupdf -Wl,-rpath,'$ORIGIN',-z,origin
       > /nix/store/1r32fki5z5ivgaikgh8pq0r6vz3b0jpj-stdenv-linux/setup: line 193: pop_var_context: head of shell_variables not a function context
       For full logs, run 'nix log /nix/store/0ibrmx5mkr625p2n5972n7426k6fq5yp-mupdf-1.23.6.drv'.
error: 1 dependencies of derivation '/nix/store/bgrlbv73rkijhw2n03yh98r503l7jrk4-python3.12-pymupdf-1.23.26.drv' failed to build

Additional context

I see few more build failures with other packages. Guess so it is not built in cache as well.

Eg: python312Packages.imbalanced-learn

Notify maintainers

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.10.2, NixOS, 24.11 (Vicuna), 24.11.20240728.52ec9ac`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.5`
 - nixpkgs: `/nix/store/bcghcr9qwqmanpds017w75mcqda4fgab-source`

Add a 👍 reaction to issues you find important.

@idlip idlip added the 0.kind: build failure A package fails to build label Aug 3, 2024
@ghpzin
Copy link
Contributor

ghpzin commented Aug 3, 2024

On Hydra:
https://hydra.nixos.org/job/nixos/trunk-combined/nixpkgs.python312Packages.pymupdf.x86_64-linux
https://hydra.nixos.org/build/267693093

Build failed because mupdf-cxx did not build on x86_64-linux and aarch64-linux (both darwin targets are okay).

mupdf itself is green:
https://hydra.nixos.org/job/nixos/trunk-combined/nixpkgs.mupdf.x86_64-linux
https://hydra.nixos.org/build/267654619

I assume the issue is related to things pymudpf does to generate mupdf-cxx.
And based on this upstream issue:
pymupdf/PyMuPDF#3279
is probably related to recent update to clang_18 and fixed on version 1.24.0 (which may need some updated version of mupdf too).


PS: You need to ping pymupdf maintainers in "Notify maintainers" for them to notice it:
@teto

@idlip
Copy link
Contributor Author

idlip commented Aug 3, 2024

Hey, thank you for the thorough investigation and detailed report on the issue.

@happysalada
Copy link
Contributor

on x86_64 darwin I have a different failure

Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/yds0i2kafj6dmvhpg275wwwhymfgqq8b-mupdf-1.24.8-source.tar.gz
source root is mupdf-1.24.8-source
setting SOURCE_DATE_EPOCH to timestamp 1721817351 of file mupdf-1.24.8-source/thirdparty/tesseract.txt
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
applying patch /nix/store/nvmjz5f7hfilyx8p98g00ialvsp23y43-0002-Add-Darwin-deps.patch
patching file Makerules
Hunk #1 succeeded at 208 with fuzz 1 (offset 55 lines).
applying patch /nix/store/dw4z9fs6kl2fgm0fv6aqjnci09jg6kjl-0003-Fix-cpp-build.patch
patching file scripts/wrap/cpp.py
Hunk #1 succeeded at 5055 (offset 460 lines).
substituteStream() in derivation mupdf-1.24.8: WARNING: '--replace' is deprecated, use --replace-{fail,warn,quiet}. (file 'Makerules')
patching script interpreter paths in scripts/mupdfwrap.py
scripts/mupdfwrap.py: interpreter directive changed from "#! /usr/bin/env python3" to "/nix/store/ks8acr22s4iggnmvxydm5czl30racy32-python3-3.12.5/bin/python3"
Running phase: configurePhase
@nix { "action": "setPhase", "phase": "configurePhase" }
fixing libtool script ./thirdparty/lcms2/ltmain.sh
./thirdparty/lcms2/configure
no configure script, doing nothing
Running phase: buildPhase
@nix { "action": "setPhase", "phase": "buildPhase" }
build flags: -j4 SHELL=/nix/store/gyp8mby6x8fljfm8f942w2mkyjdjk6pc-bash-5.2p32/bin/bash prefix=$(out) shared=yes USE_SYSTEM_LIBS=yes PKG_CONFIG=/nix/store/8y616797pbbagd1405prc1lwgc5p4r0y-pkg-config-wrapper-0.29.2/bin/pkg-config HAVE_X11=no USE_TESSERACT=yes
Makethird:57: *** missing separator. Stop.

@fpletz (failure is coming from mupdf) in case you have bandwidth for this.

@lilyinstarlight lilyinstarlight linked a pull request Sep 19, 2024 that will close this issue
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants