On 03/03/2011 01:56 PM, Michael Ellis wrote:
On Thu, Mar 3, 2011 at 2:32 PM, Hans Åberg<[email protected]> 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.
See
http://lists.gnu.org/archive/html/bug-guile/2011-03/msg00008.html
http://lists.gnu.org/archive/html/guile-devel/2011-03/msg00021.html
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.
Peter