From owner-freebsd-bugs@FreeBSD.ORG Sat Sep 6 20:50:15 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CBE5816A4BF for ; Sat, 6 Sep 2003 20:50:15 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 17EF743FF3 for ; Sat, 6 Sep 2003 20:50:13 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h873oCUp096001 for ; Sat, 6 Sep 2003 20:50:12 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h873oCJ1096000; Sat, 6 Sep 2003 20:50:12 -0700 (PDT) Resent-Date: Sat, 6 Sep 2003 20:50:12 -0700 (PDT) Resent-Message-Id: <200309070350.h873oCJ1096000@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Edwin Groothuis Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EDB8716A4BF for ; Sat, 6 Sep 2003 20:45:01 -0700 (PDT) Received: from mag.barnet.com.au (mag.barnet.com.au [218.185.88.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9C8A843FE5 for ; Sat, 6 Sep 2003 20:45:00 -0700 (PDT) (envelope-from edwin@mavetju.org) Received: from extmail.barnet.com.au (tim.direct.int.barnet.com.au [10.10.10.2]) by mag.barnet.com.au (Postfix) with ESMTP id 06BD44834 for ; Sun, 7 Sep 2003 13:44:56 +1000 (EST) Received: from k7.mavetju (tim.barnet.com.au [218.185.88.1]) by extmail.barnet.com.au (Postfix) with ESMTP id AC7A91E10 for ; Sun, 7 Sep 2003 13:44:54 +1000 (EST) Received: by k7.mavetju (Postfix, from userid 1001) id B15CE6A7101; Sun, 7 Sep 2003 13:44:53 +1000 (EST) Message-Id: <20030907034453.B15CE6A7101@k7.mavetju> Date: Sun, 7 Sep 2003 13:44:53 +1000 (EST) From: Edwin Groothuis To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/56549: [patch] rtld.c - give more info on missing shared libraries X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Edwin Groothuis List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2003 03:50:16 -0000 >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: