public inbox for qemu-devel@nongnu.org
 help / color / mirror / Atom feed
From: Zhao Liu <zhao1.liu@intel.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: qemu-devel@nongnu.org, qemu-rust@nongnu.org,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: [PATCH] rust: Update Cargo.lock
Date: Wed, 11 Mar 2026 17:11:15 +0800	[thread overview]
Message-ID: <abExs0JTxGeTSY8U@intel.com> (raw)
In-Reply-To: <20260309172440.66409-1-philmd@linaro.org>

On Mon, Mar 09, 2026 at 06:24:40PM +0100, Philippe Mathieu-Daudé wrote:
> Date: Mon,  9 Mar 2026 18:24:40 +0100
> From: Philippe Mathieu-Daudé <philmd@linaro.org>
> Subject: [PATCH] rust: Update Cargo.lock
> X-Mailer: git-send-email 2.53.0
> 
> Update Cargo.lock on top of commit  7ecd3f71079 ("Merge tag
> 'for-upstream' of https://gitlab.com/bonzini/qemu into staging").
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>  rust/Cargo.lock | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

When I ran `cargo +nightly build`, I met this error:

$ cargo +nightly build
   Compiling system-sys v0.1.0 (/media/liuzhao/data/qemu-cook/rust/bindings/system-sys)
error[E0432]: unresolved import `hwcore_sys`
  --> bindings/system-sys/lib.rs:22:5
   |
22 | use hwcore_sys::{qemu_irq, DeviceClass, DeviceState};
   |     ^^^^^^^^^^ use of unresolved module or unlinked crate `hwcore_sys`
   |
   = help: if you wanted to use a crate named `hwcore_sys`, use `cargo add hwcore_sys` to add it to your `Cargo.toml`

For more information about this error, try `rustc --explain E0432`.
error: could not compile `system-sys` (lib) due to 1 previous error

This is because of the wrong dependency relationship in Cargo.toml of
hwcore-sys & system-sys.

But the fix for this error will bring a little more change in
Cargo.lock (since the dependencies will change).

What about fixing this build bug first before updating Cargo.lock?

(That's a fix for build error I met.)
-------------------------------->8-------------------------------
From cc96c5530f5fe75eb0a422b092dbb761547e7514 Mon Sep 17 00:00:00 2001
From: Zhao Liu <zhao1.liu@intel.com>
Date: Wed, 11 Mar 2026 17:00:51 +0800
Subject: [PATCH] rust: Fix wrong dependencies for cargo

There's a build error:

$ cargo +nightly build
   Compiling system-sys v0.1.0 (/media/liuzhao/data/qemu-cook/rust/bindings/system-sys)
error[E0432]: unresolved import `hwcore_sys`
  --> bindings/system-sys/lib.rs:22:5
   |
22 | use hwcore_sys::{qemu_irq, DeviceClass, DeviceState};
   |     ^^^^^^^^^^ use of unresolved module or unlinked crate `hwcore_sys`
   |
   = help: if you wanted to use a crate named `hwcore_sys`, use `cargo add hwcore_sys` to add it to your `Cargo.toml`

For more information about this error, try `rustc --explain E0432`.
error: could not compile `system-sys` (lib) due to 1 previous error

This is because hwcore-sys & system-sys have the wrong dependencies
relationship in their Cargo.toml.

Fix the dependencies of hwcore-sys & system-sys in Cargo.toml, aligning
the dependencies described in their meson.build files.

Fixes: commit c899071b5a86 ("rust: move binding generation to bindings/")
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
---
 rust/bindings/hwcore-sys/Cargo.toml | 1 -
 rust/bindings/system-sys/Cargo.toml | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/bindings/hwcore-sys/Cargo.toml b/rust/bindings/hwcore-sys/Cargo.toml
index c20024e921a1..b5ae33da8ed6 100644
--- a/rust/bindings/hwcore-sys/Cargo.toml
+++ b/rust/bindings/hwcore-sys/Cargo.toml
@@ -21,7 +21,6 @@ chardev-sys = { path = "../chardev-sys" }
 qom-sys = { path = "../qom-sys" }
 migration-sys = { path = "../migration-sys" }
 util-sys = { path = "../util-sys" }
-system-sys = { path = "../system-sys" }

 [lints]
 workspace = true
diff --git a/rust/bindings/system-sys/Cargo.toml b/rust/bindings/system-sys/Cargo.toml
index 7e527130ff5d..bbb4eaa53db3 100644
--- a/rust/bindings/system-sys/Cargo.toml
+++ b/rust/bindings/system-sys/Cargo.toml
@@ -17,6 +17,7 @@ path = "lib.rs"
 [dependencies]
 glib-sys = { workspace = true }
 common = { path = "../../common" }
+hwcore-sys = { path = "../hwcore-sys" }
 migration-sys = { path = "../migration-sys" }
 util-sys = { path = "../util-sys" }
 qom-sys = { path = "../qom-sys" }
--
2.34.1




  reply	other threads:[~2026-03-11  8:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-09 17:24 [PATCH] rust: Update Cargo.lock Philippe Mathieu-Daudé
2026-03-11  9:11 ` Zhao Liu [this message]
2026-03-11 16:16 ` Paolo Bonzini
  -- strict thread matches above, loose matches on Subject: below --
2026-01-12  9:09 Zhao Liu
2026-01-12  8:55 ` Paolo Bonzini

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=abExs0JTxGeTSY8U@intel.com \
    --to=zhao1.liu@intel.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-rust@nongnu.org \
    /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