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

From: Matthias Apitz <guru_at_unixarea.de>
Date: Wed, 20 Sep 2023 07:58:10 UTC
El día miércoles, septiembre 20, 2023 a las 08:56:28 +0200, Dimitry Andric escribió:

> On 20 Sep 2023, at 04:47, KIRIYAMA Kazuhiko <kiri@truefc.org> wrote:
> > 
> > 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
> 
> By any chance, did you run "make delete-old" *before* running make installworld? Because you should only delete old libraries, such as libdialog.so.9, after you have successfully completed the installation. (In fact, you can even postpone deleting old libraries until much later, it's really only needed to get your system "squeaky clean".)
> 
> -Dimitry

To the OP:

Where was the 'make buildworld' run before? On the same host?

I'm asking because I faced a similar problem while updating a server
from 13-CURRENT to 14-CURRENT (from git head on August 6) You can read
the thread here:
https://lists.freebsd.org/archives/freebsd-current/2023-August/004121.html

In my case (as my investigation found out) all the update process

make buildworld
make buildkernel
...
make installkernel
reboot
make installworld
make delete...

went fine as it should. But when I later installed the same
kernel+world(!!!) into a directory to create of this a bootable image with:

make installworld DESTDIR=/home/...

this failed with the same problem you describe. The underlying problem
was/is that 'make buildworld' puts some tools into a subdir
/usr/obj/usr/src/amd64.amd64/tmp/legacy/bin/
i.e. tools from the system and from the moment where/when you run
make buildworld; and these old tools later on make installworld DESTDIR=/home/...
can not find there (older) shared libs.

The solution in my case was to rerun 'make buildworld' on the
now already updated system.

Maybe this helps you to understand your issue.

	matthias

-- 
Matthias Apitz, ✉ guru@unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub