bin/56549: [patch] rtld.c - give more info on missing shared libraries

Edwin Groothuis edwin at mavetju.org
Sat Sep 6 20:50:16 PDT 2003


>Number:         56549
>Category:       bin
>Synopsis:       [patch] rtld.c - give more info on missing shared libraries
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Sep 06 20:50:12 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Edwin Groothuis
>Release:        FreeBSD 4.8-RELEASE i386
>Organization:
-
>Environment:
System: FreeBSD k7.mavetju 4.8-RELEASE FreeBSD 4.8-RELEASE #0: Sun Aug 17 16:04:25 EST 2003 edwin at k7.mavetju:/usr/src/sys/compile/k7 i386

>Description:

When you try to start a program with a missing library, this is the
error message you get:

    /usr/libexec/ld-elf.so.1: Shared object "libintl.so.4" not found

You can find out that it is missing by using ldd (and exactly which
other library it requires by running ldd with the patch in bin/37448).

But yes, life could be so much nicer if it would tell you who was
missing it:

    /usr/libexec/ld-elf.so.1: Shared object "libintl.so.4" not found, needed by "/usr/X11R6/lib/libgnomemm-1.2.so.10"

At least I know I have to fight with libgnomemm instead of with the
original program.

>How-To-Repeat:

See above

>Fix:

--- rtld.c?rev=1.87	Sun Aug 17 18:06:00 2003
+++ rtld.c	Sun Sep  7 13:36:02 2003
@@ -839,7 +839,11 @@
       (pathname = search_library_path(name, STANDARD_LIBRARY_PATH)) != NULL)
 	return pathname;
 
-    _rtld_error("Shared object \"%s\" not found", name);
+    if (refobj != NULL)
+	_rtld_error("Shared object \"%s\" not found, needed by \"%s\"", name, refobj->path);
+    else
+	_rtld_error("Shared object \"%s\" not found", name);
+
     return NULL;
 }
 
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list