From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#46495: 28.0.50; [native-comp] Build fails for 32bit --with-wide-int Date: Wed, 31 Mar 2021 08:47:37 +0000 Message-ID: References: <86o8gjheaw.fsf@gmail.com> <865z2p0zrq.fsf@gmail.com> <86pn0w59nj.fsf@gmail.com> <83y2eap33a.fsf@gnu.org> <83lfa6kl8s.fsf@gnu.org> <83h7ktlwuy.fsf@gnu.org> <65e12b1d547420e10a19cdad6a33198926abb527.camel@redhat.com> <8335wdknbw.fsf@gnu.org> <83im58k8rb.fsf@gnu.org> <83o8eziw5j.fsf@gnu.org> Reply-To: Andrea Corallo Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12816"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: andrewjmoreton@gmail.com, dmalcolm@redhat.com, 46495@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Mar 31 10:48: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 1lRWWJ-00037A-QJ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 31 Mar 2021 10:48:11 +0200 Original-Received: from localhost ([::1]:34406 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lRWWI-0002j5-Qs for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 31 Mar 2021 04:48:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36888) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRWW9-0002hv-Vo for bug-gnu-emacs@gnu.org; Wed, 31 Mar 2021 04:48:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41914) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lRWW9-0004jT-OF for bug-gnu-emacs@gnu.org; Wed, 31 Mar 2021 04:48:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lRWW9-000227-Kh for bug-gnu-emacs@gnu.org; Wed, 31 Mar 2021 04:48:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 31 Mar 2021 08:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46495 X-GNU-PR-Package: emacs Original-Received: via spool by 46495-submit@debbugs.gnu.org id=B46495.16171804647790 (code B ref 46495); Wed, 31 Mar 2021 08:48:01 +0000 Original-Received: (at 46495) by debbugs.gnu.org; 31 Mar 2021 08:47:44 +0000 Original-Received: from localhost ([127.0.0.1]:53460 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lRWVr-00021a-S6 for submit@debbugs.gnu.org; Wed, 31 Mar 2021 04:47:44 -0400 Original-Received: from mx.sdf.org ([205.166.94.24]:56277) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lRWVo-00021Q-9Y for 46495@debbugs.gnu.org; Wed, 31 Mar 2021 04:47:42 -0400 Original-Received: from mab (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 12V8lb1U000288 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Wed, 31 Mar 2021 08:47:39 GMT In-Reply-To: <83o8eziw5j.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 31 Mar 2021 11:07:20 +0300") 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:203338 Archived-At: Eli Zaretskii writes: >> From: Andrea Corallo >> Cc: dmalcolm@redhat.com, andrewjmoreton@gmail.com, 46495@debbugs.gnu.org >> Date: Tue, 30 Mar 2021 19:19:12 +0000 >> >> >> `batch-native-compile' or `batch-byte-native-compile-for-bootstrap' >> >> should be equivalent here as the second is just a way to do only byte >> >> compilation for non dumped files when we are not using NATIVE_FULL_AOT. >> > >> > Then I guess I'm missing something: how does Emacs know whether a >> > given .eln file should be saved in native-lisp/ or in >> > ~/.emacs.d/eln-cache/? >> >> Ops apologies you are correct, `batch-byte-native-compile-for-bootstrap' >> also select as destination folder the `native-lisp' directory in the >> build tree. It is correct to invoke >> `batch-byte-native-compile-for-bootstrap' if we want the .eln to be >> deposed there. > > OK, thanks. > > Another nit: the doc string of comp-debug says: > > 0 no debugging output. > This is the recommended value unless you are debugging the compiler itself. > 1 emit debug symbols and dump pseudo C code. > 2 dump gcc passes and libgccjit log file. > 3 dump libgccjit reproducers. > > But comp.c does this: > > if (comp.debug) > gcc_jit_context_set_bool_option (comp.ctxt, > GCC_JIT_BOOL_OPTION_DEBUGINFO, > 1); > if (comp.debug > 2) > { > logfile = emacs_fopen ("libgccjit.log", "w"); > gcc_jit_context_set_logfile (comp.ctxt, > logfile, > 0, 0); > gcc_jit_context_set_bool_option (comp.ctxt, > GCC_JIT_BOOL_OPTION_KEEP_INTERMEDIATES, > 1); > gcc_jit_context_set_bool_option (comp.ctxt, > GCC_JIT_BOOL_OPTION_DUMP_EVERYTHING, > 1); > } > [...] > if (comp.debug) > gcc_jit_context_dump_to_file (comp.ctxt, > format_string ("%s.c", SSDATA (ebase_name)), > 1); > > AFAIU, this means the libgccjit log file is only output with > comp-debug 3 and higher? Correct, the docstring wasn't correct :/ aa159bf696 should update it to reflect the current situation. > Also, does comp-debug = 3 indeed cause the > reproducer to be written, or is that controlled independently by > comp-libgccjit-reproducer? The reproducer is controlled independently by `comp-libgccjit-reproducer', the idea behind this is that we want to be able to produce reproducers independently from the debug settings (we might have a ligccjit bug that is related to one debug option). > > And finally, what do you think about moving the > gcc_jit_context_dump_to_file call to comp-debug 2 or higher? IOW, > make level 1 just add debug info to the *.eln files? Especially if we > are going to make comp-debug = 1 the default (as I think we should), > wouldn't it be better than the current setup? Or maybe we should > introduce an intermediate debug level between the current 0 and 1? My proposal would be like: 0 none 1 debug symbols 2 debug symbols + pseudo C file 3 debug symbols + pseudo C file + GCC passes + libgccjit log file I think the backtrace issue you are facing is clearly a gdb unwinder limitation on Windows that should be fixed in gdb. OTOH I understand we can't update gdb for all users that might want to help debugging an issue, but I don't like very much the idea to have comp-debug 1 as default on every system. What about having 1 as default only on Windows? WDYT? > And if we make that change, do we also need to bump the ABI number? I should not be necessary. Thanks Andrea