From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bob Friesenhahn Newsgroups: gmane.comp.gnu.libtool.bugs,gmane.lisp.guile.bugs Subject: Re: Mac OS X .dylib not working Date: Tue, 2 Feb 2010 10:52:35 -0600 (CST) Message-ID: References: <20100202064208.GC5651@gmx.de> <657AF3C8-764A-4DDE-918F-F1D97DA8E8EC@math.su.se> <359C630D-FEA1-4422-91B5-6FB0DFD6941D@raeburn.org> <675379A5-A6C5-4331-B82B-1E1F975C359A@math.su.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Trace: ger.gmane.org 1265129589 1080 80.91.229.12 (2 Feb 2010 16:53:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 2 Feb 2010 16:53:09 +0000 (UTC) Cc: bug-guile@gnu.org, Ken Raeburn , bug-libtool@gnu.org To: Hans Aberg Original-X-From: bug-libtool-bounces+gnu-bug-libtool=m.gmane.org@gnu.org Tue Feb 02 17:53:02 2010 Return-path: Envelope-to: gnu-bug-libtool@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NcLzo-0004Nh-Qa for gnu-bug-libtool@m.gmane.org; Tue, 02 Feb 2010 17:53:02 +0100 Original-Received: from localhost ([127.0.0.1]:56666 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NcLzf-0002KL-El for gnu-bug-libtool@m.gmane.org; Tue, 02 Feb 2010 11:52:51 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NcLzX-0002H1-Ad for bug-libtool@gnu.org; Tue, 02 Feb 2010 11:52:43 -0500 Original-Received: from [199.232.76.173] (port=54051 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NcLzW-0002G1-OF for bug-libtool@gnu.org; Tue, 02 Feb 2010 11:52:42 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NcLzT-0001JP-To for bug-libtool@gnu.org; Tue, 02 Feb 2010 11:52:42 -0500 Original-Received: from blade.simplesystems.org ([65.66.246.74]:43037) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NcLzT-0001Ia-2x; Tue, 02 Feb 2010 11:52:39 -0500 Original-Received: from freddy.simplesystems.org (freddy.simplesystems.org [65.66.246.65]) by blade.simplesystems.org (8.13.8+Sun/8.13.8) with ESMTP id o12GqZnH019152; Tue, 2 Feb 2010 10:52:35 -0600 (CST) X-X-Sender: bfriesen@freddy.simplesystems.org In-Reply-To: <675379A5-A6C5-4331-B82B-1E1F975C359A@math.su.se> User-Agent: Alpine 2.01 (GSO 1266 2009-07-14) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (blade.simplesystems.org [65.66.246.90]); Tue, 02 Feb 2010 10:52:36 -0600 (CST) X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) X-BeenThere: bug-libtool@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports for the GNU libtool shared library maintenance tool List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-libtool-bounces+gnu-bug-libtool=m.gmane.org@gnu.org Errors-To: bug-libtool-bounces+gnu-bug-libtool=m.gmane.org@gnu.org Xref: news.gmane.org gmane.comp.gnu.libtool.bugs:7239 gmane.lisp.guile.bugs:4489 Archived-At: On Tue, 2 Feb 2010, Hans Aberg wrote: > On 2 Feb 2010, at 15:20, Ken Raeburn wrote: > >>>>> On Mac OS X (trying it on 10.5.8 PPC G4), guile-1.8.7 cannot open >>>>> dynamic library files with name extensions .dylib, but only if they >>>>> are renamed using .so instead. On the Bug-Guile list they say it >>>>> just calls libltdl, in the libtool package. I have installed latest >>>>> of both, but the problem persists: >>>> >>>> libtool should produce modules named *.so on Darwin if you pass the >>>> -module flag at link time. Typically, -avoid-version is used for >>>> modules as well. >>> >>> But dlopen() on Mac OS X can only open files in the native format, which >>> isn't ELF, and they are typically named with the .dylib file name >>> extension. If it finds a .so file on ELF format, all it does is reporting >>> it cannot be opened. >> >> ".so" doesn't mean ELF format, and on some systems including Mac OS X, >> "dynamically linked shared library" (e.g., a ".dylib" file) is not the same >> as "dynamically loadable object". Did you not see my earlier email to you >> and the bug-guile list? > > The fact is that currently Guile, which relies on libtool, cannot open .dylib > files, though it works perfectly if they are renamed .so. As for what > filenames to use, dlopen() does not care - it is something imposed by > libtool. Also, all new native DLLs (see below) on Mac OS X are named .dylib. Unless I am missing something, the question to be answered is if Guile requests opening modules using a name like "module.so" (assuming a particular naming scheme), "module.la" (using libltdl as originally intended), or bare "module" (using libltdl heuristics, which tries several incantations, such as looking for .la, and .so). OS-X's module loading does not care about the file extension. Under OS-X (Leopard and later), the 'dtruss' program can be used to see what is really going on. Bob -- Bob Friesenhahn bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/