Re: Cross compiling user applications for armv7

From: Michał_Kruszewski <mkru_at_protonmail.com>
Date: Sun, 21 Sep 2025 10:08:05 UTC
I have finally managed to cross compile packages.
It looks like the only working configuration is as follows:
  1. The system must be installed as ROOT.
  2. BUILD_AS_NON_ROOT in poudriere config must be set to NO.
No other configuration works, and I tested a couple of them.
There is still one problem.
The poudriere process freezes on:
  Packing files for repository:   0%

I do all of this to evaluate FreeBSD as a potential replacement for Linux for embedded projects.
I already gathered some experience and have some questions that maybe some of you will be able to answer.

Is it possible to cross compile FreeBSD system for embedded target without root privileges?
If you work on your personal PC having a root privileges is not a problem.
However, I would like to enable multiple users to cross compile on a server machine.
I don't want to grant root privileges to all of them.
I know that I can configure doas or sudo.
However, this is a lot of manual tweaking.
Buildroot is capable of generating embedded Linux system without root privileges.

How to cross compile packages for a newer system version than the host machine?
In embedded projects it is very common that the target platform utilizes newer version of the kernel/system than the host machine.
Cross compiling newer FreeBSD kernel and world is easy.
However, how to compile packages?
You can't create a jail utilizing a newer system version.
I tried building packages for 16-CURRENT and the process simply failed.
Poudriere even warned me that it is going to fail.

Cross-compiling packages using poudriere for armv7 is slow, it is extremely slow.
I utilize 11 cores for building.
Cross compiling Python, I don't count kernel and world compilation, takes approximately 1.5 times more than compiling the whole Linux based system plus Python using Buildroot.
Is there anything I can do about that?

Regards,
Michał