From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28690 invoked by alias); 12 Dec 2002 14:24:17 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 28682 invoked from network); 12 Dec 2002 14:24:15 -0000 Received: from unknown (HELO mailserv.rz.fh-muenchen.de) (129.187.244.239) by sources.redhat.com with SMTP; 12 Dec 2002 14:24:15 -0000 Received: (qmail 29524 invoked by uid 4306); 12 Dec 2002 14:26:32 -0000 Date: Thu, 12 Dec 2002 06:24:00 -0000 From: Roland Egger To: Max Cc: gdb@sources.redhat.com Subject: Re: Gdb LD_LIBRARY_PATH Problem Message-ID: <20021212152632.A27985@tarantel.rz.fh-muenchen.de> References: <3DF89216.4050203@machsim.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <3DF89216.4050203@machsim.com> X-SW-Source: 2002-12/txt/msg00188.txt.bz2 Hi, hmm I used the LD_LIBRARY_PATH several times with gdb and it worked. How did you see that the LD_LIBRARY_PATH is correct before the last lib? Did you need it before or is the LD_LIBRARY_PATH only needed for the last library? I think you haven't made a mistake by setting the LD_LIBRARY_PATH but perhaps you can check again if you set it for e.g. lib is in /home/test/opt/lib csh compatible shells with setenv LD_LIBRARY_PATH /home/test/opt/lib or for bourne shell compatible shells LD_LIBRARY_PATH=/home/test/opt/lib export LD_LIBRARY_PATH Perhaps that could help? Bye Roland On Thu, Dec 12, 2002 at 02:41:42PM +0100, Max wrote: > Hi, > > I have an qt application whichis linked against a home made .so file. > While app runs perfectly in the shell, it is not possible to run it in > gdb due to the error : > > error while loading shared libraries: libDCcom.so > > I have gone thru all the posts in the mailing lists and newsgroups and > google, but I still don't have a solution. > > When I do "set env LD_DEBUG=libs", I find something interesting. Gdb > finds all libraries currently till the last one which is libDCcom.so. > When gdb starts looking for this, it notices that the application has > RPATH ( which is correct ) , searches the RPATHS and can not find it > there which is also correct since the .so is not there, it is in the > LD_LIBRARY_PATH. > > After looking for RPATH, gdb searches thru the LD_LIBRARY_PATH but !!!! > this time the LD_LIBRARY_PATH is incorrect !!!! For all the searches > before this shared object, the correct LD_LIBRARY_PATH is used however > for the last .so , the LD_LIBRARY_PATH is broken. > > Can anybody give me a hint ? > > Max. > > Gdb : gdb-5.0-148 > Suse 7.3, i386 > > >