GNU bug report logs - #48342
native-comp emacs gets into an infinite loop at startup if no .el files are available

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Dima Kogan <dima@HIDDEN>; dated Tue, 11 May 2021 07:48:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 48342 <at> debbugs.gnu.org:


Received: (at 48342) by debbugs.gnu.org; 11 May 2021 17:00:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 11 13:00:49 2021
Received: from localhost ([127.0.0.1]:37238 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lgVkX-00051u-Ai
	for submit <at> debbugs.gnu.org; Tue, 11 May 2021 13:00:49 -0400
Received: from heytings.org ([95.142.160.155]:46922)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory@HIDDEN>) id 1lgVkV-0004zN-Jz
 for 48342 <at> debbugs.gnu.org; Tue, 11 May 2021 13:00:48 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org;
 s=20210101; t=1620752446;
 bh=aO3582sal+QbRWvKzKjN5pUaKZhKImrVdzKqCVOr9H0=;
 h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From;
 b=oP4uXDmxBQHtwQZr1+R6rUhnOaOsrRLPn3h7Vnd8IbAh4cVvQ+PdXM7clNLsotAoH
 XQxJvijLCkBrAk/4dqAyvb9DTeklh+zn97UgZtziEX5gqXNuA9QSdEEQV6X3Gy4i4b
 f/t60avVTRoVNpNh7vHoS0RBBnrW+Pec+YFUeKlh6n+WuwkpdgfhlmvFI7n36coitT
 h2hBfI8Mt+CJd0ViK5zr9/js5EKz1y3ce7YlGgXQkfh8ToGnUgCs9bgIe7CKrVVb3G
 2lUaMp2zblXV+EGKZe1BK7kKH9KfgQ1VBOTOo9xEjHFSOw06kXDxJzekxZpwDF7mHH
 YJT8jiSW+KnTA==
Date: Tue, 11 May 2021 17:00:46 +0000
From: Gregory Heytings <gregory@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#48342: native-comp emacs gets into an infinite loop at
 startup if no .el files are available
In-Reply-To: <834kf95u1z.fsf@HIDDEN>
Message-ID: <a8104bf9de1b05014618@HIDDEN>
References: <878s4l1zlt.fsf@HIDDEN> <xjf1radsm36.fsf@HIDDEN>
 <875yzp1wz0.fsf@HIDDEN> <834kf95u1z.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 48342
Cc: Dima Kogan <dima@HIDDEN>, 48342 <at> debbugs.gnu.org, akrl@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


>>> Yes if you want the native compiler to be able to compile files, 
>>> otherwise you should either native compile all lisp files Ahead of 
>>> Time or set `comp-deferred-compilation' to nil in early init so that 
>>> Emacs will not try to native compile bytecode being loaded.
>>
>> That's helpful. Thanks.
>
> Note that if you will be distributing the *.eln files, I think the GPL 
> requires you to make the *.el files available.  In fact, this is so even 
> with the *.elc files.  So I'm not sure I understand how you could 
> distribute only the *.elc files until now: isn't that contrary to GPL?
>

Why would that be contrary to the GPL?  The *.el files are available on 
Debian and Debian-derived distrbutions, but Debian has chosen to make the 
distribution of Emacs more modular, and each "logical part" of Emacs is 
packaged separately:

- the emacs package (which is "a metapackage that will always depend on 
the latest recommended Emacs variant") depends on emacs-gtk or emacs-lucid 
or emacs-nox (= terminal-only)

- the emacs-gtk, emacs-lucid and emacs-nox packages (which contain the 
Emacs binary and corresponding pdmp files) all depend on on 
emacs-bin-common and emacs-common, and suggest emacs-common-non-dfsg

- the emacs-bin-common package (which contains the ctags, ebrowse, 
emacsclient, etags, hexl and rcs2log binaries) depends on emacs-common

- the emacs-common package (which contains the etc/ directory and the elc 
files) recommends emacs-el and suggests emacs-common-non-dfsg

- the emacs-el package contains the el files

- the emacs-common-non-dfsg contains the info files




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#48342; Package emacs. Full text available.

Message received at 48342 <at> debbugs.gnu.org:


Received: (at 48342) by debbugs.gnu.org; 11 May 2021 12:33:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 11 08:33:29 2021
Received: from localhost ([127.0.0.1]:35276 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lgRZp-00078O-Gi
	for submit <at> debbugs.gnu.org; Tue, 11 May 2021 08:33:29 -0400
Received: from eggs.gnu.org ([209.51.188.92]:60472)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1lgRZn-00078C-UZ
 for 48342 <at> debbugs.gnu.org; Tue, 11 May 2021 08:33:28 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:47612)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1lgRZi-00009o-Jr; Tue, 11 May 2021 08:33:22 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4205
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1lgRZi-0003BO-6M; Tue, 11 May 2021 08:33:22 -0400
Date: Tue, 11 May 2021 15:33:28 +0300
Message-Id: <834kf95u1z.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dima Kogan <dima@HIDDEN>
In-Reply-To: <875yzp1wz0.fsf@HIDDEN> (message from Dima Kogan on Tue, 
 11 May 2021 01:44:03 -0700)
Subject: Re: bug#48342: native-comp emacs gets into an infinite loop at
 startup if no .el files are available
References: <878s4l1zlt.fsf@HIDDEN> <xjf1radsm36.fsf@HIDDEN>
 <875yzp1wz0.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 48342
Cc: 48342 <at> debbugs.gnu.org, akrl@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Dima Kogan <dima@HIDDEN>
> Date: Tue, 11 May 2021 01:44:03 -0700
> Cc: 48342 <at> debbugs.gnu.org
> 
> Andrea Corallo <akrl@HIDDEN> writes:
> 
> > could you share the Lisp backtrace? If you have loaded the .gdbinit
> > shipped with the repot this will be at the bottom of the gdb
> > backtrace.
> 
> Hi Andrea. The backtrace looks like this:
> 
>   "display-warning" (0xffebcfd8)
>   "display-warning" (0xffebd5d8)
>   "display-warning" (0xffebdbd8)
>   "display-warning" (0xffebe1d8)

Any idea how come display-warning calls itself?

> > Yes if you want the native compiler to be able to compile files,
> > otherwise you should either native compile all lisp files Ahead of Time
> > or set `comp-deferred-compilation' to nil in early init so that Emacs
> > will not try to native compile bytecode being loaded.
> 
> That's helpful. Thanks.

Note that if you will be distributing the *.eln files, I think the GPL
requires you to make the *.el files available.  In fact, this is so
even with the *.elc files.  So I'm not sure I understand how you could
distribute only the *.elc files until now: isn't that contrary to GPL?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#48342; Package emacs. Full text available.

Message received at 48342 <at> debbugs.gnu.org:


Received: (at 48342) by debbugs.gnu.org; 11 May 2021 08:43:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 11 04:43:59 2021
Received: from localhost ([127.0.0.1]:34880 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lgNzj-0002Cq-Fo
	for submit <at> debbugs.gnu.org; Tue, 11 May 2021 04:43:59 -0400
Received: from out1-smtp.messagingengine.com ([66.111.4.25]:57565)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dima@HIDDEN>) id 1lgNzg-0002CX-R4
 for 48342 <at> debbugs.gnu.org; Tue, 11 May 2021 04:43:57 -0400
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
 by mailout.nyi.internal (Postfix) with ESMTP id 8C37B5C00E1;
 Tue, 11 May 2021 04:43:51 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute1.internal (MEProxy); Tue, 11 May 2021 04:43:51 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=secretsauce.net;
 h=references:from:to:cc:subject:in-reply-to:date:message-id
 :mime-version:content-type; s=fm3; bh=/lzsBIyDBGwwJYkrHqqU7cWrLY
 Iu3gpSj6FsU7+cIic=; b=vFKSKpTx8z9+Y2pnAcLtqtTOy5ja4TB6R5+fhjFqKg
 qhe0Jp5xVeobGZwMAmCsQI2s70ehv/NDKI5aou//v2IayqqouHMiqb5rBVZRlIs1
 uLMR8FCKvS+ruGzt8pUPlnrbEgKHrtId2IOAHdVleQ1xYZ9o23vyRJCceBKURuXD
 U9JUfL2IA/ZhsOv9/X6wi5WdmIYtcu32ADUZBnwYLyKkpkOUxu2RRCWyjZ7sqWBf
 /F/pXY4AgKEhvGYKnDYosdAqX+SKk6gIOwRcgZUtpKHbxm8PDu08ZgECIM65QrdQ
 0uAkgdpe4slze+tGZLwBxCnLbyhVqw96mwiW0bLF2bog==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-type:date:from:in-reply-to
 :message-id:mime-version:references:subject:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=/lzsBI
 yDBGwwJYkrHqqU7cWrLYIu3gpSj6FsU7+cIic=; b=QhAesu8KMYTLZCXvL9OR1D
 VbE/vAD5b7B1yuyFoBQs5VSR+pd3h/E82xEW0Vlou/gpEdkAs+0aA90oifBxRkRQ
 WlPvvQZbO+fp09U+t3PhycgxjuG3XqelgNfrSGX3I5A1MOp+RB/nFDLz8Ih2chJR
 Il9YLlJ6AmZwC01bJPWuOXV60VRoe63kTyh0xsC77jLACzOlhuARLKaIt+c+JlRQ
 ZnEjz4KrQku1nnYYpzIG4PDtdnTuDgqW6bqQ06rjGaabqfXh7w9N/HLpgIBlnUOc
 zVP5jatYL+f4f4SDhdOt44aGG/IOZ3TTMm4haQw28xadWAzHR5aD1xONDOoRw97w
 ==
X-ME-Sender: <xms:xkOaYM2vd-_qGRbORyfLrW0jnZyrVzKlMCoBeISyHBY3x_HtDiC9eA>
 <xme:xkOaYHEk2pwGzaJn7WXi-yVSFQtDGFZGeprFR90buMbkqw7H_D6L9O8I7nYSxkaEH
 BRY1XGP2PJhxXeR>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdehtddgtdekucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucenucfjughrpehffgfhvffujgffkfggtgesthdtre
 dttdertdenucfhrhhomhepffhimhgrucfmohhgrghnuceoughimhgrsehsvggtrhgvthhs
 rghutggvrdhnvghtqeenucggtffrrghtthgvrhhnpeefveefgfettdefvdetgfekvddtff
 evhfevleelhfejheelgfduffdtieduueekheenucfkphepuddtjedrvddutddrvddufedr
 vdegfeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe
 guihhmrgesshgvtghrvghtshgruhgtvgdrnhgvth
X-ME-Proxy: <xmx:xkOaYE5iK1PZ2CeYiwNqt-umcjGR5Xl7Vk7sXVERml07u5Q41tdigw>
 <xmx:xkOaYF1bluwhNPFIuGxw4UmNo-RaCA7CK4uksIzwsy-lGRb-_EAfCA>
 <xmx:xkOaYPE4Gu6xW3-J69CHtYvz1ymKGgOdHmgOhHYYT-2nxQfNqW8iDg>
 <xmx:x0OaYGwU2pfYjr8Sp_jw7vXm7AfltcqT5mOvIFyelmdxSzdX3sOTzg>
Received: from localhost (107-210-213-243.lightspeed.irvnca.sbcglobal.net
 [107.210.213.243]) by mail.messagingengine.com (Postfix) with ESMTPA;
 Tue, 11 May 2021 04:43:50 -0400 (EDT)
References: <878s4l1zlt.fsf@HIDDEN> <xjf1radsm36.fsf@HIDDEN>
User-agent: mu4e 1.4.15; emacs 28.0.50
From: Dima Kogan <dima@HIDDEN>
To: Andrea Corallo <akrl@HIDDEN>
Subject: Re: bug#48342: native-comp emacs gets into an infinite loop at
 startup if no .el files are available
In-reply-to: <xjf1radsm36.fsf@HIDDEN>
Date: Tue, 11 May 2021 01:44:03 -0700
Message-ID: <875yzp1wz0.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 48342
Cc: 48342 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Andrea Corallo <akrl@HIDDEN> writes:

> could you share the Lisp backtrace? If you have loaded the .gdbinit
> shipped with the repot this will be at the bottom of the gdb
> backtrace.

Hi Andrea. The backtrace looks like this:

  "display-warning" (0xffebcfd8)
  "display-warning" (0xffebd5d8)
  "display-warning" (0xffebdbd8)
  "display-warning" (0xffebe1d8)
  "display-warning" (0xffebe7d8)
  "display-warning" (0xffebedd8)
  "display-warning" (0xffebf3d8)
  "display-warning" (0xffebf9d8)
  "display-warning" (0xffebffd8)
  "display-warning" (0xffec05d8)
  "display-warning" (0xffec0bd8)
  "display-warning" (0xffec11d8)
  "display-warning" (0xffec17d8)
  "display-warning" (0xffec1dd8)
  "display-warning" (0xffec23d8)
  "display-warning" (0xffec29d8)
  "display-warning" (0xffec2fd8)
  "display-warning" (0xffec35d8)
  "display-warning" (0xffec3bd8)
  "display-warning" (0xffec41d8)
  "display-warning" (0xffec47d8)
  "display-warning" (0xffec4dd8)
  "display-warning" (0xffec59d8)
  "display-warning" (0xffec5fd8)
  "display-warning" (0xffec65d8)
  "debug" (0xffec6bd8)
  "substitute-env-vars" (0xffec6e28)
  "substitute-env-in-file-name" (0xffec6ec8)
  "display-warning" (0xffec7248)
  ... 1000s more "display-warning"
  "locate-file" (0xffffe498)
  "command-line" (0xffffe5a0)
  "normal-top-level" (0xffffe640)

>> And second: how should this be packaged? Is shipping the .el files a
>> hard requirement now?

> Yes if you want the native compiler to be able to compile files,
> otherwise you should either native compile all lisp files Ahead of Time
> or set `comp-deferred-compilation' to nil in early init so that Emacs
> will not try to native compile bytecode being loaded.

That's helpful. Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#48342; Package emacs. Full text available.

Message received at 48342 <at> debbugs.gnu.org:


Received: (at 48342) by debbugs.gnu.org; 11 May 2021 08:37:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 11 04:37:06 2021
Received: from localhost ([127.0.0.1]:34869 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lgNt4-0001zj-Gv
	for submit <at> debbugs.gnu.org; Tue, 11 May 2021 04:37:06 -0400
Received: from mx.sdf.org ([205.166.94.24]:51659)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <akrl@HIDDEN>) id 1lgNt2-0001zY-OL
 for 48342 <at> debbugs.gnu.org; Tue, 11 May 2021 04:37:05 -0400
Received: from mab (ma.sdf.org [205.166.94.33])
 by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 14B8b1TB017371
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO);
 Tue, 11 May 2021 08:37:02 GMT
From: Andrea Corallo <akrl@HIDDEN>
To: Dima Kogan <dima@HIDDEN>
Subject: Re: bug#48342: native-comp emacs gets into an infinite loop at
 startup if no .el files are available
References: <878s4l1zlt.fsf@HIDDEN>
Date: Tue, 11 May 2021 08:37:01 +0000
In-Reply-To: <878s4l1zlt.fsf@HIDDEN> (Dima Kogan's message of "Tue,
 11 May 2021 00:47:10 -0700")
Message-ID: <xjf1radsm36.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 48342
Cc: 48342 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Dima Kogan <dima@HIDDEN> writes:

> Hi. I maintain Debian packages of bleeding-edge emacs builds:
>
>   http://emacs.secretsauce.net/
>
> Recently I enabled the native-comp flags for these packages. The results
> mostly work, but a user sent me a bug report whose cause I just tracked
> down. Some of this is probably my fault, as the packager, but there's an
> emacs bug here too.
>
> To tickle the bug the user needs to install the emacs-snapshot package,
> but NOT the emacs-snapshot-el package. This results in the .elc files
> being shipped, but NOT the .el files. This is a valid way to do it
> without the native-comp patches, and the Debian emacs packages have
> allowed this since forever.
>
> If you install emacs like this, this happens:
>
>   $ emacs-snapshot -Q -batch -f batch-native-compile empty.el
>
>   Fatal error 11: Segmentation fault
>
> The C backtrace is 6033 frames long, which can't be good. xbacktrace
> says this:
>
>   (gdb) xbacktrace
>   "display-warning" (0xffebcfd8)
>   "display-warning" (0xffebd5d8)
>   .... lots more "display-warning"
>   "locate-file" (0xffffe498)
>   "command-line" (0xffffe5a0)
>   "normal-top-level" (0xffffe640)
>
> And the warning itself is:
>
>   "Cannot look-up eln file as no source file was found for /usr/share/emacs/28.0.50/lisp/emacs-lisp/warnings.elc"
>
> So something somewhere wanted to throw a warning, and this warning tried
> to find its own sources, couldn't do it, and threw another warning. And
> so on.
>
> So first off, it'd be great if emacs could handle this without such a
> recursive failure mode. It took me a long time to figure out what's
> happening, and a plain-text error message on the console would have been
> nice.

Hi Dima,

could you share the Lisp backtrace?  If you have loaded the .gdbinit
shipped with the repot this will be at the bottom of the gdb backtrace.

> And second: how should this be packaged? Is shipping the .el files a
> hard requirement now?

Yes if you want the native compiler to be able to compile files,
otherwise you should either native compile all lisp files Ahead of Time
or set `comp-deferred-compilation' to nil in early init so that Emacs
will not try to native compile bytecode being loaded.

Thanks

  Andrea




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#48342; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 11 May 2021 07:47:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 11 03:47:06 2021
Received: from localhost ([127.0.0.1]:34845 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lgN6f-0000aF-TE
	for submit <at> debbugs.gnu.org; Tue, 11 May 2021 03:47:06 -0400
Received: from lists.gnu.org ([209.51.188.17]:55590)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dima@HIDDEN>) id 1lgN6d-0000a6-AO
 for submit <at> debbugs.gnu.org; Tue, 11 May 2021 03:47:03 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:56198)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <dima@HIDDEN>)
 id 1lgN6d-0007Kb-1l
 for bug-gnu-emacs@HIDDEN; Tue, 11 May 2021 03:47:03 -0400
Received: from out1-smtp.messagingengine.com ([66.111.4.25]:49239)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <dima@HIDDEN>)
 id 1lgN6b-00019Q-2e
 for bug-gnu-emacs@HIDDEN; Tue, 11 May 2021 03:47:02 -0400
Received: from compute3.internal (compute3.nyi.internal [10.202.2.43])
 by mailout.nyi.internal (Postfix) with ESMTP id 557A25C0105
 for <bug-gnu-emacs@HIDDEN>; Tue, 11 May 2021 03:46:58 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute3.internal (MEProxy); Tue, 11 May 2021 03:46:58 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=secretsauce.net;
 h=from:to:subject:date:message-id:mime-version:content-type; s=
 fm3; bh=1R091gnThmpqJuWiY9oCxximwgeYF3ZMYqnry40X5VA=; b=Amb6O8Oa
 yeUt+2+2M+lOijOPJLRMJWBWADOK16yRO+QL7wyvipiqYHxYBERqp7WCIwpM6pCS
 LxNP0/t//EWLiaiuFaiTjUxM8L/nunS/YAXFZw7eVPgT3U3nshz7Ij+W2ABOAE/O
 LKWoXP6fn8B4I28R1n4+2A8hYWqjLEiuEHX/MvhmGOrY3EYJ2EMEHPviOBO70ttD
 928DmZL9y82IoJXWx/Q2S4FicaW5vAjDTLNU5SnTcsMhavMCR0i/1ouSQ5of1l2Q
 xENhUUlIfQzSb3i/tcqLHQ5l+yxGJuylYHXaHR/09Vnr5LZ727NNoH727QC7o9YR
 0WR+3fr7aaGaPw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=content-type:date:from:message-id
 :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender
 :x-me-sender:x-sasl-enc; s=fm2; bh=1R091gnThmpqJuWiY9oCxximwgeYF
 3ZMYqnry40X5VA=; b=RDTNlzgHNqryPJrNVyp3a2kh3vX11F4ste5EdwNi15xpU
 sfpHWWsDjKvJgYGWl32wQ12EGBZHJGQTFCm6Jeg/GIUOCvX/8oeIuF0dtlPPKUs7
 DaDn+5WcfYwFAbRXIp/rLUzNk+M2CTE9CnFHCOL77vLdXYtu63Mh+f+ZCzoKD4h6
 o1nT/TZu+yoLEMPJo6oF2k73GCqOb5dfstvQfnALmukXHzkxHJkf43DNMnOCqVYm
 CoM+5N9JKdpqvpv5m3TbnmAVzLsFz4kOJgtZhWPnI6R1kGGvgFoiu/Fv6non9szd
 OjYk76kwLx9QKwAfSKZ/Lmupnvh2JQsBe+JSTjDQg==
X-ME-Sender: <xms:cjaaYLSeFHApTL12Ra22PLUMD1-6AaOHXEYurmb6-sxJSVF_GvTp4w>
 <xme:cjaaYMxmQ-0USdsE-szmz_BTrsWrZZrpaA9I_OhPiQ-YfK0Bl124TN-fOdrf_KZ6D
 XSW2t4vJlpH0mhy>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdegledguddvgecutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkfggtgesthdtredttd
 dttdenucfhrhhomhepffhimhgrucfmohhgrghnuceoughimhgrsehsvggtrhgvthhsrghu
 tggvrdhnvghtqeenucggtffrrghtthgvrhhnpeeiteelvdfgieeuleeghffhueehkeetie
 dugffhvefffffhjedugfetfeehhffhgeenucffohhmrghinhepshgvtghrvghtshgruhgt
 vgdrnhgvthenucfkphepuddtjedrvddutddrvddufedrvdegfeenucevlhhushhtvghruf
 hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpeguihhmrgesshgvtghrvghtshgr
 uhgtvgdrnhgvth
X-ME-Proxy: <xmx:cjaaYA1lfjccneFhyBNIYkpUv_6FEBbBASKg1-S8gU2TrilnQihwQw>
 <xmx:cjaaYLAgeuL-pFAB7LTF_r7IgZoYnYXW0fkmrcynU7ns6FSwmhQP-g>
 <xmx:cjaaYEjP4SUhnObSYZEGhZKYQ7yZIjmRs3ZCB5EPxfsSocjsahPnzw>
 <xmx:cjaaYPurjokE0N8fv_zgKpdciDtyPAmw5qfoXCusLwS5YZashpnDLA>
Received: from localhost (107-210-213-243.lightspeed.irvnca.sbcglobal.net
 [107.210.213.243]) by mail.messagingengine.com (Postfix) with ESMTPA
 for <bug-gnu-emacs@HIDDEN>; Tue, 11 May 2021 03:46:57 -0400 (EDT)
From: Dima Kogan <dima@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: native-comp emacs gets into an infinite loop at startup if no .el
 files are available
Date: Tue, 11 May 2021 00:47:10 -0700
Message-ID: <878s4l1zlt.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=66.111.4.25; envelope-from=dima@HIDDEN;
 helo=out1-smtp.messagingengine.com
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.6 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.6 (--)

Hi. I maintain Debian packages of bleeding-edge emacs builds:

  http://emacs.secretsauce.net/

Recently I enabled the native-comp flags for these packages. The results
mostly work, but a user sent me a bug report whose cause I just tracked
down. Some of this is probably my fault, as the packager, but there's an
emacs bug here too.

To tickle the bug the user needs to install the emacs-snapshot package,
but NOT the emacs-snapshot-el package. This results in the .elc files
being shipped, but NOT the .el files. This is a valid way to do it
without the native-comp patches, and the Debian emacs packages have
allowed this since forever.

If you install emacs like this, this happens:

  $ emacs-snapshot -Q -batch -f batch-native-compile empty.el

  Fatal error 11: Segmentation fault

The C backtrace is 6033 frames long, which can't be good. xbacktrace
says this:

  (gdb) xbacktrace
  "display-warning" (0xffebcfd8)
  "display-warning" (0xffebd5d8)
  .... lots more "display-warning"
  "locate-file" (0xffffe498)
  "command-line" (0xffffe5a0)
  "normal-top-level" (0xffffe640)

And the warning itself is:

  "Cannot look-up eln file as no source file was found for /usr/share/emacs/28.0.50/lisp/emacs-lisp/warnings.elc"

So something somewhere wanted to throw a warning, and this warning tried
to find its own sources, couldn't do it, and threw another warning. And
so on.

So first off, it'd be great if emacs could handle this without such a
recursive failure mode. It took me a long time to figure out what's
happening, and a plain-text error message on the console would have been
nice.

And second: how should this be packaged? Is shipping the .el files a
hard requirement now?

Thanks!




Acknowledgement sent to Dima Kogan <dima@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#48342; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 11 May 2021 17:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.