<div dir="ltr"><div>Thanks Louis for the clarification. I'll try to make sure we are using only one version.<br><br></div><div>Ken, it's incompatible, but this is an implementation detail and will not be a problem if you are using only one libc++.</div><div>Problems happen when mixing two different versions of libc++.<br></div><div><br></div>Isuru</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 6, 2021 at 7:04 PM Ken Cunningham <<a href="mailto:ken.cunningham.webuse@gmail.com">ken.cunningham.webuse@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 22, 2021 at 2:08 PM Louis Dionne via libcxx-dev <<a href="mailto:libcxx-dev@lists.llvm.org" target="_blank">libcxx-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;"><br><div><br><blockquote type="cite"><div>On Jul 10, 2021, at 09:33, Isuru Fernando via libcxx-dev <<a href="mailto:libcxx-dev@lists.llvm.org" target="_blank">libcxx-dev@lists.llvm.org</a>> wrote:</div><br><div><div dir="ltr"><div>Hi Ken,<br><br>I'm in the same situation as you in conda package manager.<br>Note that with libcxx 12, <a href="https://reviews.llvm.org/D91517" target="_blank">https://reviews.llvm.org/D91517</a> was merged where<div>codecvt with char8_t is added in the middle of a structure instead of at the end.<br></div><div>This means that you have to be careful that all applications link to the custom libc++.<br><br></div><div>For libcxx developers,</div><div><div>While we are discussing how to avoid ODR violations, is it possible to move the two lines at<br><a href="https://github.com/llvm/llvm-project/blob/llvmorg-12.0.1/libcxx/src/locale.cpp#L210-L211" target="_blank">https://github.com/llvm/llvm-project/blob/llvmorg-12.0.1/libcxx/src/locale.cpp#L210-L211 </a><br></div><div>to the bottom to avoid segfaults resulting from this?<br></div></div></div></div></div></blockquote><div><br></div><div>Generally speaking, we make the assumption that there's a single copy of libc++ in use inside a final linked image. Or if you want to use libc++ as an implementation detail and link it statically, ensure it doesn't export any symbols and has absolutely no ABI surface outside of the executable where it's being used. Chrome does that.</div><div><br></div><div>Anything else is very brittle, and I'm reluctant to add workarounds that make it look like it works, because you may run into other issues that we won't be able to patch so easily.</div><div><br></div><div>Louis</div><div><br></div></div></div>_______________________________________________<br>
libcxx-dev mailing list<br>
<a href="mailto:libcxx-dev@lists.llvm.org" target="_blank">libcxx-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/libcxx-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/libcxx-dev</a><br>
</blockquote></div><div><br></div><div>I had thought libc++ was more immune to this kind of problem given Apple's usual support to deploy on older systems.</div><div><br></div><div>If the libc++ structures have changed and are now incompatible with previous versions of libc++, would that now mean that an Apple build system using the new libc++ structures can no longer target a deployment target with an older libc++ (any system prior to the change)?</div><div><br></div><div>Ken</div>
</blockquote></div>