Cross compiling
#1
I've been following this issue https://invent.kde.org/teams/plasma-mobi.../issues/74 with interest, to learn how to cross-compile on my PC with a Pinephone target. The related blog post series is a good read.

I'm curious what other people do to compile programs for their PP? Directly on the device? Some other cross-compiling method?

So far I've been using the very good Manjaro ARM tools, though this compiles in a qemu vm which FWIU doesn't use your full system resources, so a native cross-compile seems like a good idea.

I don't really have a fast ARM board so for me cross-compiling seems to be my best choice.
  Reply
#2
I've built a few applications from source directly on the phone. It's slow but otherwise works out OK.
  Reply
#3
I think PmOS includes its own build system when you use pmbootstrap on the desktop, and can be used to crosscompile your own packages. See the PmOS wiki for details. The gentoo thread has a basic overview and links to the crossdev environment gentoo uses, and how you can use distcc to spread compilation between machines on the network even when they have different architectures, and make binary installable packages. I think Yocto still uses a bitbake based build system which can also make binary installable packages.
  Reply
#4
... and there is armbian build framework. Can build CC or native. There is no direct support for Pinephone, but adding should be simple.
  Reply
#5
Compiling directly on the phone is pretty slow, but doable and I'd recommend you do that.
What works on a Raspberry Pi might not work on a PinePhone and vice versa, even though it's the same architecture.
The reason being that one of them might have missing dependencies, or dependencies are located in a different place, and such.
Though if you're compiling this one of a kind app that has 0 dependencies (well, apart from the compiler of course), then there should be no problems.
Though the most common 0 dependency app I think think of are the trillions of "Hello World" tutorial apps.
But that app should be a CLI app, because ncurses or GTK or Qt etc count as dependencies.
母語は日本語ですが、英語も喋れます(ry
  Reply
#6
@wibble's comment about distcc led me to this interesting resource, https://archlinuxarm.org/wiki/Distcc_Cross-Compiling. As I'm on Manjaro this seems like a useful option.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Having trouble compiling Jumpdrive PineTrees 0 1,670 09-02-2020, 06:50 AM
Last Post: PineTrees

Forum Jump:


Users browsing this thread: 1 Guest(s)