public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Using cygwin tar from a DOS window
@ 2020-09-02 14:58 Douglas Coup
  2020-09-02 16:53 ` Bill Stewart
  2020-09-02 21:30 ` Wayne Davison
  0 siblings, 2 replies; 10+ messages in thread
From: Douglas Coup @ 2020-09-02 14:58 UTC (permalink / raw)
  To: cygwin

Hello Cygwin community.

I've recently started using a new Windows 10 workstation, on which I've 
installed 64-bit Cygwin, including tar v1.29.

Windows 10 has its own tar.exe, but I need the Cygwin tar to be found 
regardless of whether I'm using a Cygwin command window or a DOS command 
window.  Since from a DOS window I want Windows .exe files to be found 
for all situations except tar, I've copied the Cygwin tar.exe to a 
folder of its own and placed that folder in the PATH at the beginning to 
make sure Cygwin's tar.exe is found before the Windows tar.exe.

If I use tar from a Cygwin window, it works.  The tar.exe is found in 
Cygwin's own /usr/bin directory.

But if I use tar from a DOS window, I get a pop-up window that says the 
program can't start because cyggcc_s-1.dll can't be found.  This DLL is 
not present in the Cygwin hierarchy.  What's strange is if I run 
"cygcheck tar" from a Cygwin window, that DLL is not listed as a dependency.

This configuration worked successfully on my previous Windows 10 
workstation, where I had 32-bit Cygwin installed, including tar v1.27.

Any thoughts?  I'm wondering if I need to downgrade to tar v1.27 on my 
new workstation.

Regards,

Douglas Coup

-- 
Objective Systems, Inc.
REAL WORLD ASN.1 AND XML SOLUTIONS
Tel: +1 (484) 875-9841
Fax: +1 (484) 875-9830
Toll-free: (877) 307-6855 (USA only)
http://www.obj-sys.com


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

* Re: Using cygwin tar from a DOS window
  2020-09-02 14:58 Using cygwin tar from a DOS window Douglas Coup
@ 2020-09-02 16:53 ` Bill Stewart
  2020-09-02 17:00   ` Douglas Coup
  2020-09-02 21:30 ` Wayne Davison
  1 sibling, 1 reply; 10+ messages in thread
From: Bill Stewart @ 2020-09-02 16:53 UTC (permalink / raw)
  To: cygwin

On Wed, Sep 2, 2020 at 8:58 AM Douglas Coup wrote:

But if I use tar from a DOS window ...
>

Surely you don't mean DOS? DOS doesn't exist in Windows any more (unless
you are using an emulator like DosBox or a VM).

Do you mean a cmd.exe console window? (cmd.exe is a Windows console-mode
program that, despite appearances, is not "DOS." DOS was a real-mode
single-tasking operating system.)

Bill

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

* Re: Using cygwin tar from a DOS window
  2020-09-02 16:53 ` Bill Stewart
@ 2020-09-02 17:00   ` Douglas Coup
  2020-09-02 17:28     ` Eliot Moss
  0 siblings, 1 reply; 10+ messages in thread
From: Douglas Coup @ 2020-09-02 17:00 UTC (permalink / raw)
  To: cygwin


On 9/2/2020 12:53 PM, Bill Stewart wrote:
> On Wed, Sep 2, 2020 at 8:58 AM Douglas Coup wrote:
>
> But if I use tar from a DOS window ...
> Surely you don't mean DOS? DOS doesn't exist in Windows any more (unless
> you are using an emulator like DosBox or a VM).
>
> Do you mean a cmd.exe console window? (cmd.exe is a Windows console-mode
> program that, despite appearances, is not "DOS." DOS was a real-mode
> single-tasking operating system.)
>
> Bill
> --
> 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

Yes, a cmd.exe console window.

Regards,

Doug Coup

Objective Systems, Inc.
REAL WORLD ASN.1 AND XML SOLUTIONS
Tel: +1 (484) 875-9841
Fax: +1 (484) 875-9830
Toll-free: (877) 307-6855 (USA only)
http://www.obj-sys.com


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

* Re: Using cygwin tar from a DOS window
  2020-09-02 17:00   ` Douglas Coup
@ 2020-09-02 17:28     ` Eliot Moss
  2020-09-02 17:40       ` Douglas Coup
  0 siblings, 1 reply; 10+ messages in thread
From: Eliot Moss @ 2020-09-02 17:28 UTC (permalink / raw)
  To: cygwin

On 9/2/2020 1:00 PM, Douglas Coup wrote:
> 
> On 9/2/2020 12:53 PM, Bill Stewart wrote:
>> On Wed, Sep 2, 2020 at 8:58 AM Douglas Coup wrote:
>>
>> But if I use tar from a DOS window ...
>> Surely you don't mean DOS? DOS doesn't exist in Windows any more (unless
>> you are using an emulator like DosBox or a VM).
>>
>> Do you mean a cmd.exe console window? (cmd.exe is a Windows console-mode
>> program that, despite appearances, is not "DOS." DOS was a real-mode
>> single-tasking operating system.)
>>
>> Bill
>> -- 
>> 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
> 
> Yes, a cmd.exe console window.

Hardly the point :-) ...

But I think your problem may be that the Cygwin dlls need to be on the search path,
and you're hoping that none of them have names that are the same as ones earlier on
the path ...

Best - Eliot Moss

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

* Re: Using cygwin tar from a DOS window
  2020-09-02 17:28     ` Eliot Moss
@ 2020-09-02 17:40       ` Douglas Coup
  2020-09-02 17:50         ` Bill Stewart
  2020-09-02 17:59         ` Eliot Moss
  0 siblings, 2 replies; 10+ messages in thread
From: Douglas Coup @ 2020-09-02 17:40 UTC (permalink / raw)
  To: cygwin


On 9/2/2020 1:28 PM, Eliot Moss wrote:
> On 9/2/2020 1:00 PM, Douglas Coup wrote:
>>
>> On 9/2/2020 12:53 PM, Bill Stewart wrote:
>>> On Wed, Sep 2, 2020 at 8:58 AM Douglas Coup wrote:
>>>
>>> But if I use tar from a DOS window ...
>>> Surely you don't mean DOS? DOS doesn't exist in Windows any more 
>>> (unless
>>> you are using an emulator like DosBox or a VM).
>>>
>>> Do you mean a cmd.exe console window? (cmd.exe is a Windows 
>>> console-mode
>>> program that, despite appearances, is not "DOS." DOS was a real-mode
>>> single-tasking operating system.)
>>>
>>> Bill
>>> -- 
>>> 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
>>
>> Yes, a cmd.exe console window.
>
> Hardly the point :-) ...
>
> But I think your problem may be that the Cygwin dlls need to be on the 
> search path,
> and you're hoping that none of them have names that are the same as 
> ones earlier on
> the path ...
>
> Best - Eliot Moss
> -- 
> 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

I did try copying all of the .dll files in the Cygwin bin folder to the 
same folder where the copy of Cygwin's tar.exe sits.  That folder 
appears first in the PATH.  But despite that, trying to invoke tar from 
the cmd window still pops up the window saying cyggcc_s-1.dll can't be 
found.

Regards,

Doug Coup

Objective Systems, Inc.
REAL WORLD ASN.1 AND XML SOLUTIONS
Tel: +1 (484) 875-9841
Fax: +1 (484) 875-9830
Toll-free: (877) 307-6855 (USA only)
http://www.obj-sys.com



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

* Re: Using cygwin tar from a DOS window
  2020-09-02 17:40       ` Douglas Coup
@ 2020-09-02 17:50         ` Bill Stewart
  2020-09-02 17:59         ` Eliot Moss
  1 sibling, 0 replies; 10+ messages in thread
From: Bill Stewart @ 2020-09-02 17:50 UTC (permalink / raw)
  To: cygwin

On Wed, Sep 2, 2020 at 11:40 AM Douglas Coup wrote:

I did try copying all of the .dll files in the Cygwin bin folder to the
> same folder where the copy of Cygwin's tar.exe sits.
>

Why is this step necessary? Is the cygwin install process not working?

Bill

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

* Re: Using cygwin tar from a DOS window
  2020-09-02 17:40       ` Douglas Coup
  2020-09-02 17:50         ` Bill Stewart
@ 2020-09-02 17:59         ` Eliot Moss
  2020-09-02 18:09           ` Thomas Wolff
  1 sibling, 1 reply; 10+ messages in thread
From: Eliot Moss @ 2020-09-02 17:59 UTC (permalink / raw)
  To: cygwin

On 9/2/2020 1:40 PM, Douglas Coup wrote:
> 
> On 9/2/2020 1:28 PM, Eliot Moss wrote:
>> On 9/2/2020 1:00 PM, Douglas Coup wrote:
>>>
>>> On 9/2/2020 12:53 PM, Bill Stewart wrote:
>>>> On Wed, Sep 2, 2020 at 8:58 AM Douglas Coup wrote:
>>>>
>>>> But if I use tar from a DOS window ...
>>>> Surely you don't mean DOS? DOS doesn't exist in Windows any more (unless
>>>> you are using an emulator like DosBox or a VM).
>>>>
>>>> Do you mean a cmd.exe console window? (cmd.exe is a Windows console-mode
>>>> program that, despite appearances, is not "DOS." DOS was a real-mode
>>>> single-tasking operating system.)
>>>>
>>>> Bill
>>>> -- 
>>>> 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
>>>
>>> Yes, a cmd.exe console window.
>>
>> Hardly the point :-) ...
>>
>> But I think your problem may be that the Cygwin dlls need to be on the search path,
>> and you're hoping that none of them have names that are the same as ones earlier on
>> the path ...
>>
>> Best - Eliot Moss
>> -- 
>> 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
> 
> I did try copying all of the .dll files in the Cygwin bin folder to the same folder where the copy 
> of Cygwin's tar.exe sits.  That folder appears first in the PATH.  But despite that, trying to 
> invoke tar from the cmd window still pops up the window saying cyggcc_s-1.dll can't be found.

I meant that your PATH should have the Cygwin bin folder in it, somewhere.  Does that not work for 
you?  But my setup definitely has the cyggcc_s-1.dll file in /bin and /usr/bin.
It comes from the libgcc1 package (libgcc1-9.3.0-2 in my case).

Eliot Moss

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

* Re: Using cygwin tar from a DOS window
  2020-09-02 17:59         ` Eliot Moss
@ 2020-09-02 18:09           ` Thomas Wolff
  0 siblings, 0 replies; 10+ messages in thread
From: Thomas Wolff @ 2020-09-02 18:09 UTC (permalink / raw)
  To: cygwin



Am 02.09.2020 um 19:59 schrieb Eliot Moss:
> On 9/2/2020 1:40 PM, Douglas Coup wrote:
>>
>> On 9/2/2020 1:28 PM, Eliot Moss wrote:
>>> On 9/2/2020 1:00 PM, Douglas Coup wrote:
>>>>
>>>> On 9/2/2020 12:53 PM, Bill Stewart wrote:
>>>>> On Wed, Sep 2, 2020 at 8:58 AM Douglas Coup wrote:
>>>>>
>>>>> But if I use tar from a DOS window ...
>>>>> Surely you don't mean DOS? DOS doesn't exist in Windows any more 
>>>>> (unless
>>>>> you are using an emulator like DosBox or a VM).
>>>>>
>>>>> Do you mean a cmd.exe console window? (cmd.exe is a Windows 
>>>>> console-mode
>>>>> program that, despite appearances, is not "DOS." DOS was a real-mode
>>>>> single-tasking operating system.)
>>>>>
>>>>> Bill
>>>>> -- 
>>>>> 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
>>>>
>>>> Yes, a cmd.exe console window.
>>>
>>> Hardly the point :-) ...
>>>
>>> But I think your problem may be that the Cygwin dlls need to be on 
>>> the search path,
>>> and you're hoping that none of them have names that are the same as 
>>> ones earlier on
>>> the path ...
>>>
>>> Best - Eliot Moss
>>> -- 
>>> 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
>>
>> I did try copying all of the .dll files in the Cygwin bin folder to 
>> the same folder where the copy of Cygwin's tar.exe sits. That folder 
>> appears first in the PATH.  But despite that, trying to invoke tar 
>> from the cmd window still pops up the window saying cyggcc_s-1.dll 
>> can't be found.
>
> I meant that your PATH should have the Cygwin bin folder in it, 
> somewhere.  Does that not work for you?  But my setup definitely has 
> the cyggcc_s-1.dll file in /bin and /usr/bin.
> It comes from the libgcc1 package (libgcc1-9.3.0-2 in my case).
Some independent comments:
* I see cyggcc_s-seh-1.dll in the libgcc1 package, not cyggcc_s-1.dll
* My current cygwin tar does not depend on cyggcc_s-1.dll
* Maybe your cygwin tar is an older release, now and then gcc library 
conventions have changed
Thomas

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

* Re: Using cygwin tar from a DOS window
  2020-09-02 14:58 Using cygwin tar from a DOS window Douglas Coup
  2020-09-02 16:53 ` Bill Stewart
@ 2020-09-02 21:30 ` Wayne Davison
  2020-09-02 21:53   ` Bill Stewart
  1 sibling, 1 reply; 10+ messages in thread
From: Wayne Davison @ 2020-09-02 21:30 UTC (permalink / raw)
  To: Douglas Coup; +Cc: cygwin

On Wed, Sep 2, 2020 at 7:58 AM Douglas Coup wrote:
> I need the Cygwin tar to be found regardless of whether I'm using a
> Cygwin command window or a DOS command window.

I think the easiest way to run the cygwin tar from CMD (if you don't
want to just put your cygwin bin dir on your Windows PATH) is to
create a bat file that calls the cygwin tar. That way you always get
the latest cygwin tar & dll versions from the main install.  Something
like this seems to work fine (with very minimal testing):

@echo off
PATH=C:\cygwin64\bin
C:\cygwin64\bin\tar %*

..wayne..

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

* Re: Using cygwin tar from a DOS window
  2020-09-02 21:30 ` Wayne Davison
@ 2020-09-02 21:53   ` Bill Stewart
  0 siblings, 0 replies; 10+ messages in thread
From: Bill Stewart @ 2020-09-02 21:53 UTC (permalink / raw)
  To: cygwin

On Wed, Sep 2, 2020 at 3:30 PM Wayne Davison wrote:

Something like this seems to work fine (with very minimal testing):
>
> @echo off
> PATH=C:\cygwin64\bin
> C:\cygwin64\bin\tar %*
>

Keeping in mind that cmd.exe provides no environment variable scoping using
scripts, I would recommend setlocal/endlocal; example:

@echo off
setlocal enableextensions
rem set CYGPATH to cygwin "/bin" directory
set CYGPATH=C:\cygwin64\bin
set Path=%CYGPATH%;%Path%
"%CYGPATH%\tar" %*
endlocal

Bill

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

end of thread, other threads:[~2020-09-02 21:53 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-02 14:58 Using cygwin tar from a DOS window Douglas Coup
2020-09-02 16:53 ` Bill Stewart
2020-09-02 17:00   ` Douglas Coup
2020-09-02 17:28     ` Eliot Moss
2020-09-02 17:40       ` Douglas Coup
2020-09-02 17:50         ` Bill Stewart
2020-09-02 17:59         ` Eliot Moss
2020-09-02 18:09           ` Thomas Wolff
2020-09-02 21:30 ` Wayne Davison
2020-09-02 21:53   ` Bill Stewart

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