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

linux kernel doesn't cross compile #50915

Closed
eburimu opened this issue Nov 22, 2018 · 5 comments
Closed

linux kernel doesn't cross compile #50915

eburimu opened this issue Nov 22, 2018 · 5 comments
Labels
6.topic: cross-compilation Building packages on a different platform than they will be used on

Comments

@eburimu
Copy link
Contributor

eburimu commented Nov 22, 2018

Issue description

Hello.

I have the following while trying to cross compile the kernel:

  1 output '/nix/store/kp2rz218fbcdacwbkxyix2lzgd1fmdga-linux-4.19.2-armv7l-unknown-linux-gnueabihf-dev' is not allowed to refer to the following paths:
  2    /nix/store/08nciki42z9yxxxk1xrx02kdhrf9ap4h-perl-5.28.0
  3    /nix/store/7hrnv8ns7bwa4dvh802nk8k8qpdmzaai-openssl-1.0.2p-dev
  4    /nix/store/ngfsds0ad30ajgzzg0fndkp05hn4awha-gcc-wrapper-7.3.0
  5 cannot build derivation '/nix/store/sd7d84sxh99bymcgd5nj0dwi5cv685fp-nixos-system-nixos-19.03.git.ff0acea-armv7l-unknown-linux-gnueabihf.drv': 1 dependencies couldn't be built

I see the below in generic.nix

  90 
  91     depsBuildBuild = [ buildPackages.stdenv.cc ];
  92     nativeBuildInputs = [ perl ]
  93       ++ lib.optionals (stdenv.lib.versionAtLeast version "4.16") [ bison flex ];
  94 

More leakage. Any ideas?

@FRidh FRidh added the 6.topic: cross-compilation Building packages on a different platform than they will be used on label Nov 22, 2018
@eburimu
Copy link
Contributor Author

eburimu commented Nov 22, 2018

propagatedNativeBuildInputs = [ perl openssl ];

The above leads to:

 9962 shrinking RPATHs of ELF executables and libraries in /nix/store/5qckfkz4w45v1ar16fqmsp0l6q8pql2h-linux-config-4.19.2-armv7l-unknown-linux-gnueabihf
 9963 armv7l-unknown-linux-gnueabihf-strip is /nix/store/dx260wiskgwhz0qjz4ahlvch1v58g1cb-armv7l-unknown-linux-gnueabihf-binutils-2.30/bin/armv7l-unknown-linux-gnueabihf-strip
 9964 patching script interpreter paths in /nix/store/5qckfkz4w45v1ar16fqmsp0l6q8pql2h-linux-config-4.19.2-armv7l-unknown-linux-gnueabihf
 9965 checking for references to /build/ in /nix/store/5qckfkz4w45v1ar16fqmsp0l6q8pql2h-linux-config-4.19.2-armv7l-unknown-linux-gnueabihf...
 9966 mkdir: cannot create directory '/nix/store/5qckfkz4w45v1ar16fqmsp0l6q8pql2h-linux-config-4.19.2-armv7l-unknown-linux-gnueabihf': Not a directory
 9967 builder for '/nix/store/hyfba8lmyk5v7npdzh5q9p6cgcag6b4m-linux-config-4.19.2-armv7l-unknown-linux-gnueabihf.drv' failed with exit code 1
 9968 cannot build derivation '/nix/store/6glygcvyn1l9mgg4dvwnmf85rpgskhgv-linux-4.19.2-armv7l-unknown-linux-gnueabihf.drv': 1 dependencies couldn't be built
 9969 building '/nix/store/n2a79nzscklpm6mza5ck4k1fqzh3yfpv-man-db-2.7.5-armv7l-unknown-linux-gnueabihf.drv'...
 9970 cannot build derivation '/nix/store/h4x0zknjnzsa0f3qbv6ir7wwx6p6hiqh-nixos-system-nixos-19.03.git.ff0acea-armv7l-unknown-linux-gnueabihf.drv': 1 dependencies couldn't be built
 9971 building '/nix/store/86y09wgzggk1asnvp8rj53n5rp17x0d7-pcre-8.42-armv7l-unknown-linux-gnueabihf.drv'...
 9972 cannot build derivation '/nix/store/jwny64qy85vijbrn496za9p4hncn6g4x-nixos-sd-image-19.03.git.ff0acea-armv7l-linux.img-armv7l-unknown-linux-gnueabihf.drv': 1 dependencies couldn't be built
 9973 error: build of '/nix/store/jwny64qy85vijbrn496za9p4hncn6g4x-nixos-sd-image-19.03.git.ff0acea-armv7l-linux.img-armv7l-unknown-linux-gnueabihf.drv' failed

@matthewbauer
Copy link
Member

Those shouldn’t be propagated. We’ll have to look at where the references are coming from - usually it’s some debugging.

@lopsided98
Copy link
Contributor

This is a recent regression. I build cross compiled kernels for all my ARM devices, and the build broke when I updated from 0925c48 to 371a565.

@lopsided98
Copy link
Contributor

lopsided98 commented Nov 25, 2018

I didn't bisect it, but this is probably caused by #49417, which disallows references to native build inputs. The references are not new, that PR just causes them to be disallowed.

Note that the dev output is failing, and it contains lots of scripts that help build kernel modules and other software that uses kernel headers. When the kernel is cross compiled, we can probably expect that anything that depends on the dev output is also cross-compiled, so it makes sense that it would contain references to build packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

5 participants
@matthewbauer @FRidh @lopsided98 @eburimu and others