From: Tamir Duberstein <tamird@gmail.com>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: "Masahiro Yamada" <masahiroy@kernel.org>,
"Daniel Gomez" <da.gomez@samsung.com>,
rust-for-linux@vger.kernel.org, "Fiona Behrens" <me@kloenk.dev>,
"Nathan Chancellor" <nathan@kernel.org>,
"Nicolas Schier" <nicolas@fjasle.eu>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <benno.lossin@proton.me>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"David S. Miller" <davem@davemloft.net>,
"Kris Van Hees" <kris.van.hees@oracle.com>,
"Íñigo Huguet" <ihuguet@redhat.com>,
"Thomas Weißschuh" <linux@weissschuh.net>,
"Vegard Nossum" <vegard.nossum@oracle.com>,
"Laurent Pinchart" <laurent.pinchart@ideasonboard.com>,
linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org
Subject: Re: [PATCH] rust: query the compiler for dylib path
Date: Mon, 14 Oct 2024 21:10:47 -0400 [thread overview]
Message-ID: <CAJ-ks9==6mi7SF5rTR=YouwC6RwktJftqXHqhsBcHNTWxdbfig@mail.gmail.com> (raw)
In-Reply-To: <CANiq72n6zkCZdUJ0A8enLW3BgmA_=eJKgDKwNCfs-q3dfeR2BA@mail.gmail.com>
On Mon, Oct 14, 2024 at 3:09 PM Miguel Ojeda
<miguel.ojeda.sandonis@gmail.com> wrote:
>
> On Mon, Oct 14, 2024 at 8:46 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
> >
> > rustc ignores --emit=link=rust/libmacro.so
> > and produces rust/libmacro.dylib.
> >
> > Is this a bug in rustc?
This was my bad - I set this thread down the wrong path. In fact the
current build produces libmacros.so, but I haven't been able to convince
rustc to consume it. Changing `--extern macros` to `--extern
macros=$(objtree)/$(obj)/libmacros.so` produces 'error[E0463]: can't
find crate for `macros`'.
With a toy example, trying to link a proc-macro crate .so produces a
more informative message than the kernel build does:
```
rustc main.rs --extern macros=./libmacros.so
error: extern location for macros is of an unknown type: ./libmacros.so
--> main.rs:4:1
|
4 | extern crate macros;
| ^^^^^^^^^^^^^^^^^^^^
error: file name should be lib*.rlib or lib*.dylib
--> main.rs:4:1
|
4 | extern crate macros;
| ^^^^^^^^^^^^^^^^^^^^
```
I've opened https://github.com/rust-lang/rust/issues/131720, let's see
what the experts think.
next prev parent reply other threads:[~2024-10-15 1:11 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-08 22:48 [PATCH] rust: query the compiler for dylib path Tamir Duberstein
2024-10-09 12:42 ` Miguel Ojeda
2024-10-09 12:56 ` Tamir Duberstein
2024-10-09 13:12 ` Miguel Ojeda
2024-10-09 13:18 ` Tamir Duberstein
2024-10-09 14:07 ` [PATCH v3] " Tamir Duberstein
2024-10-09 14:28 ` Miguel Ojeda
2024-10-09 14:33 ` [PATCH v4] " Tamir Duberstein
2024-10-09 14:20 ` [PATCH] " Miguel Ojeda
2024-10-09 14:47 ` Tamir Duberstein
2024-10-12 13:17 ` Miguel Ojeda
[not found] ` <CGME20241010083123eucas1p2432a0bbbf37e85599b477d92965d9514@eucas1p2.samsung.com>
2024-10-10 8:31 ` Daniel Gomez
2024-10-10 14:28 ` [PATCH v5] " Tamir Duberstein
2024-10-14 18:44 ` Masahiro Yamada
2024-10-12 13:41 ` [PATCH] " Miguel Ojeda
2024-10-12 14:25 ` Tamir Duberstein
2024-10-12 23:37 ` Miguel Ojeda
2024-10-12 23:52 ` Tamir Duberstein
2024-10-14 18:45 ` Masahiro Yamada
2024-10-14 19:08 ` Miguel Ojeda
2024-10-15 1:10 ` Tamir Duberstein [this message]
2024-10-15 10:33 ` Miguel Ojeda
2024-10-15 15:05 ` Tamir Duberstein
2024-10-15 15:30 ` Miguel Ojeda
2024-10-15 15:53 ` Tamir Duberstein
2024-10-16 1:35 ` Masahiro Yamada
2024-10-15 9:10 ` Miguel Ojeda
[not found] ` <CGME20241010080828eucas1p1a1fbd99e5f7bb1c454f14ba4fa19a3e1@eucas1p1.samsung.com>
2024-10-10 8:08 ` Daniel Gomez
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='CAJ-ks9==6mi7SF5rTR=YouwC6RwktJftqXHqhsBcHNTWxdbfig@mail.gmail.com' \
--to=tamird@gmail.com \
--cc=a.hindborg@kernel.org \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=benno.lossin@proton.me \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=da.gomez@samsung.com \
--cc=davem@davemloft.net \
--cc=gary@garyguo.net \
--cc=ihuguet@redhat.com \
--cc=kris.van.hees@oracle.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@weissschuh.net \
--cc=masahiroy@kernel.org \
--cc=me@kloenk.dev \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=nathan@kernel.org \
--cc=nicolas@fjasle.eu \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tmgross@umich.edu \
--cc=vegard.nossum@oracle.com \
/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).