* ABI mismatch build error for 6.17.y and rustc 1.91.0
@ 2025-11-04 5:27 Greg KH
2025-11-04 7:07 ` Dirk Behme
0 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2025-11-04 5:27 UTC (permalink / raw)
To: rust-for-linux
My laptop just upgraded rustc to 1.91.0 and now I get the following
build error in 6.17.y when doing a 'allmodconfig' build:
RUSTDOC TK rust/kernel/lib.rs
error: mixing `-Zsanitizer` will cause an ABI mismatch in crate `kernel`
--> rust/kernel/lib.rs:3:1
|
3 | //! The `kernel` crate.
| ^
|
= 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
I don't see that on Linus's branch, but maybe I don't have the same
build options enabled there. Is 6.17.y missing a patch that is in
6.18-rc to resolve this that I just can't seem to find?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: ABI mismatch build error for 6.17.y and rustc 1.91.0
2025-11-04 5:27 ABI mismatch build error for 6.17.y and rustc 1.91.0 Greg KH
@ 2025-11-04 7:07 ` Dirk Behme
2025-11-04 7:39 ` Greg KH
0 siblings, 1 reply; 8+ messages in thread
From: Dirk Behme @ 2025-11-04 7:07 UTC (permalink / raw)
To: Greg KH, rust-for-linux
On 04/11/2025 06:27, Greg KH wrote:
> My laptop just upgraded rustc to 1.91.0 and now I get the following
> build error in 6.17.y when doing a 'allmodconfig' build:
>
> RUSTDOC TK rust/kernel/lib.rs
> error: mixing `-Zsanitizer` will cause an ABI mismatch in crate `kernel`
> --> rust/kernel/lib.rs:3:1
> |
> 3 | //! The `kernel` crate.
> | ^
> |
> = 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
>
> I don't see that on Linus's branch, but maybe I don't have the same
> build options enabled there. Is 6.17.y missing a patch that is in
> 6.18-rc to resolve this that I just can't seem to find?
This one
https://github.com/Rust-for-Linux/linux/commit/16c43a56b79e2c3220b043236369a129d508c65a
https://lore.kernel.org/rust-for-linux/CANiq72=0JJz5XDHGpiyQBd9AmPCr4veJ=2oJywyyqQB8iMxqvA@mail.gmail.com/
?
Dirk
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: ABI mismatch build error for 6.17.y and rustc 1.91.0
2025-11-04 7:07 ` Dirk Behme
@ 2025-11-04 7:39 ` Greg KH
2025-11-04 10:39 ` Miguel Ojeda
0 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2025-11-04 7:39 UTC (permalink / raw)
To: Dirk Behme; +Cc: rust-for-linux
On Tue, Nov 04, 2025 at 08:07:13AM +0100, Dirk Behme wrote:
> On 04/11/2025 06:27, Greg KH wrote:
> > My laptop just upgraded rustc to 1.91.0 and now I get the following
> > build error in 6.17.y when doing a 'allmodconfig' build:
> >
> > RUSTDOC TK rust/kernel/lib.rs
> > error: mixing `-Zsanitizer` will cause an ABI mismatch in crate `kernel`
> > --> rust/kernel/lib.rs:3:1
> > |
> > 3 | //! The `kernel` crate.
> > | ^
> > |
> > = 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
> >
> > I don't see that on Linus's branch, but maybe I don't have the same
> > build options enabled there. Is 6.17.y missing a patch that is in
> > 6.18-rc to resolve this that I just can't seem to find?
>
> This one
>
> https://github.com/Rust-for-Linux/linux/commit/16c43a56b79e2c3220b043236369a129d508c65a
That is not a valid git id in linux-next :(
> https://lore.kernel.org/rust-for-linux/CANiq72=0JJz5XDHGpiyQBd9AmPCr4veJ=2oJywyyqQB8iMxqvA@mail.gmail.com/
Ok, but why am I not seeing this on 6.18-rc?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: ABI mismatch build error for 6.17.y and rustc 1.91.0
2025-11-04 7:39 ` Greg KH
@ 2025-11-04 10:39 ` Miguel Ojeda
2025-11-04 14:26 ` Greg KH
0 siblings, 1 reply; 8+ messages in thread
From: Miguel Ojeda @ 2025-11-04 10:39 UTC (permalink / raw)
To: Greg KH; +Cc: Dirk Behme, rust-for-linux
On Tue, Nov 4, 2025 at 8:43 AM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> Ok, but why am I not seeing this on 6.18-rc?
It happens in mainline too, so a few possibilities are:
- You have the toolchain forced to an older one (can happen e.g. if
you are using `rustup` and you have an override on a path, even if the
default elsewhere is another).
- You are not enabling doctests (KUnit).
- You are not enabling KASAN.
Please let me know if you still do not see it, because that it is
definitely not expected.
I committed the fix yesterday -- it should be in tomorrow's -next.
Cheers,
Miguel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: ABI mismatch build error for 6.17.y and rustc 1.91.0
2025-11-04 10:39 ` Miguel Ojeda
@ 2025-11-04 14:26 ` Greg KH
2025-11-04 15:10 ` Miguel Ojeda
0 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2025-11-04 14:26 UTC (permalink / raw)
To: Miguel Ojeda; +Cc: Dirk Behme, rust-for-linux
On Tue, Nov 04, 2025 at 11:39:37AM +0100, Miguel Ojeda wrote:
> On Tue, Nov 4, 2025 at 8:43 AM Greg KH <gregkh@linuxfoundation.org> wrote:
> >
> > Ok, but why am I not seeing this on 6.18-rc?
>
> It happens in mainline too, so a few possibilities are:
>
> - You have the toolchain forced to an older one (can happen e.g. if
> you are using `rustup` and you have an override on a path, even if the
> default elsewhere is another).
I am using:
make CC=gcc-14 -j32
as my build command line. Hm, that's a mix of gcc and rustc, does that
even work?
> - You are not enabling doctests (KUnit).
CONFIG_KUNIT=y
> - You are not enabling KASAN.
CONFIG_KASAN=y
The full .config can be found here:
https://github.com/gregkh/gregkh-linux/blob/master/stable/configs/6.17.y
The issue only started showing up when I moved rustc from 1.90.0 to
1.91.0, nothing else changed on my system that I can determine.
> Please let me know if you still do not see it, because that it is
> definitely not expected.
I have those options as set above, so this is not expected :)
> I committed the fix yesterday -- it should be in tomorrow's -next.
Cool, what's the git id? I'll be glad to try it.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: ABI mismatch build error for 6.17.y and rustc 1.91.0
2025-11-04 14:26 ` Greg KH
@ 2025-11-04 15:10 ` Miguel Ojeda
2025-11-08 5:28 ` Greg KH
0 siblings, 1 reply; 8+ messages in thread
From: Miguel Ojeda @ 2025-11-04 15:10 UTC (permalink / raw)
To: Greg KH; +Cc: Dirk Behme, rust-for-linux
On Tue, Nov 4, 2025 at 3:26 PM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> Hm, that's a mix of gcc and rustc, does that
> even work?
It "works" -- it is a best-effort hack as we always warn, but some
distributions do use it.
GCC being used is unrelated to this issue though.
> The full .config can be found here:
> https://github.com/gregkh/gregkh-linux/blob/master/stable/configs/6.17.y
I picked this one and run it in v6.18-rc4, and I see the issue as expected:
git clean -xdf
git checkout v6.18-rc4
curl -o .config
https://raw.githubusercontent.com/gregkh/gregkh-linux/refs/heads/master/stable/configs/6.17.y
make olddefconfig
make
What is the config where you do not see the issue (after it gets
sync'd, not before the build), i.e. the one for 6.18 that does not
fail your build?
> The issue only started showing up when I moved rustc from 1.90.0 to
> 1.91.0, nothing else changed on my system that I can determine.
Yes, the issue starts with Rust 1.91.0, so that is expected.
> Cool, what's the git id? I'll be glad to try it.
It is the one from the rust-fixes branch:
fad472efab0a805dd939f017c5b8669a786a4bcf
It is the top one in the rust-fixes branch at either:
https://github.com/Rust-for-Linux/linux.git rust-fixes
https://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux.git rust-fixes
(Dirk gave the parent commit of that one, but in your case you need
the top one too)
Cheers,
Miguel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: ABI mismatch build error for 6.17.y and rustc 1.91.0
2025-11-04 15:10 ` Miguel Ojeda
@ 2025-11-08 5:28 ` Greg KH
2025-11-09 17:31 ` Miguel Ojeda
0 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2025-11-08 5:28 UTC (permalink / raw)
To: Miguel Ojeda; +Cc: Dirk Behme, rust-for-linux
On Tue, Nov 04, 2025 at 04:10:29PM +0100, Miguel Ojeda wrote:
> On Tue, Nov 4, 2025 at 3:26 PM Greg KH <gregkh@linuxfoundation.org> wrote:
> >
> > Hm, that's a mix of gcc and rustc, does that
> > even work?
>
> It "works" -- it is a best-effort hack as we always warn, but some
> distributions do use it.
>
> GCC being used is unrelated to this issue though.
>
> > The full .config can be found here:
> > https://github.com/gregkh/gregkh-linux/blob/master/stable/configs/6.17.y
>
> I picked this one and run it in v6.18-rc4, and I see the issue as expected:
>
> git clean -xdf
> git checkout v6.18-rc4
> curl -o .config
> https://raw.githubusercontent.com/gregkh/gregkh-linux/refs/heads/master/stable/configs/6.17.y
> make olddefconfig
> make
>
> What is the config where you do not see the issue (after it gets
> sync'd, not before the build), i.e. the one for 6.18 that does not
> fail your build?
>
> > The issue only started showing up when I moved rustc from 1.90.0 to
> > 1.91.0, nothing else changed on my system that I can determine.
>
> Yes, the issue starts with Rust 1.91.0, so that is expected.
>
> > Cool, what's the git id? I'll be glad to try it.
>
> It is the one from the rust-fixes branch:
>
> fad472efab0a805dd939f017c5b8669a786a4bcf
>
> It is the top one in the rust-fixes branch at either:
>
> https://github.com/Rust-for-Linux/linux.git rust-fixes
> https://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux.git rust-fixes
>
> (Dirk gave the parent commit of that one, but in your case you need
> the top one too)
This is now fixed up with the patches tagged for stable, thanks, and
sorry for the noise, I didn't know it was already queued up.
greg k-h
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: ABI mismatch build error for 6.17.y and rustc 1.91.0
2025-11-08 5:28 ` Greg KH
@ 2025-11-09 17:31 ` Miguel Ojeda
0 siblings, 0 replies; 8+ messages in thread
From: Miguel Ojeda @ 2025-11-09 17:31 UTC (permalink / raw)
To: Greg KH; +Cc: Dirk Behme, rust-for-linux
On Sat, Nov 8, 2025 at 6:28 AM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> This is now fixed up with the patches tagged for stable, thanks, and
> sorry for the noise, I didn't know it was already queued up.
Nice, thanks for confirming!
Cheers,
Miguel
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-11-09 17:31 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-04 5:27 ABI mismatch build error for 6.17.y and rustc 1.91.0 Greg KH
2025-11-04 7:07 ` Dirk Behme
2025-11-04 7:39 ` Greg KH
2025-11-04 10:39 ` Miguel Ojeda
2025-11-04 14:26 ` Greg KH
2025-11-04 15:10 ` Miguel Ojeda
2025-11-08 5:28 ` Greg KH
2025-11-09 17:31 ` Miguel Ojeda
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.