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

pkgsCross.zfs is broken #143872

Closed
2 tasks done
Atemu opened this issue Oct 30, 2021 · 8 comments
Closed
2 tasks done

pkgsCross.zfs is broken #143872

Atemu opened this issue Oct 30, 2021 · 8 comments
Labels
0.kind: bug Something is broken 6.topic: cross-compilation Building packages on a different platform than they will be used on 6.topic: kernel The Linux kernel

Comments

@Atemu
Copy link
Member

Atemu commented Oct 30, 2021

Describe the bug

A clear and concise description of what the bug is.

  • pkgsCross.zfs:
sqpoll-cancel-hang.c: In function 'main':
sqpoll-cancel-hang.c:138:13: error: '__NR_mmap' undeclared (first use in this function)
  138 |     syscall(__NR_mmap, 0x20000000ul, 0x1000000ul, 7ul, 0x32ul, -1, 0ul);
      |             ^~~~~~~~~
sqpoll-cancel-hang.c:138:13: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [Makefile:162: sqpoll-cancel-hang] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/build/liburing/test'
make: *** [Makefile:13: all] Error 2
  • pkgsCross.linuxPackages.zfs:
make[3]: Leaving directory '/nix/store/my6h9y4hsqysh6fayq3w0l4ivvbwk2yv-linux-armv7l-unknown-linux-gnueabihf-5.10.73-dev/lib/modules/5.10.73/build'
make[2]: Leaving directory '/build/source/module'
make[2]: Entering directory '/build/source'
[ -x ./scripts/zfs-tests.sh ] && \
    ./scripts/zfs-tests.sh -c
Missing helper script common.sh
make[2]: [Makefile:1485: all-local] Error 1 (ignored)
make[2]: Leaving directory '/build/source'
make[1]: Leaving directory '/build/source'
xargs: strip: No such file or directory

Additional context

Add any other context about the problem here.

#106759

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"
output here

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:
@Atemu Atemu added the 0.kind: bug Something is broken label Oct 30, 2021
@Atemu
Copy link
Member Author

Atemu commented Oct 31, 2021

Same happens in the build of liburing.

@Artturin
Copy link
Member

linuxPackages.zfs was fixed in 736dcd8#diff-6b938a2bb5aecd0c3f770bd30c95987c65fa12bd8189bfbadad3b82857cc2ea3

@veprbl veprbl added the 6.topic: kernel The Linux kernel label Oct 31, 2021
@Atemu Atemu added the 6.topic: cross-compilation Building packages on a different platform than they will be used on label Nov 1, 2021
@jonringer
Copy link
Contributor

Same happens in the build of liburing.

A similar fix should happen for liburing

@Atemu
Copy link
Member Author

Atemu commented Nov 2, 2021

The fix was for the kernel part. The userspace part with the same error as liburing isn't even diagnosed yet AFAIK.

@ju1m
Copy link
Contributor

ju1m commented Nov 21, 2021

@Atemu, this bug was fixed a month ago upstream, in the meantime I'm using:

nixpkgs.overlays = [
  (final: super: {
    # TODO: remove after liburing-2.1
    liburing = super.liburing.overrideAttrs (old: {
      src = super.fetchgit {
        url    = "http://git.kernel.dk/${old.pname}";
        rev    = "cb350a8989adbd65db574325d9a86d5437d800da";
        sha256 = "sha256-ZMev2RjiswuR9seVwHbnVUtnpaPW/XJbelBgvIuYiGg=";
      };
    });
  })
];

@dmorn
Copy link

dmorn commented May 24, 2022

For reference, I was affected while cross compiling the bootable armv7l image for rpi 3B+. liburing was failing with

rror: builder for '/nix/store/9y48v9580crkiyhiscz8q1qg34wkrixw-liburing-armv7l-unknown-linux-gnueabihf-2.1.drv' failed with exit code 2;
       last 10 log lines:
       >      CC sqpoll-exit-hang
       >      CC sqpoll-cancel-hang
       > sqpoll-cancel-hang.c: In function 'main':
       > sqpoll-cancel-hang.c:138:13: error: '__NR_mmap' undeclared (first use in this function)
       >   138 |     syscall(__NR_mmap, 0x20000000ul, 0x1000000ul, 7ul, 0x32ul, -1, 0ul);
       >       |             ^~~~~~~~~
       > sqpoll-cancel-hang.c:138:13: note: each undeclared identifier is reported only once for each function it appears in
       > make[1]: *** [Makefile:162: sqpoll-cancel-hang] Error 1
       > make[1]: Leaving directory '/build/liburing/test'
       > make: *** [Makefile:13: all] Error 2

A minimal flake for reproducing the issue

{
  description = "Build image";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-21.11";
  };

  outputs = { self, nixpkgs }: rec {
    nixosConfigurations.rpi3 = nixpkgs.lib.nixosSystem {
      system = "aarch64-linux";
      modules = [
        "${nixpkgs}/nixos/modules/installer/sd-card/sd-image-raspberrypi.nix"
        {
          nixpkgs.config.allowUnsupportedSystem = true;
          nixpkgs.crossSystem.system = "armv7l-linux";
          boot.kernelParams = [
            "console=ttyS1,115200n8"
          ];
        }
      ];
    };
    images.rpi3 = nixosConfigurations.rpi3.config.system.build.sdImage;
  };
}

@Artturin
Copy link
Member

Artturin commented May 24, 2022

For reference, I was affected while cross compiling the bootable armv7l image for rpi 3B+. liburing was failing with

rror: builder for '/nix/store/9y48v9580crkiyhiscz8q1qg34wkrixw-liburing-armv7l-unknown-linux-gnueabihf-2.1.drv' failed with exit code 2;
       last 10 log lines:
       >      CC sqpoll-exit-hang
       >      CC sqpoll-cancel-hang
       > sqpoll-cancel-hang.c: In function 'main':
       > sqpoll-cancel-hang.c:138:13: error: '__NR_mmap' undeclared (first use in this function)
       >   138 |     syscall(__NR_mmap, 0x20000000ul, 0x1000000ul, 7ul, 0x32ul, -1, 0ul);
       >       |             ^~~~~~~~~
       > sqpoll-cancel-hang.c:138:13: note: each undeclared identifier is reported only once for each function it appears in
       > make[1]: *** [Makefile:162: sqpoll-cancel-hang] Error 1
       > make[1]: Leaving directory '/build/liburing/test'
       > make: *** [Makefile:13: all] Error 2

A minimal flake for reproducing the issue

{
  description = "Build image";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-21.11";
  };

  outputs = { self, nixpkgs }: rec {
    nixosConfigurations.rpi3 = nixpkgs.lib.nixosSystem {
      system = "aarch64-linux";
      modules = [
        "${nixpkgs}/nixos/modules/installer/sd-card/sd-image-raspberrypi.nix"
        {
          nixpkgs.config.allowUnsupportedSystem = true;
          nixpkgs.crossSystem.system = "armv7l-linux";
          boot.kernelParams = [
            "console=ttyS1,115200n8"
          ];
        }
      ];
    };
    images.rpi3 = nixosConfigurations.rpi3.config.system.build.sdImage;
  };
}

please switch to the unstable channel, the issue is fixed there and cross-compilation is usually in the best health there

@dmorn
Copy link

dmorn commented May 24, 2022

Hello @Artturin thanks for joining. Compilation has already started so I'll check if this works, I've applied the overlay fix as suggested above. I'll try with unstable afterwards if this one does not make it through!

@Artturin Artturin closed this as completed Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken 6.topic: cross-compilation Building packages on a different platform than they will be used on 6.topic: kernel The Linux kernel
Projects
None yet
Development

No branches or pull requests

6 participants