Re: Building a Linuxulator userland from source

From: Felix Palmen <>
Date: Tue, 22 Aug 2023 07:50:46 UTC
* Alexander Leidinger <> [20230822 01:25]:
> Am 2023-08-18 11:26, schrieb Felix Palmen:
> > 1.) Of course, Uses/ would need quite some switching to handle
> > c7 as well as something new that works completely differently (maybe
> > call it src). All still open issues.
> I suggest to write a new Uses/ for this. Much more easy for you to do
> what you want, and less error prone and less QA to do for the existing
> linux_base stuff.

Thanks! Actually, I had this thought already but was unsure about it.
So, someone else suggesting exactly the same is quite convincing.

My goal is to replace -c7 with my project, but of course, even if that
succeeds, it means both userlands will need to coexist for quite some
time, and that's probably indeed easier with completely separate Uses.

> > 2.) Could you please elaborate how e.g. some config file "visible" to
> > the Linux processes could "pollute" a Linux build? Besides, this could
> > only affect files from base /etc I think...
> Well... the config part was more to highlight what the linux_base ports use
> the fallthrough for. In case of building I worry more that some includes
> from /usr/local are used than anything else. Also some other stuff
> configure-runs might pick-up from the installed FreeBSD ports.

I assume/hope that's a minor risk. /usr/local is not in the standard
search paths of the toolchain, so, must be added explicitly. A build
system doing that without being requested to do so would be pretty much
broken. Furthermore, the toolchain is built --with-sysroot=/compat/linux
so prepends that to all the system search paths.

Configure scripts finding *tools* in FreeBSD's /usr/local *might* be a
risk. Not an issue building with poudriere (the build jail will only
have what we want), but maybe an issue when someone builds the ports in
a live system.

Well, we will see :) At least, I already have the first ports building
fine using shell and make from the Linux userland, e.g. here:

Cheers, Felix

 Felix Palmen <>     {private}
 -- ports committer --                     {web}
 {pgp public key}
 {pgp fingerprint} 6936 13D5 5BBF 4837 B212  3ACC 54AD E006 9879 F231