From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Test User Newsgroups: gmane.emacs.bugs Subject: bug#19813: 24.4; emacs crashes on exit Date: Mon, 9 Feb 2015 11:29:04 -0500 Message-ID: References: <834mqwbd61.fsf@gnu.org> <83vbjc9rgv.fsf@gnu.org> <83oap49lw4.fsf@gnu.org> <83lhk7ah0h.fsf@gnu.org> <83iofb9jod.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b3a8192c29f47050eaa44ec X-Trace: ger.gmane.org 1423499421 30467 80.91.229.3 (9 Feb 2015 16:30:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 9 Feb 2015 16:30:21 +0000 (UTC) Cc: 19813-done@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 09 17:30:18 2015 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 1YKrE2-0005QQ-5Y for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Feb 2015 17:30:18 +0100 Original-Received: from localhost ([::1]:33688 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKrE1-0006Zo-KR for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Feb 2015 11:30:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50831) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKrDs-0006X5-QE for bug-gnu-emacs@gnu.org; Mon, 09 Feb 2015 11:30:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YKrDo-0001W6-Gh for bug-gnu-emacs@gnu.org; Mon, 09 Feb 2015 11:30:08 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47210) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKrDo-0001UG-E1 for bug-gnu-emacs@gnu.org; Mon, 09 Feb 2015 11:30:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YKrDn-0008Od-NQ for bug-gnu-emacs@gnu.org; Mon, 09 Feb 2015 11:30:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Test User Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 09 Feb 2015 16:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19813 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19813-done@debbugs.gnu.org id=D19813.142349935332188 (code D ref 19813); Mon, 09 Feb 2015 16:30:03 +0000 Original-Received: (at 19813-done) by debbugs.gnu.org; 9 Feb 2015 16:29:13 +0000 Original-Received: from localhost ([127.0.0.1]:38450 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YKrCy-0008N5-RY for submit@debbugs.gnu.org; Mon, 09 Feb 2015 11:29:13 -0500 Original-Received: from mail-lb0-f177.google.com ([209.85.217.177]:44047) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YKrCw-0008Mr-A3 for 19813-done@debbugs.gnu.org; Mon, 09 Feb 2015 11:29:11 -0500 Original-Received: by mail-lb0-f177.google.com with SMTP id z11so3684949lbi.8 for <19813-done@debbugs.gnu.org>; Mon, 09 Feb 2015 08:29:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=gV82wLfQjS2CIDz3Vq4Nh/W6m70etpY3OzVVCkW7iAM=; b=fGocihloBObM40j48pVD3KiBdcr/D2lIijI7hseSZMjoJPBQChqFLp7rZFiWKGDVPJ 1fhJsuvkdn/WT/X/IXF3VpmjxHWYh27s7GqPNtdXRim2gnKRjPs5F3e2bagWfJJVcHq6 xz5Q00aeJ9Ts+D8mrc397sC9lWexv6K03/VDXRhp/jJVHXW6ttFXhIrdUmGEaAbkfHqU 6xVZ1X2kgNOYI/pfJiOqCj4iDFUiv8mXSThFlgQKD5Jbo/eih3a7efPh3sOlZXO1VS16 kdB2T6IxSGO/34+iGVQyCyc+Sq9+vnvK6Jh5CZXkipL2w6TtCEG2WOY3azudA35Zn6Et E0aA== X-Received: by 10.112.132.67 with SMTP id os3mr18290017lbb.90.1423499344386; Mon, 09 Feb 2015 08:29:04 -0800 (PST) Original-Received: by 10.25.40.9 with HTTP; Mon, 9 Feb 2015 08:29:04 -0800 (PST) In-Reply-To: <83iofb9jod.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.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:99210 Archived-At: --047d7b3a8192c29f47050eaa44ec Content-Type: text/plain; charset=UTF-8 On Mon, Feb 9, 2015 at 10:41 AM, Eli Zaretskii wrote: > > Date: Mon, 9 Feb 2015 04:03:24 -0500 > > From: Test User > > > > The problem is not with libgcc_s_dw2-1.dll, the problem is with some > > other DLL that loads it, typically zlib1.dll or some image library. > > > > I built emacs with -shared-libgcc in LDFLAGS and the problem went away. > > That is one solution, but it is not the best one, IMO. E.g., you > cannot move this binary to another machine without also copying > libgcc_s_dw2-1.dll with it. True. I mentioned in an earlier message that I had another copy of shared libgcc because I needed to take a program that I had written to another PC. I don't see myself trying to take emacs with me, but your point is taken. > The best solution is to replace the DLL(s) you have that depend on > libgcc_s_dw2-1.dll with DLLs that offer the same functionality, but do > not depend on libgcc_s_dw2-1.dll. See below for a specific > recommendation. > > > In general, no MinGW DLLs distributed as binaries should depend on > libgcc_s_dw2-1.dll, for several reasons: > Does this simply mean that I should always build my libraries and programs with -static-libgcc? Would that be in conflict with the issues discussed in https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/Link-Options.html#Link-Options? (See -shared-libgcc). Or maybe I need to read the code to know when I should build with -static-libgcc and when I should accept the default? > > You can find DLLs that are never dependent on libgcc_s_dw2-1.dll here: > > http://sourceforge.net/projects/ezwinports/files/?source=navbar > > That collection includes librsvg, zlib, and all the other libraries > required by Emacs. (Btw, the librsvg build there is much smaller than > the one you use, because it excludes every feature not useful on > Windows, like Fontconfig, Freetype, and Harfbuzz.) > It is impossible for me to know when a feature is "useful on Windows" or not, so whenever I build software that was not born on Windows, I always try to make it use as many of its optional dependencies as possible. Now that I know, in this case maybe I can --disable-harfbuzz ,etc., or build Harfbuzz with -static-libgcc. --047d7b3a8192c29f47050eaa44ec Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Mon, Feb 9, 2015 at 10:41 AM, Eli Zaretskii <eliz@gnu.org>= wrote:
> Date: Mon= , 9 Feb 2015 04:03:24 -0500
> From: Test User <testuser448@gmail.com>
>
>=C2=A0 =C2=A0 =C2=A0The problem is not with libgcc_s_dw2-1.dll, t= he problem is with some
>=C2=A0 =C2=A0 =C2=A0other DLL that loads it, typically zlib1.dll or som= e image library.
>
> I built emacs with -shared-libgcc in LDFLAGS and the problem went away= .

That is one solution, but it is not the best one, IMO.=C2=A0 E.g., y= ou
cannot move this binary to another machine without also copying
libgcc_s_dw2-1.dll with it.=C2=A0

True. I m= entioned in an earlier message that I had another copy of shared libgcc
=
because I needed to take a program that I had written to another= PC. I don't
see myself trying to take emacs with me, but your point= is taken.


The best solution is to replace the DLL(s) you have that depend on
libgcc_s_dw2-1.dll with DLLs that offer the same functionality, but do
not depend on libgcc_s_dw2-1.dll.=C2=A0 See below for a specific
recommendation.


<snip><= br>
=C2=A0

In general, no MinGW DLLs distributed as binaries should depend on
libgcc_s_dw2-1.dll, for several reasons:

<good reasons snipped>
=C2=A0
Does this= simply mean that I should always build my libraries and programs
with -= static-libgcc? Would that be in conflict with the issues discussed in
<= /div>https://gcc.gnu.org/onlinedocs/gcc-4.9.= 2/gcc/Link-Options.html#Link-Options?
(See -shared-libgcc= ). Or maybe I need to read the code to know when I should
build with -st= atic-libgcc and when I should accept the default?



You can find DLLs that are never dependent on libgcc_s_dw2-1.dll here:

=C2=A0 http://sourceforge.net/projects/ezwinports/fil= es/?source=3Dnavbar

That collection includes librsvg, zlib, and all the other libraries
required by Emacs.=C2=A0 (Btw, the librsvg build there is much smaller than=
the one you use, because it excludes every feature not useful on
Windows, like Fontconfig, Freetype, and Harfbuzz.)

It is impossible for me to know when a feature= is "useful on Windows"
or no= t, so whenever I build software that was not born on Windows, I always
<= /div>
try to make it use as many of its optional = dependencies as possible.
Now that I kn= ow, in this case maybe I can --disable-harfbuzz ,etc., or
build Harfbuzz with -static-libgcc.
--047d7b3a8192c29f47050eaa44ec--