Re: error[E0425]: cannot find value `__tracepoint_rust_sample_loaded` in crate `$crate::bindings`

From: Alice Ryhl
Date: Wed Dec 11 2024 - 06:49:25 EST


On Wed, Dec 11, 2024 at 9:20 AM kernel test robot <lkp@xxxxxxxxx> wrote:
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: f92f4749861b06fed908d336b4dee1326003291b
> commit: 91d39024e1b02914cc5e2dbc137908e29b269ce4 rust: samples: add tracepoint to Rust sample
> date: 5 weeks ago
> config: x86_64-rhel-9.4-rust (https://download.01.org/0day-ci/archive/20241211/202412111617.7lVvmoPB-lkp@xxxxxxxxx/config)
> compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241211/202412111617.7lVvmoPB-lkp@xxxxxxxxx/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@xxxxxxxxx>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202412111617.7lVvmoPB-lkp@xxxxxxxxx/
>
> All errors (new ones prefixed by >>):
>
> >> error[E0425]: cannot find value `__tracepoint_rust_sample_loaded` in crate `$crate::bindings`
> --> samples/rust/rust_print.rs:87:5
> |
> 87 | / kernel::declare_trace! {
> 88 | | /// # Safety
> 89 | | ///
> 90 | | /// Always safe to call.
> 91 | | unsafe fn rust_sample_loaded(magic: c_int);
> 92 | | }
> | |_____^ not found in `$crate::bindings`
> |
> = note: this error originates in the macro `kernel::declare_trace` (in Nightly builds, run with -Z macro-backtrace for more info)
> --
> >> error[E0425]: cannot find function `rust_do_trace_rust_sample_loaded` in crate `$crate::bindings`
> --> samples/rust/rust_print.rs:87:5
> |
> 87 | / kernel::declare_trace! {
> 88 | | /// # Safety
> 89 | | ///
> 90 | | /// Always safe to call.
> 91 | | unsafe fn rust_sample_loaded(magic: c_int);
> 92 | | }
> | |_____^ not found in `$crate::bindings`
> |
> = note: this error originates in the macro `kernel::declare_trace` (in Nightly builds, run with -Z macro-backtrace for more info)

Would it be possible to update the bindgen version used by this robot?
See commit b2603f8ac821 ("rust: warn on bindgen < 0.69.5 and libclang
>= 19.1") for details on why.

Alice