This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: dlopen doesn't use LD_LIBRARY_PATH ( was dlopen and cygcheck inconsistency)


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 <funtoos@yahoo.com> wrote:
> Hi,
> 
> cygcheck also searches the `basename <arg1>` 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 <prog>, 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@kde.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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]