<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div>Thanks Jordan, you were correct. Somehow llvm-config --cxxflags didn't include the -fno-rtti flag.<br></div>
<div> </div>
<div id="sig19426269"><div class="signature">-- <br></div>
<div class="signature"> Gábor Kozár -- ShdNx<br></div>
<div class="signature"> kozargabor@gmail.com<br></div>
<div class="signature"> </div>
</div>
<div> </div>
<div> </div>
<div>On Thu, Oct 3, 2013, at 15:10, Gabor Kozar wrote:<br></div>
<blockquote type="cite"><div>Hi all,<br></div>
<div> </div>
<div>Thank you for the answers.<br></div>
<div> </div>
<blockquote><div>I'm still not sure why you'd have a reference to it, but perhaps your plugin is being compiled with -frtti instead of -fno-rtti?<br></div>
</blockquote><div> </div>
<div>We usually build our plugin using flags we get from llvm-config --cxxflags --ldflags, etc. However, on this particular server, this didn't work for some reason, so we provided the args manually. I'll check whether we indeed missed -fno-rtti. Thanks for the tip!<br></div>
<div> </div>
<blockquote><div>After installing clang in release mode (for me ./configure --disable-assertions --enable-optimized), the installed binary of clang cannot load plugins any more. One needs to copy the original binary manually and strip it with option -x (or not at all).<br></div>
</blockquote><div> </div>
<div>We are not actually installing the binary, just building it. The test machine is a server environment where we don't have (i.e. cannot expect to) have root access.<br></div>
<div>Thanks for mentioning it though, it's again something we have to watch out for.<br></div>
<div> </div>
<div><div>-- <br></div>
<div> Gábor Kozár -- ShdNx<br></div>
<div> kozargabor@gmail.com<br></div>
<div> </div>
</div>
<div> </div>
<div> </div>
<div>On Thu, Oct 3, 2013, at 5:05, Mathieu Baudet wrote:<br></div>
<blockquote type="cite"><div>Hi Gabor,<br></div>
<div> </div>
<div>I was planning on reporting the following issue (or caveat) for some<br></div>
<div>time. This might explain your problem.<br></div>
<div> </div>
<div>After installing clang in release mode (for me ./configure<br></div>
<div>--disable-assertions --enable-optimized), the installed binary of<br></div>
<div>clang cannot load plugins any more. One needs to copy the original<br></div>
<div>binary manually and strip it with option -x (or not at all).<br></div>
<div> </div>
<div>Failing to do so gives an error comparable to the one you report.<br></div>
<div> </div>
<div>Hoping this helps,<br></div>
<div>--<br></div>
<div>Mathieu<br></div>
<div> </div>
<div>2013/10/2 Jordan Rose <<a href="mailto:jordan_rose@apple.com">jordan_rose@apple.com</a>>:<br></div>
<blockquote><div>Running this through c++filt shows that it's a typeinfo object. I'm still<br></div>
<div>not sure why you'd have a reference to it, but perhaps your plugin is being<br></div>
<div>compiled with -frtti instead of -fno-rtti?<br></div>
<div> </div>
<div>Jordan<br></div>
<div> </div>
<div> </div>
<div>On Oct 2, 2013, at 8:59 , Gabor Kozar <<a href="mailto:kozargabor@gmail.com">kozargabor@gmail.com</a>> wrote:<br></div>
<div> </div>
<div>Hi,<br></div>
<div> </div>
<div>We have a Clang Static Analyzer plugin that registers a bunch of custom<br></div>
<div>checkers. We're using LLVM and Clang 3.3.<br></div>
<div>Clang 3.3 is able to compile, and the Static Analyzer also runs without our<br></div>
<div>plugin being loaded.<br></div>
<div> </div>
<div>On one of our test machines (a Suse Linux 11), trying to load our plugin<br></div>
<div>fails:<br></div>
<div> </div>
<blockquote><div>clang++ -cc1 -load lib-checkers.so<br></div>
</blockquote><div>error: unable to load plugin 'lib-checkers.so': 'lib-checkers.so: undefined<br></div>
<div>symbol: _ZTIN4llvm18RefCountedBaseVPTRE'<br></div>
<div> </div>
<div>Our plugin does not use llvm::RefCountedBaseVPTR, although it does make<br></div>
<div>direct use of some LLVM types, such as llvm::Optional, llvm::DenseMap and so<br></div>
<div>on.<br></div>
<div> </div>
<div>When building our plugin, we do not link against any LLVM or Clang<br></div>
<div>libraries, except for clangASTMatchers. We also tried linking against them,<br></div>
<div>but it doesn't seem to make any difference.<br></div>
<div>Both Clang and the plugin are built with the same compiler and on the same<br></div>
<div>system.<br></div>
<div> </div>
<div>As far as we can determine, this issue only appears when trying to load our<br></div>
<div>plugin, and Clang is able to function perfectly when we don't try to load<br></div>
<div>it.<br></div>
<div> </div>
<div>Any idea on what could be the issue? We're totally clueless here.<br></div>
<div>Thanks!<br></div>
<div> </div>
<div>--<br></div>
<div>Gábor Kozár -- ShdNx<br></div>
<div><a href="mailto:kozargabor@gmail.com">kozargabor@gmail.com</a><br></div>
<div> </div>
<div><u>_______________________________________________</u><br></div>
<div>cfe-dev mailing list<br></div>
<div><a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br></div>
<div><a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br></div>
<div> </div>
<div> </div>
<div> </div>
<div><u>_______________________________________________</u><br></div>
<div>cfe-dev mailing list<br></div>
<div><a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br></div>
<div><a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br></div>
<div> </div>
</blockquote></blockquote><div><u>_______________________________________________</u><br></div>
<div>cfe-dev mailing list<br></div>
<div><a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br></div>
<div><a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br></div>
</blockquote></body>
</html>