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: p11-kit-riscv64-unknown-linux-gnu-0.25-0 (cross compiled) #246545

Closed
skyrgobbler opened this issue Aug 1, 2023 · 2 comments
Closed
Labels
0.kind: build failure A package fails to build 2.status: fix-in-staging This issue has been fixed in staging but is not yet in the channels or master 6.topic: cross-compilation Building packages on a different platform than they will be used on

Comments

@skyrgobbler
Copy link

Steps To Reproduce

When trying to build an SD image for either the StarFive VisionFive 2 or Pine64 Star64 boards using the flakes at github.com/nixos/nixos-hardware/starfive/visionfive/v2 or github.com/nixos/nixos-hardware/pine64/star64 there is a problem cross compiling p11-kit due to the test not being allowed during cross compilation.

When looking in the p11-kit default.nix doCheck is only set to false for Darwin systems so I patched it with:

diff --git a/pkgs/development/libraries/p11-kit/default.nix b/pkgs/development/libraries/p11-kit/default.nix
index 7f545958e71..59c2776786d 100644
--- a/pkgs/development/libraries/p11-kit/default.nix
+++ b/pkgs/development/libraries/p11-kit/default.nix
@@ -76,7 +76,7 @@ stdenv.mkDerivation rec {
     fi
   '';

-  doCheck = !stdenv.isDarwin;
+  doCheck = ( stdenv.hostPlatform == stdenv.buildPlatform ) && !stdenv.isDarwin;

   installFlags = [
     "exampledir=${placeholder "out"}/etc/pkcs11"

which I would have thought should have solved the problem, but unfortunately not.

Build log

error: builder for '/nix/store/mjpyv58ysm90i29x6146d8y3n1b9ldq0-p11-kit-riscv64-unknown-linux-gnu-0.25.0.drv' failed with exit code 1;
       last 10 log lines:
       > checking for fdwalk... no
       > checking for setenv... yes
       > checking for getpeereid... no
       > checking for getpeerucred... no
       > checking for issetugid... no
       > checking for isatty... yes
       > checking for strerror_r... yes
       > configure: error: in `/build/source':
       > configure: error: cannot run test program while cross compiling
       > See `config.log' for more details
       For full logs, run 'nix log /nix/store/mjpyv58ysm90i29x6146d8y3n1b9ldq0-p11-kit-riscv64-unknown-linux-gnu-0.25.0.drv'.
error (ignored): error: cannot unlink '/tmp/nix-build-libgcrypt-riscv64-unknown-linux-gnu-1.10.2.drv-8': Directory not empty
error (ignored): error: cannot unlink '/tmp/nix-build-unbound-riscv64-unknown-linux-gnu-1.17.1.drv-9': Directory not empty
error: 1 dependencies of derivation '/nix/store/3c3lbcc0psmlpkj5ivqil733g738rgkm-gnutls-riscv64-unknown-linux-gnu-3.8.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/ymasznpj8da2mwpjfi89ji5d197n4xry-systemd-riscv64-unknown-linux-gnu-253.6.drv' failed to build
error (ignored): error: cannot unlink '/tmp/nix-build-go-1.20.6.drv-1/go/pkg/obj/go-build/bf': Directory not empty
error (ignored): error: cannot unlink '/tmp/nix-build-zsh-riscv64-unknown-linux-gnu-5.9.drv-8/zsh-5.9': Directory not empty
error (ignored): error: cannot unlink '/tmp/nix-build-libewf-riscv64-unknown-linux-gnu-20201230.drv-8/libewf-20201230': Directory not empty
error (ignored): error: cannot unlink '/tmp/nix-build-strace-riscv64-unknown-linux-gnu-6.4.drv-11/strace-6.4': Directory not empty
error (ignored): error: cannot unlink '/tmp/nix-build-glib-riscv64-unknown-linux-gnu-2.76.4.drv-2': Directory not empty
error (ignored): error: cannot unlink '/tmp/nix-build-pkg-config-riscv64-unknown-linux-gnu-0.29.2.drv-9': Directory not empty
error (ignored): error: cannot unlink '/tmp/nix-build-coreutils-full-riscv64-unknown-linux-gnu-9.3.drv-15/coreutils-9.3': Directory not empty
error (ignored): error: cannot unlink '/tmp/nix-build-bash-interactive-5.2-p15-riscv64-unknown-linux-gnu.drv-12/bash-5.2': Directory not empty
error: 1 dependencies of derivation '/nix/store/jsl1d51zybzgmq7s6rjpv67md1cq0nbd-nixos-system-erable-23.11.20230801.c502bec.drv' failed to build
error: 1 dependencies of derivation '/nix/store/5ll5ddry0ay6j6wgrs7d88gkn915cpr2-uboot-pine64_star64_defconfig-riscv64-unknown-linux-gnu-3.0.4.drv' failed to build
error: 1 dependencies of derivation '/nix/store/dvvjx1jxs52z5725hbn1a5pf2q5j4qds-ext4-fs.img-riscv64-unknown-linux-gnu.drv' failed to build
error: 1 dependencies of derivation '/nix/store/1jhgss4k2ljp500qm6xa34p6pdf5nfmq-pine64-star64-spl-riscv64-unknown-linux-gnu.drv' failed to build
error: 1 dependencies of derivation '/nix/store/cch9ah9fs8gkw5ai0004yadi5gqvbpji-pine64-star64-uboot-fit-image-riscv64-unknown-linux-gnu.drv' failed to build
error: 1 dependencies of derivation '/nix/store/8nskspixvq4grqf0cqih46f6ib5snpwc-nixos-sd-image-23.11.20230801.c502bec-riscv64-linux-pine64-star64.img-riscv64-unknown-linux-gnu.drv' failed to build

and the full log is in log.log

Notify maintainers

@NickCao @leifhelm @fgaz @r-ryantm

Metadata

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

 - system: `"x86_64-linux"`
 - host os: `Linux 6.4.6, NixOS, 23.11 (Tapir), 23.11.20230729.e6ab469`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.15.1`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
@skyrgobbler skyrgobbler added the 0.kind: build failure A package fails to build label Aug 1, 2023
@NickCao
Copy link
Member

NickCao commented Aug 1, 2023

This should not be an issue with #244633 and #245124

@ius ius added the 6.topic: cross-compilation Building packages on a different platform than they will be used on label Aug 3, 2023
@Artturin Artturin added the 2.status: fix-in-staging This issue has been fixed in staging but is not yet in the channels or master label Aug 3, 2023
@Artturin
Copy link
Member

Artturin commented Aug 3, 2023

Dupe of #245969

@Artturin Artturin closed this as completed Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: build failure A package fails to build 2.status: fix-in-staging This issue has been fixed in staging but is not yet in the channels or master 6.topic: cross-compilation Building packages on a different platform than they will be used on
Projects
None yet
Development

No branches or pull requests

4 participants