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 X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs Date: Wed, 6 Aug 2003 17:47:28 -0400 (EDT) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: "David A. Case" cc: cygwin AT cygwin DOT com Subject: Re: What is the minimum needed to run gtar? In-Reply-To: <20030806212944.GA472@scripps.edu> Message-ID: Importance: Normal MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Wed, 6 Aug 2003, David A. Case wrote: > On Wed, Aug 06, 2003, David Rothenberger wrote: > > > > You can find out what DLLs an executable needs by running cygcheck on it. > > Note that this may not give a complete list. Consider rxvt.exe: > > quine% cygcheck rxvt.exe > Found: .\rxvt.exe > Found: C:\cygwin\bin\rxvt.exe > rxvt.exe > .\cygwin1.dll > C:\WINDOWS\System32\KERNEL32.dll > C:\WINDOWS\System32\ntdll.dll > C:\WINDOWS\System32\USER32.dll > C:\WINDOWS\System32\GDI32.dll > C:\WINDOWS\System32\ADVAPI32.dll > C:\WINDOWS\System32\RPCRT4.dll > > > This might suggest that only cygwin1.dll is needed (besides the windows > stuff). However, continuing (in X, with DISPLAY set): > > quine% cd /usr/X11R6/bin > quine% mv libX11.dll libX11.dll~ > quine% back > /bin > quine% ./rxvt.exe > failed to load libX11.dll > > Putting libX11.dll~ back to its original name again allows rxvt.exe to run > correctly. Thus in this case (at least) cygcheck is not finding _all_ of the > dll's that are needed. > > ...dave case Dave, Yes, you're quite correct. Cygcheck will only list the DLLs that the program is statically linked to (that is, it's linked to the import libraries). If the program uses dlopen() or LoadLibrary() to load the library (like rxvt does with libX11/libW11), cygcheck will not list that library in the list of dependences. A quick and dirty test for that would be "strings program.exe | egrep -i 'dlopen|loadlibrary'". Finding out exactly which libraries are loaded with this mechanism won't be as easy (because in some cases the DLL name may be constructed dynamically). Strace might help with that somewhat, at least for dlopen() calls. Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "I have since come to realize that being between your mentor and his route to the bathroom is a major career booster." -- Patrick Naughton -- 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/