AsahiLinux / linux

Linux kernel source tree
Other
2.34k stars 90 forks source link

6.1-rc8-asahi3-1: Can't compile in a clean chroot on Manjaro due to Rust errors. #76

Closed philmmanjaro closed 1 year ago

philmmanjaro commented 1 year ago

When I try to compile the package with our tools in a clean chrootbuild environment on Manjaro-ARM I get the following Rust errors for 6.1-rc8-asahi3-1 kernel:

  OBJCOPY arch/arm64/kernel/vdso/vdso.so
***
*** Rust compiler 'rustc' is too new. This may or may not work.
***   Your version:     1.65.0
1.65.0
***   Expected version: 1.62.0
***
***
*** Rust bindings generator 'bindgen' is too new. This may or may not work.
***   Your version:     0.63.0
***   Expected version: 0.56.0
***
  UPD     rust/target.json
  RUSTC L rust/core.o
warning: unused import: `crate::error::Error`
 --> /usr/lib/rustlib/src/rust/library/core/src/num/mod.rs:7:5
  |
7 | use crate::error::Error;
  |     ^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default
warning: 1 warning emitted
  EXPORTS rust/exports_core_generated.h
  RUSTC P rust/libmacros.so
grep: warning: stray \ before #
grep: warning: stray \ before #
grep: warning: stray \ before #
  BINDGEN rust/bindings/bindings_generated.rs
  BINDGEN rust/bindings/bindings_helpers_generated.rs
error: Found argument '--blacklist-type' which wasn't expected, or isn't valid in this context
    Did you mean '--blocklist-type'?
    If you tried to supply `--blacklist-type` as a value rather than a flag, use `-- --blacklist-type`
USAGE:
    bindgen [FLAGS] [OPTIONS] <header> -- <clang-args>...
For more information try --help
make[3]: *** [/build/linux-apple-silicon/src/linux-asahi-6.1-rc8-3/rust/Makefile:343: rust/bindings/bindings_helpers_generated.rs] Error 2
make[2]: *** [/build/linux-apple-silicon/src/linux-asahi-6.1-rc8-3/Makefile:1276: prepare] Error 2
make[1]: *** [/build/linux-apple-silicon/src/linux-asahi-6.1-rc8-3/Makefile:362: __build_one_by_one] Error 2
make[1]: Leaving directory '/build/linux-apple-silicon/src/linux-asahi-6.1-rc8-3/build/base'
make: *** [Makefile:231: __sub-make] Error 2
==> ERROR: A failure occurred in prepare().
    Aborting...

The full build log can be found at our gitlab

philmmanjaro commented 1 year ago

I checked the buildinfo file of the linux-asahi-edge kenrel package and found that the same rust packages were installed:

installed = rust-1:1.65.0-1.1-aarch64
installed = rust-bindgen-0.63.0-1-aarch64
installed = rust-src-1:1.65.0-1.1-aarch64

Also I noticed that the kernel got compiled in a "dirty" environment using makepkg as KDE and other sorts of packages were installed, which normally are not needed to build a kernel. It is always recommended to use a clean chroot environment. Also I noticed that the packager information was missing in that package ...

philmmanjaro commented 1 year ago

fixed via: https://gitlab.manjaro.org/manjaro-arm/packages/apple-silicon/linux-apple-silicon/-/commit/e8fba025480080ef9eb38ea53a825ab5811f152a