From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.bugs Subject: bug#56746: 29.0.50; Probable bug with native compilation Date: Wed, 07 Jun 2023 17:20:46 -0400 Message-ID: References: <83czdsehbd.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32181"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 56746-done@debbugs.gnu.org, Kenneth Stuart To: Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 07 23:21:23 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 1q70ap-0008B3-3k for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 07 Jun 2023 23:21:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q70aW-0003nB-UA; Wed, 07 Jun 2023 17:21:04 -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 1q70aU-0003mQ-Rj for bug-gnu-emacs@gnu.org; Wed, 07 Jun 2023 17:21:02 -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 1q70aU-0006FD-J9 for bug-gnu-emacs@gnu.org; Wed, 07 Jun 2023 17:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q70aU-0005yL-Do for bug-gnu-emacs@gnu.org; Wed, 07 Jun 2023 17:21:02 -0400 Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Jun 2023 21:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 56746 X-GNU-PR-Package: emacs Mail-Followup-To: 56746@debbugs.gnu.org, acorallo@gnu.org, kstuart@hotmail.co.uk Original-Received: via spool by 56746-done@debbugs.gnu.org id=D56746.168617285522914 (code D ref 56746); Wed, 07 Jun 2023 21:21:02 +0000 Original-Received: (at 56746-done) by debbugs.gnu.org; 7 Jun 2023 21:20:55 +0000 Original-Received: from localhost ([127.0.0.1]:54952 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q70aM-0005xW-HZ for submit@debbugs.gnu.org; Wed, 07 Jun 2023 17:20:54 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:59736) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q70aK-0005xH-1H for 56746-done@debbugs.gnu.org; Wed, 07 Jun 2023 17:20:53 -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 1q70aE-0006EW-Cz; Wed, 07 Jun 2023 17:20:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=DC1DIA+7V4E8Emphynr/V/nG+oQfCLpY0yUnhucis+o=; b=PlQVHoWcfpEagK5VuDW4 QpvBum0W9rLK2DYWzYgIOabWPW375EHbGJ2LDQJbbtMgrLtKQfiAN+zwijv4FBiB2jANAC6eHqz6X 9v8DDIh4HIInorxIAFYGeSo5KRm8fVDRNPkQxhoXEY13sVBSwnEIXpMbBPj5U1UdmPenvbBfBCE3C excZSM2Or6JolcHtaUTSiRMcloZOHZOQKIJluYW3SRjmIZZlAyW4n+Bd40zq+FM0e62PFtUj/SsQb jkXjLwAkqDvjaiUw7a45O8ztGL/8YfKXu00KrrMQZmMrjYcTNIFVbe7PPSzi10nu6bezn+f7q/GIE NmBblUamVAAV+A==; Original-Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1q70aE-0001pZ-5n; Wed, 07 Jun 2023 17:20:46 -0400 In-Reply-To: (Andrea Corallo's message of "Wed, 27 Jul 2022 08:13:39 +0000") 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:263090 Archived-At: Andrea Corallo writes: > Kenneth Stuart writes: > >> Andrea Corallo writes: >> >>> Eli Zaretskii writes: >>> >>>>> From: Kenneth Stuart >>>>> Date: Sun, 24 Jul 2022 15:16:42 +0100 >>>>>=20 >>>>> Note that I'm not using 'emacs -Q' as a later version of Org is >>>>> required, however the issue strongly appears to be with emacs native >>>>> compilation as it does not occur from a build without native >>>>> compilation. >>>>>=20 >>>>> org-mode commit: 127e7fee4959ceb33dba2e442b72189f3c25eaa1 >>>>>=20 >>>>> Steps to reproduce: >>>>>=20 >>>>> 1. Create an org-mode buffer and insert a clocktable dynamic block wi= th a >>>>> `tstart` option. >>>>>=20 >>>>> #+BEGIN: clocktable :scope file :maxlevel 2 :tstart "2020-01-01" >>>>> #+END: >>>>>=20 >>>>> 2. Evaluate the clocktable (C-c C-c on the #+BEGIN line) >>>>>=20 >>>>> Result: `Invalid function: org-encode-time` >>>>> Expected: No error, clocktable updated successfully >>>>>=20 >>>>> Notes: >>>>>=20 >>>>> References: >>>>> https://mail.gnu.org/archive/html/emacs-orgmode/2022-07/msg00738.html >>>>> https://mail.gnu.org/archive/html/emacs-orgmode/2022-07/msg00696.html >>>>>=20 >>>>> In early April Org introduced a new macro `org-encode-time` which is >>>>> used in the `let` special form of function `org-matcher-time` >>>>>=20 >>>>> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/tree/lisp/org-ma= cs.el#n1395 >>>>> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/tree/lisp/org-ma= cs.el#n1463 >>>>>=20 >>>>> Function `org-matcher-time` is used by the clocktable dynamic block >>>>> options, for example adding a `tstart` option and evaluation the >>>>> clocktable emits the error "Invalid function: org-encode-time". >>>>>=20 >>>>> If then going to the source for `org-matcher-time` and evaluating the >>>>> defun, the clocktable can then be evaluated without error. >>>>>=20 >>>>> As previously stated this issue does not occur when not using native >>>>> compilation. >>>> >>>> Andrea, could you please look into this bug report? It sounds like >>>> 'defmacro' in a conditional code is mis-compiled somehow? >>> >>> I'm currently on holiday so I've only time to check the mails and reply >>> when necessary. I won't have time to look into this before next week >>> *but*... if it's a macro issue it might be some missing require in the >>> org code, we have seen this kind of issue is the most common. >>> >>> Is this org async compiled? If so Kenneth have we verifed the emitted >>> warnings? >>> >>> Thanks! >>> >>> Andrea >> >> During async compile there are a couple of warnings emitted: >> >> In end of data: >> org-macs.el:1463:29: Warning: the function =E2=80=98org-encode-time=E2= =80=99 is not known to be defined. >> org-macs.el:1361:10: Warning: the function =E2=80=98org-time-string-to-s= econds=E2=80=99 is not known to be defined. > > Nice, those are clear markers of this issue. > >> However org-encode-time is earlier defined in org-macs.el (within 'if' s= tatement). > > Okay, I can't read the code now but I guess should be easy to > investigate why during async compilation this 'if' is not triggered. > >> Also interesting, if I touch org-macs.el and synchronously compile, I se= e no issue: > > This is because compiling synchronously the definition of those macros > is most likely loaded and already present in the environment. > > Andrea Hello all, closing this as I believe was a (I guess solved) org bug. Happy to reopen if necessary. Best Regards Andrea