Closed Supermanuu closed 1 week ago
I have downloaded and executed the image-demo
test... so is something about my project...
This is my Cargo.toml
file:
[package]
name = "P360-RPIZ-BACK"
version = "0.1.0"
edition = "2021"
[dependencies]
gopro-controller = { git = "https://github.com/Supermanuu/gopro-controller.git", branch = "wifi-connect", version = "0.10.5" }
tokio = { version = "1.40.0", features = ["macros", "rt-multi-thread"] }
tokio-stream = { version = "0.1.16" }
regex = { version = "1.11.0" }
tonic = "0.12"
tonic-web = "0.12.3"
prost = "0.13"
tower-http = { version = "0.6.1", features = ["cors"] }
thiserror = "1.0.65"
bluer = { version = "0.17.3", features = ["bluetoothd"] }
futures = "0.3.31"
serde = { version = "1.0.213" }
serde_json = { version = "1.0.132" }
chrono = { version = "0.4.38" }
rppal = "0.19.0"
qrc = "0.0.5"
sdl2 = { version = "0.37.0", features = ["image"] }
[build-dependencies]
tonic-build = "0.12"
# For cross compile
[workspace.metadata.cross.target.aarch64-unknown-linux-gnu]
# Install some packages, see <https://github.com/cross-rs/cross/blob/main/docs/custom_images.md#adding-dependencies-to-existing-images>
pre-build = [
"dpkg --add-architecture $CROSS_DEB_ARCH && apt update && apt install -y libdbus-1-dev:$CROSS_DEB_ARCH pkg-config:$CROSS_DEB_ARCH protobuf-compiler:$CROSS_DEB_ARCH libsdl2-dev:$CROSS_DEB_ARCH libsdl2-image-dev:$CROSS_DEB_ARCH libsdl2-mixer-dev:$CROSS_DEB_ARCH",
]
I was compiling it with cargo build
and I have a build.rs
file:
fn main() -> Result<(), Box<dyn std::error::Error>> {
let proto_file = if std::path::Path::new("/.dockerenv").exists() {
// Dockerized build has no access to the repo root
"backend.proto"
} else {
"../backend.proto"
};
tonic_build::compile_protos(proto_file)?;
Ok(())
}
Could be that any of the dependencies are not compatible with sdl2
?
SDL_Metal_DestroyView
is a macos specific function that is only compiled when the target is set to macos, so if you are on linux it's logical it's not being found. Other than that I don't have enough info to know what is going on.
Actually it's probably related to #1409 , try using the master version of the repo and see if its works?
Yeah, thats right! Adding git master
branch solved the problem!
Thank you very much!
I thought that the master branch should be released in crates.io, but is not.
Distro:
Ubuntu 20.04.6 LTS
Version:sdl2 = { version = "0.37.0", features = ["image"] }
Installed versions through apt:Compilation error:
I dont know how to get this working... and I have not found anything on the internet...
Could be that the only way to get it working is downloading the libraries by hand?
Thank you!