From jing at jing.rocks Mon Mar 9 06:40:18 2026 From: jing at jing.rocks (Luke Yasuda) Date: Mon, 09 Mar 2026 15:40:18 +0900 Subject: 6.19.6: fails to build with rust enabled Message-ID: <8f04a6664138be8fa2c01a713038b59c@jing.rocks> Hi! when rust is enabled, 6.19.6 fails to build: # RUSTC L rust/uapi.o OBJTREE=/build/reproducible-path/linux-6.19.6/debian/build/build_amd64_none_amd64 rustc --edition=2021 -Zbinary_dep_depinfo=y -Astable_features -Dnon_ascii_idents -Dunsafe_op_in_unsafe_fn -Wmissing_docs -Wrust_2018_idioms -Wunreachable_pub -Wclippy::all -Wclippy::as_ptr_cast_mut -Wclippy::as_underscore -Wclippy::cast_lossless -Wclippy::ignored_unit_patterns -Wclippy::mut_mut -Wclippy::needless_bitwise_bool -Aclippy::needless_lifetimes -Wclippy::no_mangle_with_rust_abi -Wclippy::ptr_as_ptr -Wclippy::ptr_cast_constness -Wclippy::ref_as_ptr -Wclippy::undocumented_unsafe_blocks -Wclippy::unnecessary_safety_comment -Wclippy::unnecessary_safety_doc -Wrustdoc::missing_crate_level_docs -Wrustdoc::unescaped_backticks -Cpanic=abort -Cembed-bitcode=n -Clto=n -Cforce-unwind-tables=n -Ccodegen-units=1 -Csymbol-mangling-version=v0 -Crelocation-model=static -Zfunction-sections=n -Wclippy::float_arithmetic --target=./scripts/target.json -Ctarget-feature=-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-avx,-avx2 -Zcf-protection=branch -Zno-jump-tables -Ctarget-cpu=x86-64 -Ztune-cpu=generic -Cno-redzone=y -Ccode-model=kernel -Zfunction-return=thunk-extern -Zpatchable-function-entry=16,16 -Copt-level=2 -Cdebug-assertions=n -Coverflow-checks=y -Cdebuginfo=2 --remap-path-prefix=/build/reproducible-path/linux-6.19.6/= @./include/generated/rustc_cfg --extern ffi --extern pin_init --emit=dep-info=rust/.uapi.o.d --emit=obj=rust/uapi.o --emit=metadata=rust/libuapi.rmeta --crate-type rlib -L./rust --crate-name uapi /build/reproducible-path/linux-6.19.6/rust/uapi/lib.rs --sysroot=/dev/null -Zunstable-options # EXPORTS rust/exports_bindings_generated.h x86_64-linux-gnu-nm -p --defined-only rust/bindings.o | awk '$2~/(T|R|D|B)/ && $3!~/__(pfx|cfi|odr_asan)/ { printf "EXPORT_SYMBOL_RUST_GPL(%s); ",$3 }' > rust/exports_bindings_generated.h # RUSTC L rust/kernel.o OBJTREE=/build/reproducible-path/linux-6.19.6/debian/build/build_amd64_none_amd64 rustc --edition=2021 -Zbinary_dep_depinfo=y -Astable_features -Dnon_ascii_idents -Dunsafe_op_in_unsafe_fn -Wmissing_docs -Wrust_2018_idioms -Wunreachable_pub -Wclippy::all -Wclippy::as_ptr_cast_mut -Wclippy::as_underscore -Wclippy::cast_lossless -Wclippy::ignored_unit_patterns -Wclippy::mut_mut -Wclippy::needless_bitwise_bool -Aclippy::needless_lifetimes -Wclippy::no_mangle_with_rust_abi -Wclippy::ptr_as_ptr -Wclippy::ptr_cast_constness -Wclippy::ref_as_ptr -Wclippy::undocumented_unsafe_blocks -Wclippy::unnecessary_safety_comment -Wclippy::unnecessary_safety_doc -Wrustdoc::missing_crate_level_docs -Wrustdoc::unescaped_backticks -Cpanic=abort -Cembed-bitcode=n -Clto=n -Cforce-unwind-tables=n -Ccodegen-units=1 -Csymbol-mangling-version=v0 -Crelocation-model=static -Zfunction-sections=n -Wclippy::float_arithmetic --target=./scripts/target.json -Ctarget-feature=-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-avx,-avx2 -Zcf-protection=branch -Zno-jump-tables -Ctarget-cpu=x86-64 -Ztune-cpu=generic -Cno-redzone=y -Ccode-model=kernel -Zfunction-return=thunk-extern -Zpatchable-function-entry=16,16 -Copt-level=2 -Cdebug-assertions=n -Coverflow-checks=y -Cdebuginfo=2 --remap-path-prefix=/build/reproducible-path/linux-6.19.6/= @./include/generated/rustc_cfg --extern ffi --extern pin_init --extern build_error --extern macros --extern bindings --extern uapi --emit=dep-info=rust/.kernel.o.d --emit=obj=rust/kernel.o --emit=metadata=rust/libkernel.rmeta --crate-type rlib -L./rust --crate-name kernel /build/reproducible-path/linux-6.19.6/rust/kernel/lib.rs --sysroot=/dev/null -Zunstable-options error: cannot find macro `c_str` in this scope --> rust/kernel/firmware.rs:99:32 | 99 | Self::request_internal(c_str!("/*(DEBLOBBED)*/"), dev, FwFunc::request_nowarn()) | ^^^^^ | = help: have you added the `#[macro_use]` on the module/import? help: consider importing this macro through its public re-export | 7 + use crate::c_str; | error: cannot find macro `dev_err` in this scope --> rust/kernel/firmware.rs:104:9 | 104 | dev_err!(dev, "Missing Free {} (non-Free firmware loading is disabled)\n", name); | ^^^^^^^ | = help: have you added the `#[macro_use]` on the module/import? help: consider importing this macro through its public re-export | 7 + use crate::dev_err; | error: aborting due to 2 previous errors make[5]: *** [/build/reproducible-path/linux-6.19.6/rust/Makefile:687: rust/kernel.o] Error 1 make[4]: *** [/build/reproducible-path/linux-6.19.6/Makefile:1331: prepare] Error 2 make[3]: *** [/build/reproducible-path/linux-6.19.6/Makefile:260: __sub-make] Error 2 I know basically nothing about rust but this seems to fix it: --- linux-6.19.6.orig/rust/kernel/firmware.rs +++ linux-6.19.6/rust/kernel/firmware.rs @@ -6,6 +6,8 @@ use crate::{ bindings, + c_str, + dev_err, device::Device, error::Error, error::Result, Cheers, -- Luke Yasuda About me: https://jing.rocks/about/ GPG Fingerprint: 4E09 8D19 00AA 3F72 1899 2614 09B3 316E 13A1 1EFC -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 228 bytes Desc: OpenPGP digital signature URL: