lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJ-ks9==6mi7SF5rTR=YouwC6RwktJftqXHqhsBcHNTWxdbfig@mail.gmail.com>
Date: Mon, 14 Oct 2024 21:10:47 -0400
From: Tamir Duberstein <tamird@...il.com>
To: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
Cc: Masahiro Yamada <masahiroy@...nel.org>, Daniel Gomez <da.gomez@...sung.com>, 
	rust-for-linux@...r.kernel.org, Fiona Behrens <me@...enk.dev>, 
	Nathan Chancellor <nathan@...nel.org>, Nicolas Schier <nicolas@...sle.eu>, Miguel Ojeda <ojeda@...nel.org>, 
	Alex Gaynor <alex.gaynor@...il.com>, Boqun Feng <boqun.feng@...il.com>, 
	Gary Guo <gary@...yguo.net>, Björn Roy Baron <bjorn3_gh@...tonmail.com>, 
	Benno Lossin <benno.lossin@...ton.me>, Andreas Hindborg <a.hindborg@...nel.org>, 
	Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>, 
	"David S. Miller" <davem@...emloft.net>, Kris Van Hees <kris.van.hees@...cle.com>, 
	Íñigo Huguet <ihuguet@...hat.com>, 
	Thomas Weißschuh <linux@...ssschuh.net>, 
	Vegard Nossum <vegard.nossum@...cle.com>, 
	Laurent Pinchart <laurent.pinchart@...asonboard.com>, linux-kernel@...r.kernel.org, 
	linux-kbuild@...r.kernel.org
Subject: Re: [PATCH] rust: query the compiler for dylib path

On Mon, Oct 14, 2024 at 3:09 PM Miguel Ojeda
<miguel.ojeda.sandonis@...il.com> wrote:
>
> On Mon, Oct 14, 2024 at 8:46 PM Masahiro Yamada <masahiroy@...nel.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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ