5 ms·
Been working on getting a dev environment up and running for making GUI apps for my PinePhone. Compiling on the phone itself is simply too slow. I've poured a
by anderspitman 6y ago
Been working on getting a dev environment up and running for making GUI apps for my PinePhone. Compiling on the phone itself is simply too slow.
I've poured a few hours into fiddling with QEMU aarch64. I've got the compilation going. Still seems too slow, might need to go through the pain of getting cross-compiling working. I also haven't been able to get a display working yet.
Can anyone recommend a good tutorial for either/both:
1. Setting up QEMU/aarch64 with a working display device? Ideally needs to work on a reasonably old distro so that the executables will dynamically link on a range of distros.
2. Cross-compiling for PinePhone or Raspberry pi, which should be close enough to figure out the rest.
- jolmg 6y agoAnother option might be compiling on an RPi4 (haven't checked if it's the same ARM arch) or other "powerful" ARM machine. You could also not compile by using a language that doesn't require it.
- anderspitman 6y agoYou know what I actually hadn't considered how much more powerful my RPi4 is than the PinePhone. I'll give this a shot, thanks. Can you recommend a GUI library in a scripting language that doesn't require linking against a behemoth like QT or GTK? For reference I'm currently playing with fyne, a golang library that pretty much just needs X11 and GL libraries, which is about the best you can do on Linux AFAIK. Don't really care what the language is. It's probably going to shell out to a static golang binary anyway.
- ptx 6y agoFor Python there is Kivy[1] which works on both Android and desktop Linux (as well as other platforms), so it ought to work on PinePhone, I would assume. [1] https://kivy.org/ https://kivy.org/
- BuildTheRobots 6y agoPretty sure the pine is arm64 rather than armHF. I know I've installed Pi (hf) packages onto my Pine, but I'm not sure you can actually compile natively on a Pi without it cross compiling -and at that point a desktop is almost certainly faster. Nearly everyone else on HN is likely to have more understanding than me though, so listen to them as/when they set me straight :) I have to say though, when it comes to network IO, my original kickstarter pine64 blows the raspberry pi's out of the water (though this might just be due to the network card not being strung off the USB bus).
- anderspitman 6y agoRP4 (and I think 3) is aarch64 so it shouldn't be a problem, right? Pretty sure I already tried aarch64 executables on both Pi4 and Pine.
- deivid 6y agoon debian you could just install gcc-10-aarch64-linux-gnu and have a working cross compiler?
- anderspitman 6y agoIs it easy to get all the correct aarch64 headers for OpenGL and X11? That's where I ran into issues on Arch and started looking for alternatives. Most articles seem to think cross-compiling isn't worth the effort.
- zajio1am 6y agoIsn't that handled by multiarch support?
- anderspitman 6y agoNot sure. Multiarch looks like a debian thing and I haven't used a debian system in many years. That might be a good way to go for a build VM anyway though.
- singron 6y agoI've used nix to cross compile, and I recommend it if you can bother to learn it. It's straightforward if you want to deploy using nix/NixOS, but you can also adapt it to create portable deployables. E.g. I cross-compile a mips kernel, initramfs, and small userspace to run on a system without nix. If you think your app will be ABI compatible, it may be enough to cross-compile it with nix in an ordinary way and remove the RUNPATH and dynamic linker it sets in the elf file.