public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* cygcheck doesn't work on DLLs and executables in current working directory
@ 2020-10-02 15:59 Hamish McIntyre-Bhatty
  2020-10-02 16:33 ` Marco Atzeri
  0 siblings, 1 reply; 4+ messages in thread
From: Hamish McIntyre-Bhatty @ 2020-10-02 15:59 UTC (permalink / raw)
  To: Cygwin General Mailing List


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

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


[-- 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 --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: cygcheck doesn't work on DLLs and executables in current working directory
  2020-10-02 15:59 cygcheck doesn't work on DLLs and executables in current working directory Hamish McIntyre-Bhatty
@ 2020-10-02 16:33 ` Marco Atzeri
  2020-10-05 15:20   ` Hamish McIntyre-Bhatty
  0 siblings, 1 reply; 4+ messages in thread
From: Marco Atzeri @ 2020-10-02 16:33 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: cygcheck doesn't work on DLLs and executables in current working directory
  2020-10-02 16:33 ` Marco Atzeri
@ 2020-10-05 15:20   ` Hamish McIntyre-Bhatty
  2020-10-05 15:50     ` Marco Atzeri
  0 siblings, 1 reply; 4+ messages in thread
From: Hamish McIntyre-Bhatty @ 2020-10-05 15:20 UTC (permalink / raw)
  To: cygwin


[-- 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 --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: cygcheck doesn't work on DLLs and executables in current working directory
  2020-10-05 15:20   ` Hamish McIntyre-Bhatty
@ 2020-10-05 15:50     ` Marco Atzeri
  0 siblings, 0 replies; 4+ messages in thread
From: Marco Atzeri @ 2020-10-05 15:50 UTC (permalink / raw)
  To: cygwin

On 05.10.2020 17:20, Hamish McIntyre-Bhatty via Cygwin wrote:
> 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:
> 

that is expected. It is as Windows works

the shared libs in the same directory have precedence
on the one on the path.






^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-10-05 15:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-02 15:59 cygcheck doesn't work on DLLs and executables in current working directory Hamish McIntyre-Bhatty
2020-10-02 16:33 ` Marco Atzeri
2020-10-05 15:20   ` Hamish McIntyre-Bhatty
2020-10-05 15:50     ` Marco Atzeri

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).