NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.27k stars 14.26k forks source link

xprite-editor fails on multiple platforms #146949

Open arkivm opened 3 years ago

arkivm commented 3 years ago

Describe the bug

xprite-editor fails to build on x86_64-darwin, aarch64-darwin, and x86_64-linux on hydra.

All of them suffer from the same problem

error[E0034]: multiple applicable items in scope
   --> /private/tmp/nix-build-xprite-editor-unstable-2019-09-22.drv-0/xprite-editor-unstable-2019-09-22-vendor.tar.gz/imageproc/src/hog.rs:440:33
    |
440 |             let intensity = u8::clamp(hist[bucket]);
    |                                 ^^^^^ multiple `clamp` found
    |
    = note: candidate #1 is defined in an impl of the trait `Ord` for the type `u8`
note: candidate #2 is defined in the trait `Clamp`
   --> /private/tmp/nix-build-xprite-editor-unstable-2019-09-22.drv-0/xprite-editor-unstable-2019-09-22-vendor.tar.gz/imageproc/src/definitions.rs:68:5
    |
68  |     fn clamp(x: T) -> Self;
    |     ^^^^^^^^^^^^^^^^^^^^^^^
help: disambiguate the associated function for candidate #1
    |
440 |             let intensity = Ord::clamp(hist[bucket]);
    |                             ~~~~~
help: disambiguate the associated function for candidate #2
    |
440 |             let intensity = Clamp::clamp(hist[bucket]);
    |                             ~~~~~~~

which seem to be stemming from using an old version of imageproc (i.e., v0.18). However, trivially upgrading to a newer version of imageproc (v0.22.0) breaks xprite-editor as it still relies on some old exported interfaces (affine module and its functions affine::translate) that are not available in the newer versions of imageproc.

Steps To Reproduce

Steps to reproduce the behavior:

  1. build fails locally with nix-build -A xprite-editor

Expected behavior

Build succeeds

Notify maintainers

@marsam

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: `"aarch64-darwin"`
 - host os: `Darwin 21.1.0, macOS 12.0`
 - multi-user?: `no`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.15`
 - channels(klein): `"home-manager, nixpkgs-21.11pre330734.5cb226a06c4"`
 - nixpkgs: `/Users/klein/.nix-defexpr/channels/nixpkgs`

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:
fgaz commented 2 years ago

Not stale, still broken: #198759