<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<b style="font-style: normal; font-variant: normal; letter-spacing:
normal; line-height: normal; orphans: auto; text-align: start;
text-indent: 0px; text-transform: none; white-space: normal;
widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;
color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size:
medium; background-color: rgb(255, 255, 255);">On 10/30/2015 10:02
PM, Krzysztof Parzyszek via llvm-dev</b><span style="margin: 0px;
padding: 0px; border: 0px; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(0,
0, 0); font-family: 'Times New Roman'; font-size: medium; float:
none; display: inline !important; background-color: rgb(255, 255,
255);"><span style="margin: 0px; padding: 0px; border: 0px;"><span
class="Apple-converted-space"> </span></span></span><a
href="javascript:" title="[llvm-dev] opt: undefined symbol:
_ZN4llvm9DebugFlagE" target="_blank"
gdf-obfuscated-mailto="NfVqbFNeEAAJ" rel="nofollow"
onmousedown="this.href='javascript:';return true;"
onclick="this.href='javascript:';return true;" style="margin: 0px;
padding: 0px; border: 0px; text-decoration: none; color: rgb(102,
17, 204); cursor: pointer; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px; font-family:
'Times New Roman'; font-size: medium; background-color: rgb(255,
255, 255);">wrote:</a><span style="color: rgb(34, 34, 34);
font-family: Arial, Helvetica, sans-serif; font-size: 13px;
font-style: normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: normal; orphans: auto;
text-align: start; text-indent: 0px; text-transform: none;
white-space: normal; widows: auto; word-spacing: 0px;
-webkit-text-stroke-width: 0px; display: inline !important; float:
none; background-color: rgb(255, 255, 255);"></span>
<hr style="font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; line-height: normal; orphans:
auto; text-align: start; text-indent: 0px; text-transform: none;
white-space: normal; widows: auto; word-spacing: 0px;
-webkit-text-stroke-width: 0px; color: rgb(0, 0, 0); font-family:
'Times New Roman'; font-size: medium; background-color: rgb(255,
255, 255);">
<pre style="margin: 0px; padding: 0px; border: 0px; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: pre-wrap; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"><div class="IVILX2C-Db-b" style="margin: 0px; padding: 0px; border: 0px; color: rgb(136, 136, 136);">On 10/30/2015 11:01 AM, Irini via llvm-dev wrote:
>>
<i>
</i>><i>> I try to run my pass by executing:
</i>><i>> opt -load ../../../Release+Asserts/lib/<wbr>MyPass.so -MyPassName
</i>>>
>><i> But I get this error:
</i>>><i>
</i>><i>> Error opening '../../../Release+Asserts/lib/<wbr>MyPass.so':
</i>><i>> ../../../Release+Asserts/lib/<wbr>MyPass.so: undefined symbol:</i><i> _ZN4llvm9DebugFlagE
</i>><i>> -load request ignored.
</i>>><i> opt: Unknown command line argument '-MyPassName'. Try: 'opt -help'
</i></div>>
>
> Is your "opt" built with NDEBUG?
>
> -Krzysztof
I found the solution to this with a little hack. In case anyone faces the same problem:
I build LLVM and set these flags on configure:
> $(LLVM_SRC_PATH)/configure --enable-clang-plugin-support --enable-clang-static-analyzer --enable-assertions --enable-werror --enable-debug-runtime --enable-debug-symbols --with-clang-srcdir
It created a folder Release+Debug+Asserts (can't really get how it can be both release and debug , following the code it's not possible (?!) )
Still it couldn't recognize the 'Debug()' calls and I was getting the same error as before.
Finally, I set 'llvm::DEBUG = true' on my Pass and it worked.
--irini
</pre>
</body>
</html>