Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <20050530020950.65014.qmail@web31711.mail.mud.yahoo.com> Date: Sun, 29 May 2005 19:09:50 -0700 (PDT) From: Sunil Subject: Re: dlopen doesn't use LD_LIBRARY_PATH ( was dlopen and cygcheck inconsistency) To: cygwin AT cygwin DOT com In-Reply-To: 6667 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes So, this issue is still un-resolved. Contrary to what cgf say, dlopen doesn't care about LD_LIBRARY_PATH while opening dependent DLLs of its argument. It opens the DLL if the depedent DLLs are found in the $PATH. I think you meant if I do dlopen("c.dll",..) it will try to find it in LD_LIBRARY_PATH (plus /usr/lib from 1.5.17). what happens in this case: dlopen("/a/b/c.dll",...) and c.dll depends on /a/b/d.dll. This dlopen of c.dll fails if /a/b is not in PATH, although it is in LD_LIBRARY_PATH. I don't think this is linux behaviour. Thanks, -Sunil --- Sunil wrote: > Hi, > > cygcheck also searches the `basename ` for > dependent DLLs while dlopen requires PATH to be set > to > open the DLL. One of them should be corrected to > make > life consistent. example is as follows: > > $ cygcheck /usr/lib/gstreamer-0.8/cyggstossaudio.dll > C:/cygwin/lib/gstreamer-0.8/cyggstossaudio.dll > C:/cygwin/lib/gstreamer-0.8\cyggstaudio.dll > C:\cygwin\bin\cygwin1.dll > C:\WINDOWS\System32\ADVAPI32.DLL > C:\WINDOWS\System32\ntdll.dll > C:\WINDOWS\System32\KERNEL32.dll > C:\WINDOWS\System32\RPCRT4.dll > C:\cygwin\bin\cygglib-2.0-0.dll > C:\cygwin\bin\cygiconv-2.dll > C:\cygwin\bin\cygintl-3.dll > C:\cygwin\bin\cyggobject-2.0-0.dll > C:\cygwin\bin\cyggstreamer-0.8-1.dll > C:\cygwin\bin\cyggmodule-2.0-0.dll > C:\cygwin\bin\cyggthread-2.0-0.dll > C:\cygwin\bin\cygpopt-0.dll > C:\cygwin\bin\cygxml2-2.dll > C:\cygwin\bin\cygz.dll > C:\cygwin\bin\cyggstinterfaces-0.8-0.dll > > dlopen on /usr/lib/gstreamer-0.8/cyggstossaudio.dll > fails(with win32 error 126) if > /usr/lib/gstreamer-0.8 > is not in PATH, probably because cyggstaudio.dll is > in > there. > > if I run the program with > PATH=/usr/lib/gstreamer-0.8:$PATH , it > dlopen()s > the DLL fine. > > I think either cygcheck is misleading in this case > or > dlopen should check for basename of its argument to > open the dependent DLLs as well. I am speculating > that > its the former. > > Thanks, > Sunil > PS: One more thing, errno is set to 13 (permission > denied) after dlopen fails (although dlerror() > pointed > to 126). Is that right? > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam > protection around > http://mail.yahoo.com > _______________________________________________ > kde-cygwin mailing list > kde-cygwin AT kde DOT org > https://mail.kde.org/mailman/listinfo/kde-cygwin > __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new Resources site http://smallbusiness.yahoo.com/resources/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/