gtk-rs / gtk3-rs

Rust bindings for GTK 3
https://gtk-rs.org
MIT License
508 stars 90 forks source link

[BUG] cannot build after adding to Cargo.toml #761

Closed paulfrische closed 2 years ago

paulfrische commented 2 years ago

Bug description

Hello there, I added gtk to my Cargo.toml, but when I try to build I get an error.

My Cargo.toml:

[package]
name = "test_project"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
gtk = { git = "https://github.com/gtk-rs/gtk3-rs.git" }

I've tried both the git and the "normal" version but neither works.

PS: I am very new to rust, sry for any dump mistakes I make

Backtrace

Compiling futures-util v0.3.21
   Compiling gio v0.16.0 (https://github.com/gtk-rs/gtk-rs-core#3a0325e0)
   Compiling glib-sys v0.16.0 (https://github.com/gtk-rs/gtk-rs-core#3a0325e0)
   Compiling gobject-sys v0.16.0 (https://github.com/gtk-rs/gtk-rs-core#3a0325e0)
error[E0463]: can't find crate for `serde` which `system_deps` depends on
  --> /home/paul/.cargo/git/checkouts/gtk-rs-core-7be42ca38bd6361c/3a0325e/glib/sys/build.rs:13:21
   |
13 |     if let Err(s) = system_deps::Config::new().probe() {
   |                     ^^^^^^^^^^^ can't find crate

error[E0463]: can't find crate for `serde` which `system_deps` depends on
  --> /home/paul/.cargo/git/checkouts/gtk-rs-core-7be42ca38bd6361c/3a0325e/glib/gobject-sys/build.rs:13:21
   |
13 |     if let Err(s) = system_deps::Config::new().probe() {
   |                     ^^^^^^^^^^^ can't find crate

For more information about this error, try `rustc --explain E0463`.
error: could not compile `glib-sys` due to previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `gobject-sys` due to previous error
paulfrische commented 2 years ago

never mind, no it works