Re: llvm10 build failure on Rpi3 [You need to update /usr/local/poudriere/poudriere-system]

From: Mark Millard via freebsd-ports <freebsd-ports_at_freebsd.org>
Date: Sun, 04 Jul 2021 05:34:35 UTC
On 2021-Jul-3, at 21:32, Mark Millard <marklmi at yahoo.com> wrote:

> [Just correcting a bad placement of  some of the new text.]
> 
> On 2021-Jul-3, at 21:25, Mark Millard <marklmi at yahoo.com> wrote:
> 
>> On 2021-Jul-3, at 21:15, Mark Millard <marklmi at yahoo.com> wrote:
>> 
>>> Summary: You need to update /usr/local/poudriere/poudriere-system
>>> 
>>> Updating your HOST environment does not automatically update that
>>> area.
>>> 
>>> One possibility for an update procedure is:
>>> 
>>> # cd /usr/src
>>> # make installworld DESTDIR=/usr/local/poudriere/poudriere-system DB_FROM_SRC=1
>>> # make distrib-dirs DESTDIR=/usr/local/poudriere/poudriere-system DB_FROM_SRC=1
>>> # make distribution DESTDIR=/usr/local/poudriere/poudriere-system DB_FROM_SRC=1
>>> # make -DBATCH_DELETE_OLD_FILES delete-old DESTDIR=/usr/local/poudriere/poudriere-system DB_FROM_SRC=1
>>> 
>>> Sometime after after a poudriere bulk run completes:
>>> 
>>> # make -DBATCH_DELETE_OLD_FILES delete-old-libs DESTDIR=/usr/local/poudriere/poudriere-system DB_FROM_SRC=1
>>> 
>>> 
>>> How I got there . . .
>>> 
>>> Someone pointed out something that I'd not even thought to check
>>> about your builds (that explains why your lang/rust did not fail
>>> to build as well and a major difference in your poudriere vs.
>>> make build tests and vs. my attempts to reproduce). Your log
>>> still reports:
>>> 
>>> Host OSVERSION: 1400024
>>> Jail OSVERSION: 1400019
>>> 
> 
> [Text moved here:]
> 
> I forgot to quote the OSVERSION in:
> 
> ---Begin Environment---
> SHELL=/bin/csh
> OSVERSION=1400019
> UNAME_v=FreeBSD 14.0-CURRENT
> UNAME_r=14.0-CURRENT
> . . .
> 
>>> 1400019 is from early June:
>>> 
>>> committer	Neel Chauhan <nc@FreeBSD.org>	2021-06-07 22:53:24 +0000
>>> commit	37d64dcdfa519157aff9711f1f226ad7bd778f46 (patch)
>>> 
>>> That Jail version of the system predates using llvm12
>>> as the system compiler. 1400023 was the switch to llvm12:
>>> 
>>> committer	Dimitry Andric <dim@FreeBSD.org>	2021-06-13 20:01:15 +0000
>>> commit	d409305fa3838fb39b38c26fc085fb729b8766d5 (patch)
>>> 
>>> This means that the direct make build of devel/llvm10
>>> was based on using system clang 12, not what you have
>>> poudriere using.
>>> 
>>> You should have (using things as they happen to
>>> be available to install now):
>>> 
>>> Host OSVERSION: 1400024
>>> Jail OSVERSION: 1400024
> 
> [Removed bad placement of example text where it could be
> greatly misleading.]
> 
>>> In other words: equal unless you have good reason to be
>>> building older materials.
>>> 
>>> 
>>> So we see that your poudriere bulk builds are based on clang 11,
>>> not clang 12, according to the log file:
>>> 
>>> _CCVERSION_921dbbb2=FreeBSD clang version 11.0.1 (git@github.com:llvm/llvm-project.git llvmorg-11.0.1-0-g43ff75f2c3fe) Target: aarch64-unknown-freebsd14.0 Thread model: posix InstalledDir: /usr/bin
>>> _ALTCCVERSION_921dbbb2=none
>>> _CXXINTERNAL_acaad9ca=FreeBSD clang version 11.0.1 (git@github.com:llvm/llvm-project.git llvmorg-11.0.1-0-g43ff75f2c3fe) Target: aarch64-unknown-freebsd14.0 Thread model: posix InstalledDir: /usr/bin "/usr/bin/ld" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld-elf.so.1" "--enable-new-dtags" "-o" "a.out" "/usr/lib/crt1.o" "/usr/lib/crti.o" "/usr/lib/crtbegin.o" "-L/usr/lib" "/dev/null" "-lc++" "-lm" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "/usr/lib/crtend.o" "/usr/lib/crtn.o"
>>> . . .
>>> _OBJC_CCVERSION_921dbbb2=FreeBSD clang version 11.0.1 (git@github.com:llvm/llvm-project.git llvmorg-11.0.1-0-g43ff75f2c3fe) Target: aarch64-unknown-freebsd14.0 Thread model: posix InstalledDir: /usr/bin
>>> . . .
>> 
>> I forgot to quote another OSVERSION:
>> 
>> . . .
>> ARCH=aarch64
>> OPSYS=FreeBSD
>> _OSRELEASE=14.0-CURRENT
>> OSREL=14.0
>> OSVERSION=1400019
>> . . .
>> 
>>> -- The C compiler identification is Clang 11.0.1
>>> -- The CXX compiler identification is Clang 11.0.1
>>> -- The ASM compiler identification is Clang
>>> . . .
>> 
> 
> 

I'll note that your use of:

# poudriere jail -c -j main -m null -M /usr/local/poudriere/poudriere-system -S /usr/src -v 14.0-CURRENT

where /usr/src is the same as used to build your live
boot system, means that updating /usr/src to a vintage
with:

OSVERSION: 1400024

also means that /usr/src is no longer consistent with with
system in /usr/local/poudriere/poudriere-system unless
/usr/local/poudriere/poudriere-system has also been updated.

You are using a older system and older toolchain to build
based on a new /usr/src that does not match what is in
/usr/local/poudriere/poudriere-system but the build
activity is happening in that older system environment.

It is an incoherent combination. It is not surprising that
it does not behave well.

I'd update /etc/src to a vintage that has the workaround
for the lang/rust build problem, rebuild and install the
HOST OS, boot it, install the same OS version into:

/usr/local/poudriere/poudriere-system

and then rebuild all the ports to be sure that none are
still based on an incoherent combination of materials.

My guess is that you want poudriere-system tracking the live
system and its /usr/src/ . That would mean that just after
booting a new system update that was based on an updated
/usr/src/ you would then continue updating via something like:

# cd /usr/src
# make installworld DESTDIR=/usr/local/poudriere/poudriere-system DB_FROM_SRC=1
# make distrib-dirs DESTDIR=/usr/local/poudriere/poudriere-system DB_FROM_SRC=1
# make distribution DESTDIR=/usr/local/poudriere/poudriere-system DB_FROM_SRC=1
# make -DBATCH_DELETE_OLD_FILES delete-old DESTDIR=/usr/local/poudriere/poudriere-system DB_FROM_SRC=1

Sometime after after a poudriere bulk run completes:

# make -DBATCH_DELETE_OLD_FILES delete-old-libs DESTDIR=/usr/local/poudriere/poudriere-system DB_FROM_SRC=1

(That sequence is  biased to poudriere use instead of to a
chroot environment that has been tailored and needs the
tailoring preserved.)


Note: If one wants to have the likes of:

/usr/local/poudriere/poudriere-system

be based on older system versions sometimes, then a different -S PATH
needs to be used than for the boot system, say:

# poudriere jail -c -j main -m null -M /usr/local/poudriere/poudriere-system -S /usr/oldersrc -v 14.0-CURRENT

Then updates of poudriere-system would be more like:
(presuming that you have already established /usr/oldersrc)

# cd /usr/oldersrc/
# ??? do whatever to get /usr/oldersrc/ to have the commit desired ???
# make buildworld
# make installworld DESTDIR=/usr/local/poudriere/poudriere-system DB_FROM_SRC=1
# make distrib-dirs DESTDIR=/usr/local/poudriere/poudriere-system DB_FROM_SRC=1
# make distribution DESTDIR=/usr/local/poudriere/poudriere-system DB_FROM_SRC=1
# make -DBATCH_DELETE_OLD_FILES delete-old DESTDIR=/usr/local/poudriere/poudriere-system DB_FROM_SRC=1

Sometime after after a poudriere bulk run completes:

# make -DBATCH_DELETE_OLD_FILES delete-old-libs DESTDIR=/usr/local/poudriere/poudriere-system DB_FROM_SRC=1


Mistake apology:

Back 0n 2021-June-23 I had written:

QUOTE
So your jail's OSVERSION is older than the environment
that it is running in. (Unlikely to contribute to the
0xA5A5A5A5u as far as I can tell.)
END QUOTE

The "Unlikely . . ." was just wrong. Sorry.

The reality is that such is incoherent, given the use of
the same /usr/src/ code in poudriere as was used to update
the booting system. The update from clang 11 to clang 12
between make the combination even more likely to be a
problem. /usr/local/poudriere/poudriere-system needs to
track the changes as well.

===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)