Well, I have spent a few more days tentatively messing around with LSX, and I have noticed a few things.

First off, the C compiler is not the only program to have occasional issues. Sometimes the "mv" command also fails with the oh-so-descriptive "?" error. By the looks of it, this error is caused by something going wrong with a fork() and subsequent wait() syscall. That recurring error in the C compiler is also caused by the 2nd pass of the C compiler not being able to find a temporary file created by the 1st pass. If the 1st pass was failing to run, then that would explain why the 2nd pass isn't able to find that temporary file. This has me guessing that there may be something wrong with fork() or exec(). Whenever it is, it doesn't dumpster memory or blow up the filesystem. For all I know, it may be an emulation issue too, but I have no way of testing it right now.

The current kernel I am building is under 16KB at the moment. My goal is to be able to recreate the stock (semi?) functional kernel, and then do modifications from there. This goal has not been reached, as this kernel simply crashes on startup. It is either a HALT instruction or a stack issue depending on if the kernel has been stripped or not. I bet I am building it wrong again :/, it doesn't need to be reloc'd after the "ld -X" does it?

Has anyone actually been able to get a system to build with the archived LSX disks? I have poured over the config files many times, but I feel like I am missing something painfully obvious...

On Mon, Jul 11, 2022 at 6:47 PM Noel Chiappa <jnc@mercury.lcs.mit.edu> wrote:
    > From: Paul Ruizendaal

    > Note that LSX only holds one process in core and swaps other processes
    > (NPROC = 3) out to floppy. It reportedly took several hours for the
    > Terak to self-compile LSX from source.

If one is working in a simulator, and not a real hardware PDP-11, there's a
'trick' one can use to make life a lot easier - for MINI-UNIX, at least; I'll
comment on LSX below.

As I report in the MINI-UNIX Computer History Wiki article: "MINI-UNIX uses
the same file system as V6; this allows MINI-UNIX packs to be 'mounted' on V6
systems (either real, or simulated), which is very convenient for working on
them." So just spin up a V6 in the simulator, mount the LSX/MINI-UNIX pack,
and away you go. The V6 toolchain can be used to compile/link kernels; to
link user commands one will need to import the LSX/MINI-UNIX loader (which,
since V6 is source compatible with LSX/MINI-UNIX, is trivial).

LSX is potentially more complex, as it supports _two different_ file system
formats: the standard V6 one, and a 'contiguous' one which is very similar
to the V6 one (rdwri.c has no conditionals on CONTIG; not so alloc.c,
though), but is not fully compatible. So non-contiguous LSX file systems
can be mounted under V6, but not contiguous ones.

        Noel