public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* cygport i686/x86 library build undefined type in sys/stat.h
@ 2021-05-15  4:16 Brian Inglis
  2021-05-15  6:01 ` Marco Atzeri
  2021-05-15 13:36 ` Ken Brown
  0 siblings, 2 replies; 4+ messages in thread
From: Brian Inglis @ 2021-05-15  4:16 UTC (permalink / raw)
  To: cygwin

Trying to build latest libssh2 1.9.0 using cygport, works under x86_64,
but under i686/x86 fails with:

In file included from */usr/i686-pc-cygwin/include/sys/stat.h*:22,
                  from ...:
/usr/include/cygwin/stat.h:27:3: error: unknown type name ‘timestruc_t’
    27 |   timestruc_t   st_atim;
       |   ^~~~~~~~~~~

The equivalent include path to */usr/i686-pc-cygwin/include/sys/stat.h*
does not exist under 64 bit as /usr/x86_64-pc-cygwin/include,
and cygcheck -f does not come up with a hit.

The only obvious work around the timeframe of these files appears to be a
local test newlib-cygwin build and install for format_proc_cpuinfo and
format_proc_swaps testing:

$ head -v /proc/version
==> /proc/version <==
CYGWIN_NT-10.0-19042-WOW64 version 3.2.1-340.i686 (...@...) (gcc version 10.2.0 (GCC) ) 2021-04-30 12:55 UTC

Has anyone any idea, from seeing anything similar happen on their installs,
where this directory and these files may have come from,
what may have installed them, and whether it is likely to be safe to
rename or remove them?

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

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]

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

* Re: cygport i686/x86 library build undefined type in sys/stat.h
  2021-05-15  4:16 cygport i686/x86 library build undefined type in sys/stat.h Brian Inglis
@ 2021-05-15  6:01 ` Marco Atzeri
  2021-05-15  7:55   ` Marco Atzeri
  2021-05-15 13:36 ` Ken Brown
  1 sibling, 1 reply; 4+ messages in thread
From: Marco Atzeri @ 2021-05-15  6:01 UTC (permalink / raw)
  To: cygwin

On 15.05.2021 06:16, Brian Inglis wrote:
> Trying to build latest libssh2 1.9.0 using cygport, works under x86_64,
> but under i686/x86 fails with:
> 
> In file included from */usr/i686-pc-cygwin/include/sys/stat.h*:22,
>                   from ...:
> /usr/include/cygwin/stat.h:27:3: error: unknown type name ‘timestruc_t’
>     27 |   timestruc_t   st_atim;
>        |   ^~~~~~~~~~~
> 
> The equivalent include path to */usr/i686-pc-cygwin/include/sys/stat.h*
> does not exist under 64 bit as /usr/x86_64-pc-cygwin/include,
> and cygcheck -f does not come up with a hit.
> 

It is defined under:

/usr/include/machine/types.h

#ifndef __timestruc_t_defined
#define __timestruc_t_defined
typedef struct timespec timestruc_t;
#endif /*__timestruc_t_defined*/


check that the <threads.h> is included

$ cat prova.c
#include <threads.h>
int main(){
timestruc_t abstime;
}

$ gcc -c  prova.c
$ ls -l prova.o
-rw-r--r-- 1 Marco Kein 656 May 15 07:59 prova.o


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

* Re: cygport i686/x86 library build undefined type in sys/stat.h
  2021-05-15  6:01 ` Marco Atzeri
@ 2021-05-15  7:55   ` Marco Atzeri
  0 siblings, 0 replies; 4+ messages in thread
From: Marco Atzeri @ 2021-05-15  7:55 UTC (permalink / raw)
  To: cygwin

On 15.05.2021 08:01, Marco Atzeri wrote:
> On 15.05.2021 06:16, Brian Inglis wrote:
>> Trying to build latest libssh2 1.9.0 using cygport, works under x86_64,
>> but under i686/x86 fails with:
>>
>> In file included from */usr/i686-pc-cygwin/include/sys/stat.h*:22,
>>                   from ...:
>> /usr/include/cygwin/stat.h:27:3: error: unknown type name ‘timestruc_t’
>>     27 |   timestruc_t   st_atim;
>>        |   ^~~~~~~~~~~
>>
>> The equivalent include path to */usr/i686-pc-cygwin/include/sys/stat.h*
>> does not exist under 64 bit as /usr/x86_64-pc-cygwin/include,
>> and cygcheck -f does not come up with a hit.
>>
> 
> It is defined under:
> 
> /usr/include/machine/types.h
> 
> #ifndef __timestruc_t_defined
> #define __timestruc_t_defined
> typedef struct timespec timestruc_t;
> #endif /*__timestruc_t_defined*/
> 
> 
> check that the <threads.h> is included

of course <time.h> is a more natural choice

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

* Re: cygport i686/x86 library build undefined type in sys/stat.h
  2021-05-15  4:16 cygport i686/x86 library build undefined type in sys/stat.h Brian Inglis
  2021-05-15  6:01 ` Marco Atzeri
@ 2021-05-15 13:36 ` Ken Brown
  1 sibling, 0 replies; 4+ messages in thread
From: Ken Brown @ 2021-05-15 13:36 UTC (permalink / raw)
  To: cygwin

On 5/15/2021 12:16 AM, Brian Inglis wrote:
> Trying to build latest libssh2 1.9.0 using cygport, works under x86_64,
> but under i686/x86 fails with:
> 
> In file included from */usr/i686-pc-cygwin/include/sys/stat.h*:22,
>                   from ...:
> /usr/include/cygwin/stat.h:27:3: error: unknown type name ‘timestruc_t’
>     27 |   timestruc_t   st_atim;
>        |   ^~~~~~~~~~~
> 
> The equivalent include path to */usr/i686-pc-cygwin/include/sys/stat.h*
> does not exist under 64 bit as /usr/x86_64-pc-cygwin/include,
> and cygcheck -f does not come up with a hit.
> 
> The only obvious work around the timeframe of these files appears to be a
> local test newlib-cygwin build and install for format_proc_cpuinfo and
> format_proc_swaps testing:

It looks like something went wrong with the install of your test build.  In 
particular, the headers went to the wrong place.

> $ head -v /proc/version
> ==> /proc/version <==
> CYGWIN_NT-10.0-19042-WOW64 version 3.2.1-340.i686 (...@...) (gcc version 10.2.0 
> (GCC) ) 2021-04-30 12:55 UTC
> 
> Has anyone any idea, from seeing anything similar happen on their installs,
> where this directory and these files may have come from,
> what may have installed them, and whether it is likely to be safe to
> rename or remove them?

Not only is it safe, but I would say it's mandatory.  You should also look for 
other remnants of your test install and remove them.  In general, I think it's a 
bad idea to do test installs in the same Cygwin installation that you use for 
building packages.

Ken

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

end of thread, other threads:[~2021-05-15 13:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-15  4:16 cygport i686/x86 library build undefined type in sys/stat.h Brian Inglis
2021-05-15  6:01 ` Marco Atzeri
2021-05-15  7:55   ` Marco Atzeri
2021-05-15 13:36 ` Ken Brown

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