Re: [PATCH 1/1] docs: makefile: move rustdoc check to the build wrapper
From: Mauro Carvalho Chehab
Date: Tue Nov 18 2025 - 15:32:18 EST
Em Tue, 18 Nov 2025 20:11:52 +0100
Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx> escreveu:
> Em Tue, 18 Nov 2025 09:38:15 -0700
> Jonathan Corbet <corbet@xxxxxxx> escreveu:
>
> > Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx> writes:
> >
> > > On Mon, Nov 17, 2025 at 10:20:46AM +0100, Miguel Ojeda wrote:
> > >> On Mon, Nov 17, 2025 at 10:13 AM Mauro Carvalho Chehab
> > >> <mchehab+huawei@xxxxxxxxxx> wrote:
> > >> >
> > >> > The makefile logic to detect if rust is enabled is not working
> > >> > the way it was expected. Move it to be inside the wrapper
> > >> > script.
> > >>
> > >> Hmm... Could the commit explain a bit why this didn't work and why now it does?
> > >
> > > I don't know exactly why this was not working.
> >
> > I would feel a lot better if we knew what the real problem is before
> > applying fixes for it. Otherwise something seems certain to come and
> > bite us at some point.
>
> Me too, but the bug is very annoying ;-)
>
> I'll try to seek for some time to better understand it, maybe
> next week.
Btw, at least here (Fedora 43, upgraded from 42), rustdoc doesn't build
for docs-next.
Perhaps the issue could be due to some weird things with Fedora 43.
That's what happens after sphinx-build-wrapper finishes handling
htmldocs (after this patch), when it runs "make LLVM=1 rustdoc":
Building rust docs
DESCEND objtool
INSTALL libsubcmd_headers
CALL scripts/checksyscalls.sh
RUSTC L rust/bindings.o
RUSTC L rust/build_error.o
RUSTC L rust/uapi.o
error: mixing `-Zsanitizer` will cause an ABI mismatch in crate `build_error`
--> rust/build_error.rs:3:1
|
3 | //! Build-time error.
| ^
|
= help: the `-Zsanitizer` flag modifies the ABI so Rust crates compiled with different values of this flag cannot be used together safely
= note: unset `-Zsanitizer` in this crate is incompatible with `-Zsanitizer=kernel-address` in dependency `core`
= help: set `-Zsanitizer=kernel-address` in this crate or unset `-Zsanitizer` in `core`
= help: if you are sure this will not cause problems, you may use `-Cunsafe-allow-abi-mismatch=sanitizer` to silence this error
error: mixing `-Zsanitizer` will cause an ABI mismatch in crate `build_error`
--> rust/build_error.rs:3:1
|
3 | //! Build-time error.
| ^
|
= help: the `-Zsanitizer` flag modifies the ABI so Rust crates compiled with different values of this flag cannot be used together safely
= note: unset `-Zsanitizer` in this crate is incompatible with `-Zsanitizer=kernel-address` in dependency `compiler_builtins`
= help: set `-Zsanitizer=kernel-address` in this crate or unset `-Zsanitizer` in `compiler_builtins`
= help: if you are sure this will not cause problems, you may use `-Cunsafe-allow-abi-mismatch=sanitizer` to silence this error
error: aborting due to 2 previous errors
make[4]: *** [rust/Makefile:527: rust/build_error.o] Error 1
make[4]: ** Esperando que outros processos terminem.
make[3]: *** [Makefile:1286: prepare] Error 2
Ignored errors when building rustdoc: Command '['make', 'rustdoc']' returned non-zero exit status 2.. Is RUST enabled?
Relevant Rust configs:
$ grep RUST .config
CONFIG_RUSTC_VERSION=109100
CONFIG_RUST_IS_AVAILABLE=y
CONFIG_RUSTC_LLVM_VERSION=210103
CONFIG_RUSTC_HAS_COERCE_POINTEE=y
CONFIG_RUSTC_HAS_SPAN_FILE=y
CONFIG_RUSTC_HAS_UNNECESSARY_TRANSMUTES=y
CONFIG_RUSTC_HAS_FILE_WITH_NUL=y
CONFIG_RUSTC_HAS_FILE_AS_C_STR=y
CONFIG_RUST=y
CONFIG_RUSTC_VERSION_TEXT="rustc 1.91.0 (f8297e351 2025-10-28) (Fedora 1.91.0-1.fc43)"
# CONFIG_CPUFREQ_DT_RUST is not set
CONFIG_HAVE_RUST=y
# CONFIG_RUST_FW_LOADER_ABSTRACTIONS is not set
# CONFIG_BLK_DEV_RUST_NULL is not set
# CONFIG_RUST_PHYLIB_ABSTRACTIONS is not set
CONFIG_RADIO_TRUST=y
CONFIG_RADIO_TRUST_PORT=350
CONFIG_HID_THRUSTMASTER=y
CONFIG_THRUSTMASTER_FF=y
CONFIG_TRUSTED_KEYS=y
CONFIG_HAVE_TRUSTED_KEYS=y
CONFIG_TRUSTED_KEYS_TPM=y
CONFIG_TRUSTED_KEYS_TEE=y
CONFIG_TRUSTED_KEYS_CAAM=y
CONFIG_INTEGRITY_TRUSTED_KEYRING=y
CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT=y
# CONFIG_RUST_BITMAP_HARDENED is not set
CONFIG_SYSTEM_TRUSTED_KEYRING=y
CONFIG_SYSTEM_TRUSTED_KEYS=""
CONFIG_SECONDARY_TRUSTED_KEYRING=y
CONFIG_SECONDARY_TRUSTED_KEYRING_SIGNED_BY_BUILTIN=y
# CONFIG_SAMPLES_RUST is not set
# CONFIG_FIND_BIT_BENCHMARK_RUST is not set
# CONFIG_RUST_DEBUG_ASSERTIONS is not set
CONFIG_RUST_OVERFLOW_CHECKS=y
# CONFIG_RUST_BUILD_ASSERT_ALLOW is not set
CONFIG_RUST_KERNEL_DOCTESTS=y
Thanks,
Mauro