[LLVMdev] "lazy symbol binding failed" with dynamically loaded pass in opt

Duncan P. N. Exon Smith dexonsmith at apple.com
Fri Apr 18 15:32:18 PDT 2014


On 2014-Apr-18, at 5:32, Julian Oppermann <oppermann at esa.informatik.tu-darmstadt.de> wrote:

> Hi Tim, Dear List,
> 
> Am 18.04.2014 um 10:08 schrieb Tim Northover <t.p.northover at gmail.com>:
>> One common problem (the only one I really know about, unfortunately)
>> is trying to load a module into Xcode's copy of "opt" rather than one
>> from the same tree as your module.
> 
> I just double-checked that I use the opt executable from the same tree I use to build the module.
> 
> This tree is configured as a Debug+Asserts build, and compiled by the system compiler (which identifies itself as "Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)“. Would compiling the LLVM tree with another compiler, e.g., a recent GCC, make any difference?

Seems unlikely to help.  We use Apple's clang all the time.

> I tried various combinations of linking my passes with the related libraries via USEDLIBS, LLVMLIBS and LINK_COMPONENTS with no success. The outcome is either that opt does not load the module at all because of duplicated symbols, or that my custom passes don’t register properly at runtime (e.g., they’re not visible in „opt --help“)

Are you using the same configure line on both Linux and Darwin?

What build system are you using?  (cmake vs. configure)

Is it the same build system you were using on Linux?

> Cheers,
> Julian
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev





More information about the llvm-dev mailing list