From: Xi Ruoyao <xry111@xry111.site>
To: "Miguel Ojeda" <miguel.ojeda.sandonis@gmail.com>,
"Huacai Chen" <chenhuacai@kernel.org>,
"WANG Xuerui" <kernel@xen0n.name>,
"Alice Ryhl" <aliceryhl@google.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Arve Hjønnevåg" <arve@android.com>,
"Todd Kjos" <tkjos@android.com>,
"Christian Brauner" <christian@brauner.io>,
"Carlos Llamas" <cmllamas@google.com>
Cc: "Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Danilo Krummrich" <dakr@kernel.org>,
"Benno Lossin" <lossin@kernel.org>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Trevor Gross" <tmgross@umich.edu>,
loongarch@lists.linux.dev,
rust-for-linux <rust-for-linux@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Mainline loongarch64 defconfig+Rust build error
Date: Tue, 09 Dec 2025 19:28:33 +0800 [thread overview]
Message-ID: <fb77069524eec1df222b2ecbc6ddf5c3b4b041bb.camel@xry111.site> (raw)
In-Reply-To: <CANiq72mrVzqXnAV=Hy2XBOonLHA6YQgH-ckZoc_h0VBvTGK8rA@mail.gmail.com>
On Tue, 2025-12-09 at 11:56 +0100, Miguel Ojeda wrote:
> Hi all,
>
> I am seeing in mainline loongarch64 defconfig+Rust the following build
> error [1].
>
> Cheers,
> Miguel
>
> [1]
>
> error[E0425]: cannot find value `compat_ptr_ioctl` in crate `bindings`
> --> drivers/android/binder/rust_binder_main.rs:317:38
> |
> 317 | compat_ioctl: Some(bindings::compat_ptr_ioctl),
> | ^^^^^^^^^^^^^^^^ help: a
> function with a similar name exists: `compat_sys_ioctl`
> |
> ::: /__w/quick/quick/linux/rust/bindings/bindings_generated.rs:78264:5
> |
> 78264 | pub fn compat_sys_ioctl(fd: ffi::c_uint, cmd: ffi::c_uint,
> arg: compat_ulong_t) -> ffi::c_long;
> | ----------------------------------------------------------------------------------------------
> similarly named function `compat_sys_ioctl` defined here
I highly doubt if this is really a LoongArch-only issue. We have:
#ifdef CONFIG_COMPAT
extern long compat_ptr_ioctl(struct file *file, unsigned int cmd,
unsigned long arg);
#else
#define compat_ptr_ioctl NULL
#endif
AFAIK bindgen does not translate C preprocessor macro definitions, so
when !CONFIG_COMPAT we won't have the Rust binding for it.
And as LA32 is not upstreamed it's pointless to support COMPAT for
LoongArch, yet.
--
Xi Ruoyao <xry111@xry111.site>
next prev parent reply other threads:[~2025-12-09 11:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-09 10:56 Mainline loongarch64 defconfig+Rust build error Miguel Ojeda
2025-12-09 11:28 ` Xi Ruoyao [this message]
2025-12-09 12:17 ` Gary Guo
2025-12-09 12:20 ` hev
2025-12-11 1:24 ` Alice Ryhl
2025-12-11 1:26 ` Alice Ryhl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fb77069524eec1df222b2ecbc6ddf5c3b4b041bb.camel@xry111.site \
--to=xry111@xry111.site \
--cc=a.hindborg@kernel.org \
--cc=aliceryhl@google.com \
--cc=arve@android.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=chenhuacai@kernel.org \
--cc=christian@brauner.io \
--cc=cmllamas@google.com \
--cc=dakr@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=kernel@xen0n.name \
--cc=linux-kernel@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
--cc=lossin@kernel.org \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=rust-for-linux@vger.kernel.org \
--cc=tkjos@android.com \
--cc=tmgross@umich.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).