From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Leake Newsgroups: gmane.emacs.devel Subject: Re: png in emacs 25 mingw64 Date: Sat, 16 Apr 2016 15:34:16 -0500 Message-ID: <867ffxjnsn.fsf_-_@stephe-leake.org> References: <56CCD91E.6070507@alice.it> <83twj4dx7q.fsf@gnu.org> <878u0gyyge.fsf_-_@wanadoo.es> <570FC0BC.8030709@cs.ucla.edu> <874mb4yxqi.fsf@wanadoo.es> <83potsduv5.fsf@gnu.org> <87vb3kxho5.fsf@wanadoo.es> <83mvowdru7.fsf@gnu.org> <87r3e8x88h.fsf@wanadoo.es> <571102B8.8010004@cs.ucla.edu> <87inziyjb5.fsf@wanadoo.es> <57112544.5050508@cs.ucla.edu> <87d1pqycsz.fsf@wanadoo.es> <57113DC4.4010303@cs.ucla.edu> <878u0ey81k.fsf@wanadoo.es> <83lh4ed4ht.fsf@gnu.org> <87zisuwrng.fsf@wanadoo.es> <868u0ea6zm.fsf@stephe-leake.org> <83ega6cbh0.fsf@gnu.org> <86oa99kasq.fsf@stephe-leake.org> <83lh4dbuav.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1460838898 26311 80.91.229.3 (16 Apr 2016 20:34:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 16 Apr 2016 20:34:58 +0000 (UTC) Cc: ofv@wanadoo.es, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 16 22:34:47 2016 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 1arWvR-000496-W2 for ged-emacs-devel@m.gmane.org; Sat, 16 Apr 2016 22:34:42 +0200 Original-Received: from localhost ([::1]:33097 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1arWvR-00012H-A7 for ged-emacs-devel@m.gmane.org; Sat, 16 Apr 2016 16:34:41 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52507) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1arWvM-0000y0-5z for emacs-devel@gnu.org; Sat, 16 Apr 2016 16:34:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1arWvI-0008La-SY for emacs-devel@gnu.org; Sat, 16 Apr 2016 16:34:36 -0400 Original-Received: from gproxy7-pub.mail.unifiedlayer.com ([70.40.196.235]:60926) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1arWvI-0008LJ-Lo for emacs-devel@gnu.org; Sat, 16 Apr 2016 16:34:32 -0400 Original-Received: (qmail 13826 invoked by uid 0); 16 Apr 2016 20:34:22 -0000 Original-Received: from unknown (HELO cmgw4) (10.0.90.85) by gproxy7.mail.unifiedlayer.com with SMTP; 16 Apr 2016 20:34:22 -0000 Original-Received: from host114.hostmonster.com ([74.220.207.114]) by cmgw4 with id j8aK1s00L2UdiVW018aNoe; Sat, 16 Apr 2016 14:34:22 -0600 X-Authority-Analysis: v=2.1 cv=aJ5j99Nm c=1 sm=1 tr=0 a=CQdxDb2CKd3SRg4I0/XZPQ==:117 a=CQdxDb2CKd3SRg4I0/XZPQ==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=hEr_IkYJT6EA:10 a=x_XPkuGwIRMA:10 a=kziv93cY1bsA:10 a=mDV3o1hIAAAA:8 a=9i_RQKNPAAAA:8 a=9mXQCswj7WBqPgEZ-ccA:9 Original-Received: from [76.218.37.33] (port=57964 helo=TAKVER4) by host114.hostmonster.com with esmtpa (Exim 4.86_2) (envelope-from ) id 1arWv5-0007pQ-EA; Sat, 16 Apr 2016 14:34:19 -0600 In-Reply-To: <83lh4dbuav.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 16 Apr 2016 15:40:56 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (windows-nt) X-Identified-User: {2442:host114.hostmonster.com:stephele:stephe-leake.org} {sentby:smtp auth 76.218.37.33 authed with stephen_leake@stephe-leake.org} X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 70.40.196.235 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:202995 Archived-At: TLDR; I usually have Cygwin in the PATH as well; it has shell tools I can't get in Mingw (yet). It turns out that is the problem; if I run my build of Emacs from a Mingw64 shell (no Cygwin in PATH), it can show PNGs. More details below. Question; exactly which path is searched for DLLs? I have two: PATH from the parent process exec-path after editing in ~/.emacs The png image is opened well after ~/.emacs is processed, so does it look on the edited exec-path for the dll? Or does the dll search take place during startup, in which case it is the parent PATH (or exec-path before editing in ~/.emacs). Eli Zaretskii writes: >> From: Stephen Leake >> Cc: ofv@wanadoo.es, emacs-devel@gnu.org >> Date: Sat, 16 Apr 2016 07:17:25 -0500 >> >> Eli Zaretskii writes: >> >> >> From: Stephen Leake >> >> Date: Fri, 15 Apr 2016 16:37:33 -0500 >> >> Cc: emacs-devel@gnu.org >> >> >> >> One thing I'd like to fix; my build of emacs 25 does not display png >> >> files. The binary pretest install does. I'd like to figure out the >> >> difference. >> > >> > Are both binaries in the same directory? >> >> My build is in c:/Projects/emacs/emacs-25-build-mingw64/src (I don't >> install, so I can easily switch versions), with libpng16-16.dll in >> d:/msys64/mingw54/bin in PATH. >> >> The error message is "Cannot display image: (Invalid image >> specification)". I traced thru some of the code that tries to open >> the image; image.c init-image-library returns nil. I haven't tried >> running under the debugger to go further. >> >> config.h sets HAVE_PNG true. >> >> >> The pretest binary is in d:/Apps/emacs-25.0.90/bin, both emacs.exe and >> libpng16-16.dll; mingw64 is _not_ in PATH. >> >> cygwin "diff" says the two dlls differ. > > So this is the root cause, right there: the DLLs differ. I don't see why that has to be the problem; the difference could be in some date. > Where did > you get them? One from the MSYS2 distribution, the other from the pretest binary, which may have been built with the MSYS2 distribution, but I'm not sure. >Are both 64-bit DLLs? Are they both MinGW DLLs? I don't know how to tell. >> depends.exe on emacs and libpng (both builds) reports no obvious errors >> (it seems there is always something missing on windows; I assume those >> are optional Windows components). > > I didn't mean errors. Libpng should depend on zlib DLL; Yes; zlib1.dll >do you have > it? Yes; in the respective distributions. >is it good? I don't know how to tell. I guess I need to find some other Mingw64 program that uses it? >is there only one zlib DLL? In PATH for each build, yes. Although "type -a zlib1.dll" says "not found", so it's hard to be sure. >> The libpng comes from the msys2 package manager, so I assume it's all >> consistent. > > Does it come with zlib DLL, or did you install zlib DLL separately? > If the latter, they could be inconsistent. Still from the package manager. Yes, the packages could be inconsistent with each other. >> Yes, I figured it was some obscure dll issue, which is why I have not >> tried to track it down yet. Since the problem is not present in the >> pretest, I figured it's a problem with my setup, not the Emacs sources, >> so I did not report a bug. > > I don't understand why you (and others) use different PATH > arrangements to run different binaries, and have multiple versions of > support DLLs. If I want to use the Mingw distribution, I use that path. If I want to use the Emacs pretest binary distribution, I use that path. I do _not_ mix distributions. I have no idea how the Emacs pretest was built; simply assuming it is the same as my current Mingw installation is almost guarranteed to be false. That's what PATH is for. >Isn't it clear that by doing so you create your own DLL > hell? No, I'm avoiding it by not mixing distributions. >It's much better to have just one copy of each support DLL, in > a place that is always on PATH. That would be nice. I can do that on Debian, that has only one package manager, and a rigorous distribution policy. I could do that on Windows by only using MSYS2. But then I would not be able to use the Emacs pretest. Hmm. I do usually have Cygwin in the PATH as well; it has shell tools I can't get in Mingw (yet). It turns out that is the problem; if I run my build of Emacs from a Mingw64 shell (no Cygwin in PATH), it can show PNGs. So your point about mixing distributions is valid; I was not being careful enough. Most of the time it's not a problem (this is the first problem I can remember). -- -- Stephe