From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ken Brown Newsgroups: gmane.emacs.bugs Subject: bug#12993: Wrong icon for Cygw32-Emacs Date: Mon, 08 Apr 2013 12:58:40 -0400 Message-ID: <5162F740.9020409@cornell.edu> References: <50B2300C.3090100@alice.it> <50C58B9F.8050105@dancol.org> <5161B6E4.90508@cornell.edu> <834nfich3g.fsf@gnu.org> <5161F6D4.20402@cornell.edu> <83zjx9bvac.fsf@gnu.org> <5162BFFF.3090407@cornell.edu> <83vc7xaxb1.fsf@gnu.org> <5162E177.10601@cornell.edu> <83ip3xat2m.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1365445529 1751 80.91.229.3 (8 Apr 2013 18:25:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 8 Apr 2013 18:25:29 +0000 (UTC) Cc: 12993@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Apr 08 20:25:32 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1UPGki-0004Y8-If for geb-bug-gnu-emacs@m.gmane.org; Mon, 08 Apr 2013 20:25:12 +0200 Original-Received: from localhost ([::1]:41485 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPFQ1-0000yn-Q7 for geb-bug-gnu-emacs@m.gmane.org; Mon, 08 Apr 2013 12:59:45 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:55990) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPFPn-0000o8-9v for bug-gnu-emacs@gnu.org; Mon, 08 Apr 2013 12:59:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UPFPl-0007c7-Tf for bug-gnu-emacs@gnu.org; Mon, 08 Apr 2013 12:59:31 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36173) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPFPl-0007bu-RR for bug-gnu-emacs@gnu.org; Mon, 08 Apr 2013 12:59:29 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UPFTC-0004tn-1F for bug-gnu-emacs@gnu.org; Mon, 08 Apr 2013 13:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ken Brown Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Apr 2013 17:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12993 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12993-submit@debbugs.gnu.org id=B12993.136544052718759 (code B ref 12993); Mon, 08 Apr 2013 17:03:01 +0000 Original-Received: (at 12993) by debbugs.gnu.org; 8 Apr 2013 17:02:07 +0000 Original-Received: from localhost ([127.0.0.1]:40280 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UPFSI-0004sU-Ez for submit@debbugs.gnu.org; Mon, 08 Apr 2013 13:02:07 -0400 Original-Received: from limestone5.mail.cornell.edu ([128.253.83.165]:47954) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UPFSE-0004sL-VL for 12993@debbugs.gnu.org; Mon, 08 Apr 2013 13:02:04 -0400 X-CornellRouted: This message has been Routed already. Original-Received: from authusersmtp.mail.cornell.edu ([10.16.197.9]) by limestone5.mail.cornell.edu (8.14.4/8.14.4) with ESMTP id r38GwMil004661; Mon, 8 Apr 2013 12:58:22 -0400 (EDT) Original-Received: from [192.168.1.9] (cpe-67-249-194-47.twcny.res.rr.com [67.249.194.47]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id r38GwLdc030953 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 8 Apr 2013 12:58:22 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 In-Reply-To: <83ip3xat2m.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:73250 Archived-At: On 4/8/2013 12:24 PM, Eli Zaretskii wrote: >> Date: Mon, 08 Apr 2013 11:25:43 -0400 >> From: Ken Brown >> CC: dancol@dancol.org, 12993@debbugs.gnu.org >> >> $ objdump -fh src/emacs.res >> >> src/emacs.res: file format pe-i386 >> architecture: i386, flags 0x00000039: >> HAS_RELOC, HAS_DEBUG, HAS_SYMS, HAS_LOCALS >> start address 0x00000000 >> >> Sections: >> Idx Name Size VMA LMA File off >> Algn >> 0 .rsrc 0000d5f0 00000000 00000000 0000003c 2**2 >> CONTENTS, ALLOC, LOAD, RELOC, DATA > > That doesn't look right, the format shouldn't be pe-i386. What do you > get for any .o file compiled by the 64-bit Cygwin GCC? $ objdump -fh src/emacs.o src/emacs.o: file format pe-x86-64 architecture: i386:x86-64, flags 0x00000039: HAS_RELOC, HAS_DEBUG, HAS_SYMS, HAS_LOCALS start address 0x0000000000000000 Sections: Idx Name Size VMA LMA File off Algn 0 .text 000031c0 0000000000000000 0000000000000000 0000049c 2**4 CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE 1 .data 00000120 0000000000000000 0000000000000000 0000365c 2**4 CONTENTS, ALLOC, LOAD, RELOC, DATA 2 .bss 00000150 0000000000000000 0000000000000000 00000000 2**4 ALLOC [...] >>>> Is it possible that the problem is in nt/emacs.rc after all? >>> >>> Unlikely, since it works with the 64-bit Microsoft compiler. Does >>> Cygwin64 define WIN64? If not, it might be getting the wrong version >>> of the manifest. >> >> No, it doesn't define WIN64. It does define __x86_64__ if that helps. > > Then please try editing emacs.rc to change > > #ifdef WIN64 > 1 24 "emacs-x64.manifest" > #else > 1 24 "emacs-x86.manifest" > #endif > > into > > #ifdef __x86_64__ > 1 24 "emacs-x64.manifest" > #else > 1 24 "emacs-x86.manifest" > #endif > > and see if that helps. Yes, the build now completes and the correct icon is there. Moreover, objdump now gives the expected file format: $ objdump -fr src/emacs.res src/emacs.res: file format pe-x86-64 architecture: i386:x86-64, flags 0x00000039: HAS_RELOC, HAS_DEBUG, HAS_SYMS, HAS_LOCALS start address 0x0000000000000000 RELOCATION RECORDS FOR [.rsrc]: OFFSET TYPE VALUE 000000000000022c rva32 .rsrc 000000000000023c rva32 .rsrc 000000000000024c rva32 .rsrc 000000000000025c rva32 .rsrc 000000000000026c rva32 .rsrc 000000000000027c rva32 .rsrc 000000000000028c rva32 .rsrc 000000000000029c rva32 .rsrc 00000000000002ac rva32 .rsrc 00000000000002bc rva32 .rsrc 00000000000002cc rva32 .rsrc 00000000000002dc rva32 .rsrc Thank you! So I assume the correct fix is the following: === modified file 'nt/emacs.rc' --- nt/emacs.rc 2013-03-05 03:59:35 +0000 +++ nt/emacs.rc 2013-04-08 16:55:12 +0000 @@ -1,6 +1,6 @@ Emacs ICON icons/emacs.ico 32649 CURSOR icons/hand.cur -#ifdef WIN64 +#if defined (WIN64) || defined (__x86_64__) 1 24 "emacs-x64.manifest" #else 1 24 "emacs-x86.manifest" Right? Ken