-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
install: Compile (but error at runtime) on non-x86_64/aarch64 #114
Conversation
Skipping CI for Draft Pull Request. |
draft while I test this locally and a debug pod. This is just a theory atm... I can't see anything else that could be wrong. |
30d81a2
to
2808b77
Compare
It builds ok locally and I started up a s390x debug pod, ran:
and got a good build:
|
A procedural note, we don't usually include the file suffix ".rs" in the topic prefix. This is about the install code (module). And it's usually best in the subject message to explain a bit more what the goal is. Something like:
This all said, while I'm not opposed to this fix...thinking about this a bit more, what seems it'd be better (and about equally easy) is to change the build configuration in Then we can drop many of the architecture conditionals in that code. Conceptually we'd be going from Hmm...I'm not totally sure Cargo has support for conditionally enabling a crate feature for a given arch (without resorting to a build script). It does support this for dependencies https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#platform-specific-dependencies Well...in the end, let's just do some cleanup for this commit message and merge! (Of course the real fix is to actually implement the install flow for those arches, but that's more involved) |
BTW just for reference this install logic is a Rust rewrite of https://github.com/coreos/coreos-assembler/blob/main/src/create_disk.sh |
We already are checking for target_arch when using the constants. Just instantiating them when we are in a target_arch makes the build fail when we are building on non-x86_64/aarch64. Signed-off-by: Joseph Marrero <[email protected]>
2808b77
to
5f42643
Compare
Thanks, yeah my main intent here is just to not break rpm-ostree builds by vendoring bootc for now. I found https://github.com/coreos/coreos-assembler/blob/main/src/create_disk.sh when looking for |
We already are checking for target_arch when using the constants. Just instantiating them when we are in a target arch makes the build fail when we are building on a arch that that hits the constraint we created for initiating the constant.
closes #112