zirias@
Developer
As I already mentioned it in other threads, I decided to add some summary about my current "research/poc" project here: I'm trying to build a Linuxulator userland directly from source. This might be an alternative to the current practice of re-packaging (and adjusting) an existing Linux distribution to get the Linuxulator userland, as is done by the linux-c7 ports. It might also turn out to be not feasible.
My current work in progress is here in the form of a ports overlay: https://github.com/Zirias/freebsd-ports-overlay-linuxsrc
You can just clone that repository and add it as an overlay to poudriere in order to test it.
I'll give my intermediate assessment of this approach:
The good:

My current work in progress is here in the form of a ports overlay: https://github.com/Zirias/freebsd-ports-overlay-linuxsrc
You can just clone that repository and add it as an overlay to poudriere in order to test it.
I'll give my intermediate assessment of this approach:
The good:
- So far, it works. A userland created that way is very likely to "just work" on FreeBSD, because everything will be built with a GNU toolchain (binutils, gcc, glibc) configured for exactly the Linux kernel version the respective FreeBSD kernel claims syscall compatibility with (currently Linux 4.4 for FreeBSD 13.2 and Linux 5.15 for FreeBSD 14.0).
- It's easily possible to provide the newest versions of the toolchain and important shared libs independent from some Linux distribution. Things like paths can be configured at build time (making adjustments to work well on FreeBSD simpler) and some parts of existing FreeBSD ports for some shared libs can be reused for the corresponding "Linuxulator port".
- This approach comes with the risk to create "yet another Linux distribution". Although all you need to support Linux applications is typically shared libs, they come with their own build dependencies. Case in point, my overlay already contains IIRC around 150 ports, just to have a userland that provides the ffmpeg libs and gtk2 (in somewhat complete configurations). I'm currently hitting kind of a roadblock adding gtk3 support, because this requires librsvg, which in turn requires rust (need a compiler targeting Linux) to build the latest versions. Building/packaging rust is cumbersome.
One thing is perfectly clear, I would never be able to maintain all of this alone.
- Several (ugly) hacks/workarounds for issues with both the existing ports framework and poudriere are currently needed, you can find them in linuxsrc.mk. This is not surprising, building software targeting Linux was never a supported use case. These issues should be solved in a better way....
- Whether the approach of building from source is good or bad for application compatibility must be evaluated. On the one hand, offering the latest versions of important (widely used) shared libs has the potential to improve compatibility. On the other hand, this userland will be different from any existing Linux distribution, so applications specifically targeting e.g. a "RedHat" system might suffer.
