delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/09/26/00:49:25

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:reply-to:subject:to:references:from:message-id
:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=ZZXN9JIdgt9Aop2v
lX/zS8mPiyvCg0RqiGedKsFfAduqWtuuNspb8h6NAh1Fp+TldPw2UzIIl8Uxqw/1
IbS/9atKDfUznavb4YVKIB9/4Ok2RzbGVYxbItEFPGif4FaNNzVCsmzY6swmwB6Y
PDB/EgYy8/iHroWI2S1G4gvGw24=
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:reply-to:subject:to:references:from:message-id
:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=JA/0O5U/oYAcX0UXh5UoFz
S79ws=; b=ZNFw/+YJ0dxDGTG6Q4hkOFjtZcouwU1Rz6yDhMvmqYaOa0HIhLqQIc
7VB1a5q1NQsSiUEQ3RdHE7VxDeaumxE7kCPN2rZFRYSdD8ctDqmuuokgvqSNm6Wk
Rbf672qeTsT5aI3GrQ5p1pNKlIm1FRc5kDshFBh4GGx0xoStN0IiQ=
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=-0.3 required=5.0 tests=AWL,BAYES_20,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=H*r:ip*192.168.1.100, Hx-spam-relays-external:!192.168.1.100!, H*RU:!192.168.1.100!, creep
X-HELO: smtp-out-so.shaw.ca
X-Authority-Analysis: v=2.2 cv=B4DJ6KlM c=1 sm=1 tr=0 a=MVEHjbUiAHxQW0jfcDq5EA==:117 a=MVEHjbUiAHxQW0jfcDq5EA==:17 a=IkcTkHD0fZMA:10 a=NEAV23lmAAAA:8 a=w_pzkKWiAAAA:8 a=azV_T_9n9q6lniu_a-UA:9 a=QEXdDO2ut3YA:10 a=sRI3_1zDfAgwuvI8zelB:22
Reply-To: Brian DOT Inglis AT SystematicSw DOT ab DOT ca
Subject: Re: GCC-6.4 sys/select.h build failures with std=c++14
To: cygwin AT cygwin DOT com
References: <CAHBhQykTn7Y2rPVtAQSaVu+1J8ytSDAAcT-Su5e_oABEVNmtrA AT mail DOT gmail DOT com>
From: Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca>
Message-ID: <961f5079-1561-64c8-8b32-c74099755ef1@SystematicSw.ab.ca>
Date: Mon, 25 Sep 2017 22:49:04 -0600
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0
MIME-Version: 1.0
In-Reply-To: <CAHBhQykTn7Y2rPVtAQSaVu+1J8ytSDAAcT-Su5e_oABEVNmtrA@mail.gmail.com>
X-CMAE-Envelope: MS4wfA7BAj/qOALOWwDhgwJVt+4TnsiD7hBAf4IdYSP6f0goQBgDkeDWPopVkXvS15jf72NdqCz7EAifUNBLqlXLw4yHyjGv8Tg51l0gKqzjq43fryiv/RrG nE3mYKRn2Xmrjcxc7AHARrc6PtQXlkxGxABBp4VJPUrcCCS39ZtwlWYpm+Of+BHO4eXwjyWNOS8EbQ==
X-IsSubscribed: yes

On 2017-09-25 19:41, Ian Fette wrote:
> I tried compiling a very simple program with curl using -std=c++14 under 
> 64-bit cygwin with gcc 6.4.0. When compiling with just g++ main.cpp -lcurl 
> everything is fine, however if I try to use c++14 as the dialect (g++ 
> main.cpp -lcurl -std=c++14) familiar problems creep up

> This is resolved by manually including <sys/select.h> before including 
> <curl/curl.h>

> This was discussed in the curl project in the past 
> (https://github.com/curl/curl/issues/749) where it was determined that it was
> caused by a cygwin bug which was addressed in 
> https://cygwin.com/git/gitweb.cgi?p=newlib-cygwin.git;a=blob;f=newlib/libc/include/sys/types.h;
> h=c9f0fc7f3a9ca420c2372c9af42ce2a0e63e3b1c;hb=ee97c4b22491b205fd3b7697e03c909e02b652d3
> If anyone has thoughts, I'd greatly appreciate it.

A lot of GNU and Cygwin package build problems are avoided by building either
without any -std=... option, or equivalently with -std=gnu++nn, which enables
many non-portable GCC extensions and Unix features, instead of -std=c++nn, which
disables GCC extensions and Unix features, and accepts only portable features
supported by GCC and C++ headers you specify.

In general, try replacing -std=c... with -std=gnu... or omitting -std=... and
see if your program builds without errors or warnings.
Adding -Wall -Wextra will let you know if anything appears questionable to the
compiler.

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

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