From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#63365: 30.0.50; GCC 13.1 breaks building Emacs with native-compilation Date: Tue, 09 May 2023 08:05:39 +0300 Message-ID: <83r0rqaycc.fsf@gnu.org> References: <86wn1jtezk.fsf@gnu.org> <83jzxjcac9.fsf@gnu.org> <86h6smopo6.fsf@gnu.org> <835y92dfgd.fsf@gnu.org> <86v8h2k475.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25676"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63365@debbugs.gnu.org, akrl@sdf.org To: Arash Esbati Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 09 07:05:20 2023 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 1pwFXM-0006UL-Dh for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 09 May 2023 07:05:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pwFX7-0005E4-0T; Tue, 09 May 2023 01:05:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pwFX5-0005Dg-Dc for bug-gnu-emacs@gnu.org; Tue, 09 May 2023 01:05:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pwFX5-0001By-4T for bug-gnu-emacs@gnu.org; Tue, 09 May 2023 01:05:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pwFX3-0005Cv-Ro for bug-gnu-emacs@gnu.org; Tue, 09 May 2023 01:05:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 May 2023 05:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63365 X-GNU-PR-Package: emacs Original-Received: via spool by 63365-submit@debbugs.gnu.org id=B63365.168360868519988 (code B ref 63365); Tue, 09 May 2023 05:05:01 +0000 Original-Received: (at 63365) by debbugs.gnu.org; 9 May 2023 05:04:45 +0000 Original-Received: from localhost ([127.0.0.1]:42195 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwFWm-0005CJ-I3 for submit@debbugs.gnu.org; Tue, 09 May 2023 01:04:44 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:34500) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwFWl-0005C8-CE for 63365@debbugs.gnu.org; Tue, 09 May 2023 01:04:43 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pwFWg-00019k-0V; Tue, 09 May 2023 01:04:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=637wkvIsITYinwpt36DT2kWVKf9+BYMnLg+7i3Q8Ago=; b=CCZwstVJ5TC+ AIG6ofgedD7cwWPdrfQE9Ceex9Cfnw6vFLMbDFq6mD59UAc4ykSIFENTXgxmeE7tdM2Ecj5NnSQqJ v9G7pA23ZGzWmrTgyfkYfc4l9OSAb+dSf0/wvrfXed8bB9g9wOLcdygQ3TNomINE7dckUoLMjCVFM BDZpPdiTp6pRhH22U9FW3f3rDmuvPIji6Kn0i0KDTIXTR0ES0YHF1fYawJAMNwGA366uuWPXyLE4o bA3CqqMaRBQ+xx50N5E0frm+cMq+aAWZNqQeT88purhj5gSLGg4fZqsTT15jCFSr5Bx3Oemh97kLQ 5Rt9CyXVgQNLWgUFV2Tudg==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pwFWf-00036l-4G; Tue, 09 May 2023 01:04:37 -0400 In-Reply-To: <86v8h2k475.fsf@gnu.org> (message from Arash Esbati on Mon, 08 May 2023 21:34:22 +0200) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:261383 Archived-At: > From: Arash Esbati > Cc: akrl@sdf.org, 63365@debbugs.gnu.org > Date: Mon, 08 May 2023 21:34:22 +0200 > > Eli Zaretskii writes: > > > The recipe goes like this: > > > > sed -n 's/.*\[\(.*\)]$/\1/p' BACKTRACE | addr2line -C -f -i -p -e BINDIR/EMACS-BINARY > > > > (It is broken in the manual into two lines, because the line is long, > > but it is a single long command that runs Sed and pipes its output > > into addr2line, a program that comes with GNU Binutils.) > > Yes, I think I grasped that one. The problem I'm facing is that my > lisp/emacs_backtrace.txt looks like this: > > Backtrace: > 00007ff61166a12e > 00007ff611538be1 > 00007ff611559601 > 00007ff6116ce84a > 00007ff9b7977ff0 > ... > > and the sed command doesn't match on the addresses above. It works for > the example given in the manual like this: > > Backtrace: > emacs[0x5094e4] > emacs[0x4ed3e6] > emacs[0x4ed504] > /lib64/libpthread.so.0[0x375220efe0] > /lib64/libpthread.so.0(read+0xe)[0x375220e08e] > emacs[0x509af6] > emacs[0x5acc26] > > So in my case, sed returns nothing which is piped into addr2line. Right, forgot about that factoid. On Windows, the Sed part is not required, so the command is just addr2line -C -f -i -p -e BINDIR/EMACS-BINARY < emacs_backtrace.txt > > Can you show a full C compilation command of one of the C source > > files? Like this: > > > > $ cd /path/to/emacs/src > > $ make data.o -W data.c V=1 > > > > I'd like to see all of the compiler's command-line options your build > > uses. > > It looks like this; line-breaks added manually: OK, so you compile with "-O2 -gdwarf-2 -g3", the default optimization options, and with -mtune=generic (also the default). Things to try, in order to better understand the scope of the problem: 1) try removing -mtune=generic 2) try using -O1 instead of -O2 For 1), edit src/Makefile to remove -mtune=generic from any GCC options there, then remove src/*.o files and say "make" to rebuild. For 2), edit src/Makefile to change -O2 to -O1, and again remove *.o files and rebuild. But let's first establish the exact locus of the crashes first, without any changes in the build options.