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

From: Tomoaki AOKI <junchoon_at_dec.sakura.ne.jp>
Date: Wed, 20 Sep 2023 18:14:02 UTC
On Wed, 20 Sep 2023 18:16:47 +0200
Dimitry Andric <dim@FreeBSD.org> wrote:

> On 20 Sep 2023, at 15:02, KIRIYAMA Kazuhiko <kiri@truefc.org> wrote:
> > 
> > On Wed, 20 Sep 2023 15:56:28 +0900,
> > Dimitry Andric wrote:
> ...
> > Fortunately old binaries exist and `cp
> > /past_created/usr/src/amd64.amd64/tmp/usr/lib/libdialog.so.9
> > /usr/lib' then go forward but stopped at stand/i386/boot2:
> > 
> > ===> stand/i386/boot2 (install)
> > objcopy -S -O binary boot1.out boot1
> > objcopy -S -O binary boot2.out boot2.bin
> > btxld -v -E 0x2000 -f bin -b /usr/obj/usr/src/amd64.amd64/stand/i386/btx/btx/btx -l boot2.ldr  -o boot2.ld -P 1 boot2.bin
> > make[6]: exec(btxld) failed (No such file or directory)
> > *** Error code 1
> > 
> > Stop.
> > make[6]: stopped in /usr/src/stand/i386/boot2
> 
> As far as I remember, this typically happens when some sources are touched, and it is attempting to rebuild the boot loader binaries at install time. This should normally not happen, as everything has been built during buildworld already. But this problem sometimes occurs when system clocks are out of sync, or when files in the object tree get their dates modified for other reasons.

IIRC, this happenes on the scenario below.

 buildword
 buildkernel
 modify something related with only kernel or kernel modules
 buildkernel aggain
 installkernel
 reboot
 etcpudate -p
 installworld, then, bang! start rebuiding boot codes and loaders.


> 
> In this particular case it is trying to re-link btx using btxld, but since that tool is only available during buildworld, it cannot find it. I don't know of a good way to fix this, except maybe to run a buildworld with WITHOUT_CLEAN, e.g.:
> 
> make -DWITHOUT_CLEAN -j <num_jobs> buildworld
> 
> That should rebuild all things that need rebuilding without doing excessive cleaning, and from there you can attempt to installworld again.
> 
> -Dimitry


-- 
Tomoaki AOKI    <junchoon@dec.sakura.ne.jp>