public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* 'tac' trying to use "/tmp"; Error: not found
       [not found]     ` <CAOoKcr2sX3LTPt__nkU0onVXpicDQUmEdSgv8L2UnR+KKv6sug@mail.gmail.com>
@ 2023-04-03  1:42       ` Prof. Luis G. Uribe C.
  2023-04-03  3:22         ` marco atzeri
  0 siblings, 1 reply; 3+ messages in thread
From: Prof. Luis G. Uribe C. @ 2023-04-03  1:42 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1063 bytes --]

*Bogotá, Sunday April 2nd, 2023*

*REF: 'tac' trying to use "/tmp"; Error: not found*
*_______________________________________________________*
*|  'tac'  utility dies with a not found "/tmp" error.  |*
*¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯*
  I didn't see this problem in older 'tac' versions...

  I created "/tmp" under my root directory:
*    "c:\tmp"* (Windows 10), *to no avail*.

  I make a  *tmp*  dir directly *above*, in the *parent's 'tac' dir*:
     *"../tmp"*, at the same level as other usual folders like:
        *bin*, *dev*, *etc*, *lib*, *sbin*...,
  and now: *'**tac' works fine**!*

  I think that in *line 70 of "tac.c"*:




*ID: tac (GNU coreutils) 9.0    Packaged by Cygwin (9.0-1)    Copyright (C)
2021 Free Software Foundation, Inc.*

...if it is defined as:

*#define DEFAULT_TMPDIR "**..**/tmp"*

*instead of* the *actual*:

*#define DEFAULT_TMPDIR   "/tmp"*

it could work fine!


Best regards,

*Eng. Luis G. Uribe C.*

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

* Re: 'tac' trying to use "/tmp"; Error: not found
  2023-04-03  1:42       ` 'tac' trying to use "/tmp"; Error: not found Prof. Luis G. Uribe C.
@ 2023-04-03  3:22         ` marco atzeri
  2023-04-03 15:29           ` Brian Inglis
  0 siblings, 1 reply; 3+ messages in thread
From: marco atzeri @ 2023-04-03  3:22 UTC (permalink / raw)
  To: Prof. Luis G. Uribe C.; +Cc: cygwin

On Sun, Apr 2, 2023 at 9:43 PM Prof. Luis G. Uribe C. via Cygwin  wrote:
>
> *Bogotá, Sunday April 2nd, 2023*
>
> *REF: 'tac' trying to use "/tmp"; Error: not found*
> *_______________________________________________________*
> *|  'tac'  utility dies with a not found "/tmp" error.  |*
> *¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯*
>   I didn't see this problem in older 'tac' versions...
>
>   I created "/tmp" under my root directory:
> *    "c:\tmp"* (Windows 10), *to no avail*.
>
>   I make a  *tmp*  dir directly *above*, in the *parent's 'tac' dir*:
>      *"../tmp"*, at the same level as other usual folders like:
>         *bin*, *dev*, *etc*, *lib*, *sbin*...,
>   and now: *'**tac' works fine**!*

The expectation for the existence of /tmp directory is well founded

https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard

I assume by accident your installation pruned the directory.
I will not be surprised if other programs also complain, not only tac

> Best regards,
>
> *Eng. Luis G. Uribe C.*
>

Regards
Marco

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

* Re: 'tac' trying to use "/tmp"; Error: not found
  2023-04-03  3:22         ` marco atzeri
@ 2023-04-03 15:29           ` Brian Inglis
  0 siblings, 0 replies; 3+ messages in thread
From: Brian Inglis @ 2023-04-03 15:29 UTC (permalink / raw)
  To: cygwin

On 2023-04-02 21:22, marco atzeri wrote:
> On Sun, Apr 2, 2023 at 9:43 PM Prof. Luis G. Uribe C. wrote:
>> *|  'tac'  utility dies with a not found "/tmp" error.  |*

It is preferable to copy the exact command(s) and output into your problem 
report. Presumably the input is a pipe or non-seekable device which needs 
buffered in a temp file.

>>    I didn't see this problem in older 'tac' versions...
>>    I created "/tmp" under my root directory:
>> *    "c:\tmp"* (Windows 10), *to no avail*.
>>    I make a  *tmp*  dir directly *above*, in the *parent's 'tac' dir*:
>>       *"../tmp"*, at the same level as other usual folders like:
>>          *bin*, *dev*, *etc*, *lib*, *sbin*...,
>>    and now: *'**tac' works fine**!*

The /tmp directory needs to be created in the Cygwin POSIX root directory "/".

[I am surprised GNU tac does not yet use mmap where available, as an alternative 
to seek, as mmap has been around for decades, since 4.4BSD, SysVr4, and Solaris 
2.0 days, and should be faster on huge files.]

> The expectation for the existence of /tmp directory is well founded
> https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard
> I assume by accident your installation pruned the directory.
> I will not be surprised if other programs also complain, not only tac

You can point to another dir under a shell (or export the env var) using e.g.

	$ export TMPDIR=${TMP:-${TEMP:-/tmp}}
or
	$ TMPDIR=. tac ...

If you have Cygwin bash and coreutils installed, under bash or a similar shell 
with brace expansion you can restore the install directories with:

	$ /bin/mkdir -pv -m 0755 /{bin,dev,etc,lib} \
		/usr/{bin,lib,local/{bin,etc,lib},src}
	$ /bin/mkdir -pv -m 01777 /dev/{mqueue,shm} /etc/fstab.d \
		/{home,{,usr/}tmp} /var/{log,run,tmp}
	$ /bin/mkdir -pv -m 0666 /var/run/utmp
see:
	https://cygwin.com/git/?p=cygwin-apps/setup.git;a=blob;f=install.cc#l156

If the directories do not have the correct permissions, use chmod to fix them.

-- 
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer     but when there is no more to cut
                                 -- Antoine de Saint-Exupéry

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

end of thread, other threads:[~2023-04-03 15:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAOoKcr3-vGedWvQWu8kmKJ48AfGpaqO0pHQG-KZFc2h+SAuKSw@mail.gmail.com>
     [not found] ` <CAOoKcr3rB3cLPs+OX=qC0DVoS=pnbaOQH5HLxAa53bjb4mVwKQ@mail.gmail.com>
     [not found]   ` <CAOoKcr3gXr3QMT6sJkHC=jVsuFnXamOpdHJ3dt9=yCixYeAzrQ@mail.gmail.com>
     [not found]     ` <CAOoKcr2sX3LTPt__nkU0onVXpicDQUmEdSgv8L2UnR+KKv6sug@mail.gmail.com>
2023-04-03  1:42       ` 'tac' trying to use "/tmp"; Error: not found Prof. Luis G. Uribe C.
2023-04-03  3:22         ` marco atzeri
2023-04-03 15:29           ` Brian Inglis

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