lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] LLVM libc++


From: Vadim Zeitlin
Subject: Re: [lmi] LLVM libc++
Date: Tue, 12 Jul 2022 01:34:36 +0200

On Mon, 11 Jul 2022 23:01:57 +0000 Greg Chicares <gchicares@sbcglobal.net> 
wrote:

GC> On 7/11/22 22:02, Vadim Zeitlin wrote:
GC> > On Mon, 11 Jul 2022 19:03:25 +0000 Greg Chicares 
<gchicares@sbcglobal.net> wrote:
GC> > 
GC> > GC> On 7/11/22 16:22, Greg Chicares wrote:
GC> [...]
GC> > GC> Should I hope for better clang diagnostics if I use its
GC> > GC>   https://libcxx.llvm.org/
GC> > GC> standard library?
GC> > 
GC> >  Yes, I think this might be the case and, in particular, I'd be curious if
GC> > this particular error message is improved when using libc++. But mostly I
GC> > always use libc++ because it's even more different from libstdc++ than
GC> > clang itself is different from gcc and I've found several unportable
GC> > constructs in my own code that correctly failed to compile (or compiled
GC> > with warnings indicating a serious problem) with libc++, while they
GC> > compiled just fine with libstdc++. Again, I'm sure the reverse must be
GC> > possible as well, but as my primary compiler is gcc, I never encounter it.
GC> 
GC> Do you happen already to know exactly how to do that? I tried:
GC> 
GC>   /root[0]#apt-get install libc++-dev
GC>   The following additional packages will be installed:
GC>     libc++-13-dev libc++1-13 libc++abi1-13 libunwind-13 libunwind-13-dev
GC>   The following packages will be REMOVED:
GC>     libunwind-dev
GC> 
GC> and said "No" because I'm afraid it might break gcc unwinding.

 There is indeed a problem, since quite some time, in testing/unstable,
with libc++ and libunwind-dev being incompatible with each other. I've been
working around it by using a different chroot for the clang/libc++ builds,
as you don't need libunwind-dev for those and it won't be used anyhow, due
to the (required) check for __GLIBCXX__ in unwind.cpp.

 I keep hoping that sooner or later this problem will get resolved, but
it's present since at least a couple of months, so it certainly isn't
guaranteed that it will happen any time soon. But the only alternative
solution I can see is uninstalling libunwind-dev system package and
building our own libunwind and installing it under /usr/local, which is not
great neither. Oh, and there is also the possibility of using stable, of
course, where the problem doesn't exist, but you probably don't want to go
back to it.

 So for now I just keep using separate chroot (where I also installed clang
14 from experimental, because it's clearly a throwaway one anyhow).

 Sorry but I don't have a better answer,
VZ

Attachment: pgp3RwxizumzW.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]