Build fails due to type mismatch in libsecret (aarch64 crosscompile)
Detailed description of the issue. Provide as much information as you can, potentially with images or videos showing the issue.
Steps to reproduce
- Cross-compile fractal for aarch64
- Observe that it fails building
libsecret
Information
-
This bug is reproducible from the latest nightly build - Fractal Version: N/A
- OS Version: Fedora 35 Server
- Installation Source: Tried to compile following the steps in the README
- Homeserver: N/A
Here's the output that cargo gives me:
Compiling gdk-pixbuf v0.15.6
Compiling libsecret v0.1.3
error[E0308]: mismatched types
--> /run/build/fractal/_flatpak_build/cargo-home/registry/src/github.com-1ecc6299db9ec823/libsecret-0.1.3/src/service.rs:1035:17
|
1035 | &mut item_paths as *mut _ as *mut *const i8,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u8`, found `i8`
|
= note: expected raw pointer `*mut *const u8`
found raw pointer `*mut *const i8`
For more information about this error, try `rustc --explain E0308`.
error: could not compile `libsecret` due to previous error
warning: build failed, waiting for other jobs to finish...
error: build failed
FAILED: src/fractal
Note that this line doesn't exist in the sources anymore. In fact when modifying Cargo.toml
to use:
libsecret = { git = "https://gitlab.gnome.org/World/Rust/libsecret-rs.git", rev = "5284a9d5", features = ["v0_19"] }
libsecret can be compiled, but it will throw other errors when assembling fractal
:
Compiling fractal v5.0.0-alpha (/run/build/fractal)
error[E0277]: `?` couldn't convert the error to `secret::SecretError`
--> src/secret.rs:295:55
|
295 | password_clear_future(Some(&schema()), attr).await?;
| ^ the trait `From<glib::error::Error>` is not implemented for `secret::SecretError`
|
= note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
= help: the following implementations were found:
<secret::SecretError as From<gtk4::glib::Error>>
= note: required because of the requirements on the impl of `FromResidual<Result<Infallible, glib::error::Error>>` for `Result<(), secret::SecretError>`
error[E0277]: the trait bound `Cancellable: glib::object::IsA<gio::auto::cancellable::Cancellable>` is not satisfied
--> src/secret.rs:249:9
|
245 | let items = password_search_sync(
| -------------------- required by a bound introduced by this call
...
249 | gio::Cancellable::NONE,
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `glib::object::IsA<gio::auto::cancellable::Cancellable>` is not implemented for `Cancellable`
|
note: required by a bound in `password_search_sync`
--> /run/build/fractal/_flatpak_build/cargo-home/git/checkouts/libsecret-rs-046cfcad6661588b/5284a9d/libsecret/src/functions.rs:118:31
|
118 | cancellable: Option<&impl IsA<gio::Cancellable>>,
| ^^^^^^^^^^^^^^^^^^^^^ required by this bound in `password_search_sync`
error[E0277]: `?` couldn't convert the error to `secret::SecretError`
--> src/secret.rs:250:6
|
250 | )?;
| ^ the trait `From<glib::error::Error>` is not implemented for `secret::SecretError`
|
= note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
= help: the following implementations were found:
<secret::SecretError as From<gtk4::glib::Error>>
= note: required because of the requirements on the impl of `FromResidual<Result<Infallible, glib::error::Error>>` for `Result<Vec<secret::StoredSession>, secret::SecretError>`
error[E0277]: `?` couldn't convert the error to `secret::SecretError`
--> src/secret.rs:273:11
|
273 | .await?;
| ^ the trait `From<glib::error::Error>` is not implemented for `secret::SecretError`
|
= note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
= help: the following implementations were found:
<secret::SecretError as From<gtk4::glib::Error>>
= note: required because of the requirements on the impl of `FromResidual<Result<Infallible, glib::error::Error>>` for `Result<(), secret::SecretError>`
error[E0277]: `?` couldn't convert the error to `secret::SecretError`
--> src/secret.rs:282:61
|
282 | password_clear_future(Some(&schema()), attributes).await?;
| ^ the trait `From<glib::error::Error>` is not implemented for `secret::SecretError`
|
= note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
= help: the following implementations were found:
<secret::SecretError as From<gtk4::glib::Error>>
= note: required because of the requirements on the impl of `FromResidual<Result<Infallible, glib::error::Error>>` for `Result<(), secret::SecretError>`
error[E0277]: the trait bound `libsecret::Error: ErrorDomain` is not satisfied
--> src/secret.rs:48:49
|
48 | Self::Libsecret(error) if error.is::<libsecret::Error>() => {
| ^^ the trait `ErrorDomain` is not implemented for `libsecret::Error`
|
note: required by a bound in `gtk4::glib::Error::is`
--> /run/build/fractal/_flatpak_build/cargo-home/registry/src/github.com-1ecc6299db9ec823/glib-0.15.6/src/error.rs:50:18
|
50 | pub fn is<T: ErrorDomain>(&self) -> bool {
| ^^^^^^^^^^^ required by this bound in `gtk4::glib::Error::is`
error[E0277]: the trait bound `libsecret::Error: ErrorDomain` is not satisfied
--> src/secret.rs:49:33
|
49 | match error.kind::<libsecret::Error>() {
| ^^^^ the trait `ErrorDomain` is not implemented for `libsecret::Error`
|
note: required by a bound in `gtk4::glib::Error::kind`
--> /run/build/fractal/_flatpak_build/cargo-home/registry/src/github.com-1ecc6299db9ec823/glib-0.15.6/src/error.rs:71:20
|
71 | pub fn kind<T: ErrorDomain>(&self) -> Option<T> {
| ^^^^^^^^^^^ required by this bound in `gtk4::glib::Error::kind`
I'd be happy to provide any other information you need. I didn't attempt a native compile yet due to the immense amounts of time that cross-compilation has taken up so far.