From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Wolfgang Jenkner Newsgroups: gmane.emacs.bugs Subject: bug#22065: core dumped during compilation (emacs-25 branch on FreeBSD 9) Date: Sun, 14 Feb 2016 17:12:46 +0100 Message-ID: <85si0vjkos.fsf@iznogoud.viz> References: <867fkz16lw.fsf@phe.ftfl.ca> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1455468983 24666 80.91.229.3 (14 Feb 2016 16:56:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 14 Feb 2016 16:56:23 +0000 (UTC) Cc: ashish@FreeBSD.org, 22065@debbugs.gnu.org, Paul Eggert To: Joseph Mingrone Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Feb 14 17:56:10 2016 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 1aUzxx-0008E7-FK for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Feb 2016 17:56:09 +0100 Original-Received: from localhost ([::1]:51939 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUzxw-0006OK-VC for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Feb 2016 11:56:08 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58194) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUzxt-0006OA-8m for bug-gnu-emacs@gnu.org; Sun, 14 Feb 2016 11:56:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aUzxq-0006oq-1R for bug-gnu-emacs@gnu.org; Sun, 14 Feb 2016 11:56:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48202) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUzxp-0006om-Tm for bug-gnu-emacs@gnu.org; Sun, 14 Feb 2016 11:56:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aUzxp-0000fS-ON for bug-gnu-emacs@gnu.org; Sun, 14 Feb 2016 11:56:01 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <867fkz16lw.fsf@phe.ftfl.ca> Resent-From: Wolfgang Jenkner Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Feb 2016 16:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22065 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22065-submit@debbugs.gnu.org id=B22065.14554689372536 (code B ref 22065); Sun, 14 Feb 2016 16:56:01 +0000 Original-Received: (at 22065) by debbugs.gnu.org; 14 Feb 2016 16:55:37 +0000 Original-Received: from localhost ([127.0.0.1]:38977 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aUzxR-0000eq-Kr for submit@debbugs.gnu.org; Sun, 14 Feb 2016 11:55:37 -0500 Original-Received: from vie01a-dmta-at50-3.mx.upcmail.net ([62.179.121.138]:23503) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aUzxQ-0000eh-9g for 22065@debbugs.gnu.org; Sun, 14 Feb 2016 11:55:36 -0500 Original-Received: from [172.31.216.42] (helo=vie01a-pemc-psmtp-at51) by vie01a-dmta-at50.mx.upcmail.net with esmtp (Exim 4.72) (envelope-from ) id 1aUzxM-0005Rt-Rz for 22065@debbugs.gnu.org; Sun, 14 Feb 2016 17:55:32 +0100 Original-Received: from iznogoud.viz ([85.127.216.38]) by vie01a-pemc-psmtp-at51 with SMTP @ mailcloud.upcmail.net id JGvX1s00B0qHE310BGvXgV; Sun, 14 Feb 2016 17:55:32 +0100 X-SourceIP: 85.127.216.38 X-CNFS-Analysis: v=2.1 cv=cbNcrxzM c=1 sm=2 tr=0 a=WMcXiqyxzwfQz4412Nzb/A==:117 a=WMcXiqyxzwfQz4412Nzb/A==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=jFJIQSaiL_oA:10 a=6I5d2MoRAAAA:8 a=vaJtXVxTAAAA:8 a=YvEd5nrdW3DZIa5RmEsA:9 Original-Received: from wolfgang by iznogoud.viz with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1aUzxL-00002T-CM; Sun, 14 Feb 2016 17:55:31 +0100 User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.1.50 (berkeley-unix) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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:113018 Archived-At: On Mon, Nov 30 2015, Joseph Mingrone wrote: > There is a compilation issue on FreeBSD 9 (which has about another > year of life) for the emacs-25 branch. The error/warnings suggest the > problems may be related to bug 18410. It compiles fine on FreeBSD 10. > Attached is a build log. The pkg-fallout list indicates that that the build has been broken since 13 Nov 2014, although at that time it failed while temacs was loading up stuff, with a different error message. http://docs.freebsd.org/cgi/mid.cgi?201411130859.sAD8xATU001375 According to https://svnweb.freebsd.org/ports/head/editors/emacs-devel/Makefile?view=log this seems to correlate to a ports update to emacs bzr version 118251 from the previous 117676 (on Aug 10 2014). There's a prominent change concerning the stack in this time frame, viz. commit c7dfea947eba1980fe3a23ad13f04dd40c6c0d68 Author: Dmitry Antipov Date: Tue Sep 9 07:44:06 2014 +0400 Add macros to allocate temporary Lisp objects with alloca. So, on FreeBSD 10, in a jail containing a basic FreeBSD 9 amd64 userland I bisected between the above commit, which is still good, and some later bad commit. As USE_STACK_LISP_OBJECTS wasn't turned on by default before 2014-09-24, I configured with $ ./configure --without-all --without-x CPPFLAGS=-DUSE_STACK_LISP_OBJECTS=1 In the last few steps I had to delete the INLINE specifier in the definition of local_vector_init() in src/alloc.c because it conflicted with a declaration in src/lisp.h. The first bad commit turns out to be commit edb0288b83b45d295df52ce7644e897613358971 Author: Dmitry Antipov Date: Mon Sep 15 18:53:23 2014 +0400 If USE_LOCAL_ALLOCATORS, allocate some Lisp objects on stack. Unfortunately, --enable-checking or --enable-check-lisp-object-type also somehow makes the bootstrapping failure disappear. On a current emacs master, after adding CPPFLAGS=-DUSE_STACK_LISP_OBJECTS=0 to the configure command line bootstrapping emacs works (in the above jail). Alternatively (though not very practically), adding CFLAGS="-g -O0" works (but CFLAGS="-g -O" doesn't). Alternatively, bootstrapping even with the oldest gcc available from ports (4.6.4) works. So, perhaps, the FreeBSD 9 default base cc (a patched gcc 4.2.1) has some stack-related optimization bug, even on amd64?