[LLVMdev] inserting a print statement into IR

Duncan Sands baldrick at free.fr
Mon Apr 4 23:44:58 PDT 2011


Hi George,

> This is the seg fault I am getting.
>
> dyld: lazy symbol binding failed: Symbol not found:
> __ZN4llvm13IRBuilderBase18CreateGlobalStringEPKcRKNS_5TwineE
>    Referenced from:
> /Users/georgebaah/llvm_dir/llvm-2.8/Debug+Asserts/lib/LLVMArrayBoundsCheck.dylib
>    Expected in: flat namespace
>
> dyld: Symbol not found: __ZN4llvm13IRBuilderBase18CreateGlobalStringEPKcRKNS_5TwineE
>    Referenced from:
> /Users/georgebaah/llvm_dir/llvm-2.8/Debug+Asserts/lib/LLVMArrayBoundsCheck.dylib
>    Expected in: flat namespace

this is quite a different kind failure to what I was imagining when you
mentioned getting a segfault!  Indeed calling a function will clearly fail
if that function doesn't exist.  I suggest you work out where in LLVM these
symbols are defined (or determine that they are not defined anywhere) and
then try to work out why your library wasn't linked with them.  Probably
you forgot to link with the right LLVM library.

Ciao, Duncan.



More information about the llvm-dev mailing list