public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Mark Geisert <mark@maxrnd.com>
To: cygwin@cygwin.com
Subject: Re: can't compile coreutils-9.3 any more after upgrade to cygwin-3.4.8
Date: Thu, 24 Aug 2023 14:39:36 -0700	[thread overview]
Message-ID: <aa38a12e-875a-bfaf-6427-2f8d05c0bc47@maxrnd.com> (raw)
In-Reply-To: <83C27059-CB24-48F5-AC91-AB0622DF82CD@Denis-Excoffier.org>

Hi Denis,

Thanks for the report.  More below...

Denis Excoffier via Cygwin wrote:
> Hello,
> When i try to compile coreutils-9.3 under cygwin-3.4.8 i get the following error messages (see below).
> There seems to be a kind of loop in the hierarchy of #includes.
> Moreover, with cygwin-3.4.7, this is ok. Also, if under cygwin-3.4.8 i remove the 2 #includes from /usr/include/sys/cpuset.h,
> this is also ok.
> 
> Regards,
> 
> Denis Excoffier.
> 
> 
> 
> In file included from /usr/include/sys/signal.h:23,
>                   from /usr/include/signal.h:6,
>                   from ./lib/signal.h:52,
>                   from /usr/include/time.h:158,
>                   from ./lib/time.h:47,
>                   from ./lib/sys/stat.h:44,
>                   from ./lib/fcntl.h:64,
>                   from ./lib/unistd.h:99,
>                   from ./lib/stdlib.h:98,
>                   from /usr/include/sys/cpuset.h:12,
>                   from /usr/include/sys/_pthreadtypes.h:12,
>                   from /usr/include/sys/types.h:221,
>                   from ./lib/sys/types.h:39,
>                   from ./lib/stdio.h:69,
>                   from src/chroot.c:21:
> /usr/include/cygwin/signal.h:121:3: error: unknown type name 'pthread_attr_t'
>    121 |   pthread_attr_t *sigev_notify_attributes; /* notification attributes */
>        |   ^~~~~~~~~~~~~~
> In file included from /usr/include/signal.h:6,
>                   from ./lib/signal.h:52,
>                   from /usr/include/time.h:158,
>                   from ./lib/time.h:47,
>                   from ./lib/sys/stat.h:44,
>                   from ./lib/fcntl.h:64,
>                   from ./lib/unistd.h:99,
>                   from ./lib/stdlib.h:98,
>                   from /usr/include/sys/cpuset.h:12,
>                   from /usr/include/sys/_pthreadtypes.h:12,
>                   from /usr/include/sys/types.h:221,
>                   from ./lib/sys/#include <sys/cpuset.h>types.h:39,
>                   from ./lib/stdio.h:69,
>                   from src/chroot.c:21:
> /usr/include/sys/signal.h:227:29: error: expected ')' before 'int'
>    227 | int pthread_kill (pthread_t, int);
>        |                             ^~~~
>        |                             )

ISTM the above could be fixed by moving "#include <sys/cpuset.h>" after all the 
typedefs in <sys/_pthreadtypes.h>.  That would be an odd location for an #include 
though.  Another approach would be to have explicit external refs for the needed 
two functions in <sys/cpuset.h> and remove the #includes there.

> In file included from /usr/include/sys/stat.h:22,
>                   from ./lib/sys/stat.h:47,
>                   from ./lib/fcntl.h:64,
>                   from ./lib/unistd.h:99,
>                   from ./lib/stdlib.h:98,
>                   from /usr/include/sys/cpuset.h:12,
>                   from /usr/include/sys/_pthreadtypes.h:12,
>                   from /usr/include/sys/types.h:221,
>                   from ./lib/sys/types.h:39,
>                   from ./lib/stdio.h:69,
>                   from src/chroot.c:21:
> /usr/include/cygwin/stat.h:27:3: error: unknown type name 'timestruc_t'
>     27 |   timestruc_t   st_atim;
>        |   ^~~~~~~~~~~
> /usr/include/cygwin/stat.h:28:3: error: unknown type name 'timestruc_t'
>     28 |   timestruc_t   st_mtim;
>        |   ^~~~~~~~~~~
> /usr/include/cygwin/stat.h:29:3: error: unknown type name 'timestruc_t'
>     29 |   timestruc_t   st_ctim;
>        |   ^~~~~~~~~~~
> /usr/include/cygwin/stat.h:32:3: error: unknown type name 'timestruc_t'
>     32 |   timestruc_t   st_birthtim;
>        |   ^~~~~~~~~~~

I don't have an answer for these.  Awaiting more input from our wizards.  I'm 
willing to submit the patch for any agreed solution.

..mark

  reply	other threads:[~2023-08-24 21:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-24 17:44 Denis Excoffier
2023-08-24 21:39 ` Mark Geisert [this message]
2023-08-25  9:38   ` Corinna Vinschen
2023-08-26  5:50     ` Mark Geisert
2023-08-26 14:01       ` Corinna Vinschen
2023-08-30  5:36         ` Mark Geisert

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=aa38a12e-875a-bfaf-6427-2f8d05c0bc47@maxrnd.com \
    --to=mark@maxrnd.com \
    --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).