cargo build error while compiling smithay

The exact issue is
error[E0277]: the trait bound `Boottime: ClockSource` is not satisfied
error[E0277]: the trait bound `Boottime: ClockSource` is not satisfied
with rust 1.69
No description
29 Replies
Nova
Nova2y ago
@i509VCB any ideas? :p ahhh
#[cfg(target_os = "linux")]
impl ClockSource for Boottime {
fn id() -> libc::clockid_t {
libc::CLOCK_BOOTTIME
}
}

#[cfg(any(target_os = "freebsd", target_os = "dragonfly"))]
impl ClockSource for Boottime {
fn id() -> libc::clockid_t {
libc::CLOCK_UPTIME
}
}
#[cfg(target_os = "linux")]
impl ClockSource for Boottime {
fn id() -> libc::clockid_t {
libc::CLOCK_BOOTTIME
}
}

#[cfg(any(target_os = "freebsd", target_os = "dragonfly"))]
impl ClockSource for Boottime {
fn id() -> libc::clockid_t {
libc::CLOCK_UPTIME
}
}
the target isn't seen as linux
i509VCB
i509VCB2y ago
Yeah I was about to ask if there was conditional compilation somewhere
Nova
Nova2y ago
guess we have to patch smithay then... but how?
i509VCB
i509VCB2y ago
Send a pull request, I assume android supports one or the other
Nova
Nova2y ago
but it's not using either one
i509VCB
i509VCB2y ago
Hmm? CLOCK_UPTIME isn't in bionic?
Nova
Nova2y ago
oh wait i see add more targets to the attributes sure
i509VCB
i509VCB2y ago
Yeah just another target for the cfg attribute
micimize
micimizeOP2y ago
Ahh ok, that makes sense
Nova
Nova2y ago
idk what to do here :S
micimize
micimizeOP2y ago
GitHub
Build errors on Android · Issue #1025 · Smithay/smithay
Hi , I was trying to build smithay as a dependency of https://github.com/stardustxr/server on Android/termux, and got a compiler error specifically from this block where android is not included in ...
micimize
micimizeOP2y ago
This specific build issue might be a bit of a red herring for total lack of android support: https://github.com/Smithay/smithay/pull/711. IDK how much stardust uses from simthay / if the code it materially depends on is platform-agnostic.
Nova
Nova2y ago
smithay is how we interact with 2D apps it's a Wayland compositor
micimize
micimizeOP2y ago
Ok, so we basically need it to have full Android support to get stardust working on android
Nova
Nova2y ago
maybe? I'm not sure I'm not much of an android expert what android device did you want to run stardust on anyway?
micimize
micimizeOP2y ago
I have a Samsung S23. It isn't (currently) my daily driver so I could in theory do whatever to it
Nova
Nova2y ago
oh well then you have even more problems i mean how are you gonna display to any headset through that if you put linux on it....
micimize
micimizeOP2y ago
what do you mean? It has data+video out. The nreal app works fine for instance
Nova
Nova2y ago
yea, but that's only by deeply integrating with android which is something i have zero clue how to even start on for stardust plus, stardust shouldn't be doing that anyway monado should but of course monado android drivers idk how to make or connect to stardust yet i'm sure it's possible, but in terms of practical within any forseeable future.... ya know what I mean?
micimize
micimizeOP2y ago
hmm -- I was kinda hoping monado wouldn't require additional code to work on android vs linux, but maybe that's wishful thinking. I am currently thinking that attempting to run things within a container might be the next thing to try
Nova
Nova2y ago
stardust should work great in there but getting either monado in or the video/data in... that's the new challenge oh also getting mesa in too because without graphics acceleration this is doomed tbh this is so sooo much easier with postmarketOS or something like that idk if the s23 supports any type of linux yet but if it does use that instead it'll save you so much time and energy sorry, i'm getting so frustrated since every time i look at android it just becomes a nightmare i have to deal with because people want compatibility yet it's so... horribly designed for XR
micimize
micimizeOP2y ago
I hadn't heard of this! S23 doesn't seem to be on the list of supported devices but will look into it.
Nova
Nova2y ago
did you know that basically EVERYONE has to reverse engineer and reimplement parts of android independently for XR just to get stuff like the Quest operating system to work since nobody shares their work all the major XR companies that use android on their devices and none of them share how they did it and it barely works too
micimize
micimizeOP2y ago
lol wth
Nova
Nova2y ago
hell, magic leap literally went "let's remove java and everything else from android and hybridize it with linux" until the magic leap 2 when they just relented and went to pure android on an x86 processor same as the steam deck's processor so yea android has kinda been a nightmare on the entire field
micimize
micimizeOP2y ago
from what I've seen there's a lot less community energy around directly flashing linux onto android devices these days, but will dig a bit more
Nova
Nova2y ago
the only reason it's still around is because a) qualcomm makes the best mobile XR processors at the moment b) android is a dev toolchain that unity already exports to and... that's basically it
micimize
micimizeOP2y ago
The appeal of trying to getting things to work this way is that if it's possible to get hardware acceleration in a container, which I've seen some indications/projects that indicate it might be possible, then it can potentially be made a portable termux package
Nova
Nova2y ago
yea that'd be exciting! though you can't use it with a headset unless you have that openxr connection or such which is... definitely a project that would have to span outside a termux package i don't have high hopes for android working out but that doesn't mean i don't want to try
Want results from more Discord servers?
Add your server