<div dir="ltr">Unfortunately without more info (like the compile/link commands) I'd be unable to help - but it seems like you're either linking the wrong libc++ implicitly, or your link line order doesn't resolve the dependencies in the right way (<a href="https://www.linuxtopia.org/online_books/an_introduction_to_gcc/gccintro_18.html">example</a>). You can eliminate the latter problem by linking with lld (-fuse-ld=lld), as IIRC it doesn't have problems resolving out-of-order libraries. You might also find clang's verbose mode (-v) useful to find the linker invocation, and can use the linker's verbose option (-Wl,-v if invoked through the clang driver) to determine which libc++ you ended up trying to link with.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, May 18, 2021 at 3:43 AM floris westermann <<a href="mailto:wfloris@student.ethz.ch">wfloris@student.ethz.ch</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">Hi Mitch,<div><br></div><div>I checked the lib and the symbols seem to be present:</div><div><br></div><div>$ nm /usr/local/lib/libc++.so.1.0 | grep exception | grep what</div>0000000000236554 T dfs$_ZNKSt13bad_exception4whatEv<br>0000000000236538 T dfs$_ZNKSt9exception4whatEv<br><div><br></div><div>What should be the link order?</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 17 May 2021 at 19:34, Mitch Phillips <<a href="mailto:mitchp@google.com" target="_blank">mitchp@google.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">Removing the dfs$ prefix from the mangled name, the symbol that's missing is std::exception::what(), which normally comes from libc++abi. Are you sure that libc++abi.so contains the dfsan-prefixed symbol and your link line order is correct?<br><div><br></div><div>On my machine:</div><div><br></div><div>$ ninja cxx cxxabi && nm lib/libc++abi.so.1.0 | grep exception | grep what</div><div>000000000011cd60 T dfs$_ZNKSt13bad_exception4whatEv<br>000000000011cc90 T dfs$_ZNKSt9exception4whatEv<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 17, 2021 at 9:02 AM floris westermann via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-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 dir="ltr">Hi everyone,<div><br></div><div>I am currently trying to compile a project with the Dataflow sanitizer.</div><div>I have recompiled the libcxx and other dependencies using the sanitizer and the libc++abi.</div><div><br></div><div>The libraries are linked dynamically but when I try to execute the binary I get the following error:</div><div>```symbol lookup error: ./Variane_testharness: undefined symbol: dfs$_ZNKSt9exception4whatEv```</div><div><br></div><div>The project is a verilog project that is translated to CPP with verilator.</div><div><br></div><div><div>Does anyone know how I can resolve this?</div><div><br></div><div>Cheers,</div><div>Floris</div><div></div></div></div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>
</blockquote></div>
</blockquote></div>