You are not logged in.
Hey,
Can someone help a Arch newbie out here? I'm trying to build a custom kernel (with default config though, so I should be building the official Arch kernel as a first step now) with the Arch Build System method described in the wiki. However, I always get the following error after a while when I run "makepkg -s":
==> Starting package_linux-custom-headers()...
Installing build files...
Installing headers...
Installing KConfig files...
Installing Rust files...
install: cannot stat 'rust/*.rmeta': No such file or directory
==> ERROR: A failure occurred in package_linux-custom-headers().
Aborting...
I just can't figure out wtf is going on. I miss the good old days when Linux kernel was just C. I do have stable Rust toolchain installed with rustup from Arch repos, and also rust-bindgen and rust-src from Arch repos, and every other dependency mentioned in the PKGBUILD's makedepends. Why isn't that enough, what am I doing wrong? I'm compiling with the same user as the Rust install, the env seems to be fine: I can execute rustc, cargo etc just fine.
I have compiled kernel before with the traditional way using other distributions and I have never seen a problem like this. Maybe they're doing something for me out of the box and Arch wants me to do it manually instead but what is it ...? To be honest I don't understand the whole "Installing XXX..." / "install: cannot stat" thing, I am supposed to build the packages here, not install anything? The install should happen with the next step with pacman -U.
There is also a very instructive error before the Rust one: "Warning: 'make modules_install' requires /doesnt/exist. Please install it. This is probably in the kmod package." Can I just ignore this? Obviously there is nothing "/doesnt/exist" I could install. And I do have kmod installed so I'm not sure what that one is about either...
Thanks for your patience.
Last edited by auoax (2025-04-02 06:57:28)
Offline
Please post your PKGBUILD
Offline
Sure, here it is: https://0x0.st/82Qi.txt
It should be the PKGBUILD for default Arch kernel (6.14.arch1-1) from https://gitlab.archlinux.org/archlinux/ … ages/linux with changed package name and modifications suggested in the Arch Wiki (Kernel/Arch_build_system: 2.1 Avoid creating the doc) to cut down the compilation time.
Offline
HMM taking a look
Last edited by mackin_cheese (2025-04-01 16:22:16)
Offline
Do you have the testing repo's enabled?
Offline
I do have stable Rust toolchain installed with rustup from Arch repos
Which is likely the problem. Arch's packages are always built in a clean chroot/container, and would be pulling in the regular rust package. When dealing with rustup, we can't really predict how things are going to act.
Offline
auoax wrote:I do have stable Rust toolchain installed with rustup from Arch repos
Which is likely the problem. Arch's packages are always built in a clean chroot/container, and would be pulling in the regular rust package. When dealing with rustup, we can't really predict how things are going to act.
Oh, that makes sense. I removed the rustup installation and installed everything Rust-related from the Arch repos. Everything works great now, thank you!
I went with rustup initially because Arch Wiki says:
The Native installation, recommended if you only use Rust for running or installing software made with Rust
The Rustup installation, recommended if you intend to program anything in Rust
And I do program in Rust sometimes. IIRC you also need rustup for cross-compiling and compiling flat binaries. Is there a way to have both without using a VM?
@mackin_cheese: Nope, did not have testing enabled, just the default repositories.
Would it be a good idea to mention in the "Kernel/Arch build system" or "Rust" wiki page that Rustup installation is incompatible with ABS kernel build?
Offline
> Would it be a good idea to mention in the "Kernel/Arch build system" or "Rust" wiki page that Rustup installation is incompatible with ABS kernel build?
I think this would be a great idea, since I just hit this.
> Is there a way to have both without using a VM?
This is also I also wish to know...
Offline
Scimmia wrote:auoax wrote:I do have stable Rust toolchain installed with rustup from Arch repos
Which is likely the problem. Arch's packages are always built in a clean chroot/container, and would be pulling in the regular rust package. When dealing with rustup, we can't really predict how things are going to act.
Oh, that makes sense. I removed the rustup installation and installed everything Rust-related from the Arch repos. Everything works great now, thank you!
I went with rustup initially because Arch Wiki says:
The Native installation, recommended if you only use Rust for running or installing software made with Rust
The Rustup installation, recommended if you intend to program anything in RustAnd I do program in Rust sometimes. IIRC you also need rustup for cross-compiling and compiling flat binaries. Is there a way to have both without using a VM?
@mackin_cheese: Nope, did not have testing enabled, just the default repositories.
Would it be a good idea to mention in the "Kernel/Arch build system" or "Rust" wiki page that Rustup installation is incompatible with ABS kernel build?
The Rustup installation is not really incompatible with ABS kernel build.
I maintain the linux-git AUR package and I just worked on updating the PKGBUILD to match current ABS kernel. I use rustup and got the same compilation error. Upon investigating, it seems you have to manually install the rust components required for the compilation.
You can check this page on which components to install with rustup: https://docs.kernel.org/rust/quick-start.html
If you already use rust for development, odds are you just need to install the rust-src component, because Linux kernel will try to recompile the core library.
Offline
auoax wrote:Scimmia wrote:Which is likely the problem. Arch's packages are always built in a clean chroot/container, and would be pulling in the regular rust package. When dealing with rustup, we can't really predict how things are going to act.
Oh, that makes sense. I removed the rustup installation and installed everything Rust-related from the Arch repos. Everything works great now, thank you!
I went with rustup initially because Arch Wiki says:
The Native installation, recommended if you only use Rust for running or installing software made with Rust
The Rustup installation, recommended if you intend to program anything in RustAnd I do program in Rust sometimes. IIRC you also need rustup for cross-compiling and compiling flat binaries. Is there a way to have both without using a VM?
@mackin_cheese: Nope, did not have testing enabled, just the default repositories.
Would it be a good idea to mention in the "Kernel/Arch build system" or "Rust" wiki page that Rustup installation is incompatible with ABS kernel build?
The Rustup installation is not really incompatible with ABS kernel build.
I maintain the linux-git AUR package and I just worked on updating the PKGBUILD to match current ABS kernel. I use rustup and got the same compilation error. Upon investigating, it seems you have to manually install the rust components required for the compilation.
You can check this page on which components to install with rustup: https://docs.kernel.org/rust/quick-start.html
If you already use rust for development, odds are you just need to install the rust-src component, because Linux kernel will try to recompile the core library.
I installed rust-src and rust-bindgen and I couldn't build the kernel headers due to the error in the title of this post. I also have rustup installed and I can't install the package due to the conflict.
Offline
I also have rustup installed and I can't install the package due to the conflict.
https://wiki.archlinux.org/title/Develo … ean_chroot
What's on your system doesn't matter this way.
Offline