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

Re: (ITS#5325) Build error: __lock_getlocker undefined symbol



[Please CC messages to the ITS]

Tim Bishop wrote:
> On Sat, Jan 12, 2008 at 10:07:57AM +0100, Pierangelo Masarati wrote:
>> tim@bishnet.net wrote:
>>
>>> For reference, it's because my libdb is built using --with-uniquename.
>>> This means the function name is actually __lock_getlocker_4006.
>>>
>>> I didn't see this in the documentation. OpenLDAP should either correctly
>>> handle this case, or document that it's not supported.
>> I think using that option is a Bad Idea (TM); it is the Wrong Solution
>> to the problem of having multiple coexisting versions of a library.  In
>> any case, adding support for that feature would be problematic and
>> definitely prone to user (and developer) errors, since the value used to
>> make names unique is not exposed in any header file, so it would have to
>> be manually defined.  There are tons of (sysadmin side) ways to make
>> sure the right library is loaded, so I vote against supporting this
>> feature.  Of course, I'm fine about documenting that --with-uniquename
>> is not supported.
> 
> I notice lots of other functions have a mapping in the bdb header file
> so you don't need to know the unique value. Is this issue occuring
> because the __lock_getlocker function is not meant to be called by
> external applications?

The mapping depends on the version of Berkeley, so mapping names would
require to know what the mapping is; but as far as I can see, it does
not provide any means to expose it.  Other mappings are basically needed
to work around uneven cross-version naming issues in Berkeley, or for
OpenLDAP internal purposes, like separating back-bdb and back-hdb names.

As Hallvard pointed out, probably that function was not meant to be
exposed, since it's not declared in Berkeley's headers, but
unfortunately OpenLDAP code seems to need it.  Of course, you can still
manually CPPFLAGS=-D__lock_getlocker=__lock_getlocker_4006 to workaround
your issue.

p.



Ing. Pierangelo Masarati
OpenLDAP Core Team

SysNet s.r.l.
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
---------------------------------------