Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Mar 2025 14:19:17 -0700
From:      Craig Leres <leres@freebsd.org>
To:        Rozhuk Ivan <rozhuk.im@gmail.com>, freebsd-hackers <freebsd-hackers@freebsd.org>
Subject:   Re: Is any way to detect *'version '*'required by '*'not defined' ?
Message-ID:  <3ab047d1-1b1c-44d3-a766-d2f0fd00446a@freebsd.org>
In-Reply-To: <20250316231342.62fab6f8@rimwks.local>
References:  <20250316231342.62fab6f8@rimwks.local>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------5npgunHY8RREUkZfaLNnTi1q
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

On 3/16/25 14:13, Rozhuk Ivan wrote:
> 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

I wrote the attached script once upon a time to find binaries and 
libraries that were missing shared libraries. It uses ldd. Does it do 
what you want?

		Craig
--------------5npgunHY8RREUkZfaLNnTi1q
Content-Type: text/plain; charset=UTF-8; name="brokensharedlib"
Content-Disposition: attachment; filename="brokensharedlib"
Content-Transfer-Encoding: base64

IyEvYmluL3NoCiMgQCgjKSAkSWQkIChMQkwpCiMKIyBMb29rIGZvciBkeW5hbWljIGJpbmFy
aWVzIHRoYXQgYXJlIG1pc3Npbmcgc2hhcmVkIGxpYnJhcmllcy4KIyB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CQkJZmkKCQkJIyBQcm9iYWJseSBjYW4ndCBoYXBwZW4KCQkJ
ZWNobyAiJHtwcm9nfTogTm8gc3VjaCBmaWxlIG9yIGRpcmVjdG9yeSAoWFhYKTogJHtmfSIK
CQlkb25lCgkJY29udGludWUKCWZpCglpZiBbIC1yICR7YX0gXTsgdGhlbgoJCWxpc3Q9IiR7
bGlzdH0gJHthfSIKCQljb250aW51ZQoJZmkKCWlmIFsgLWYgJHthfSBdOyB0aGVuCgkJZWNo
byAiJHtwcm9nfTogTm90IHJlYWRhYmxlOiAke2F9IgoJCWNvbnRpbnVlCglmaQoJZWNobyAi
JHtwcm9nfTogQ2FuJ3QgZmluZDogJHthfSIKZG9uZQoKIyBwcm9jZXNzIGxpc3Qgb2YgY2Fu
ZGlkYXRlcwpsZGQgJHtsaXN0fSAyPiYxIHwgXAogICAgYXdrICdCRUdJTiB7CgkgICAgZmls
ZSA9ICI/OiIKCX0KCSQyID09ICI9PiIgewoJCWlmICgkMCB+IC9ub3QgZm91bmQvKSB7CgkJ
CSIvdXNyL2Jpbi9maWxlICIgZmlsZSB8IGdldGxpbmUgb3V0CgkJCSMgU3VwcHJlc3MgbGlu
dXggYmluYXJpZXMKCQkJaWYgKG91dCAhfiAvaW50ZXJwcmV0ZXIvIHx8IG91dCAhfiAvW0xs
XWludXgvKSB7CgkJCQlwcmludCBmaWxlICQwCgkJCX0KCQl9CgkJbmV4dAoJfQoJTkYgPT0g
MSB7CgkJZmlsZSA9ICQxCgkJc3ViKCI6JCIsICIiLCBmaWxlKQoJfScK

--------------5npgunHY8RREUkZfaLNnTi1q--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3ab047d1-1b1c-44d3-a766-d2f0fd00446a>