Re: Mac OS X Lion - dyld: lazy symbol binding failed
Re: Mac OS X Lion - dyld: lazy symbol binding failed
- Subject: Re: Mac OS X Lion - dyld: lazy symbol binding failed
- From: Rohitash Panda <email@hidden>
- Date: Mon, 17 Sep 2012 19:02:21 +0530
- Organization: Oracle Corp.
Thanks Jack , for your suggestions.
Moving to a the XCode 4.4.1 will result in a lot of re-work . So wanted
to know if there is some way we can fix this in the current tool-chain
version. I will also give it a try with XCode 4.4.1 in a test environment.
I recompiled the library ( which was failing ) into a loadable module
and now I'm not getting the "lazy symbol binding failed" errors during
loading . But I'm not sure its fine though , since I do see some other
errors .
$ ./sqlplus /nolog
Error 6 initializing SQL*Plus
SP2-0667: Message file sp1<lang>.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
Couple of queries :
1. Will a dynamic library get "lazy symbol binding failed" errors if its
supposed to a loadable module , as I don't see the error's when I make
the offending library it a bundle.
2. How can I check the sanity of the library built ? Are there any tools
available .
3. This seems like a dyld issue . Is it possible to debug dyld ( gdb /
dtrace ) . Are there any debug versions of dyld available.
Thanks.
On 9/10/2012 6:48 PM, Jack Howarth wrote:
On Mon, Sep 10, 2012 at 05:24:49PM +0530, Rohitash wrote:
Hi,
Need some help regarding the cause of this below error :
$ ./sqlplus /nolog
dyld: lazy symbol binding failed: Symbol not found: _ocieiInitSrcOff
Referenced from: rdbms/install/instantclient/libociei.dylib
Expected in: flat namespace
dyld: Symbol not found: _ocieiInitSrcOff
Referenced from: rdbms/install/instantclient/libociei.dylib
Expected in: flat namespace
Trace/BPT trap: 5
$ export DYLD_PRINT_APIS=1
$ sqlplus /nolog
_dyld_get_image_slide(0x102bf5000)
dyld_register_image_state_change_handler(40, 1, 0x7fff88a97fb6)
dlopen(libclntsh.dylib.11.1, 0x00000005
<https://bug.oraclecorp.com/pls/bug/webbug_edit.edit_info_top?rptno=00000005>)
dlsym(0x7fff62832288
<https://bug.oraclecorp.com/pls/bug/webbug_edit.edit_info_top?rptno=62832288>,
lfvinit)
dladdr(0x1047f94e0, 0x7fff627d8248)
dlopen(/ade/b/4272543511
<https://bug.oraclecorp.com/pls/bug/webbug_edit.edit_info_top?rptno=4272543511>/oracle/work/instantclient_11_2/libsqlplusic.dylib,0x00000005
<https://bug.oraclecorp.com/pls/bug/webbug_edit.edit_info_top?rptno=00000005>)
_dyld_get_image_slide(0x102bf5000)
dlclose(0x7fff62832288
<https://bug.oraclecorp.com/pls/bug/webbug_edit.edit_info_top?rptno=62832288>)
dlsym(0x7fc800404ae0, sqlplusicInit)
dlopen(libclntsh.dylib.11.1, 0x00000005
<https://bug.oraclecorp.com/pls/bug/webbug_edit.edit_info_top?rptno=00000005>)
dlsym(0x7fff62832288
<https://bug.oraclecorp.com/pls/bug/webbug_edit.edit_info_top?rptno=62832288>,
lfvinit)
dladdr(0x1047f94e0, 0x7fff627d7f48)
dlopen(/ade/b/4272543511
<https://bug.oraclecorp.com/pls/bug/webbug_edit.edit_info_top?rptno=4272543511>/oracle/work/instantclient_11_2/libociei.dylib,0x00000005
<https://bug.oraclecorp.com/pls/bug/webbug_edit.edit_info_top?rptno=00000005>)
dlclose(0x7fff62832288
<https://bug.oraclecorp.com/pls/bug/webbug_edit.edit_info_top?rptno=62832288>)
dlsym(0x7fc800405700
<https://bug.oraclecorp.com/pls/bug/webbug_edit.edit_info_top?rptno=800405700>,
ocieiInit)
dyld: lazy symbol binding failed: Symbol not found: _ocieiInitSrcOff
Referenced from:
/ade/b/4272543511
<https://bug.oraclecorp.com/pls/bug/webbug_edit.edit_info_top?rptno=4272543511>/oracle/work/instantclient_11_2/libociei.dylib
Expected in: flat namespace
$ nm -A libociei.dylib | grep _ocieiInitSrcOff
libociei.dylib: 0000000000000770
<https://bug.oraclecorp.com/pls/bug/webbug_edit.edit_info_top?rptno=0000000000000770>
T _ocieiInitSrcOff
It looks like dlsym() is not able to find/load the lazy symbol , even
though the symbol is clearly present in the library defined in the only
.c file that goes inside the library.
Appreciate your inputs if you have seen something similar .
Thanks
Rohitash,
Did you try updating to Xcode 4.4.1? There was -undefined dynamic_lookup linker bug introduced in
Xcode 4.2 (radr://10466868), which was fixed in Xcode 4.4.0. Note that if you use the Command Line
Tools under Lion, Xcode 4.4.1 fixed an upgrade glitch which prevented Xcode 4.4.0 from updating to
the correct Command Line Tools on Lion. So you really want to be on Xcode 4.4.1 on Lion and make
sure that the Command Line Tools are upgraded to 4.4.1 if you use them.
Jack
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden