www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2023/07/04/14:52:43

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4E2B2385734D
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1688496720;
bh=AY0Z+P5f2OxDD9U8SeJ2S1P7niX/iEvGpBryaBOE1rM=;
h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=dQl1hg1YM8u0gt3KT1suyYzQo/LdGKXNwMLgpW0vBgkrDLYBhC1HF1j/+Cs3ZZP4x
DEXjNUVi7KV+mqEz0M/K8+dO+sv/VHAavLOgITGJcWhs4I9TG/5rSocsAI6r4rZ2cH
stJTbpt8MAIa/zS2Y//+YAuEazqQwU0FMK2uCjEI=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 14F8A3858D32
Subject: Re: iostream doesn't work (clang++)
To: cygwin AT cygwin DOT com
References: <7e07e251-2ec6-b7a5-62da-8578eb638993 AT gmail DOT com>
Message-ID: <4a37e6f9-bcc2-f222-8598-43ba0a4ed54c@maxrnd.com>
Date: Tue, 4 Jul 2023 11:51:16 -0700
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101
Firefox/52.0 SeaMonkey/2.49.4
MIME-Version: 1.0
In-Reply-To: <7e07e251-2ec6-b7a5-62da-8578eb638993@gmail.com>
X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, BODY_8BITS,
KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, SPF_HELO_NONE,
SPF_NONE, TXREP,
T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Mark Geisert via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Mark Geisert <mark AT maxrnd DOT com>
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 364IqO6T025531

Hi there,

ggl329 via Cygwin wrote:
> Hi,
> 
> clang++ fails with iostream.
> Does it go well in your environment?
> # I noticed that clang is orphaned. clang requires a maintainer?
> 
> 
> $ cat sample.cc
> #include <iostream>
> int main()
> {
>      std::cout << "Hello World.\n";
>      return 0;
> }
> 
> $ g++ sample.cc
> $ ./a
> Hello World.
> 
> $ clang++ sample.cc
> In file included from sample.cc:1:
> In file included from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/iostream:39:
> In file included from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/ostream:38:
> In file included from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/ios:42:
> In file included from 
> /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/bits/ios_base.h:39:
> In file included from 
> /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/ext/atomicity.h:35:
> In file included from 
> /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/x86_64-pc-cygwin/bits/gthr.h:148:
> In file included from 
> /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/x86_64-pc-cygwin/bits/gthr-default.h:35:
> In file included from /usr/include/pthread.h:11:
> In file included from /usr/include/sys/types.h:221:
> In file included from /usr/include/sys/_pthreadtypes.h:12:
> /usr/include/sys/cpuset.h:45:24: error: use of undeclared identifier 
> '__builtin_malloc'; did you mean
>        '__builtin_alloca'?
>    return (cpu_set_t *) __builtin_malloc (CPU_ALLOC_SIZE(num));
>                         ^
> /usr/include/sys/cpuset.h:45:24: note: '__builtin_alloca' declared here
> /usr/include/sys/cpuset.h:52:3: error: use of undeclared identifier '__builtin_free'
>    __builtin_free (set);
>    ^
> 2 errors generated.
[...]

That's not a problem with <iostream>, but with <sys/cpuset.h>.  It did not 
anticipate being compiled with clang.  I will submit a patch.
Thanks for the report,

..mark

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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