From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andy Moreton Newsgroups: gmane.emacs.bugs Subject: bug#46495: 28.0.50; [native-comp] Build fails for 32bit --with-wide-int Date: Thu, 18 Feb 2021 22:36:25 +0000 Message-ID: <865z2p0zrq.fsf@gmail.com> References: <86y2fq93zj.fsf@gmail.com> <83lfbqbq3g.fsf@gnu.org> <868s7pwvq8.fsf@gmail.com> <28FB9567-61E6-4083-8711-6CF6C8A493F4@gnu.org> <86o8gjheaw.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14671"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (windows-nt) To: 46495@debbugs.gnu.org Cancel-Lock: sha1:cM6MyXC/FQmY+iKjGoQ+XoIvXs4= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 18 23:37:12 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lCrv5-0003hU-ML for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 18 Feb 2021 23:37:11 +0100 Original-Received: from localhost ([::1]:43286 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lCrv4-0004ar-8y for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 18 Feb 2021 17:37:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47920) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCruw-0004ah-9f for bug-gnu-emacs@gnu.org; Thu, 18 Feb 2021 17:37:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36816) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lCruw-000237-2L for bug-gnu-emacs@gnu.org; Thu, 18 Feb 2021 17:37:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lCruw-0001jh-05 for bug-gnu-emacs@gnu.org; Thu, 18 Feb 2021 17:37:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Andy Moreton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 18 Feb 2021 22:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46495 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16136878066644 (code B ref -1); Thu, 18 Feb 2021 22:37:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 Feb 2021 22:36:46 +0000 Original-Received: from localhost ([127.0.0.1]:48362 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lCruf-0001j5-Vc for submit@debbugs.gnu.org; Thu, 18 Feb 2021 17:36:46 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:44892) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lCrue-0001iw-UR for submit@debbugs.gnu.org; Thu, 18 Feb 2021 17:36:45 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47874) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCrud-0004Z2-Q1 for bug-gnu-emacs@gnu.org; Thu, 18 Feb 2021 17:36:44 -0500 Original-Received: from ciao.gmane.io ([116.202.254.214]:46080) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCruY-0001oI-0S for bug-gnu-emacs@gnu.org; Thu, 18 Feb 2021 17:36:42 -0500 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1lCruS-0002yA-D7 for bug-gnu-emacs@gnu.org; Thu, 18 Feb 2021 23:36:32 +0100 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=geb-bug-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 5 X-Spam_score: 0.5 X-Spam_bar: / X-Spam_report: (0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:200295 Archived-At: On Wed 17 Feb 2021, Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote: > Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of > text editors" writes: > >> Andy Moreton writes: >> >>> On Tue 16 Feb 2021, Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote: >>> >>>> Andy could you point out the two libgccjit versions you used specifying >>>> wich one was used in the successfull / failed experiment? >>> >>> It seems they both now fail (and I have lost the build log from the >>> successful experiment, so I don't have a note of the commit used). >> >> That's odd. The culprit of the bug I've isolated is a crash in >> libgccjit so should be easy to recognize (we should never crash in >> libgccjit). >> >> Anyway I've an half cooked patch to work around this issue, I guess I'll >> test it this evening. > > A fix like the attached is working around the GCC bug. > > The only annoyance of this approach is that libgccjit for each > compilation is outputting to console: > "libgccjit.so: note: disable pass tree-isolate-paths for functions in the range of [0, 4294967295]" > > We probably also want to check at configure time and raise an error in > case configuring --with-nativecomp --with-wide-int but with a (really) > old libgccjit that does not provide > 'gcc_jit_context_add_command_line_option'. > > Works for me bootstraping Emacs on i686-pc-linux-gnu + GCC10 but I can't > test the Windows side, Andy would you mind giving it a try? I tried doing clean builds (after "git clean -xdf" each time ) both without and then with this patch. The i686-pc-mingw32 toolchain is: gcc version 9.2.0 (MinGW.org GCC Build-2). Without your patch, the i686-pc-mingw32 build succeeded. As I have seen some builds succeed and some fail, there is perhaps another issue to look into after this one. With your patch, the i686-pc-mingw32 build succeeded. Running the resulting emacs still produced some crashes in the async compile processes. Program received signal SIGTRAP, Trace/breakpoint trap. [Switching to Thread 6952.0x1e8c] 0x757bff43 in KERNELBASE!DebugBreak () from C:\WINDOWS\System32\KernelBase.dll #0 0x757bff43 in KERNELBASE!DebugBreak () from C:\WINDOWS\System32\KernelBase.dll #1 0x012d2778 in emacs_abort () at c:/emacs/git/emacs/native/src/w32fns.c:10914 #2 0x0112509c in terminate_due_to_signal (sig=11, backtrace_limit=40) at c:/emacs/git/emacs/native/src/emacs.c:416 #3 0x01158fd2 in handle_fatal_signal (sig=11) at c:/emacs/git/emacs/native/src/sysdep.c:1762 #4 0x01158fac in deliver_thread_signal (sig=11, handler=0x1158fb9 ) at c:/emacs/git/emacs/native/src/sysdep.c:1754 #5 0x01159007 in deliver_fatal_thread_signal (sig=11) at c:/emacs/git/emacs/native/src/sysdep.c:1774 #6 0x010010d1 in __register_frame_info () #7 0x012d2693 in my_exception_handler (exception_data=0xbfc764) at c:/emacs/git/emacs/native/src/w32fns.c:10862 #8 0x7581e6e2 in UnhandledExceptionFilter () from C:\WINDOWS\System32\KernelBase.dll #9 0x00bfc764 in ?? () #10 0x77364c91 in ntdll!RtlCaptureStackContext () from C:\WINDOWS\SYSTEM32\ntdll.dll #11 0x77327684 in ntdll!RtlGetAppContainerNamedObjectPath () from C:\WINDOWS\SYSTEM32\ntdll.dll #12 0x00000000 in ?? ()