how does libldap detection work in ./configure script?
Tomasz Chmielewski
mangoo at wpkg.org
Thu Jan 26 11:12:58 GMT 2006
Gerald (Jerry) Carter schrieb:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Tomasz Chmielewski wrote:
>
>
>>>Check config.log for the reason of the failure. That the
>>>first thing to do.
>>
>>I checked that many times, but I didn't know what I'm looking for.
>>But I guess that's it - no it's only to find out how to cope with that:
>>
>
> ...
>
>>/home/data/wrt54/openldap-2.3.18/libraries/libldap/.libs/libldap.so:
>>undefined reference to `lutil_memcmp'
>>collect2: ld returned 1 exit status
>
>
> Yup. That's you error. But google comes up empty on
> that function. It doesn't look familiar to me.
I found a workaround.
I'm posting it here in case if anyone ever wanted to cross-compile Samba
with LDAP support for Linux / mipsel / uclibc.
"lutil_memcmp" comes from OpenLDAP (2.3.18).
It is defined in openldap-2.3.18/include/ac/string.h
To get around this issue, you have to comment out lines 92-95 in that file:
/*#ifdef NEED_MEMCMP_REPLACEMENT
int (lutil_memcmp)(const void *b1, const void *b2, size_t len);
#define memcmp lutil_memcmp
#endif*/
Interestingly, it isn't used anywhere else.
Then, compile OpenLDAP once again, and Samba's ./configure (gcc really)
script shouldn't complain again.
Of course, I don't know if it doesn't break things...
--
Tomasz Chmielewski
http://wpkg.org
More information about the samba-technical
mailing list