[llvm-dev] opt: undefined symbol: _ZN4llvm9DebugFlagE

Irini via llvm-dev llvm-dev at lists.llvm.org
Thu Nov 5 04:59:57 PST 2015


*On 10/30/2015 10:02 PM, Krzysztof Parzyszek via llvm-dev*wrote: 
<javascript:>
------------------------------------------------------------------------

On 10/30/2015 11:01 AM, Irini via llvm-dev wrote: >> //>/> I try to run 
my pass by executing: />/> opt -load 
../../../Release+Asserts/lib/MyPass.so -MyPassName />> >>/But I get this 
error: />>//>/> Error opening '../../../Release+Asserts/lib/MyPass.so': 
/>/> ../../../Release+Asserts/lib/MyPass.so: undefined 
symbol://_ZN4llvm9DebugFlagE />/> -load request ignored. />>/opt: 
Unknown command line argument '-MyPassName'. Try: 'opt -help' /
>
>
> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151105/5336f374/attachment.html>


More information about the llvm-dev mailing list