Re: pkg vs uname troubles after upgrade to 14 (lld not rebuilt issue? (X_)LINKER_FREEBSD_VERSION still 13 based?)

From: Mark Millard <marklmi_at_yahoo.com>
Date: Tue, 16 Feb 2021 19:28:33 -0800
On 2021-Feb-16, at 15:37, Mark Millard <marklmi at yahoo.com> wrote:

> On 2021-Feb-16, at 11:49, Brandon Bergren <bdragon at FreeBSD.org> wrote:
> 
>> It looks like there were recently some fixes to release.sh, that just got backported to 13. I wonder if the problem is the packages themselves being misbuilt.
>> 
>> https://cgit.freebsd.org/src/commit/release?h=releng/13.0&id=4689ab1eab624d1a551a5a8f109383ea18eeba20
> 
> release/release.sh and release/tools/arm.subr are not used
> for self-building ports as far as I know. Steve Kargl's
> example was: self-built pkg, then portmaster, then used
> portmaster to build the rest of his ports, and not in/for
> an arm context. release/release.sh would have to contribute
> as a side effect of its prior use in some way for that
> sequence, if I understand right.
> 
>> 
>> On Tue, Feb 16, 2021, at 12:20 PM, Mark Millard wrote:
>>> There are other reports of a:
>>> 
>>> pkg: Warning: Major OS version upgrade detected.  Running "pkg 
>>> bootstrap -f" recommended

I think that I found something that might contribute, shown
here for my META_MODE build context . . .

Builds that do nor force being from scratch tend to:

make[1]: "/usr/fbsd/mm-src/Makefile.inc1" line 339: SYSTEM_COMPILER: Determined that CC=cc matches the source tree.  Not bootstrapping a cross-compiler.
make[1]: "/usr/fbsd/mm-src/Makefile.inc1" line 344: SYSTEM_LINKER: Determined that LD=ld matches the source tree.  Not bootstrapping a cross-linker.

But in my build environment, after upgrading to 14 and
doing multiple updates as 14 has progressed, I find:

# ld -v
LLD 11.0.1 (FreeBSD llvmorg-11.0.1-0-g43ff75f2c3fe-1300007) (compatible with GNU linkers)

Note the "1300007". This goes along with:

# Meta data file /usr/obj/amd64_clang/amd64.amd64/usr/fbsd/mm-src/amd64.amd64/toolchain-metadata.mk.meta
CMD _at_: > toolchain-metadata.mk
CMD _at_echo ".info Using cached toolchain metadata from build at $(hostname) on $(date)"  > toolchain-metadata.mk
CMD _at_echo "_LOADED_TOOLCHAIN_METADATA=t" >> toolchain-metadata.mk
CMD _at_echo "COMPILER_VERSION=110001" >> toolchain-metadata.mk
CMD _at_echo "X_COMPILER_VERSION=110001" >> toolchain-metadata.mk
CMD _at_echo "COMPILER_TYPE=clang" >> toolchain-metadata.mk
CMD _at_echo "X_COMPILER_TYPE=clang" >> toolchain-metadata.mk
CMD _at_echo "COMPILER_FEATURES=c++11 c++14 c++17 retpoline init-all" >> toolchain-metadata.mk
CMD _at_echo "X_COMPILER_FEATURES=c++11 c++14 c++17 retpoline init-all" >> toolchain-metadata.mk
CMD _at_echo "COMPILER_FREEBSD_VERSION=1400000" >> toolchain-metadata.mk
CMD _at_echo "X_COMPILER_FREEBSD_VERSION=1400000" >> toolchain-metadata.mk
CMD _at_echo "COMPILER_RESOURCE_DIR=/usr/lib/clang/11.0.1" >> toolchain-metadata.mk
CMD _at_echo "X_COMPILER_RESOURCE_DIR=/usr/lib/clang/11.0.1" >> toolchain-metadata.mk
CMD _at_echo "LINKER_VERSION=110001" >> toolchain-metadata.mk
CMD _at_echo "X_LINKER_VERSION=110001" >> toolchain-metadata.mk
CMD _at_echo "LINKER_FEATURES= build-id ifunc retpoline ifunc-noplt" >> toolchain-metadata.mk
CMD _at_echo "X_LINKER_FEATURES= build-id ifunc retpoline ifunc-noplt" >> toolchain-metadata.mk
CMD _at_echo "LINKER_TYPE=lld" >> toolchain-metadata.mk
CMD _at_echo "X_LINKER_TYPE=lld" >> toolchain-metadata.mk
CMD _at_echo "LINKER_FREEBSD_VERSION=1300007" >> toolchain-metadata.mk
CMD _at_echo "X_LINKER_FREEBSD_VERSION=1300007" >> toolchain-metadata.mk
CMD _at_echo ".export COMPILER_VERSION  COMPILER_TYPE  COMPILER_FEATURES  COMPILER_FREEBSD_VERSION  COMPILER_RESOURCE_DIR  LINKER_VERSION  LINKER_FEATURES  LINKER_TYPE  LINKER_FREEBSD_VERSION" >> toolchain-metadata.mk
CMD _at_echo ".export X_COMPILER_VERSION X_COMPILER_TYPE X_COMPILER_FEATURES X_COMPILER_FREEBSD_VERSION X_COMPILER_RESOURCE_DIR X_LINKER_VERSION X_LINKER_FEATURES X_LINKER_TYPE X_LINKER_FREEBSD_VERSION" >> toolchain-metadata.mk
CWD /usr/obj/amd64_clang/amd64.amd64/usr/fbsd/mm-src/amd64.amd64
TARGET toolchain-metadata.mk
-- command output --
. . .

So (X_)COMPILER_FREEBSD_VERSION were updated to be 14 based
but (X_)LINKER_FREEBSD_VERSION still are based on 13: not
automatically updated.

I do not know what the various consequences might be but
sticking at a 13 based figure seems odd.

===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)
Received on Wed Feb 17 2021 - 02:28:41 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:27 UTC