* Re: Error: unknown type name ‘pthread_attr_t’ in signal.h
2017-10-16 7:12 Error: unknown type name ‘pthread_attr_t’ in signal.h Jeffrey Walton
@ 2017-10-16 8:39 ` Jeffrey Walton
2017-10-16 8:55 ` Marco Atzeri
2017-10-16 9:20 ` Corinna Vinschen
` (2 subsequent siblings)
3 siblings, 1 reply; 11+ messages in thread
From: Jeffrey Walton @ 2017-10-16 8:39 UTC (permalink / raw)
To: cygwin
On Mon, Oct 16, 2017 at 3:12 AM, Jeffrey Walton <noloader@gmail.com> wrote:
> Hi Everyone,
>
> I'm trying to build Emacs on Cygwin. I use the platform as a test bed
> because of Newlib. Emacs is failing with:
>
> gcc -DHAVE_CONFIG_H -I. -I../lib -I../src -I../src
> -I/usr/local/include -DNDEBUG -pthread -D_XOPEN_SOURCE=600 -m64 -MT
> close-stream.o -MD -MP -MF .deps/close-stream.Tpo -c -o close-stream.o
> close-stream.c
> In file included from /usr/include/sys/signal.h:22:0,
> from /usr/include/signal.h:6,
> from ./signal.h:52,
> from ./sys/select.h:107,
> from /usr/include/sys/time.h:47,
> from ./sys/time.h:39,
> from ./sys/select.h:86,
> from /usr/include/sys/types.h:68,
> from ./sys/types.h:28,
> from ./fcntl.h:50,
> from binary-io.h:23,
> from binary-io.c:3:
> /usr/include/cygwin/signal.h:175:3: error: unknown type name ‘pthread_attr_t’
> pthread_attr_t *sigev_notify_attributes; /* notification attributes */
> ^~~~~~~~~~~~~~
>
> Examining /usr/include/cygwin/signal.h around 175, I see:
>
> typedef struct sigevent
> {
> sigval_t sigev_value; /* signal value */
> int sigev_signo; /* signal number */
> int sigev_notify; /* notification type */
> void (*sigev_notify_function) (sigval_t); /* notification function */
> pthread_attr_t *sigev_notify_attributes; /* notification attributes */
> } sigevent_t;
>
> But I don't see an include for the pthread gear in the signal.h header file.
>
> I found one past message that's similar
> (https://cygwin.com/ml/cygwin/2016-06/msg00458.html), but its reported
> as an upstream bug. I don't think it applies here since the pthread
> data structure is used without an apparent declaration.
>
> Can anyone confirm things are (not?) working as expected? If things
> are working as expected, then hints to work around the failure would
> be appreciated.
I think something is borked with the Cygwin headers. If I am parsing
http://pubs.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_02.html
and https://cygwin.com/ml/cygwin/2006-01/msg00642.html correctly, it
should be sufficient to define _XOPEN_SOURCE to 600. From the section
"The _XOPEN_SOURCE Feature Test Macro":
Since this volume of IEEE Std 1003.1-2001 is aligned with the ISO C
standard, and since all functionality enabled by _POSIX_C_SOURCE set
equal to 200112L is enabled by _XOPEN_SOURCE set equal to 600, there
should be no need to define _POSIX_C_SOURCE if _XOPEN_SOURCE is so
defined. Therefore, if _XOPEN_SOURCE is set equal to 600 and
_POSIX_C_SOURCE is set equal to 200112L, the behavior is the same as
if only _XOPEN_SOURCE is defined and set equal to 600...
Perhaps the Cygwin FAQ should say something about the macros to enable
features. Right now, the only discussion relates to __CYGWIN__ and
_WIN32. Confer, "6.39. What preprocessor macros do I need to know
about?" in https://www.cygwin.com/faq.html . It seems like there's a
lot more macros we need to know about.
I would still appreciate some help in working around the compile failures.
Jeff
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Error: unknown type name ‘pthread_attr_t’ in signal.h
2017-10-16 8:39 ` Jeffrey Walton
@ 2017-10-16 8:55 ` Marco Atzeri
0 siblings, 0 replies; 11+ messages in thread
From: Marco Atzeri @ 2017-10-16 8:55 UTC (permalink / raw)
To: cygwin
On 16/10/2017 10:39, Jeffrey Walton wrote:
> On Mon, Oct 16, 2017 at 3:12 AM, Jeffrey Walton <noloader@gmail.com> wrote:
>> Hi Everyone,
>>
>
> I think something is borked with the Cygwin headers. If I am parsing
> http://pubs.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_02.html
> and https://cygwin.com/ml/cygwin/2006-01/msg00642.html correctly, it
> should be sufficient to define _XOPEN_SOURCE to 600. From the section
> "The _XOPEN_SOURCE Feature Test Macro":
>
> Since this volume of IEEE Std 1003.1-2001 is aligned with the ISO C
> standard, and since all functionality enabled by _POSIX_C_SOURCE set
> equal to 200112L is enabled by _XOPEN_SOURCE set equal to 600, there
> should be no need to define _POSIX_C_SOURCE if _XOPEN_SOURCE is so
> defined. Therefore, if _XOPEN_SOURCE is set equal to 600 and
> _POSIX_C_SOURCE is set equal to 200112L, the behavior is the same as
> if only _XOPEN_SOURCE is defined and set equal to 600...
>
>
> I would still appreciate some help in working around the compile failures.
>
> Jeff
>
hi Jeff,
see
/usr/include/sys/features.h
for explanation of the current behaviour and options
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Error: unknown type name ‘pthread_attr_t’ in signal.h
2017-10-16 7:12 Error: unknown type name ‘pthread_attr_t’ in signal.h Jeffrey Walton
2017-10-16 8:39 ` Jeffrey Walton
@ 2017-10-16 9:20 ` Corinna Vinschen
2017-10-16 14:59 ` Ken Brown
2017-10-17 22:36 ` Jeffrey Walton
3 siblings, 0 replies; 11+ messages in thread
From: Corinna Vinschen @ 2017-10-16 9:20 UTC (permalink / raw)
To: cygwin
[-- Attachment #1: Type: text/plain, Size: 2436 bytes --]
On Oct 16 03:12, Jeffrey Walton wrote:
> Hi Everyone,
>
> I'm trying to build Emacs on Cygwin. I use the platform as a test bed
> because of Newlib. Emacs is failing with:
>
> gcc -DHAVE_CONFIG_H -I. -I../lib -I../src -I../src
> -I/usr/local/include -DNDEBUG -pthread -D_XOPEN_SOURCE=600 -m64 -MT
> close-stream.o -MD -MP -MF .deps/close-stream.Tpo -c -o close-stream.o
> close-stream.c
> In file included from /usr/include/sys/signal.h:22:0,
> from /usr/include/signal.h:6,
> from ./signal.h:52,
> from ./sys/select.h:107,
> from /usr/include/sys/time.h:47,
> from ./sys/time.h:39,
> from ./sys/select.h:86,
> from /usr/include/sys/types.h:68,
> from ./sys/types.h:28,
> from ./fcntl.h:50,
> from binary-io.h:23,
> from binary-io.c:3:
> /usr/include/cygwin/signal.h:175:3: error: unknown type name ‘pthread_attr_t’
> pthread_attr_t *sigev_notify_attributes; /* notification attributes */
> ^~~~~~~~~~~~~~
>
> Examining /usr/include/cygwin/signal.h around 175, I see:
>
> typedef struct sigevent
> {
> sigval_t sigev_value; /* signal value */
> int sigev_signo; /* signal number */
> int sigev_notify; /* notification type */
> void (*sigev_notify_function) (sigval_t); /* notification function */
> pthread_attr_t *sigev_notify_attributes; /* notification attributes */
> } sigevent_t;
>
> But I don't see an include for the pthread gear in the signal.h header file.
That's right, but that's usually not a problem because the pthread
types are included via sys/types.h. That means, a simple testcase
like
#include <signal.h>
main(){}
isn't sufficient to trigger the above, neither with nor without
-D_XOPEN_SOURCE=600. And there's the fact that emacs is part
of the Cygwin distro, so it seems you're using a non-standard
setting somewhere.
We could add #include sys/_pthreadtypes.h to cygwin/signal.h
unconditioanlly, but it would be interesting to know how the
above include chain works, and why sys/_pthreadtypes.h isn't
picked up.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Error: unknown type name ‘pthread_attr_t’ in signal.h
2017-10-16 7:12 Error: unknown type name ‘pthread_attr_t’ in signal.h Jeffrey Walton
2017-10-16 8:39 ` Jeffrey Walton
2017-10-16 9:20 ` Corinna Vinschen
@ 2017-10-16 14:59 ` Ken Brown
2017-10-17 22:36 ` Jeffrey Walton
3 siblings, 0 replies; 11+ messages in thread
From: Ken Brown @ 2017-10-16 14:59 UTC (permalink / raw)
To: cygwin
On 10/16/2017 3:12 AM, Jeffrey Walton wrote:
> Hi Everyone,
>
> I'm trying to build Emacs on Cygwin. I use the platform as a test bed
> because of Newlib. Emacs is failing with:
>
> gcc -DHAVE_CONFIG_H -I. -I../lib -I../src -I../src
> -I/usr/local/include -DNDEBUG -pthread -D_XOPEN_SOURCE=600 -m64 -MT
> close-stream.o -MD -MP -MF .deps/close-stream.Tpo -c -o close-stream.o
> close-stream.c
> In file included from /usr/include/sys/signal.h:22:0,
> from /usr/include/signal.h:6,
> from ./signal.h:52,
> from ./sys/select.h:107,
> from /usr/include/sys/time.h:47,
> from ./sys/time.h:39,
> from ./sys/select.h:86,
> from /usr/include/sys/types.h:68,
> from ./sys/types.h:28,
> from ./fcntl.h:50,
> from binary-io.h:23,
> from binary-io.c:3:
> /usr/include/cygwin/signal.h:175:3: error: unknown type name âpthread_attr_tâ
> pthread_attr_t *sigev_notify_attributes; /* notification attributes */
> ^~~~~~~~~~~~~~
>
> Examining /usr/include/cygwin/signal.h around 175, I see:
>
> typedef struct sigevent
> {
> sigval_t sigev_value; /* signal value */
> int sigev_signo; /* signal number */
> int sigev_notify; /* notification type */
> void (*sigev_notify_function) (sigval_t); /* notification function */
> pthread_attr_t *sigev_notify_attributes; /* notification attributes */
> } sigevent_t;
>
> But I don't see an include for the pthread gear in the signal.h header file.
>
> I found one past message that's similar
> (https://cygwin.com/ml/cygwin/2016-06/msg00458.html), but its reported
> as an upstream bug.
Yes, it was an upstream gnulib issue that was fixed long ago. I suspect
you're building an old version of emacs that hadn't yet imported the
fixed gnulib. Try building the latest emacs release. It should build
with a simple ./configure && make.
Ken
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Error: unknown type name ‘pthread_attr_t’ in signal.h
2017-10-16 7:12 Error: unknown type name ‘pthread_attr_t’ in signal.h Jeffrey Walton
` (2 preceding siblings ...)
2017-10-16 14:59 ` Ken Brown
@ 2017-10-17 22:36 ` Jeffrey Walton
2017-10-18 10:13 ` Corinna Vinschen
3 siblings, 1 reply; 11+ messages in thread
From: Jeffrey Walton @ 2017-10-17 22:36 UTC (permalink / raw)
To: cygwin
On Mon, Oct 16, 2017 at 3:12 AM, Jeffrey Walton <noloader@gmail.com> wrote:
> Hi Everyone,
>
> I'm trying to build Emacs on Cygwin. I use the platform as a test bed
> because of Newlib. Emacs is failing with:
Forgive my ignorance... Should this question go to the Newlib folks?
Jeff
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Error: unknown type name ‘pthread_attr_t’ in signal.h
2017-10-17 22:36 ` Jeffrey Walton
@ 2017-10-18 10:13 ` Corinna Vinschen
2017-10-18 11:52 ` Ken Brown
0 siblings, 1 reply; 11+ messages in thread
From: Corinna Vinschen @ 2017-10-18 10:13 UTC (permalink / raw)
To: cygwin
[-- Attachment #1: Type: text/plain, Size: 634 bytes --]
On Oct 17 18:36, Jeffrey Walton wrote:
> On Mon, Oct 16, 2017 at 3:12 AM, Jeffrey Walton <noloader@gmail.com> wrote:
> > Hi Everyone,
> >
> > I'm trying to build Emacs on Cygwin. I use the platform as a test bed
> > because of Newlib. Emacs is failing with:
>
> Forgive my ignorance... Should this question go to the Newlib folks?
Good thinking, but in this case, no. The problem (*iff* there is any)
and the potential fix would only affect Cygwin headers.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Error: unknown type name ‘pthread_attr_t’ in signal.h
2017-10-18 10:13 ` Corinna Vinschen
@ 2017-10-18 11:52 ` Ken Brown
2017-10-18 14:11 ` Corinna Vinschen
0 siblings, 1 reply; 11+ messages in thread
From: Ken Brown @ 2017-10-18 11:52 UTC (permalink / raw)
To: cygwin; +Cc: Jeffrey Walton
[CC-ing the OP in case he is not subscribed to the list.]
On 10/18/2017 6:13 AM, Corinna Vinschen wrote:
> On Oct 17 18:36, Jeffrey Walton wrote:
>> On Mon, Oct 16, 2017 at 3:12 AM, Jeffrey Walton <noloader@gmail.com> wrote:
>>> Hi Everyone,
>>>
>>> I'm trying to build Emacs on Cygwin. I use the platform as a test bed
>>> because of Newlib. Emacs is failing with:
>>
>> Forgive my ignorance... Should this question go to the Newlib folks?
>
> Good thinking, but in this case, no. The problem (*iff* there is any)
> and the potential fix would only affect Cygwin headers.
As I said in https://cygwin.com/ml/cygwin/2017-10/msg00144.html, this is
almost certainly the same gnulib issue that has already been fixed
(http://lists.gnu.org/archive/html/bug-gnulib/2016-03/msg00054.html).
The OP is probably building old emacs sources that hadn't incorporated
the fix.
Ken
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Error: unknown type name ‘pthread_attr_t’ in signal.h
2017-10-18 11:52 ` Ken Brown
@ 2017-10-18 14:11 ` Corinna Vinschen
2017-10-18 14:19 ` Ken Brown
2017-10-18 14:42 ` Yaakov Selkowitz
0 siblings, 2 replies; 11+ messages in thread
From: Corinna Vinschen @ 2017-10-18 14:11 UTC (permalink / raw)
To: cygwin
[-- Attachment #1: Type: text/plain, Size: 1249 bytes --]
On Oct 18 07:52, Ken Brown wrote:
> [CC-ing the OP in case he is not subscribed to the list.]
>
> On 10/18/2017 6:13 AM, Corinna Vinschen wrote:
> > On Oct 17 18:36, Jeffrey Walton wrote:
> > > On Mon, Oct 16, 2017 at 3:12 AM, Jeffrey Walton <noloader@gmail.com> wrote:
> > > > Hi Everyone,
> > > >
> > > > I'm trying to build Emacs on Cygwin. I use the platform as a test bed
> > > > because of Newlib. Emacs is failing with:
> > >
> > > Forgive my ignorance... Should this question go to the Newlib folks?
> >
> > Good thinking, but in this case, no. The problem (*iff* there is any)
> > and the potential fix would only affect Cygwin headers.
>
> As I said in https://cygwin.com/ml/cygwin/2017-10/msg00144.html, this is
> almost certainly the same gnulib issue that has already been fixed
> (http://lists.gnu.org/archive/html/bug-gnulib/2016-03/msg00054.html). The OP
> is probably building old emacs sources that hadn't incorporated the fix.
Yeah, I saw that, Ken, but thanks for pointing it out. I was
talking about this more in a theoretical way :)
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Error: unknown type name ‘pthread_attr_t’ in signal.h
2017-10-18 14:11 ` Corinna Vinschen
@ 2017-10-18 14:19 ` Ken Brown
2017-10-18 14:42 ` Yaakov Selkowitz
1 sibling, 0 replies; 11+ messages in thread
From: Ken Brown @ 2017-10-18 14:19 UTC (permalink / raw)
To: cygwin
On 10/18/2017 10:11 AM, Corinna Vinschen wrote:
> On Oct 18 07:52, Ken Brown wrote:
>> [CC-ing the OP in case he is not subscribed to the list.]
>>
>> On 10/18/2017 6:13 AM, Corinna Vinschen wrote:
>>> On Oct 17 18:36, Jeffrey Walton wrote:
>>>> On Mon, Oct 16, 2017 at 3:12 AM, Jeffrey Walton <noloader@gmail.com> wrote:
>>>>> Hi Everyone,
>>>>>
>>>>> I'm trying to build Emacs on Cygwin. I use the platform as a test bed
>>>>> because of Newlib. Emacs is failing with:
>>>>
>>>> Forgive my ignorance... Should this question go to the Newlib folks?
>>>
>>> Good thinking, but in this case, no. The problem (*iff* there is any)
>>> and the potential fix would only affect Cygwin headers.
>>
>> As I said in https://cygwin.com/ml/cygwin/2017-10/msg00144.html, this is
>> almost certainly the same gnulib issue that has already been fixed
>> (http://lists.gnu.org/archive/html/bug-gnulib/2016-03/msg00054.html). The OP
>> is probably building old emacs sources that hadn't incorporated the fix.
>
> Yeah, I saw that, Ken, but thanks for pointing it out. I was
> talking about this more in a theoretical way :)
Ah, OK. My main reason for writing was to CC the OP, since his latest
email suggested that he hadn't seen any of the replies.
Ken
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Error: unknown type name ‘pthread_attr_t’ in signal.h
2017-10-18 14:11 ` Corinna Vinschen
2017-10-18 14:19 ` Ken Brown
@ 2017-10-18 14:42 ` Yaakov Selkowitz
1 sibling, 0 replies; 11+ messages in thread
From: Yaakov Selkowitz @ 2017-10-18 14:42 UTC (permalink / raw)
To: cygwin
[-- Attachment #1.1: Type: text/plain, Size: 1235 bytes --]
On 2017-10-18 09:11, Corinna Vinschen wrote:
> On Oct 18 07:52, Ken Brown wrote:
>> On 10/18/2017 6:13 AM, Corinna Vinschen wrote:
>>> On Oct 17 18:36, Jeffrey Walton wrote:
>>>> On Mon, Oct 16, 2017 at 3:12 AM, Jeffrey Walton <noloader@gmail.com> wrote:
>>>>> Hi Everyone,
>>>>>
>>>>> I'm trying to build Emacs on Cygwin. I use the platform as a test bed
>>>>> because of Newlib. Emacs is failing with:
>>>>
>>>> Forgive my ignorance... Should this question go to the Newlib folks?
>>>
>>> Good thinking, but in this case, no. The problem (*iff* there is any)
>>> and the potential fix would only affect Cygwin headers.
>>
>> As I said in https://cygwin.com/ml/cygwin/2017-10/msg00144.html, this is
>> almost certainly the same gnulib issue that has already been fixed
>> (http://lists.gnu.org/archive/html/bug-gnulib/2016-03/msg00054.html). The OP
>> is probably building old emacs sources that hadn't incorporated the fix.
>
> Yeah, I saw that, Ken, but thanks for pointing it out. I was
> talking about this more in a theoretical way :)
I don't think there is anything more to do on our end wrt this gnulib issue.
--
Yaakov Selkowitz
Software Engineer - Platform Enablement Group
Red Hat, Inc.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread