Re: Request to update libc++ related packages for current Clang/LLVM toolchain

Takashi Yano via Cygwin <[email protected]>
Newsgroups gmane.os.cygwin
Message-ID <[email protected]>
On Fri, 16 Jan 2026 00:05:31 +0200
Florin wrote:
> On Thu, Jan 15, 2026 at 5:00 PM Takashi Yano via Cygwin <[email protected]>
> wrote:
> 
> > On Thu, 15 Jan 2026 21:53:21 +0900
> > Takashi Yano wrote:
> > > On Sun, 11 Jan 2026 23:11:00 +0200
> > > Florin wrote:
> > > > Hello Cygwin list,
> > > >
> > > > I’ve noticed that the Clang/LLVM stable packages in Cygwin are at
> > version
> > > > 20.1.x, while the libc++-devel, libc++1, libc++abi-devel, libc++abi1,
> > > > libunwind-devel and libunwind1 packages are still at 8.0.1. According
> > to
> > > > the package summaries, they were last updated in 2019.
> > > >
> > > > This version mismatch can present issues using modern C++ features and
> > > > makes it hard to use a complete LLVM toolchain with libc++ on Cygwin.
> > > >
> > > > I searched the Cygwin mailing list archives for prior posts about
> > updating
> > > > libc++, but I didn’t find a clear request or discussion about
> > coordinating
> > > > libc++ versions with newer Clang.
> > > >
> > > > Could you clarify if there is a plan to update libc++ to match more
> > recent
> > > > LLVM releases, or if the recommended C++ standard library for newer and
> > > > future Clang versions on Cygwin should be libstdc++.
> > > >
> > > > Thank you for your time and I'm grateful for the effort you all put
> > into
> > > > this project.
> > >
> > > I have just uploaded libcxx, compiler-rt, and libunwind packages.
> > > However, you cannot use them with -stdlib=libc++, -rtlib=compiler-rt,
> > > and -unwindlib=libunwind. This is because clang package has incomplete
> > > cygwin driver.
> > >
> > > You can link them to, for example hello.cc, with:
> > > clang++ -stdlib=libc++ -isystem /usr/include/c++/v1 hello.cc -lc++
> > $(clang --print-resource-dir)/lib/cygwin/libclang_rt.builtins-x86_64.a
> > -lunwind
> > >
> > > The resulted a.exe will be free from libgcc_s. Please try.
> >
> > I also uploaded 21.1.4-1 (Test) which works with clang/llvm 21.1.4-1
> > (Test).
> > This test version does not have the problem above.
> >
> > --
> > Takashi Yano <[email protected]>
> >
> > --
> >
> 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
> 
> Hi Takashi,
> 
> I appreciate the short response time and the details you provided.
> 
> The test with a simple Hello World source on clang-20 based on your compile
> command succeeded and the result does not depend, indeed, on
> *cyggcc_s-seh-1.dll*. I didn't test the *-fuse-ld=lld* flag.
> 
> For the test versions (21.1.4-1) I kept getting link errors. The
> command *clang++
> -v -stdlib=libc++ -fuse-ld=lld hello.cc -lc++ -lunwind* produces a few
> errors like this:
> 
> > ld.lld: error: undefined symbol: std::__1::basic_ostream<char,
> > std::__1::char_traits<char>>::sentry::sentry(std::__1::basic_ostream<char,
> > std::__1::char_traits<char>>&)
> > >>> referenced by /tmp/hello-a3d7ec.o:(std::__1::basic_ostream<char,
> > std::__1::char_traits<char>>& std::__1::__put_character_sequence
> > *[abi:ne210104]*<char,
> > std::__1::char_traits<char>>(std::__1::basic_ostream<char,
> > std::__1::char_traits<char>>&, char const*, unsigned long))
> 
> 
> The default *ld* linker (*clang++ -v -stdlib=libc++ hello.cc -lc++ -lunwind* )
> behaves similarly:
> 
> > /usr/bin/ld:
> > /tmp/hello-e03638.o:hello.cc:(.text$_ZNSt3__124__put_character_sequenceB8ne210104IcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m[_ZNSt3__124__put_character_sequenceB8ne210104IcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m]+0x1ad):
> > undefined reference to `std::__1::basic_ostream<char,
> > std::__1::char_traits<char> >::sentry::~sentry()'
> >
> 
> I've tried different workarounds but couldn't make it work for clang-21
> (-std=c++14, -D_LIBCPP_ABI_VERSION=1, -fno-exceptions, -fno-rtti).
> 
> Do you have a working compile command I could try?
> 
> The symbols demanded by compiler require *[abi:ne210104]* while the libc++
> contains symbols with different ABI.
> The command *nm /usr/lib/libc++.dll.a | grep "basic_ostream" *produces
> lines like "*0000000000000000 T
> _ZTv0_n24_NSt3__113basic_ostreamIcNS_11char_traitsIcEEED1Ev*", which lacks
> the expected ABI tag.
> 
> Is libc++ compiled with the correct flags?
> Has the compiler some defaults not matching what current libc++ provides?
> 
> Thank you for your time and we love your work,

Thanks for testing and the report. That issue will be fixed in 21.1.4-2 (Test).
Please test 21.1.4-2 (Test) as well that will be uploaded shortly.

-- 
Takashi Yano <[email protected]>

-- 
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.