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: pkgsStatic.libjpeg_turbo #282158

Closed
lilyball opened this issue Jan 19, 2024 · 1 comment
Closed

Build failure: pkgsStatic.libjpeg_turbo #282158

lilyball opened this issue Jan 19, 2024 · 1 comment

Comments

@lilyball
Copy link
Member

Steps To Reproduce

Steps to reproduce the behavior:

  1. nix build nixpkgs/eabe8d3eface69f5bb16c18f8662a702f50c20d5#pkgsStatic.libjpeg

Build log

It's long, so I've trimmed it to just the relevant bits

Running tests...
Test project /build/source/build
        Start   7: tjbench-static-tile-cp
        Start  29: tjbench-static-tilem-cp
        Start  41: cjpeg-static-rgb-islow
        Start  52: cjpeg-static-422-ifast-opt
        Start  56: cjpeg-static-440-islow
        Start  66: cjpeg-static-420-q100-ifast-prog
        Start  72: cjpeg-static-gray-islow
        Start  84: cjpeg-static-3x2-float-prog
        Start  88: cjpeg-static-3x2-ifast-prog
        Start 140: cjpeg-static-420-islow-prog
        Start 145: cjpeg-static-444-islow
        Start 148: cjpeg-static-444-islow-prog
        Start 151: cjpeg-static-444-islow-ari
        Start  82: cjpeg-static-420s-ifast-opt
        Start  92: cjpeg-static-420-islow-ari
        Start  94: jpegtran-static-420-islow-ari
  1/155 Test   #7: tjbench-static-tile-cp ............................   Passed    0.01 sec
        Start   8: tjbench-static-tile
  2/155 Test  #29: tjbench-static-tilem-cp ...........................   Passed    0.01 sec
        Start  30: tjbench-static-tilem
  3/155 Test  #41: cjpeg-static-rgb-islow ............................***Failed    0.01 sec
/nix/store/zx8aqgdy735qzk81glfwil6mbi6ddqb1-coreutils-9.4/bin/env: 'cjpeg-static': No such file or directory

        Start  43: djpeg-static-rgb-islow
  4/155 Test  #52: cjpeg-static-422-ifast-opt ........................***Failed    0.01 sec
/nix/store/zx8aqgdy735qzk81glfwil6mbi6ddqb1-coreutils-9.4/bin/env: 'cjpeg-static': No such file or directory

        Start  46: jpegtran-static-icc
  5/155 Test  #56: cjpeg-static-440-islow ............................***Failed    0.01 sec
/nix/store/zx8aqgdy735qzk81glfwil6mbi6ddqb1-coreutils-9.4/bin/env: 'cjpeg-static': No such file or directory

        Start  48: djpeg-static-rgb-islow-565
  6/155 Test  #66: cjpeg-static-420-q100-ifast-prog ..................***Failed    0.01 sec
/nix/store/zx8aqgdy735qzk81glfwil6mbi6ddqb1-coreutils-9.4/bin/env: 'cjpeg-static': No such file or directory

        Start  50: djpeg-static-rgb-islow-565D
  7/155 Test  #72: cjpeg-static-gray-islow ...........................***Failed    0.01 sec
/nix/store/zx8aqgdy735qzk81glfwil6mbi6ddqb1-coreutils-9.4/bin/env: 'cjpeg-static': No such file or directory
[…]
        Start  24: tjbench-static-tile-444-64x64-cmp
 70/155 Test   #9: tjbench-static-tile-gray-8x8-cmp ..................***Failed    0.01 sec
Could not obtain MD5 sum: No such file or directory

        Start  25: tjbench-static-tile-gray-128x128-cmp
 71/155 Test  #10: tjbench-static-tile-420-8x8-cmp ...................***Failed    0.01 sec
Could not obtain MD5 sum: No such file or directory
[…]
1% tests passed, 153 tests failed out of 155

Additional context

This is an issue with cross-compiling. The tests are specified using ${CMAKE_CROSSCOMPILING_EMULATOR}, which Nix sets to env. The problem is the tests are trying to refer to the static targets and relying on CMake replacing the target with the actual output path, but when ${CMAKE_CROSSCOMPILING_EMULATOR} is defined this no longer happens. I've confirmed this by reproducing it in the trivial cross-compiled environment of { crossSystem.system = builtins.currentSystem; crossSystem.foo = true; }.

Notify maintainers

@vcunat @colemickens @kamadorueda

Metadata

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

[user@system:~]$ nix run nixpkgs#nix-info -- -m
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.60, NixOS, 24.05 (Uakari), 24.05.20231211.a9bf124`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - nixpkgs: `/etc/nix/inputs/nixpkgs`

Add a 👍 reaction to issues you find important.

@wolfgangwalther
Copy link
Contributor

Fixed in #285624.

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

No branches or pull requests

2 participants