public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: ggl329 <ggl329@gmail.com>
To: cygwin@cygwin.com
Subject: iostream doesn't work (clang++)
Date: Wed, 5 Jul 2023 01:48:08 +0900	[thread overview]
Message-ID: <7e07e251-2ec6-b7a5-62da-8578eb638993@gmail.com> (raw)

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.


Package version information which may be related.

Cygwin Package Information
Package              Version
binutils             2.40-1
clang                8.0.1-1
compiler-rt          8.0.1-1
cygwin               3.4.7-1
cygwin-devel         3.4.7-1
gcc-core             11.4.0-1
gcc-g++              11.4.0-1
libc++-devel         8.0.1-1
libc++1              8.0.1-1
libc++abi-devel      8.0.1-1
libc++abi1           8.0.1-1
libclang-devel       8.0.1-1
libclang8            8.0.1-1
libllvm-devel        8.0.1-1
libllvm8             8.0.1-1
libpolly-devel       8.0.1-1
libpolly8            8.0.1-1
libstdc++6           11.4.0-1
libunwind-devel      8.0.1-1
libunwind1           8.0.1-1
llvm                 8.0.1-1

-- 
   ggl329

             reply	other threads:[~2023-07-04 16:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-04 16:48 ggl329 [this message]
2023-07-04 18:51 ` Mark Geisert
2023-07-05  3:06 ` Mark Geisert
2023-07-05 15:54   ` ggl329
2023-07-05 23:08     ` Brian Inglis
2023-07-07  8:01       ` Mark Geisert
2023-07-07 15:48       ` Jon Turney
2023-07-07 18:18         ` gs-cygwin.com
2023-07-08  9:12           ` Jon Turney
2023-07-13  5:52     ` Mark Geisert
2023-07-13 16:11       ` ggl329

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7e07e251-2ec6-b7a5-62da-8578eb638993@gmail.com \
    --to=ggl329@gmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).