public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Hamish McIntyre-Bhatty <hamishmb@live.co.uk>
To: cygwin@cygwin.com
Subject: Re: cygcheck doesn't work on DLLs and executables in current working directory
Date: Mon, 5 Oct 2020 16:20:00 +0100	[thread overview]
Message-ID: <DB7PR02MB39961E9C50F8597C169CC301E70C0@DB7PR02MB3996.eurprd02.prod.outlook.com> (raw)
In-Reply-To: <f1952025-527e-0442-2609-9fec518172a1@gmail.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 2653 bytes --]

On 02/10/2020 17:33, Marco Atzeri via Cygwin wrote:
> On 02.10.2020 17:59, Hamish McIntyre-Bhatty via Cygwin wrote:
>> Hi,
>>
>> I've noticed that cygcheck doesn't work when run against executables and
>> DLLs in the current working directory. Has anyone else experienced this?
>>
>> Hamish
>>
>>
>
> how are you calling it ?
>
>
> $ cygcheck ./hello_c.exe
> d:\cyg_pub\devel\openmpi\examples64\hello_c.exe
>   D:\cygwin64\bin\cygwin1.dll
>     C:\WINDOWS\system32\KERNEL32.dll
>       C:\WINDOWS\system32\ntdll.dll
>       C:\WINDOWS\system32\KERNELBASE.dll
>   D:\cygwin64\bin\cygmpi-40.dll
>     D:\cygwin64\bin\cygopen-pal-40.dll
>       D:\cygwin64\bin\cygz.dll
>       D:\cygwin64\bin\cyggcc_s-seh-1.dll
>     D:\cygwin64\bin\cygopen-rte-40.dll
> -- 
> Problem reports:      https://cygwin.com/problems.html
> FAQ:                  https://cygwin.com/faq/
> Documentation:        https://cygwin.com/docs.html
> Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Irritatingly, I can't reproduce that now. It might well have been
something to do with my setup because VirtualBox is causing all sorts of
annoying problems at the moment. I'll reply again with output if it
happens again.

I did find something else though:

If I make a temporary directory and move into it, and then copy
/bin/bash and /bin/cygwin1.dll into it, if I run "cygcheck
/bin/bash.exe" it then says it depends on the cygwin1 DLL in the current
directory rather than the one in /bin:

Hamish@Hamish-PC ~
$ mkdir temp2

Hamish@Hamish-PC ~
$ cd temp2

Hamish@Hamish-PC ~/temp2
$ cp /bin/bash.exe /bin/cygwin1.dll ./

Hamish@Hamish-PC ~/temp2
$ cygcheck ./bash.exe
C:\cygwin64\home\Hamish\temp2\bash.exe
  C:\cygwin64\home\Hamish\temp2\cygwin1.dll
    C:\WINDOWS\system32\KERNEL32.dll
      C:\WINDOWS\system32\ntdll.dll
      C:\WINDOWS\system32\KERNELBASE.dll
  C:\cygwin64\bin\cygiconv-2.dll
  C:\cygwin64\bin\cygintl-8.dll
  C:\cygwin64\bin\cygreadline7.dll
    C:\cygwin64\bin\cygncursesw-10.dll

Hamish@Hamish-PC ~/temp2
$ cygcheck /bin/bash.exe
C:\cygwin64\bin\bash.exe
  C:\cygwin64\home\Hamish\temp2\cygwin1.dll
    C:\WINDOWS\system32\KERNEL32.dll
      C:\WINDOWS\system32\ntdll.dll
      C:\WINDOWS\system32\KERNELBASE.dll
  C:\cygwin64\bin\cygiconv-2.dll
  C:\cygwin64\bin\cygintl-8.dll
  C:\cygwin64\bin\cygreadline7.dll
    C:\cygwin64\bin\cygncursesw-10.dll

Not sure if this classes as a bug, rather than an interesting quirk with
the search path order (I guess), but perhaps worth mentioning.

Hamish


[-- Attachment #1.1.2: 0x87B761FE07F548D6.asc --]
[-- Type: application/pgp-keys, Size: 3235 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2020-10-05 15:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-02 15:59 Hamish McIntyre-Bhatty
2020-10-02 16:33 ` Marco Atzeri
2020-10-05 15:20   ` Hamish McIntyre-Bhatty [this message]
2020-10-05 15:50     ` Marco Atzeri

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DB7PR02MB39961E9C50F8597C169CC301E70C0@DB7PR02MB3996.eurprd02.prod.outlook.com \
    --to=hamishmb@live.co.uk \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).