RE: make installworld filed with "Required library libdialog.so.9 not found"

From: Mark Millard <marklmi_at_yahoo.com>
Date: Wed, 20 Sep 2023 05:08:50 UTC
KIRIYAMA Kazuhiko <kiri_at_truefc.org> wrote on
Date: Wed, 20 Sep 2023 02:47:28 UTC :

> I'm updating 15.0-CURRENT (main-n265415-b2bd87bb01a9) from
> 14.0-CURRENT, but make installworld filed with "Required
> library libdialog.so.9 not found" as follows:
> 
> root@vm:/usr/src # make installworld
> make[1] warning: /usr/src/: Read-only file system.
> make[1]: "/usr/obj/usr/src/amd64.amd64/toolchain-metadata.mk" line 1: Using cached toolchain metadata from build at vm.truefc.org on Tue Sep 19 12:43:15 JST 2023
> --------------------------------------------------------------
> >>> Install check world
> --------------------------------------------------------------
> mkdir -p /tmp/install.bRcisFAS
> progs=$(for prog in [ awk cap_mkdb cat chflags chmod chown cmp cp date echo egrep find grep id install ln make mkdir mtree mv pwd_mkdb rm sed services_mkdb sh sort strip sysctl test time true uname wc tzsetup makewhatis ; do if progpath=`env PATH=/usr/obj/usr/src/amd64.amd64/tmp/bin:/usr/obj/usr/src/amd64.amd64/tmp/usr/sbin:/usr/obj/usr/src/amd64.amd64/tmp/usr/bin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/bin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/bin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/libexec::/sbin:/bin:/usr/sbin:/usr/bin which $prog`; then echo $progpath; else echo "Required tool $prog not found in PATH ("/usr/obj/usr/src/amd64.amd64/tmp/bin:/usr/obj/usr/src/amd64.amd64/tmp/usr/sbin:/usr/obj/usr/src/amd64.amd64/tmp/usr/bin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/bin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/bin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr!
> /libexec::/sbin:/bin:/usr/sbin:/usr/bin")." >&2; exit 1; fi; done); if [ -z "" ] ; then libs=$(ldd -f "%o %p\n" -f "%o %p\n" $progs 2>/dev/null | sort -u | grep -Ev '\[.*]' | while read line; do set -- $line; if [ "$2 $3" != "not found" ]; then echo $2; else echo "Required library $1 not found." >&2; exit 1; fi; done); fi; cp $libs $progs /tmp/install.bRcisFAS
> Required library libdialog.so.9 not found.
> *** Error code 1
> 
> Stop.
> make[1]: stopped in /usr/src
> *** Error code 1
> 
> Stop.
> make: stopped in /usr/src
> 
> 
> According to [1], this causes
> usr.sbin/tzsetup/Makefile.depend.options, but already fixed
> this. libdialog.so.10 has been built in
> /usr/obj/usr/src/amd64.amd64/gnu/lib/libdialog/:
> 
> root@vm:/usr/src # find /usr/obj -name "libdialog.*"
> /usr/obj/usr/src/amd64.amd64/gnu/lib/libdialog/libdialog.so
> /usr/obj/usr/src/amd64.amd64/gnu/lib/libdialog/libdialog.so.10
> /usr/obj/usr/src/amd64.amd64/gnu/lib/libdialog/libdialog.so.10.debug
> /usr/obj/usr/src/amd64.amd64/gnu/lib/libdialog/libdialog.a
> /usr/obj/usr/src/amd64.amd64/gnu/lib/libdialog/libdialog.so.10.full
> /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/debug/usr/lib/libdialog.so.10.debug
> /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/debug/usr/lib32/libdialog.so.10.debug
> /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/libdialog.so.10
> /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/libdialog.a
> /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/libdialog.so
> /usr/obj/usr/src/amd64.amd64/tmp/usr/lib32/libdialog.so.10
> /usr/obj/usr/src/amd64.amd64/tmp/usr/lib32/libdialog.so
> /usr/obj/usr/src/amd64.amd64/tmp/usr/lib32/libdialog.a
> /usr/obj/usr/src/amd64.amd64/obj-lib32/gnu/lib/libdialog/libdialog.so.10
> /usr/obj/usr/src/amd64.amd64/obj-lib32/gnu/lib/libdialog/libdialog.a
> /usr/obj/usr/src/amd64.amd64/obj-lib32/gnu/lib/libdialog/libdialog.so
> /usr/obj/usr/src/amd64.amd64/obj-lib32/gnu/lib/libdialog/libdialog.so.10.full
> /usr/obj/usr/src/amd64.amd64/obj-lib32/gnu/lib/libdialog/libdialog.so.10.debug
> root@vm:/usr/src # 
> 
> What should I do ?
> 
> Regards
> 
> [1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265954

Hmm. Starting from a version prior to 2021-10-27's

QUOTE
author John Baldwin <jhb@FreeBSD.org> 2021-10-27 16:30:24 +0000
committer John Baldwin <jhb@FreeBSD.org> 2021-10-27 16:30:24 +0000
commit 2f7f8995367b3fe1a9e2bf34be6f0684963eed02 (patch)
tree 9e09841d915d546711fc3080771f8c7032baeae2 /gnu/lib/libdialog
parent aa15f7df644a5ec0eff84f077920432d5dc81d97 (diff)
. . .

libdialog: Bump shared library version to 10.
The upgrade to libdialog 1.3 included changes to the ABI. Bump libdpv to 3 since it links against libdialog. 
END QUOTE

and jumping in one step to 2023-Sep-18's b2bd87bb01a9 is a big jump
inside main (somewhat udner 2 years). Adding an accidental removal
of old libraries too soon would make it messier for sure.

I started out expecting to point you at artifact from:

https://artifact.ci.freebsd.org/snapshot/main/

to extract copies of what what you are missing. But that goes
back only to 2023-Jan-01, long after the 9 -> 10 for libdialog .
(I avoid being so far out of sync that artifacts are not
available for the starting vintage's time frame.)

FreeBSD 13.* did the 8 -> 9 libdialog transition in:

QUOTE
author John Baldwin <jhb@FreeBSD.org> 2021-02-02 01:09:33 +0000
committer John Baldwin <jhb@FreeBSD.org> 2021-02-05 01:51:45 +0000
commit 6e1fe6d26ea2939656c8286ccbd105a89d3349a3 (patch)
tree 890f1f3b243a3faced7ca3d6113cc328303abdfe /gnu/lib/libdialog
parent e4a6846c34d2bf5365199411a5ad680462ab8f9d (diff)
. . .

Bump shared library versions after ncurses bump in 13.
A few shared libraries in the base system link against ncurses. An upgrade from a 12.x host to 13 results in ABI breakage for existing binaries since the newer versions of these libraries link against the newer ncurses while the binary itself links against the older ncurses. For example, dialog4ports built on 12.x sometimes crashes on 13 since it depends on libdialog which links against ncurses internally. (cherry picked from commit 0b7f1af804f06a285717b490bef80e24648adcbe)
END QUOTE

But I'm not sure if libdialog.so* and realted files extracted
from a 13.*-RELEASE from:

http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/amd64/13.0-RELEASE/base.txz

could help or not. (Wrong target triple vs. 14, for example.)

I'm not aware of anyplace to get 14.0-CURRENT files with such a vintage,
unless you have old copies around to extract from. Too bad the file(s)
ended up missing before the transition to new files was complete
(including updated packages/ports and such, if any, not just system
files), thus avoiding references to the old files.

(There also could be the issue of non-debug build vs. debug-build
matching.)

I'm left with using, say, a 13.0-RELEASE to build an old 14.0-CURRENT
vintage similar to your starting point and then copying the file(s)
needed from that 14.0-CURRENT build.

Hopefully there is a nicer to deal with answer.

===
Mark Millard
marklmi at yahoo.com