linux-next: build failure after merge of Linus' tree
Hi all,
After merging Linus' tree, today's linux-next build (x86_64 allmodconfig) failed (very quickly) like this:
error: unknown unstable option: patchable-function-entry
Presumably exposed by commit
1f9c4a996756 ("Kbuild: make MODVERSIONS support depend on not being a compile test build")
Which allowed the rust parts of the build to happen in my x86_64 allmodconfig build.
This is a cross build on a PowerPC LE host.
$ rustc --version rustc 1.80.1 $ x86_64-linux-gnu-gcc --version x86_64-linux-gnu-gcc (Debian 14.2.0-1) 14.2.0
I have reverted these commits for today:
a2f115470520 ("kasan: rust: Add KASAN smoke test via UAF") e3117404b411 ("kbuild: rust: Enable KASAN support") f64e2f3a66e3 ("rust: kasan: Rust does not support KHWASAN") c42297438aee ("kbuild: rust: Define probing macros for rustc") cc1d98f9fe30 ("kasan: simplify and clarify Makefile") ca627e636551 ("rust: cfi: add support for CFI_CLANG with Rust")
Basically for the latter one (as a guess).
And the build works.
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 31 lines · Stephen Rothwell
Hi all,
After merging Linus' tree, today's linux-next build (
x86_64allmodconfig) failed (very quickly) like this:error: unknown unstable option:
patchable-function-entryPresumably exposed by commit
1f9c4a996756("Kbuild: make MODVERSIONS support depend on not being a compile test build")Which allowed the rust parts of the build to happen in my
x86_64allmodconfig build.This is a cross build on a PowerPC LE host.
$ rustc --version rustc 1.80.1 $ x86_64-linux-gnu-gcc --version x86_64-linux-gnu-gcc (Debian 14.2.0-1) 14.2.0I have reverted these commits for today:
a2f115470520("kasan: rust: Add KASAN smoke test via UAF")e3117404b411("kbuild: rust: Enable KASAN support")f64e2f3a66e3("rust: kasan: Rust does not support KHWASAN")c42297438aee("kbuild: rust: Define probing macros for rustc")cc1d98f9fe30("kasan: simplify and clarifyMakefile")ca627e636551("rust: cfi: add support forCFI_CLANGwith Rust")
Quoted 3 lines
Basically for the latter one (as a guess).
And the build works.
Sorry about that! The fix is here:
https://lore.kernel.org/all/[email protected]/
Alice
Hi Alice,
Quoted 3 lines · On Thu, 26 Sep 2024 09:36:56 +0200 Alice Ryhl <[email protected]> wrote:
Sorry about that! The fix is here:
https://lore.kernel.org/all/[email protected]/
Thanks. I will replace the reverts in my fixes tree with that until it is applied to Linus' tree.
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 3 lines · Stephen Rothwell
Thanks. I will replace the reverts in my fixes tree with that until it is applied to Linus' tree.
Thanks! I will apply it to rust-fixes now, so in principle you will get it through that branch for tomorrow, in case it helps.
Cheers,
Miguel
Quoted 12 lines · Miguel Ojeda
Quoted 3 lines · Stephen Rothwell
Thanks. I will replace the reverts in my fixes tree with that until it is applied to Linus' tree.
Thanks! I will apply it to rust-fixes now, so in principle you will get it through that branch for tomorrow, in case it helps.
Cheers,
Miguel
Do you offer a (an optimized - optimized for kernel-builds) prebuilt RUST toolchain - preferable for x86-64 hosts - like Nathan + LLVM/Clang folk offer (see [1],[2])?
Maybe I have missed in [3] or overlooked.
INFO: I use LLVM/Clang-19 from [2] for my latest Linux v6.11 builds. It's faster (20-25% in build-time) than distro LLVM toolchain (here:
Debian/unstable AMD64).
[ Provocative ]
Can I REALLY use a RUST-compiled Linux-kernel on BARE METAL? Do I need special hardware?
Do you have a working in sense of bootable linux-config file? ^^ This is a real question - not interested in any "technical preview". ^^ You do NOT need to answer all this!
[ /Provocative ]
Thanks.
BR,
-Sedat-
[1] https://mirrors.edge.kernel.org/pub/tools/llvm/
[2] https://mirrors.edge.kernel.org/pub/tools/llvm/files/
[3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/rust/
Quoted 4 lines · Sedat Dilek
Do you offer a (an optimized - optimized for kernel-builds) prebuilt RUST toolchain - preferable for x86-64 hosts - like Nathan + LLVM/Clang folk offer (see [1],[2])?
Yes, Nathan himself provides those! :)
https://mirrors.edge.kernel.org/pub/tools/llvm/rust/
He may comment further -- I think the Rust compiler itself is not built (yet?) with PGO etc. like he does for the LLVM side.
As usual -- thanks Nathan!
Quoted 1 line
Maybe I have missed in [3] or overlooked.
If you go into the Quick Start guide from your link, you will see it linked at the top:
https://docs.kernel.org/rust/quick-start.html
I also mentioned these in LPC's Kernel Summit track (sorry, no video/stream yet, as far as I understand):
https://lpc.events/event/18/contributions/1912/
Quoted 6 lines
[ Provocative ]
Can I REALLY use a RUST-compiled Linux-kernel on BARE METAL? Do I need special hardware?
Do you have a working in sense of bootable linux-config file? ^^ This is a real question - not interested in any "technical preview". ^^ You do NOT need to answer all this!
I am not sure what you mean -- people has been using Linux with Rust enabled in real hardware for quite a while, e.g. Android and Asahi, plus others are upcoming (Fedora, as far as I know), and I regularly test in CI that the kernel boots in QEMU for several architectures and configs that we already have in-tree.
I also regularly test in CI that the kernel can be built with rustup's binaries, with several distro toolchains and with Nathan's toolchains too.
Cheers,
Miguel
Quoted 11 lines · Miguel Ojeda
Quoted 4 lines · Sedat Dilek
Do you offer a (an optimized - optimized for kernel-builds) prebuilt RUST toolchain - preferable for x86-64 hosts - like Nathan + LLVM/Clang folk offer (see [1],[2])?
Yes, Nathan himself provides those! :)
Thanks for the link!
OK, I darkly remember seeing this somewhere.
Quoted 23 lines
He may comment further -- I think the Rust compiler itself is not built (yet?) with PGO etc. like he does for the LLVM side.
As usual -- thanks Nathan!
Quoted 1 line
Maybe I have missed in [3] or overlooked.
If you go into the Quick Start guide from your link, you will see it linked at the top:
https://docs.kernel.org/rust/quick-start.html
I also mentioned these in LPC's Kernel Summit track (sorry, no video/stream yet, as far as I understand):
https://lpc.events/event/18/contributions/1912/Quoted 6 lines
[ Provocative ]
Can I REALLY use a RUST-compiled Linux-kernel on BARE METAL? Do I need special hardware?
Do you have a working in sense of bootable linux-config file? ^^ This is a real question - not interested in any "technical preview". ^^ You do NOT need to answer all this!
Quoted 6 lines
I am not sure what you mean -- people has been using Linux with Rust enabled in real hardware for quite a while, e.g. Android and Asahi, plus others are upcoming (Fedora, as far as I know), and I regularly test in CI that the kernel boots in QEMU for several architectures and configs that we already have in-tree.
Asahi or Fedora-Asahi?
Do you have a link to a Linux-Live-System or maybe a pointer to a kernel-config?
Quoted 4 lines
I also regularly test in CI that the kernel can be built with
rustup's binaries, with several distro toolchains and with Nathan's toolchains too.
Is it possible to download a built VM (rustup-binary) and test in QEMU for example?
I have NO experiences with RUST - but it looks like things/development moved further.
Before I wanted to test gendwarfksyms-v3 from Sami.
Best regards and wishes,
-sed@-
Quoted 2 lines · Sedat Dilek
Thanks for the link!
You're welcome!
Quoted 5 lines
Asahi or Fedora-Asahi?
Do you have a link to a Linux-Live-System or maybe a pointer to a kernel-config?Is it possible to download a built VM (rustup-binary) and test in QEMU for example?
You should be able to build and boot your own kernels with Rust enabled like you would normally do, as long as the requirements are met.
But Rust for Linux is not a Linux distribution, if that is what you are asking.
Regarding Asahi and other users/distributions, I would suggest asking them directly if you are interested in their setup.
For help on setting things up etc., I would suggest asking in our Zulip -- please see https://rust-for-linux.com/contact.
Thanks!
Cheers,
Miguel