Re: c++: dynamic_cast woes

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Wed, 09 Aug 2023 22:25:55 UTC
On 9 Aug 2023, at 00:29, Christoph Moench-Tegeder <cmt@burggraben.net> wrote:
> 
> ## Dimitry Andric (dim@FreeBSD.org):
> 
>> Yes, this is a typical problem when type info is replicated across
>> dynamic library boundaries. The best thing to prevent this is to
>> ensure that the key functions for a class (typically constructors
>> and destructors) are only in one translation unit (object file),
>> and that object file is only in one .so file.
> 
> As FreeBSD is basically unsupported from upstream, this sounds
> like I'm in for quite a bit of fun here. Well.

FWIW, it took quite a while (kicad has LOTS of dependencies!), but I
built kicad and it looks like I can reproduce the original problem,
after disabling the static-cast-patch. So I will investigate it a bit
further.

-Dimitry