Re: dig from dns/bind-tools gets: ld-elf.so.1: /usr/local/lib/libidn2.so.0: version IDN2_0.0.0 required by /usr/local/bin/dig not defined

From: Mark Millard <marklmi_at_yahoo.com>
Date: Thu, 15 Feb 2024 18:12:44 UTC
Piotr Smyrak <ps.ports_at_smyrak.com> wrote on
Date: Thu, 15 Feb 2024 10:26:48 UTC :

On Wed, 14 Feb 2024 17:32:18 -0800
Mark Millard <marklmi@yahoo.com> wrote:
> 
> > I did:
> > 
> > # pkg install bind-tools
> > . .
> > # dig srv _http._tcp.portsnap.FreeBSD.org
> > ld-elf.so.1: /usr/local/lib/libidn2.so.0: version IDN2_0.0.0 required
> > by /usr/local/bin/dig not defined
> > 
> > So, next:
> > 
> > # pkg install libidn2
> > # dig srv _http._tcp.portsnap.FreeBSD.org
> > 
> > and that worked. Looks like a dependency is
> > missing.
> > 
> > (Why portsnap?: Just helping someone using 12.4-RELEASE
> > that wanted to use portsnap but was having a problem.)
> 
> IDN options is by default on in the port of bind-tools. It shall
> register a dependendency automatically though.

dns/bind-tools got a build-time dependency but not a
dependency for run-time use. So pkg install of
bind-tools did not automatically install the needed
libidn2 package.

For reference, for the build-time dependency working:

===> Returning to build of bind-tools-9.18.20_2
===> bind-tools-9.18.20_2 depends on shared library: libidn2.so - not found
===> Installing existing package /packages/All/libidn2-2.3.4_2.pkg
[main-arm64-default-job-10] Installing libidn2-2.3.4_2...
[main-arm64-default-job-10] `-- Installing libunistring-1.1...
[main-arm64-default-job-10] `-- Extracting libunistring-1.1: .......... done
[main-arm64-default-job-10] Extracting libidn2-2.3.4_2: .......... done
===> bind-tools-9.18.20_2 depends on shared library: libidn2.so - found (/usr/local/lib/libidn2.so)
===> Returning to build of bind-tools-9.18.20_2

It is just the run-time dependency that is missing
for how bind-tools is built.

===
Mark Millard
marklmi at yahoo.com