Rust for Linux List
 help / color / mirror / Atom feed
* LLVM 22 needs bindgen 0.72.1
@ 2026-07-18 19:18 Burak Emir
  2026-07-19 10:02 ` Miguel Ojeda
  0 siblings, 1 reply; 9+ messages in thread
From: Burak Emir @ 2026-07-18 19:18 UTC (permalink / raw)
  To: Nathan Chancellor, Miguel Ojeda; +Cc: rust-for-linux, Alice Ryhl

Hey Nathan, Miguel, anyone who may run into this,

I just filed https://github.com/Rust-for-Linux/linux/issues/1247

I couldn't find this described anywhere, so posting here for wider
reach. Maybe it helps save some time.

I have run into this with the slim LLVM toolchains [1] which use LLVM
22. It could happen with any toolchain LLVM 22.

- bindgen 0.71.1 with a libclang LLVM 22 will erroneously generate
opaque types as bindings. This then leads to build errors "field does
not exist".

- Using bindgen 0.72.1 works fine.

It would be great if the slim LLVM toolchains could be updated to
bindgen 0.72.1

cheers,
Burak

[1] https://mirrors.edge.kernel.org/pub/tools/llvm/rust/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: LLVM 22 needs bindgen 0.72.1
  2026-07-18 19:18 LLVM 22 needs bindgen 0.72.1 Burak Emir
@ 2026-07-19 10:02 ` Miguel Ojeda
  2026-07-19 12:17   ` Miguel Ojeda
  0 siblings, 1 reply; 9+ messages in thread
From: Miguel Ojeda @ 2026-07-19 10:02 UTC (permalink / raw)
  To: Burak Emir; +Cc: Nathan Chancellor, Miguel Ojeda, rust-for-linux, Alice Ryhl

On Sat, Jul 18, 2026 at 9:18 PM Burak Emir <burak.emir@gmail.com> wrote:
>
> It would be great if the slim LLVM toolchains could be updated to
> bindgen 0.72.1

Yeah, this is the "Missing fields in nested class with LLVM 22." entry
I have in:

  https://github.com/Rust-for-Linux/linux/issues/353

Updating the toolchains would be nice. I think we can easily add a
check on `rust_is_available.sh` like e.g. the one I had before commit:

  ae64324ad5c1 ("rust: rust_is_available: remove warning for `bindgen`
< 0.69.5 && libclang >= 19.1")

I will do that.

Cheers,
Miguel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: LLVM 22 needs bindgen 0.72.1
  2026-07-19 10:02 ` Miguel Ojeda
@ 2026-07-19 12:17   ` Miguel Ojeda
  2026-07-20  9:34     ` Burak Emir
  2026-07-20 22:09     ` Nathan Chancellor
  0 siblings, 2 replies; 9+ messages in thread
From: Miguel Ojeda @ 2026-07-19 12:17 UTC (permalink / raw)
  To: Burak Emir; +Cc: Nathan Chancellor, Miguel Ojeda, rust-for-linux, Alice Ryhl

On Sun, Jul 19, 2026 at 12:02 PM Miguel Ojeda
<miguel.ojeda.sandonis@gmail.com> wrote:
>
> Updating the toolchains would be nice.

Wait, we don't ship `bindgen` yet in those, no?

i.e. we discussed doing so some time ago, if I recall correctly, but
it is not the case yet.

Or do you mean something else?

I guess you used the instructions which pick the minimum `bindgen`.
Maybe we could add a note there, or simply remove `--version` to
suggest the latest (which could also be good so that more people test
the latest).

> I think we can easily add a
> check on `rust_is_available.sh` like e.g. the one I had before commit:
>
>   ae64324ad5c1 ("rust: rust_is_available: remove warning for `bindgen`
> < 0.69.5 && libclang >= 19.1")
>
> I will do that.

Done:

  https://lore.kernel.org/rust-for-linux/20260719120514.159914-1-ojeda@kernel.org/

Thanks!

Cheers,
Miguel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: LLVM 22 needs bindgen 0.72.1
  2026-07-19 12:17   ` Miguel Ojeda
@ 2026-07-20  9:34     ` Burak Emir
  2026-08-03  5:06       ` Miguel Ojeda
  2026-07-20 22:09     ` Nathan Chancellor
  1 sibling, 1 reply; 9+ messages in thread
From: Burak Emir @ 2026-07-20  9:34 UTC (permalink / raw)
  To: Miguel Ojeda; +Cc: Nathan Chancellor, Miguel Ojeda, rust-for-linux, Alice Ryhl

Hey Miguel!

On Sun, Jul 19, 2026 at 2:18 PM Miguel Ojeda
<miguel.ojeda.sandonis@gmail.com> wrote:
> > Updating the toolchains would be nice.
>
> Wait, we don't ship `bindgen` yet in those, no?
>
> i.e. we discussed doing so some time ago, if I recall correctly, but
> it is not the case yet.
>
> Or do you mean something else?
>
> I guess you used the instructions which pick the minimum `bindgen`.

Yes, exactly. I followed the instructions at the bottom of
https://mirrors.edge.kernel.org/pub/tools/llvm/rust/ , specifically:

cargo install --locked --root $llvm_prefix --version
$(scripts/min-tool-version.sh bindgen) bindgen-cli

> Maybe we could add a note there, or simply remove `--version` to
> suggest the latest (which could also be good so that more people test
> the latest).

I also think --latest would be a good default choice.

> > I think we can easily add a
> > check on `rust_is_available.sh` like e.g. the one I had before commit:
> >
> >   ae64324ad5c1 ("rust: rust_is_available: remove warning for `bindgen`
> > < 0.69.5 && libclang >= 19.1")
> >
> > I will do that.
>
> Done:
>
>   https://lore.kernel.org/rust-for-linux/20260719120514.159914-1-ojeda@kernel.org/
>

Thanks for taking care of this!

Cheers,
-- Burak

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: LLVM 22 needs bindgen 0.72.1
  2026-07-19 12:17   ` Miguel Ojeda
  2026-07-20  9:34     ` Burak Emir
@ 2026-07-20 22:09     ` Nathan Chancellor
  2026-07-23 16:20       ` Miguel Ojeda
  1 sibling, 1 reply; 9+ messages in thread
From: Nathan Chancellor @ 2026-07-20 22:09 UTC (permalink / raw)
  To: Miguel Ojeda; +Cc: Burak Emir, Miguel Ojeda, rust-for-linux, Alice Ryhl

On Sun, Jul 19, 2026 at 02:17:57PM +0200, Miguel Ojeda wrote:
> I guess you used the instructions which pick the minimum `bindgen`.
> Maybe we could add a note there, or simply remove `--version` to
> suggest the latest (which could also be good so that more people test
> the latest).

I have updated the README to remove '--version' from the 'cargo install'
command to help avoid this. The warning seems like a good idea as well.

-- 
Cheers,
Nathan

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: LLVM 22 needs bindgen 0.72.1
  2026-07-20 22:09     ` Nathan Chancellor
@ 2026-07-23 16:20       ` Miguel Ojeda
  0 siblings, 0 replies; 9+ messages in thread
From: Miguel Ojeda @ 2026-07-23 16:20 UTC (permalink / raw)
  To: Nathan Chancellor; +Cc: Burak Emir, Miguel Ojeda, rust-for-linux, Alice Ryhl

On Tue, Jul 21, 2026 at 12:09 AM Nathan Chancellor <nathan@kernel.org> wrote:
>
> I have updated the README to remove '--version' from the 'cargo install'
> command to help avoid this. The warning seems like a good idea as well.

Thanks!

Cheers,
Miguel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: LLVM 22 needs bindgen 0.72.1
  2026-07-20  9:34     ` Burak Emir
@ 2026-08-03  5:06       ` Miguel Ojeda
  2026-08-03  8:23         ` Burak Emir
  0 siblings, 1 reply; 9+ messages in thread
From: Miguel Ojeda @ 2026-08-03  5:06 UTC (permalink / raw)
  To: Burak Emir; +Cc: Nathan Chancellor, Miguel Ojeda, rust-for-linux, Alice Ryhl

On Mon, Jul 20, 2026 at 11:34 AM Burak Emir <burak.emir@gmail.com> wrote:
>
> On Sun, Jul 19, 2026 at 2:18 PM Miguel Ojeda
> <miguel.ojeda.sandonis@gmail.com> wrote:
> >
> >   https://lore.kernel.org/rust-for-linux/20260719120514.159914-1-ojeda@kernel.org/
> >
>
> Thanks for taking care of this!

You're welcome! Did you have a chance to test the warning patch above
to confirm you see it as expected?

No worries if you don't have the setup anymore, I will apply it, but
it would be nice to know :)

Thanks!

Cheers,
Miguel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: LLVM 22 needs bindgen 0.72.1
  2026-08-03  5:06       ` Miguel Ojeda
@ 2026-08-03  8:23         ` Burak Emir
  2026-08-03  8:27           ` Miguel Ojeda
  0 siblings, 1 reply; 9+ messages in thread
From: Burak Emir @ 2026-08-03  8:23 UTC (permalink / raw)
  To: Miguel Ojeda; +Cc: Nathan Chancellor, Miguel Ojeda, rust-for-linux, Alice Ryhl

On Mon, Aug 3, 2026 at 7:07 AM Miguel Ojeda
<miguel.ojeda.sandonis@gmail.com> wrote:
>
> On Mon, Jul 20, 2026 at 11:34 AM Burak Emir <burak.emir@gmail.com> wrote:
> >
> > On Sun, Jul 19, 2026 at 2:18 PM Miguel Ojeda
> > <miguel.ojeda.sandonis@gmail.com> wrote:
> > >
> > >   https://lore.kernel.org/rust-for-linux/20260719120514.159914-1-ojeda@kernel.org/
> > >
> >
> > Thanks for taking care of this!
>
> You're welcome! Did you have a chance to test the warning patch above
> to confirm you see it as expected?
>
> No worries if you don't have the setup anymore, I will apply it, but
> it would be nice to know :)

Done.

I also ran the updated cargo install command again (where Nathan
removed the --version).
As expected, it replaces bindgen with 0.71.1 with 0.72.1 and the
warning from the rust_is_available script goes away, as intended.

Cheers,
- Burak

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: LLVM 22 needs bindgen 0.72.1
  2026-08-03  8:23         ` Burak Emir
@ 2026-08-03  8:27           ` Miguel Ojeda
  0 siblings, 0 replies; 9+ messages in thread
From: Miguel Ojeda @ 2026-08-03  8:27 UTC (permalink / raw)
  To: Burak Emir; +Cc: Nathan Chancellor, Miguel Ojeda, rust-for-linux, Alice Ryhl

On Mon, Aug 3, 2026 at 10:23 AM Burak Emir <burak.emir@gmail.com> wrote:
>
> Done.
>
> I also ran the updated cargo install command again (where Nathan
> removed the --version).
> As expected, it replaces bindgen with 0.71.1 with 0.72.1 and the
> warning from the rust_is_available script goes away, as intended.

Thanks a lot!

Cheers,
Miguel

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-08-03  8:27 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-18 19:18 LLVM 22 needs bindgen 0.72.1 Burak Emir
2026-07-19 10:02 ` Miguel Ojeda
2026-07-19 12:17   ` Miguel Ojeda
2026-07-20  9:34     ` Burak Emir
2026-08-03  5:06       ` Miguel Ojeda
2026-08-03  8:23         ` Burak Emir
2026-08-03  8:27           ` Miguel Ojeda
2026-07-20 22:09     ` Nathan Chancellor
2026-07-23 16:20       ` Miguel Ojeda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox