Skip site navigation (1)Skip section navigation (2)
Date:      Sun,  7 Sep 2003 13:44:53 +1000 (EST)
From:      Edwin Groothuis <edwin@mavetju.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   bin/56549: [patch] rtld.c - give more info on missing shared libraries
Message-ID:  <20030907034453.B15CE6A7101@k7.mavetju>
Resent-Message-ID: <200309070350.h873oCJ1096000@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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@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:


Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030907034453.B15CE6A7101>