Re: llvm10 build failure on Rpi3

From: bob prohaska <fbsd_at_www.zefox.net>
Date: Sat, 03 Jul 2021 18:25:46 UTC
> >> On 2021-Jul-2, at 19:23, Mark Millard <marklmi at yahoo.com> wrote:
> > 
> >>> Side note:
> >>> 
> >>> It llooks like http://www.zefox.org/~bob/swaplogs/poudrierellvm10.log
> >>> shows that you tried with:
> >>> 
> >>> Device          1K-blocks     Used    Avail Capacity
> >>> /dev/da0s2b       1048576    25784  1022792     2%
> >>> /dev/mmcsd0s2b    1048576    25124  1023452     2%
> >>> Total             2097152    50908  2046244     2%
> >>> 
[hope the quotes are right!]

That's correct. The sequence of experiments ran something like this:

The Pi3 was configured with a a pair of ~3 GB swap partitions, one on
microSD, the other on the 1 TB mechanical hard disk. Make was not limited
in the number of jobs it could parallel. OOMA was restrained by putting
vm.pageout_oom_seq="4096"
vm.pfault_oom_attempts="20"
in /boot/loader.conf The usual "excessive swap" warnings were presented
during boot and ignored by me. 

Worlds and kernels built wtihout trouble, so I tried building www/chromium
using poudriere. It stopped in /devel/llvm10 with the "expected expression"
error and continued to stop there despite updating /usr/ports several times. 
At no time were there any hints of swap problems. Resorting to a GENERIC
self-hosted kernel made no difference. /usr/src was not tampered with. 

Eventually I resorted to running make in devel/llvm10, to my surprise it
ran to completion. It also ran make package successfully. Again I tried to
build just devel/llvm10 using poudriere, again getting "expected expression". 

At that point I resized the swap partitions to 1 GB each and tried poudriere
on devel/llvm10. That got rid of the excessive swap warnings, but didn't help.
Finally I placed 
MAKE_JOBS_NUMBER=2 
in /usr/local/etc/poudriere.d/make.conf and tried again. That still failed,
still with "expected expression". 

Since devel/llvm10 had created a package successfully, I tried slipping a copy
into poudriere's package directory, hoping it would find and use the package
to make further progress. Unfortunately, poudriere seems to remember the failure
and won't use the proffered package. It's still running, on lang/spidermoneky78.  

There were no reboots between experiments.

My first suspicion is that I've somehow screwed up the poudriere setup, perhaps
by a fumbled execution of poudriere jail -u, which I mistakenly thought was
needed after updating /usr/ports. The fact that the stoppage reported looks like
a syntax error specific to devel/llmv10 which is unaffected by swap pressure
makes it seem unrelated to kernel or swap constraints. 

AIUI, the hardware of the Pi4 is considerably different from the Pi3 in terms
of memory management, noted from an interview with Eben Upton on YouTube. He 
didn't go into any detail.  Whether that's relevant is unclear to me, but it 
does suggest the Pi4, even with restricted memory, won't behave like a Pi3.

Is there any sort of sanity test for the poudriere system? If I delete and
re-create the existing jail can the existing package library be preserved
and re-used? If not, that's OK, I'd just like to know beforehand.

Thanks for reading, and all your help!

bob prohaska