Closed xobs closed 3 years ago
Maybe I'm wrong, but this seems to be more of a Cargo problem than a minifb problem?
@emoon It could be. Right now I'm trying to determine why it is that including minifb causes this to happen, and why it didn't happen before.
It only seems to happen when I enable x11
or wayland
as features. For example, this build works just fine:
[package]
authors = ["Sean Cross <sean@xobs.io>"]
edition = "2018"
name = "minifb-build-test"
version = "0.1.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
log = "0.4"
[target.'cfg(any(windows, target_os = "macos"))'.dependencies]
minifb = {version = "0.19", default-features = false}
I see. I'm not sure exactly what could cause this to be honest. If you find out why this is and what needs to be changed in (likely) the minifb
cargo.toml I would be happy to apply the changes (or even better if you can do a PR)
I'm still not sure if this is a bug in my setup, a bug in cargo, or a bug in minifb
. Using Resolver Version 2 does fix the issue, but I don't know if that's the fix or if it's a workaround: https://github.com/rust-lang/cargo/issues/9147
I see. I'm waiting for the replay on your last question and I guess we will see
It looks like this is "as-designed". The correct solution is to use Resolver Version 2 once 1.51 is released.
Thanks for looking into this!
I have a package that uses
minifb
when building on Windows, and uses raw calls when building on an embedded platform.However, even including a reference to
minifb
causeslog
to fail to build, even if I conditionally requireminifb
.src/main.rs:
Cargo.toml:
Attempting to build for
riscv32imac-unknown-none-elf
:If I remove the entry to
minifb
by commenting it out, it builds just fine: