need help debugging wierd dlopen failure

Frank Goenninger frgo at me.com
Tue Sep 20 13:44:45 UTC 2016


Am 20.09.2016 um 15:32 schrieb Luís Oliveira <luismbo at gmail.com>:
> 
> On Tue, Sep 20, 2016 at 10:53 AM, Jim Newton <jimka.issy at gmail.com> wrote:
>> CL-USER> (cffi::list-foreign-libraries)
>> (...
>> #<CFFI:FOREIGN-LIBRARY
>>   :LIBCAIRO #P"/usr/local/Cellar/cairo/1.12.16_1/lib/libcairo.dylib" (truename=#P"/usr/local/Cellar/cairo/1.12.16_1/lib/libcairo.2.dylib")>)
>> CL-USER>
>> 
>> However, when I attempt to load libgdk-x11-2.0.0.dylib it complains that it cannot find a particular symbol in /usr/local/lib/libcairo.dylib.  Why is it complaining about /usr/local/lib/libcairo.dylib?
> 
> Most of those dylibs are symlinks and libgdk may depend on a name
> which exists in /usr/local/lib but not /usr/local/Cellar, maybe? ldd
> can tell you what a given dylib depends on.

As Jim is on macOS there is no ldd. The command to use is

otool -L /usr/local/lib//libcairo.dylib

Seeing that Jim uses homebrew to install Cairo it is worth mentioning that brew install … also generates (normally) an entry in /usr/local/lib . That is why I always stick to using /usr/local/lib/libxyz.dylib paths when I want to ensure a particular library to be loaded.

Best,
   Frank



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://mailman.common-lisp.net/pipermail/cffi-devel/attachments/20160920/31a69b93/attachment.sig>


More information about the cffi-devel mailing list