cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Problem with libldap, liblber detection on Mac OS X

From: Daniel Johnson <daniel_at_daniel-johnson.org>
Date: Fri, 02 Feb 2007 17:49:44 -0500

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Feb 2, 2007, at 4:59 PM, Dan Fandrich wrote:

> On Fri, Feb 02, 2007 at 04:24:09PM -0500, Daniel Johnson wrote:
>> While the recent change to acinclude.m4 cleaned things up, configure
>> is still generating the wrong file names:
>>
>> checking name of dynamic library ldap... libldap.so
>> checking name of dynamic library lber... liblber.so
>>
>> On Darwin, those should be libldap.dylib and liblber.dylib.
>> Unfortunately, Darwin distinguishes between loadable modules
>> (normally named *.so) and shared libraries (named *.dylib). Only
>> dylibs can be linked to, but either can be dlopened. Libtool is
>> returning .so since that's what is usually used for modules, but in
>> this case it's wrong because we're talking about real libraries.
>
> I noticed that, but I haven't had a chance to get on to an OS X system
> to figure out what's going on. Unfortunately, the dynamic library
> detection macros rely on the use of undocumented internal libtool
> variables,
> so it's tricky business. In this case, I suspect the $std_shrext
> variable
> is not being set for OS X, while the original $shrext_cmds was.

Libtool is doing
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'

and

eval std_shrext=\"$shrext_cmds\"

so if $module is yes $std_shrext is .so.

Liberal application of echos in configure shows that this is indeed
happening.

>
>> In addition, those files are actually symlinks to the same file: /
>> System/Library/Frameworks/LDAP.framework/Versions/A/LDAP which has no
>> extension at all but is a genuine shared library.
>
> What is the name of the LDAP library that curl links against? How
> about the
> dynamic version used at run time? Are they both symlinks to the
> same 'LDAP'
> file?

Well, curl isn't linking to it since it's being dlopened. The actual
library is /System/Library/Frameworks/LDAP.framework/Versions/A/LDAP
and both are symlinked to it.

lrwxr-xr-x 1 root wheel 57 Dec 20 19:47 /usr/lib/liblber.dylib -
> /System/Library/Frameworks/LDAP.framework/Versions/A/LDAP
lrwxr-xr-x 1 root wheel 57 Dec 20 19:47 /usr/lib/libldap.dylib -
> /System/Library/Frameworks/LDAP.framework/Versions/A/LDAP

Daniel

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (Darwin)
Comment: http://homepage.mac.com/danielj7/publickey.txt

iD8DBQFFw8AI4sDFGYouOqARAjQCAJkBB4T8hCB/G2rwObzMk8IVVth+ywCgge9t
RsuhUgU16J/6dIwzZnu11UE=
=BSuG
-----END PGP SIGNATURE-----
Received on 2007-02-03