[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mac OS X .dylib not working

From: Peter O'Gorman
Subject: Re: Mac OS X .dylib not working
Date: Thu, 03 Mar 2011 20:59:13 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc13 Thunderbird/3.1.7

On 03/03/2011 01:56 PM, Michael Ellis wrote:
On Thu, Mar 3, 2011 at 2:32 PM, Hans Åberg<address@hidden>  wrote:
[I'm not on the bug-libtool list, so please cc me.]

Despite being reported a year ago, Guile can still not open dynamic libraries 
ending with .dylib on Mac OS X. Looking throw the past discussion, it looks as 
though developers of the one package hold the opinion that those of the other 
package should do the fix. So I am merely reporting it, cross-linking, so that 
you can figure out who guys should do the fix. :-)

So guile-2.0.0 using libltdl.7.dylib of libtool-2.4, can on Mac OS X 10.6.6 
only open a dynamic library if the name of what it actually opens ends in .so 
(say by making a soft link using 'ln -s'); if it ends in .dylib, it cannot open 
it, even if the full name is given.


Mac OS X does not care about file name extensions; .dylib is just a convention 
for native dynamic libraries.

The static linker when it sees a -l flag will look for files beginning with "lib" and ending in ".dylib", ".so" (though this is recent and perhaps not documented) and ".a". So, I think you could say that it cares about file name extensions.

So the wanted behavior is to first try opening a library without adding an 
extension, and then try out different endings. On Mac OS X, it would be best 
trying out .dylib first - I haven't seen any other ending in use.

It does seem as though guile should sometimes be trying lt_dlopen() first - then libltdl will attempt to open whatever it's given.

  -- the libtool archive extension .la
  -- the extension used for native dynamically loadable modules on the
host platform, e.g., .so, .sl, etc.

On Mac OS X, libtool's idea of the native dynamically loadable module extension is ".so", and it's not going to change.

However, I can see the point that libltdl should try .dylib as well as .so for lt_dlopenext on Mac OS X. I will come up with a patch for that.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]