I’m interested in developing software for Haiku using C++. However, I hate giving up my standard Linux tool set. My setup is a VirtualBox with target OS (Haiku) running on my host OS (Linux) where my development tools are. And than both systems talk to each other using gdb-server or alike protocol. There are some older articles on this forum’s archive about cross compilation but I haven’t been able to find anything useful. Is there a (decent!) manual / tutorial available about cross compiling for Haiku and using gdb server to debug. A docker container with all the tools would be a bonus. If it does not exist I’ll create one and share it with the community.
p.s. Of course I could develop on Haiku but at present I have only single good computer with large screen and running Haiku in a VirtualBox does not allow me to use the full screen resolution and that would impact my productivity and the ways I’m used to work.
Update: I found this I found this.
If Haiku is using the standard VESA driver then you can add custom video modes to the VM with the VBoxManage
command. In addition, the VMware add-ons package includes a vmsvga
driver that can be used in VirtualBox to gain access to higher resolutions.
Also, VirtualBox often has poor performance with Haiku, I would recommend VMWare (or QEMU/KVM).
On Linux, you can install VMWare from their website.
Allright! I’ve managed to cross compile stuff on Haiku using two approaches. First is by using the aiku/cross-compiler:x86_64-r1beta4 docker image. After interactively running this image, I get the x86_64-unknown-haiku-g++ compiler which produces valid haiku executable. The second (a bit more rough!) approach is to use CMake on my PC to simply copy sources to Haiku in VirtualBox and use its’ own g++ to produce the program. But now I have problems with using gdb to remotely debug is. Namely, no matter which approach I use, gdbserver crashes. Does anyone have any experience with this?
p.s. It also happens if I include debug info (screenshot has a mistake).