-
Notifications
You must be signed in to change notification settings - Fork 215
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
Support cross-compiling in builder
#173
Comments
Thanks for reporting! Could you be more specific about the error that occurs and how you were able to fix it. I tried looking through your |
Oh well, sorry, thought it would be obvious 😅 So what I get on my M1 MacBook is the error thrown here: Line 105 in 6df1629
Actually, that line you found was one try, but that didn't work. What I ended up doing on my MacBook, is changing the Now that I keep thinking about that, it doesn't really make sense to enforce the target architecture being x86 for the builder itself, does it? What should be x86 is the target that the builder builds for, right? And since the target for the bootloader is hardcoded anyways, I don't really see a point in the compile-time check for x86 architecture. Am I missing something? |
Thanks for clarifying! So using the
Yes, it doesn't make sense to force an architecture for the
I want to prevent people from trying to use the |
Yes, exactly. The image is still built for x86 and then I run it with a custom-patched qemu-system-x86_64, which works well :D |
I created a PR with a potential fix in #176. Could you try whether it fixes your problem @nschoellhorn? |
Works like a charm, thank you so much for the quick reaction! |
Awesome, thanks for testing! |
I am working on my operating system on an Apple Silicon M1 MacBook (aarch64) from time to time and when I try to build the boot image, it always fails with the message
This crate only supports the x86_64 architecture.
because it uses the current architecture, of course. I ended up cloning the repo and adding theTARGET
environment variable to the builder process to make it cross-compile for x86_64, which works for me but I'm not sure if that's the best way to do this.Maybe the crate could get a config option for cross-compiling or something? Or always force a specific target? I'm not sure what issues might arise from this, so I thought I'd submit this issue first to discuss stuff.
If we can agree on a good solution, I'd be happy to submit a PR for that! :)
Thanks for your work!
The text was updated successfully, but these errors were encountered: