Subject: bug#47161: 28.0.50; [feature/native-comp] Failure to native-compile bytecomp.el etc.

From: Andrea Corallo <[email-masked]>
Date: Mon, 15 Mar 2021 20:05:10 +0000

Eli Zaretskii <[email-masked]> writes:

>> From: Andrea Corallo <[email-masked]>
>> Cc: [email-masked]
>> Date: Mon, 15 Mar 2021 15:48:01 +0000
>> 
>> >   $ emacs -batch -l comp -f batch-byte-native-compile-for-bootstrap ../lisp/emacs-lisp/bytecomp.el
>> >   Debugger entered--Lisp error: (wrong-type-argument "../lisp/emacs-lisp/bytecomp.el" listp #<subr byte-compile-form>)
>> >     signal(wrong-type-argument ("../lisp/emacs-lisp/bytecomp.el" listp #<subr byte-compile-form>))
>> >     comp--native-compile("../lisp/emacs-lisp/bytecomp.el")
>> >     batch-native-compile()
>> >     batch-byte-native-compile-for-bootstrap()
>> >     command-line-1(("-l" "comp" "-f" "batch-byte-native-compile-for-bootstrap" "../lisp/emacs-lisp/bytecomp.el"))
>> >     command-line()
>> >     normal-top-level()
>> >
>> > Am I doing something wrong?
>> 
>> Actually no, 7f74ed4912 fix for me.
>
> And I guess we also need a similar fix in byte-opt.el?  I installed
> it.

Right thanks

> I also suddenly see another byte-compilation message:
>
>     ELC      emacs-lisp/byte-opt.elc
>   Compiler-macro error for cl--block-wrapper: (error "(setf seq-elt) is already defined as something else than a generic function")
>   Eager macro-expansion failure: (error "(setf seq-elt) is already defined as something else than a generic function")
>
> What causes this?

ATM I've no idea, but it doesn't look to me evidently related to native
compilation.  How can I reproduce it?

Also, shouldn't byte-opt.el be native compiled as it's in COMPILE_FIRST?

Thanks

  Andrea