Is any way to detect *'version '*'required by '*'not defined' ?

From: Rozhuk Ivan <rozhuk.im_at_gmail.com>
Date: Sun, 16 Mar 2025 21:13:42 UTC
Hi!

I am looking for a way to find broken lib and apps that cause err messages like that:
% /usr/local/share/chromium/chrome
ld-elf.so.1: /usr/local/lib/libxkbcommon.so.0: version V_0.5.0 required by /usr/local/share/chromium/chrome not defined

For libs this works fine (some times it coredump on some libs):
/libexec/ld-elf.so.1 -d ${LIB_NAME}

But for executables - it run app:
% /libexec/ld-elf.so.1 -d /usr/local/bin/idn
libidn 1.42
Copyright 2002-2024 Simon Josefsson.
GNU Libidn is free software with ABSOLUTELY NO WARRANTY.  For more
information about these matters, see <https://www.gnu.org/licenses/>.
Type each input string on a line by itself, terminated by a newline character.

idn: tld_check_4z: Missing input
Exit 1