Link error when compiling with -fsanitize=undefined
Jean-Marc Lasgouttes
lasgouttes at lyx.org
Mon Sep 20 08:56:24 UTC 2021
Le 18/09/2021 à 18:46, Kornel Benko a écrit :
> Am Sat, 18 Sep 2021 10:34:49 -0400
> schrieb Scott Kostyshak <skostysh at lyx.org>:
>
>>> I tried but failed. The problem is that tex2lyx uses
>>> libzlibstatic.a, ../../lib/libsupport.a to link with, but these are compiled with
>>> -fsanitize. So the only way is to define dummy versions as Jean-Marc pointed out.
>>
>> Thank you for trying, Kornel!
>>
>> Scott
>>
>
> Actually it was pretty easy. According to the error message,
> undefined reference to `typeinfo for lyx::xml::FontTag'
> looked wrong, since it is defined in xml.h. But src/tex2lyx/dummy_impl.cpp used
> FontTag _and_ did not include it xml.h.
>
> So inserting this include cured the compilation for me.
I do not know whether sanitize will prove useful, but the extra include
looks good.
JMarc
More information about the lyx-devel
mailing list