From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27598 invoked by alias); 19 Dec 2005 17:51:51 -0000 Received: (qmail 27589 invoked by uid 22791); 19 Dec 2005 17:51:49 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Mon, 19 Dec 2005 17:51:48 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1EoPAn-0006qq-KI; Mon, 19 Dec 2005 12:51:45 -0500 Date: Mon, 19 Dec 2005 17:51:00 -0000 From: Daniel Jacobowitz To: yinglcs@aim.com Cc: gdb@sources.redhat.com Subject: Re: can't find shared libraries in gdb Message-ID: <20051219175145.GA26309@nevyn.them.org> Mail-Followup-To: yinglcs@aim.com, gdb@sources.redhat.com References: <8C7D2D9C4891CA2-1834-6F6C@MBLK-M10.sysops.aol.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8C7D2D9C4891CA2-1834-6F6C@MBLK-M10.sysops.aol.com> User-Agent: Mutt/1.5.8i X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2005-12/txt/msg00160.txt.bz2 On Mon, Dec 19, 2005 at 12:35:41PM -0500, yinglcs@aim.com wrote: > Hi, > I run my program under Gdb. But i get the following error saying it > can't find the shared libraries: > (gdb) run > Starting program: /home/yinglcs/src/firefox1.5/dist/bin/firefox-bin > /home/yinglcs/src/firefox1.5/dist/bin/firefox-bin: error while loading > shared libraries: libmozjs.so: cannot open shared object file: No such > file or directory > > But I check there is a soft link in the same directory as the > executable and it points to a vaild file. > Can you please tell me how to fix this problem so that I can run my > problem under gdb? > > [yinglcs@localhost bin]$ ls -la libmozjs.so > lrwxrwxrwx 1 yinglcs yinglcs 24 Dec 15 09:47 libmozjs.so -> > ../../js/src/libmozjs.so* > > [yinglcs@localhost bin]$ ls -la ../../js/src/libmozjs.so > -rwxrwxr-x 1 yinglcs yinglcs 1845285 Dec 15 09:47 > ../../js/src/libmozjs.so* Does it run outside of GDB? If so, it is likely that your shell startup files (.profile, .bashrc, et cetera) are clobbering your LD_LIBRARY_PATH settings. -- Daniel Jacobowitz CodeSourcery, LLC