Cross Compilation on Windows (ish)
|
In case it’s of any interest to people, I seem to have had some success getting the GCCSDK, Autobuilder and my build environment up and running on Windows, using the Windows Subsystem for Linux and the default Ubuntu 24.04 that comes with it. I suspect this means that it should also be fine on a native Ubuntu 24.04, but I’ve not actually tried building it all on that. I’ve loosely updated https://www.stevefryatt.org.uk/risc-os/build-tools/environment to highlight the issues that I found compared to last time I did a full build of the system back in 2020 or thereabouts on Ubuntu 20.04. For the WSL bit, I just followed https://learn.microsoft.com/en-us/windows/wsl/install and then jumped into my instructions as soon as I had a Linux terminal prompt. The setup hasn’t been used in anger, but I’ve built a few pieces of my software using it. I’m not an expert, use at your own risk, etc… :-) |
|
Thanks for the write-up! |
|
That’s great you’ve done a write up Steve. I never quite got around to it myself as I’ve been using the GCCSDK autobuilder on WSL for quite a while now and thought it was knowledge that should be shared. I tend to code in C++ and combining it with Visual Studio Code and RPCEmu means I can edit, compile, copy to RPCEmu all from VSCode and then test it in RPCEmu. |
|
To avoid having to uninstall and install an older version of texinfo (which is quite a hideous thing to do, really), you can edit the file And a, probably cleaner, way which I haven’t tried is to just not generate the docs: https://www.mail-archive.com/lfs-dev%40linuxfromscratch.org/msg18321.html |
|
Nice job Steve! I use mostly Linux, so a container or a VM for GCCSDK is more than enough for me. But I know there are quite a few folks that wish to have it on Windows. |
|
In case anyone is interested in trying out the RISC OS build environment I’ve been building, here’s a short demo of the environment: https://asciinema.org/a/9gcZhYwjYsfzTPg0TY4ULghwe It runs in Docker, so works on Linux, macOS and Windows (more usefully under WSL). It’s x86 only, so ARM users won’t be able to use it without emulation. |
|
That’s really cool I’ve also had some experience with WSL for various development tasks, and it’s great for running Linux tools on Windows. The key to getting these setups working smoothly is often in the details, like ensuring all dependencies are correctly installed and paths are properly configured. |