From: Andreas Hindborg <a.hindborg@kernel.org>
To: "Alistair Francis" <alistair23@gmail.com>
Cc: "Alistair Francis" <alistair@alistair23.me>,
<linux-kernel@vger.kernel.org>, <boqun.feng@gmail.com>,
<me@kloenk.dev>, <benno.lossin@proton.me>, <tmgross@umich.edu>,
<aliceryhl@google.com>, <gary@garyguo.net>, <ojeda@kernel.org>,
<rust-for-linux@vger.kernel.org>, <alex.gaynor@gmail.com>,
<alistair.francis@wdc.com>, <bjorn3_gh@protonmail.com>
Subject: Re: [PATCH v3 01/11] rust: bindings: Support some inline static functions
Date: Tue, 12 Nov 2024 10:58:40 +0100 [thread overview]
Message-ID: <87iksssrhr.fsf@kernel.org> (raw)
In-Reply-To: <CAKmqyKNjjELzVbWgBHaHr8N1XnOJHk-U6RfLyb-FbTJ7h9jPoA@mail.gmail.com> (Alistair Francis's message of "Tue, 12 Nov 2024 08:58:07 +1000")
"Alistair Francis" <alistair23@gmail.com> writes:
> On Mon, Nov 11, 2024 at 10:07 PM Andreas Hindborg <a.hindborg@kernel.org> wrote:
>>
>> "Alistair Francis" <alistair@alistair23.me> writes:
>>
>> <cut>
>>
>> > diff --git a/rust/exports.c b/rust/exports.c
>> > index 587f0e776aba..288958d2ebea 100644
>> > --- a/rust/exports.c
>> > +++ b/rust/exports.c
>> > @@ -18,6 +18,7 @@
>> > #include "exports_core_generated.h"
>> > #include "exports_helpers_generated.h"
>> > #include "exports_bindings_generated.h"
>> > +#include "exports_bindings_static_generated.h"
>>
>> Generating `exports_bindings_static_generated.h` depends on `exports.o`,
>> which depends on `exports.c`. Does this not create chicken-egg kind of
>> problem?
>
> It is a bit confusing as there are a few levels of autogeneration, but
> Make happily handles it.
>
> `exports.c` depends on `exports_bindings_static_generated.h`
>
> But `exports_bindings_static_generated.h` depends on `extern.o`
> (extern not exports).
>
> `extern.o` then depends on `extern.c`
>
> `extern.c` then depends on `bindings_generated_static.rs`, which is
> generated by bindgen.
>
> So there isn't a chick-egg problem and this happily builds from a clean tree.
Right, I think I mixed up exports/extern.
Anyway, it does not build for me. I applied it on top of `rust-next` and
I get:
..
│ CC rust/extern.o │
│/home/aeh/src/linux-rust/helpers/rust/extern.c:1:10: fatal error: '/home/aeh/src/linux-rust/helpers/bindings/bindings_helper.h' file not found │
│ 1 | #include "/home/aeh/src/linux-rust/helpers/bindings/bindings_helper.h" │
│ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ │
│1 error generated. │
I am doing out of tree build - maybe that is the culprit?
Best regards,
Andreas Hindborg
next prev parent reply other threads:[~2024-11-12 9:58 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-11 11:26 [PATCH v3 00/11] rust: bindings: Auto-generate inline static functions Alistair Francis
2024-11-11 11:26 ` [PATCH v3 01/11] rust: bindings: Support some " Alistair Francis
2024-11-11 11:46 ` Andreas Hindborg
2024-11-11 22:51 ` Alistair Francis
2024-11-11 12:07 ` Andreas Hindborg
2024-11-11 22:58 ` Alistair Francis
2024-11-12 9:58 ` Andreas Hindborg [this message]
2024-11-12 23:18 ` Alistair Francis
2024-11-11 11:26 ` [PATCH v3 02/11] rust: helpers: Remove blk helper Alistair Francis
2024-11-11 11:26 ` [PATCH v3 03/11] rust: helpers: Remove err helper Alistair Francis
2024-11-11 11:26 ` [PATCH v3 04/11] rust: helpers: Remove kunit helper Alistair Francis
2024-11-11 11:26 ` [PATCH v3 05/11] rust: helpers: Remove some page helpers Alistair Francis
2024-11-11 11:26 ` [PATCH v3 06/11] rust: helpers: Remove rbtree helper Alistair Francis
2024-11-11 11:26 ` [PATCH v3 07/11] rust: helpers: Remove some refcount helpers Alistair Francis
2024-11-11 11:26 ` [PATCH v3 08/11] rust: helpers: Remove signal helper Alistair Francis
2024-11-11 11:26 ` [PATCH v3 09/11] rust: helpers: Remove some spinlock helpers Alistair Francis
2024-11-11 11:26 ` [PATCH v3 10/11] rust: helpers: Remove some task helpers Alistair Francis
2024-11-11 11:26 ` [PATCH v3 11/11] rust: helpers: Remove uaccess helpers Alistair Francis
2024-11-11 13:23 ` [PATCH v3 00/11] rust: bindings: Auto-generate inline static functions Dirk Behme
2024-11-11 13:51 ` Andreas Hindborg
2024-11-12 5:35 ` Dirk Behme
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=87iksssrhr.fsf@kernel.org \
--to=a.hindborg@kernel.org \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=alistair.francis@wdc.com \
--cc=alistair23@gmail.com \
--cc=alistair@alistair23.me \
--cc=benno.lossin@proton.me \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=gary@garyguo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=me@kloenk.dev \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--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).