[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FFI on OS X?
From: |
Ludovic Courtès |
Subject: |
Re: FFI on OS X? |
Date: |
Thu, 03 Mar 2011 00:03:54 +0100 |
User-agent: |
Gnus/5.110013 (No Gnus v0.13) Emacs/23.2 (gnu/linux) |
Hi,
Hans Aberg <address@hidden> writes:
> On 2 Mar 2011, at 21:44, Ludovic Courtès wrote:
>
>>> scheme@(guile-user)> (define libm (dynamic-link "/usr/lib/libm.dylib"))
>>> ERROR: In procedure dynamic-link: file: "/usr/lib/libm.dylib",
>>> message: "file not found"
>>
>> You should omit the extension, which will be automatically inferred by
>> Guile (actually ltdl) depending on the system:
>>
>> (dynamic-link "/usr/lib/libm")
>>
>> or:
>>
>> (dynamic-link "libm")
>
> None of those work - I checked and rechecked that. Making a soft link ending
> on ".so", and it works fine. I have seen this before in the Bessel function
> example.
Right. There’s this insightful test started by you last year:
http://lists.gnu.org/archive/html/bug-libtool/2010-02/msg00000.html
The crux is that on older MacOS X versions ‘.dylib’ are shared libraries
(not dlopenable), whereas ‘.so’ are “bundles” (dlopenable). That’s why
lt_dlopenext (which is what ‘dynamic-link’ uses) doesn’t try to open
‘.dylib’ files.
May I recommend switching to GNU/Linux? :-)
Thanks,
Ludo’.
- Re: FFI on OS X?, Ludovic Courtès, 2011/03/02
- Re: FFI on OS X?, Hans Aberg, 2011/03/02
- Re: FFI on OS X?,
Ludovic Courtès <=
- Re: FFI on OS X?, Hans Aberg, 2011/03/03
- Re: FFI on OS X?, Ludovic Courtès, 2011/03/03
- Re: FFI on OS X?, Hans Aberg, 2011/03/03
- Re: FFI on OS X?, Ludovic Courtès, 2011/03/03
- Re: FFI on OS X?, Hans Aberg, 2011/03/03
Re: FFI on OS X?, Andreas Rottmann, 2011/03/02