* can't compile coreutils-9.3 any more after upgrade to cygwin-3.4.8
@ 2023-08-24 17:44 Denis Excoffier
2023-08-24 21:39 ` Mark Geisert
0 siblings, 1 reply; 6+ messages in thread
From: Denis Excoffier @ 2023-08-24 17:44 UTC (permalink / raw)
To: cygwin; +Cc: Denis Excoffier
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/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);
| ^~~~
| )
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;
| ^~~~~~~~~~~
make[2]: *** [Makefile:11912: src/chroot.o] Error 1
make[1]: *** [Makefile:21297: all-recursive] Error 1
make: *** [Makefile:8434: all] Error 2
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: can't compile coreutils-9.3 any more after upgrade to cygwin-3.4.8
2023-08-24 17:44 can't compile coreutils-9.3 any more after upgrade to cygwin-3.4.8 Denis Excoffier
@ 2023-08-24 21:39 ` Mark Geisert
2023-08-25 9:38 ` Corinna Vinschen
0 siblings, 1 reply; 6+ messages in thread
From: Mark Geisert @ 2023-08-24 21:39 UTC (permalink / raw)
To: cygwin
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: can't compile coreutils-9.3 any more after upgrade to cygwin-3.4.8
2023-08-24 21:39 ` Mark Geisert
@ 2023-08-25 9:38 ` Corinna Vinschen
2023-08-26 5:50 ` Mark Geisert
0 siblings, 1 reply; 6+ messages in thread
From: Corinna Vinschen @ 2023-08-25 9:38 UTC (permalink / raw)
To: cygwin
On Aug 24 14:39, Mark Geisert via Cygwin wrote:
> 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.
> >
> > [...]
> > /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.
Usually it's easily fixable. There's typically no loop because
of the guards, e.g.
#ifndef _SYS_CPUSET_H_
#define _SYS_CPUSET_H_
but some guarding can have side effects.
However, somebody needs to come up *at least* with a simple reproducer.
Corinna
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: can't compile coreutils-9.3 any more after upgrade to cygwin-3.4.8
2023-08-25 9:38 ` Corinna Vinschen
@ 2023-08-26 5:50 ` Mark Geisert
2023-08-26 14:01 ` Corinna Vinschen
0 siblings, 1 reply; 6+ messages in thread
From: Mark Geisert @ 2023-08-26 5:50 UTC (permalink / raw)
To: cygwin
Hi Corinna,
Corinna Vinschen via Cygwin wrote:
> On Aug 24 14:39, Mark Geisert via Cygwin wrote:
>> 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.
>>>
[...compilation log excerpt elided here...]
>
> Usually it's easily fixable. There's typically no loop because
> of the guards, e.g.
>
> #ifndef _SYS_CPUSET_H_
> #define _SYS_CPUSET_H_
>
> but some guarding can have side effects.
>
> However, somebody needs to come up *at least* with a simple reproducer.
It can be reproduced by running 'cygport coreutils.cygport build' in a prep'd
coreutils source directory e.g. /usr/src/coreutils-9.0-1.src . Excerpt follows:
make[3]: Entering directory
'/usr/src/coreutils-9.0-1.src/coreutils-9.0-1.x86_64/build'
CC lib/exclude.o
CC lib/exitfail.o
CC lib/fadvise.o
CC lib/creat-safer.o
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:81,
from ./lib/stdlib.h:100,
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:58,
from
/usr/src/coreutils-9.0-1.src/coreutils-9.0-1.x86_64/src/coreutils-9.0/lib/exclude.c:31:
/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:81,
from ./lib/stdlib.h:100,
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:58,
from
/usr/src/coreutils-9.0-1.src/coreutils-9.0-1.x86_64/src/coreutils-9.0/lib/exclude.c:31:
/usr/include/sys/signal.h:227:29: error: expected ')' before 'int'
227 | int pthread_kill (pthread_t, int);
| ^~~~
| )
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:81,
from ./lib/stdlib.h:100,
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:58,
from
/usr/src/coreutils-9.0-1.src/coreutils-9.0-1.x86_64/src/coreutils-9.0/lib/exclude.c:31:
/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've trimmed the errors back to just those from compiling lib/exclude.c. This is
new breakage in 3.4.8 (per Denis) and corresponds to the new in 3.4.8 #includes
added to /usr/include/sys/cpuset.h.
I guess it's the include search order that has ./lib/stdlib.h being included from
sys/cpuset.h rather than the "<stdlib.h>" coded there.
I'm not familiar with building coreutils. But it seems something about the new
#includes added to sys/cpuset.h have upset coreutils' build magic. My offer to
replace the two problematic #includes with two explicit extern statements still
stands ;-).
..mark
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: can't compile coreutils-9.3 any more after upgrade to cygwin-3.4.8
2023-08-26 5:50 ` Mark Geisert
@ 2023-08-26 14:01 ` Corinna Vinschen
2023-08-30 5:36 ` Mark Geisert
0 siblings, 1 reply; 6+ messages in thread
From: Corinna Vinschen @ 2023-08-26 14:01 UTC (permalink / raw)
To: cygwin
On Aug 25 22:50, Mark Geisert via Cygwin wrote:
> Hi Corinna,
>
> Corinna Vinschen via Cygwin wrote:
> > On Aug 24 14:39, Mark Geisert via Cygwin wrote:
> > > 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.
> > > >
> [...compilation log excerpt elided here...]
> >
> > Usually it's easily fixable. There's typically no loop because
> > of the guards, e.g.
> >
> > #ifndef _SYS_CPUSET_H_
> > #define _SYS_CPUSET_H_
> >
> > but some guarding can have side effects.
> >
> > However, somebody needs to come up *at least* with a simple reproducer.
>
> It can be reproduced by running 'cygport coreutils.cygport build' in a
> prep'd coreutils source directory e.g. /usr/src/coreutils-9.0-1.src .
> Excerpt follows:
This is not what I meant. A simple reproducer is ideally a piece of
C code which shows ;the problem with a minimum of code. In this case,
a pice of C code with the #includes required to reproduce the compiler
failing is what I'm looking for.
> I guess it's the include search order that has ./lib/stdlib.h being included
> from sys/cpuset.h rather than the "<stdlib.h>" coded there.
That should break including any other header file, too, which includes
<stdlib.h>. Why does it only break sys/cpuset.h?
> I'm not familiar with building coreutils. But it seems something about the
> new #includes added to sys/cpuset.h have upset coreutils' build magic. My
> offer to replace the two problematic #includes with two explicit extern
> statements still stands ;-).
Sorry, but this is not the right thing to do to fix such an issue.
Corinna
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: can't compile coreutils-9.3 any more after upgrade to cygwin-3.4.8
2023-08-26 14:01 ` Corinna Vinschen
@ 2023-08-30 5:36 ` Mark Geisert
0 siblings, 0 replies; 6+ messages in thread
From: Mark Geisert @ 2023-08-30 5:36 UTC (permalink / raw)
To: cygwin
Corinna Vinschen via Cygwin wrote:
> On Aug 25 22:50, Mark Geisert via Cygwin wrote:
>> Hi Corinna,
>>
>> Corinna Vinschen via Cygwin wrote:
>>> On Aug 24 14:39, Mark Geisert via Cygwin wrote:
>>>> 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.
>>>>>
>> [...compilation log excerpt elided here...]
>>>
>>> Usually it's easily fixable. There's typically no loop because
>>> of the guards, e.g.
>>>
>>> #ifndef _SYS_CPUSET_H_
>>> #define _SYS_CPUSET_H_
>>>
>>> but some guarding can have side effects.
>>>
>>> However, somebody needs to come up *at least* with a simple reproducer.
>>
>> It can be reproduced by running 'cygport coreutils.cygport build' in a
>> prep'd coreutils source directory e.g. /usr/src/coreutils-9.0-1.src .
>> Excerpt follows:
>
> This is not what I meant. A simple reproducer is ideally a piece of
> C code which shows ;the problem with a minimum of code. In this case,
> a pice of C code with the #includes required to reproduce the compiler
> failing is what I'm looking for.
>
>> I guess it's the include search order that has ./lib/stdlib.h being included
>> from sys/cpuset.h rather than the "<stdlib.h>" coded there.
>
> That should break including any other header file, too, which includes
> <stdlib.h>. Why does it only break sys/cpuset.h?
>
>> I'm not familiar with building coreutils. But it seems something about the
>> new #includes added to sys/cpuset.h have upset coreutils' build magic. My
>> offer to replace the two problematic #includes with two explicit extern
>> statements still stands ;-).
>
> Sorry, but this is not the right thing to do to fix such an issue.
Agreed. Also, given the locus of this issue, coding an STC is problematic. I'm
taking this coreutils build issue to the cygwin-apps ML for further discussion.
..mark
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-08-30 5:36 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-24 17:44 can't compile coreutils-9.3 any more after upgrade to cygwin-3.4.8 Denis Excoffier
2023-08-24 21:39 ` Mark Geisert
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
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).