From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] ImageMagick Support on Windows Date: Wed, 15 Oct 2014 08:49:33 +0300 Message-ID: <83h9z56fwy.fsf@gnu.org> References: <83siis71xq.fsf@gnu.org> <83siiq6e3v.fsf@gnu.org> <83r3ya65t0.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1413352209 6745 80.91.229.3 (15 Oct 2014 05:50:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 15 Oct 2014 05:50:09 +0000 (UTC) Cc: emacs-devel@gnu.org To: Alexander Shukaev Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 15 07:50:02 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XeHTF-00088y-Em for ged-emacs-devel@m.gmane.org; Wed, 15 Oct 2014 07:50:01 +0200 Original-Received: from localhost ([::1]:41913 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeHTF-000819-4d for ged-emacs-devel@m.gmane.org; Wed, 15 Oct 2014 01:50:01 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43686) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeHSw-00080g-Gi for emacs-devel@gnu.org; Wed, 15 Oct 2014 01:49:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XeHSq-0002SY-JS for emacs-devel@gnu.org; Wed, 15 Oct 2014 01:49:42 -0400 Original-Received: from mtaout29.012.net.il ([80.179.55.185]:58419) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeHSq-0002SS-75 for emacs-devel@gnu.org; Wed, 15 Oct 2014 01:49:36 -0400 Original-Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0NDH004000ZJHH00@mtaout29.012.net.il> for emacs-devel@gnu.org; Wed, 15 Oct 2014 08:48:34 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NDH000EG1GY8N50@mtaout29.012.net.il>; Wed, 15 Oct 2014 08:48:34 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.185 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:175385 Archived-At: > Date: Tue, 14 Oct 2014 23:33:38 +0200 > From: Alexander Shukaev > Cc: emacs-devel@gnu.org > > I have amended the patches and currently they look as attached. However, I > think we have a problem here. After applying them, during the build, the > "./temacs --batch --load loadup bootstrap" command crashes when it reaches: > > Loading .../src/emacs/lisp/image.el (source)... > > I cannot say 100% what could be the cause of this Can you run this command under GDB, and see exactly where it crashes, and why? > but I can give my 99% that this is because some ImageMagick library > has not been loaded. I'm not sure I see where image.el needs to load image libraries. Could you point out where you think that happens? (Running temacs under GDB will surely tell, btw.) If you rename the ImageMagick DLLs to some other names, or remove them from PATH, does the Emacs build succeed? > If you look at one of my previous messages: > > Nevertheless, on the linking stage I see: > > > -lMagickWand-6.Q16HDRI -lMagickCore-6.Q16HDRI > > So these are the import libraries needed to resolve utilized ImageMagick > functions. Their respective DLLs on my system are: > > libMagickWand-6.Q16HDRI-2.dll > libMagickCore-6.Q16HDRI-2.dll > > It means that we should somehow add these 2 libraries as mandatory to the > "dynamic-library-alist". Is it really true that both of these DLLs need to be loaded independently? Isn't one of them dependent on the other? If the latter, just loading one DLL, the dependent one, will automatically load the other one. If you have the "dependency walker" utility, it will show you the dependencies of each of these 2 DLLs. > But from what I infer from the documentation, this: > > '(imagemagick "libMagickWand-6.Q16HDRI-2.dll" "libMagickCore-6.Q16HDRI-2.dll") > > is not the correct way of doing that since this sublist, in fact, represents > alternatives to the same single library. In other words, I don't see how > certain feature can be assigned more than one mandatory DLL. That's right, we don't currently support more than a single dynamically loaded library file per image type. If it turns out (see above) that it is impossible to fit ImageMagick into that scheme, we will need to make additional changes, like supporting a list of DLLs in w32-win.el and in w32_delayed_load. But these are still speculations. Let's first determine (1) where and why does temacs crash, and (2) could only one of these DLLs be loaded, and cause an automatic loading of the other. Thanks again for working on this.