[LLVMdev] dyld: lazy symbol binding failed: fast lazy bind offset out of range

Jack Howarth howarth at bromo.med.uc.edu
Mon Oct 22 13:01:41 PDT 2012


On Mon, Oct 22, 2012 at 11:40:32AM -0700, Nick Kledzik wrote:
> 
> On Oct 22, 2012, at 11:34 AM, Jack Howarth wrote:
> 
> > Nick,
> >   I have uploaded the full walk with 'set env DYLD_PRINT_INITIALIZERS'. It didn't seem very informative
> > as the dyld error occurs right after...
> > 
> > (gdb)
> > llvm::sys::DynamicLibrary::getPermanentLibrary (filename=0x142903da8 "/sw/opt/llvm-3.2/lib/LLVMPolly.so", errMsg=0x7fff5fbfe6e0) at /sw/src/fink.build/llvm32-3.2-0/llvm-3.2/lib/Support/DynamicLibrary.cpp:77
> > 77        void *handle = dlopen(filename, RTLD_LAZY|RTLD_GLOBAL);
> > (gdb)
> > Reading symbols for shared libraries ... done
> > dyld: calling initializer function 0x100eea5b0 in /sw/opt/llvm-3.2/lib/LLVMPolly.so
> 
> You need to set a break point at 0x100eea5b0 and run again until that break is hit, then start stepping.
> 
> > Are there any tricks for identifying the order that the symbols are being resolved?
> (gdb) set env DYLD_PRINT_BINDINGS 1
> will show each use of a symbol as it is bound.  This can be *a lot* of information.  
> 
> -Nick

Nick,
    We can eliminate the linkages of ppl/isl/cloog in cc1 as the cause of the problem. I rebuilt the gcc47 package with...

Configured with: ../gcc-4.7.2/configure --prefix=/sw --prefix=/sw/lib/gcc4.7 --mandir=/sw/share/man --infodir=/sw/lib/gcc4.7/info --enable-languages=c,c++,fortran,lto,objc,obj-c++,java --with-gmp=/sw --with-libiconv-prefix=/sw --without-ppl --without-cloog --with-mpc=/sw --with-system-zlib --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib --program-suffix=-fsf-4.7

to disable the graphite support such that cc1 is linked as...

% otool -L  /sw/lib/gcc4.7/libexec/gcc/x86_64-apple-darwin12.2.0/4.7.2/cc1 
/sw/lib/gcc4.7/libexec/gcc/x86_64-apple-darwin12.2.0/4.7.2/cc1:
	/sw/lib/libintl.8.dylib (compatibility version 10.0.0, current version 10.1.0)
	/sw/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
	/sw/lib/libmpc.3.dylib (compatibility version 4.0.0, current version 4.0.0)
	/sw/lib/libmpfr.4.dylib (compatibility version 6.0.0, current version 6.1.0)
	/sw/lib/gmp5/libgmp.10.dylib (compatibility version 11.0.0, current version 11.5.0)
	/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)

Using a dragonegg.so plugin built against this compiler, still produces the error...

dyld: lazy symbol binding failed: fast lazy bind offset out of range (53437, max=2928) in image /sw/lib/gcc4.7/libexec/gcc/x86_64-apple-darwin12.2.0/4.7.2/cc1
dyld: fast lazy bind offset out of range (53437, max=2928) in image /sw/lib/gcc4.7/libexec/gcc/x86_64-apple-darwin12.2.0/4.7.2/cc1

when loading the /sw/opt/llvm-3.2/lib/LLVMPolly.so plugin. This is as much as I can reduce 
the cc1 linkages so I'll have to manually hunt for the symbol now. Sigh.
           Jack




More information about the llvm-dev mailing list