unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Andrea Corallo <akrl@sdf.org>
To: Pedro Andres Aranda Gutierrez <paaguti@gmail.com>
Cc: "Mattias Engdegård" <mattiase@acm.org>, 62537@debbugs.gnu.org
Subject: bug#62537: Error compiling emacs master with native compilation activated
Date: Thu, 30 Mar 2023 09:28:10 +0000	[thread overview]
Message-ID: <xjf4jq2fv11.fsf@ma.sdf.org> (raw)
In-Reply-To: <CAO48Bk9xgB8kxSiPFdiipUDWTBrfoxUxbCShz_fPMj1_quXH+w@mail.gmail.com> (Pedro Andres Aranda Gutierrez's message of "Thu, 30 Mar 2023 09:18:39 +0200")

Pedro Andres Aranda Gutierrez <paaguti@gmail.com> writes:

> HI
> there seems to be a problem when compiling the org-mode files with
> native compilation activated
>
> ```
>   ELC+ELN  org/org-plot.elc
>
> Error: native-ice ("org/org-plot.el" "block does not end with a
> branch" #s(comp-block-lap bb_8 ((comment "LAP TAG 83") (call
> helper_unbind_n #s(comp-mvar nil nil ((1 . 1)) nil nil nil)) (setimm
> #s(comp-mvar (t) nil nil nil nil 2) make-temp-file) (setimm
> #s(comp-mvar (t) nil nil nil nil 3) "org-plot") (set #s(comp-mvar (t)
> nil nil nil nil 2) (callref funcall #s(comp-mvar (t) nil nil nil nil
> 2) #s(comp-mvar (t) nil nil nil nil 3))) (call
> record_unwind_protect_excursion) (setimm #s(comp-mvar (t) nil nil nil
> nil 3) org-plot/goto-nearest-table) (set #s(comp-mvar (t) nil nil nil
> nil 3) (callref funcall #s(comp-mvar (t) nil nil nil nil 3))) (setimm
> #s(comp-mvar (t) nil nil nil nil 3) org-table-to-lisp) (set
> #s(comp-mvar (t) nil nil nil nil 3) (callref funcall #s(comp-mvar (t)
> nil nil nil nil 3))) (call helper_unbind_n #s(comp-mvar nil nil ((1 .
> 1)) nil nil nil)) (setimm #s(comp-mvar (t) nil nil nil nil 4)
> plist-get) (set #s(comp-mvar (t) nil nil nil nil 5) #s(comp-mvar (t)
> nil nil nil nil 0)) (setimm #s(comp-mvar (t) nil nil nil nil 6)
> :transpose) (set #s(comp-mvar (t) nil nil nil nil 4) (callref funcall
> #s(comp-mvar (t) nil nil nil nil 4) #s(comp-mvar (t) nil nil nil nil
> 5) #s(comp-mvar (t) nil nil nil nil 6))) (set #s(comp-mvar (t) nil nil
> nil nil 5) #s(comp-mvar (t) nil nil nil nil 4)) (setimm #s(comp-mvar
> (t) nil nil nil nil 6) #s(hash-table size 3 test eq rehash-size 1.5
> rehash-threshold 0.8125 purecopy t data (y 105 yes 105 t 105)))) nil
> nil nil nil #s(hash-table size 65 test eql rehash-size 1.5
> rehash-threshold 0.8125 data ()) nil nil 1 72 nil nil)
> org-plot/gnuplot)
>   mapbacktrace(#f(compiled-function (evald func args flags) #<bytecode
> 0x285567f77ae87d2>))
>   debug-early-backtrace()
>   debug-early(error (native-ice "org/org-plot.el" "block does not end
> with a branch" #s(comp-block-lap :name bb_8 :insns ((comment "LAP TAG
> 83") (call helper_unbind_n #s(comp-mvar :typeset nil :valset nil
> :range ((1 . 1)) :neg nil :id nil :slot nil)) (setimm #s(comp-mvar
> :typeset (t) :valset nil :range nil :neg nil :id nil :slot 2)
> make-temp-file) (setimm #s(comp-mvar :typeset (t) :valset nil :range
> nil :neg nil :id nil :slot 3) "org-plot") (set #s(comp-mvar :typeset
> (t) :valset nil :range nil :neg nil :id nil :slot 2) (callref funcall
> #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil
> :slot 2) #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id
> nil :slot 3))) (call record_unwind_protect_excursion) (setimm
> #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil
> :slot 3) org-plot/goto-nearest-table) (set #s(comp-mvar :typeset (t)
> :valset nil :range nil :neg nil :id nil :slot 3) (callref funcall
> #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil
> :slot 3))) (setimm #s(comp-mvar :typeset (t) :valset nil :range nil
> :neg nil :id nil :slot 3) org-table-to-lisp) (set #s(comp-mvar
> :typeset (t) :valset nil :range nil :neg nil :id nil :slot 3) (callref
> funcall #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id
> nil :slot 3))) (call helper_unbind_n #s(comp-mvar :typeset nil :valset
> nil :range ((1 . 1)) :neg nil :id nil :slot nil)) (setimm #s(comp-mvar
> :typeset (t) :valset nil :range nil :neg nil :id nil :slot 4)
> plist-get) (set #s(comp-mvar :typeset (t) :valset nil :range nil :neg
> nil :id nil :slot 5) #s(comp-mvar :typeset (t) :valset nil :range nil
> :neg nil :id nil :slot 0)) (setimm #s(comp-mvar :typeset (t) :valset
> nil :range nil :neg nil :id nil :slot 6) :transpose) (set #s(comp-mvar
> :typeset (t) :valset nil :range nil :neg nil :id nil :slot 4) (callref
> funcall #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id
> nil :slot 4) #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil
> :id nil :slot 5) #s(comp-mvar :typeset (t) :valset nil :range nil :neg
> nil :id nil :slot 6))) (set #s(comp-mvar :typeset (t) :valset nil
> :range nil :neg nil :id nil :slot 5) #s(comp-mvar :typeset (t) :valset
> nil :range nil :neg nil :id nil :slot 4)) (setimm #s(comp-mvar
> :typeset (t) :valset nil :range nil :neg nil :id nil :slot 6)
> #<hash-table eq 3/3 0x155ea01696a7>)) :closed nil :in-edges nil
> :out-edges nil :idom nil :df #<hash-table eql 0/65 0x155ea02c4401>
> :post-num nil :final-frame nil :sp 1 :addr 72 :non-ret-insn nil
> :no-ret nil) org-plot/gnuplot))
>   signal(native-ice ("org/org-plot.el" "block does not end with a
> branch" #s(comp-block-lap :name bb_8 :insns ((comment "LAP TAG 83")
> (call helper_unbind_n #s(comp-mvar :typeset nil :valset nil :range ((1
> . 1)) :neg nil :id nil :slot nil)) (setimm #s(comp-mvar :typeset (t)
> :valset nil :range nil :neg nil :id nil :slot 2) make-temp-file)
> (setimm #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id
> nil :slot 3) "org-plot") (set #s(comp-mvar :typeset (t) :valset nil
> :range nil :neg nil :id nil :slot 2) (callref funcall #s(comp-mvar
> :typeset (t) :valset nil :range nil :neg nil :id nil :slot 2)
> #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil
> :slot 3))) (call record_unwind_protect_excursion) (setimm #s(comp-mvar
> :typeset (t) :valset nil :range nil :neg nil :id nil :slot 3)
> org-plot/goto-nearest-table) (set #s(comp-mvar :typeset (t) :valset
> nil :range nil :neg nil :id nil :slot 3) (callref funcall #s(comp-mvar
> :typeset (t) :valset nil :range nil :neg nil :id nil :slot 3)))
> (setimm #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id
> nil :slot 3) org-table-to-lisp) (set #s(comp-mvar :typeset (t) :valset
> nil :range nil :neg nil :id nil :slot 3) (callref funcall #s(comp-mvar
> :typeset (t) :valset nil :range nil :neg nil :id nil :slot 3))) (call
> helper_unbind_n #s(comp-mvar :typeset nil :valset nil :range ((1 . 1))
> :neg nil :id nil :slot nil)) (setimm #s(comp-mvar :typeset (t) :valset
> nil :range nil :neg nil :id nil :slot 4) plist-get) (set #s(comp-mvar
> :typeset (t) :valset nil :range nil :neg nil :id nil :slot 5)
> #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil
> :slot 0)) (setimm #s(comp-mvar :typeset (t) :valset nil :range nil
> :neg nil :id nil :slot 6) :transpose) (set #s(comp-mvar :typeset (t)
> :valset nil :range nil :neg nil :id nil :slot 4) (callref funcall
> #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil
> :slot 4) #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id
> nil :slot 5) #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil
> :id nil :slot 6))) (set #s(comp-mvar :typeset (t) :valset nil :range
> nil :neg nil :id nil :slot 5) #s(comp-mvar :typeset (t) :valset nil
> :range nil :neg nil :id nil :slot 4)) (setimm #s(comp-mvar :typeset
> (t) :valset nil :range nil :neg nil :id nil :slot 6) #<hash-table eq
> 3/3 0x155ea01696a7>)) :closed nil :in-edges nil :out-edges nil :idom
> nil :df #<hash-table eql 0/65 0x155ea02c4401> :post-num nil
> :final-frame nil :sp 1 :addr 72 :non-ret-insn nil :no-ret nil)
> org-plot/gnuplot))
>   comp--native-compile("org/org-plot.el")
>   batch-native-compile()
>   batch-byte+native-compile()
>   command-line-1(("--eval" "(setq load-prefer-newer t
> byte-compile-warnings 'all)" "-l" "comp" "-f"
> "batch-byte+native-compile" "org/org-plot.el"))
>   command-line()
>   normal-top-level()
> Internal native compiler error: "org/org-plot.el", "block does not end
> with a branch", #s(comp-block-lap bb_8 ((comment "LAP TAG 83") (call
> helper_unbind_n #s(comp-mvar nil nil ((1 . 1)) nil nil nil)) (setimm
> #s(comp-mvar (t) nil nil nil nil 2) make-temp-file) (setimm
> #s(comp-mvar (t) nil nil nil nil 3) "org-plot") (set #s(comp-mvar (t)
> nil nil nil nil 2) (callref funcall #s(comp-mvar (t) nil nil nil nil
> 2) #s(comp-mvar (t) nil nil nil nil 3))) (call
> record_unwind_protect_excursion) (setimm #s(comp-mvar (t) nil nil nil
> nil 3) org-plot/goto-nearest-table) (set #s(comp-mvar (t) nil nil nil
> nil 3) (callref funcall #s(comp-mvar (t) nil nil nil nil 3))) (setimm
> #s(comp-mvar (t) nil nil nil nil 3) org-table-to-lisp) (set
> #s(comp-mvar (t) nil nil nil nil 3) (callref funcall #s(comp-mvar (t)
> nil nil nil nil 3))) ...) nil nil nil nil #s(hash-table size 65 test
> eql rehash-size 1.5 rehash-threshold 0.8125 data ()) nil nil ...),
> #<symbol org-plot/gnuplot at 23521>
> make[5]: *** [Makefile:327: org/org-plot.elc] Error 255

Hi Pedro,

bisecting this should be due to:
"
52b67740d10df8ca539fdc2c7d50283997683141
Author:     Mattias Engdegård <mattiase@acm.org>
AuthorDate: Sat Mar 25 15:38:00 2023 +0100
Commit:     Mattias Engdegård <mattiase@acm.org>
CommitDate: Sat Mar 25 16:21:09 2023 +0100

Parent:     db7e95531ac Switch buffer in Ftreesit_query_capture
Merged:     comp-no-spawn
Follows:    emacs-28.2 (164697)

Generalise a LAP optimisation rule

* lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode):
Accept (stack-set 1) as equivalent to (discardN-preserve-tos 1) in a
rule previously overlooked.  This is usually beneficial in code size
and almost always shortens dynamic paths.
"

I'll try to have a look as soon as I've some time.

Thanks

  Andrea





  parent reply	other threads:[~2023-03-30  9:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-30  7:18 bug#62537: Error compiling emacs master with native compilation activated Pedro Andres Aranda Gutierrez
2023-03-30  8:50 ` Eli Zaretskii
2023-03-30  9:28 ` Andrea Corallo [this message]
2023-03-30  9:59   ` Pedro Andres Aranda Gutierrez
2023-03-30 10:37   ` Mattias Engdegård
2023-03-30 13:35     ` Andrea Corallo
2023-03-31 10:26       ` Andrea Corallo
2023-03-31 15:14         ` Mattias Engdegård
2023-04-05 17:19           ` Andrea Corallo
2023-04-05 20:51             ` Mattias Engdegård
2023-04-05 21:12               ` Andrea Corallo
2023-04-05 21:46                 ` Mattias Engdegård
2023-04-06 10:42             ` Mattias Engdegård

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xjf4jq2fv11.fsf@ma.sdf.org \
    --to=akrl@sdf.org \
    --cc=62537@debbugs.gnu.org \
    --cc=mattiase@acm.org \
    --cc=paaguti@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).