[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#4642) failed to load plugin /tmp/openldap/plugin/hello.dynlib: dlopen(/tmp/openldap/plugin/hello.dynlib, 9): Symbol not found: _slap_cids



andreas.bohne-lang@zmf.ma.uni-heidelberg.de wrote:
> Trying to port a plugin to MacOsX I run into trouble.
> The plugin is running fine on Solaris (Sun) but on MacOSX the plugin is not
> loaded.
>
> line 91 (pluginlog /tmp/openldap/plugin/)
> line 93 (plugin postoperation /tmp/openldap/plugin/hello.dynlib hello_init)
> failed to load plugin /tmp/openldap/plugin/hello.dynlib:
> dlopen(/tmp/openldap/plugin/hello.dynlib, 9): Symbol not found: _slap_cids
>   Referenced from: /tmp/openldap/lib/libslapi-2.3.0.dylib
>   Expected in: flat namespace
>
> /tmp/openldap/etc/openldap/slapd.conf: line 93: <plugin> handler exited with 1!
>
> The plugin was compiled as a shared library:
>
> gcc -dynamiclib  -I/tmp/openldap/include -o hello.dynlib  hello.c 
> -L/tmp/openldap/lib/ -lslapi
>
> (btw I also tried this:
> cc -dynamiclib -flat_namespace -undefined suppress -o hello.dynlib
> -L/tmp/openldap/lib -lslapi  -install_name  hello.dylib
> -Wl,-compatibility_version -Wl,3 -Wl,-current_version -Wl,3.8 hello.c but same
> problem)
>
> Googleing a couple of pages I found this at
> developer.apple.com/technotes/tn2002/tn2071.html
>
>   
>> Many applications being ported to Mac OS X utilize APIs such as dlopen, dlgets,
>>     
> and >dlclose these are not supported on Mac OS X. Below are listed these APIs
> along with >some alternative APIs or suggestions that will allow port your
> application to Mac OS >X.
> Could this cause the problem?
>   

slap_cids is a global variable that may be used in different places in 
slapd.  Your plugin is not accessing it, but it may call functions that 
access it.  It seems that your plugin may need some compile options that 
instruct it to resolve symbols runtime.  This seems to be fairly 
compiler and/or OS-specific, so I hope someone familiar with MacOsX can 
provide further help.

p.



Ing. Pierangelo Masarati
OpenLDAP Core Team

SysNet s.n.c.
Via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
------------------------------------------
Office:   +39.02.23998309
Mobile:   +39.333.4963172
Email:    pierangelo.masarati@sys-net.it
------------------------------------------