delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/10/16/04:40:11

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:reply-to:in-reply-to:references
:from:date:message-id:subject:to:content-type
:content-transfer-encoding; q=dns; s=default; b=X/7P4gbgKYuWzjn3
vFp5r9AS3YMGnp7I6zPe10dw3JySD2x7Vd816Y2cF/uJphQj5eKeLWBrGntEW+tR
7pqkLcgcIdGAdGKWRSCC9czZ1OfCWirrvRWo+SnzLIHDj2qnvS1J3s8r+3NhloWL
mV/qcMDSpr8lqp2Y5hxLT5NqJBk=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:reply-to:in-reply-to:references
:from:date:message-id:subject:to:content-type
:content-transfer-encoding; s=default; bh=8oJFMdQtPEuSOBjuxDAqG0
IVr+k=; b=tzfBbKjzeUyDVmdqHo7tUm2Uy33WKmT4Xa9/uHYjnnmJNCxK73/BKQ
MCOqxQZL6CBrZDBUKF4owRcioZQnQ4saG+4345kyd1G2oTxTw5KKPnXFBN+ZV8Rc
iDVbYgxBoI8n0FJFQUCtun9PC/SDsMcPubdSwGr8Mpvzegqj6mQ7A=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=1.1 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=walton, Walton, gear, confer
X-HELO: mail-oi0-f66.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:content-transfer-encoding; bh=ahTYZ/eOr8gomIRD3EV2ejm+fNORiFt6TmrN+XuuFbY=; b=rEoQn0v9noKZQYWTI8+SY8XK9uXqSs+EWhEHZMRAtchTnMM4OOy+hOPEH4FQyUMDF3 ZqQPmCjrtTkScjBtqbuXOtmOzL2ZmTVnNxHZCyMlxQ0JLxDFgfdMrCkFQjvAFdovQ2FC EW2o/mMm3lxtnJN0tYBo+xCfVfdYOJAijoboVZ4Ncj+/9V5wi1H0KV6KkMuT5GG3FqfU GD23WE+P8thDZBBj8A1CWUCWi7JbDBOVLEljTz1VayeSDvUSgJDjoOot2UFYlKoJLLzr CgeP2wMId6+OhvRV7ADibo3C2J+FQA9L1mAHad8sfNi8MTBp5W0UUA5Zc6uc1xmgwAvg +p9w==
X-Gm-Message-State: AMCzsaVxVATH3G5mE49q4jIGbHNqBiqDsGalwgQHLltVrddy75ln6Fia LqNvwWktq14X2kU6+ArHIduNyKKQFp+fwAmLAOKiRix8
X-Google-Smtp-Source: ABhQp+SBG70WCbAvg7AQ/5ruPBS8uraxacU3VrYq0oJNnVn4tXVJQIiBOpZ/Bl48CceYEHUvDJEgVZ8lnqmVZaW7x7o=
X-Received: by 10.202.77.23 with SMTP id a23mr4755742oib.309.1508143194016; Mon, 16 Oct 2017 01:39:54 -0700 (PDT)
MIME-Version: 1.0
Reply-To: noloader AT gmail DOT com
In-Reply-To: <CAH8yC8=eY+bFd=t_4-UKFk+JnfamzQspzxFVpRdVT571LjBERQ@mail.gmail.com>
References: <CAH8yC8=eY+bFd=t_4-UKFk+JnfamzQspzxFVpRdVT571LjBERQ AT mail DOT gmail DOT com>
From: Jeffrey Walton <noloader AT gmail DOT com>
Date: Mon, 16 Oct 2017 04:39:53 -0400
Message-ID: <CAH8yC8n+Dbr6ANUKrcnF+X2c_KWoJBDYXxmtTZyNHA1b1F7oAw@mail.gmail.com>
Subject: =?UTF-8?Q?Re=3A_Error=3A_unknown_type_name_=E2=80=98pthread=5Fattr=5Ft=E2=80=99_in?= =?UTF-8?Q?_signal=2Eh?=
To: cygwin AT cygwin DOT com
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id v9G8eAtW005201

On Mon, Oct 16, 2017 at 3:12 AM, Jeffrey Walton <noloader AT gmail DOT 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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019