Yes, that's what I've found. I can also confirm that compiling with 1 thread works around it. It's only a problem w/ gmake -jN where N is > 1 (I run w/ 8 or 12 or so typically).


Aaron


On Fri, Dec 29, 2023 at 1:43 PM, Andrea Corallo <acorallo@gnu.org> wrote:

Eli Zaretskii <eliz@gnu.org> writes:

From: Aaron Jensen <aaronjensen@gmail.com>
Date: Thu, 28 Dec 2023 09:05:25 -0500

On macOS, I am often getting this when building Emacs from scratch. Could this be a race condition with a parallel build?

I bisected and the problematic commit is: e670412a3e101e70dc26e021f467faece8cb7f6b

In toplevel form:
org/org-element.el:64:2: Error: Eager macro-expansion failure:
(native-compiler-error (lambda (arg322 &optional arg323) (let ((f
#'macroexpand)) (funcall f arg322 arg323))) "Compiling
/private/var/tmp/emacs-plusA30-20231227-
10652-1cz0rs/.brew_home/.emacs.d/eln-cache/30.0.50-69afc345/subr--trampoline-6d6163726f657870616e64_macroexpand_0.eln... File already exists:
/private/var/tmp/emacs-plusA30-20231227-10652-1cz0rs/.brew_home/.emacs.d/eln-cache/30.0.50-69afc345/subr--trampoline-6d6163726f657870616e64_macroexpand_0.eln

Error: file-already-exists (\"File already exists\"
\"/private/var/tmp/emacs-plusA30-20231227-10652-1cz0rs/.brew_home/.emacs.d/eln-cache/30.0.50-69afc345/subr--trampoline-6d6163726f657870616e64_macroexpand_0.eln\") mapbacktrace(#f(compiled-function (evald func args flags) #<bytecode -0x1fcb3a734512f81>)) debug-early-backtrace()
debug-early(error (file-already-exists \"File already exists\"
\"/private/var/tmp/emacs-plusA30-20231227-10652-1cz0rs/.brew_home/.emacs.d/eln-cache/30.0.50-69afc345/subr--trampoline-6d6163726f657870616e64_macroexpand_0.eln
\"))
rename-file(\"/private/var/tmp/emacs-plusA30-20231227-10652-1cz0rs/.brew_home/.emacs.d/eln-cache/30.0.50-69afc345/subr--trampoline-6d6163726f657870616e64_macroexpand_08i0tl8.eln.tmp\"
\"/private/var/tmp/emacs-plusA30-20231
227-10652-1cz0rs/.brew_home/.emacs.d/eln-cache/30.0.50-69afc345/subr--trampoline-6d6163726f657870616e64_macroexpand_0.eln\") comp-delete-or-replace-file(\"/private/var/tmp/emacs-plusA30-20231227-10652-1cz0rs/.brew_home/.emacs.d/eln-cache/30.0.50-69afc345/subr--trampoline-6d6163726f657870616e64_macroexpand_0.eln\"
\"/private/var/tmp/emacs-plusA30
-20231227-10652-1cz0rs/.brew_home/.emacs.d/eln-cache/30.0.50-69afc345/subr--trampoline-6d6163726f657870616e64_macroexpand_08i0tl8.eln.tmp\") comp--compile-ctxt-to-file(\"/private/var/tmp/emacs-plusA30-20231227-10652-1cz0rs/.brew_home/.emacs.d/eln-cache/30.0.50-69afc345/subr--trampoline-6d6163726f657870616e64_macroexpand_0.eln\") comp-compile-ctxt-to-file(\"/private/var/tmp/emacs-plusA30-20231227-10652-1cz0rs/.brew_home/.emacs.d/eln-cache/30.0.50-69afc345/subr--trampoline-6d6163726f657870616e64_macroexpand_0.eln\") comp-final1()
load-with-code-conversion(\"/private/var/tmp/emacs-int-comp-subr--trampoline-6d6163726f657870616e64_macroexpand_0-haajZW.el\"
\"/private/var/tmp/emacs-int-comp-subr--trampoline-6d6163726f657870616e64_macroexpand_0-haajZW.e l\" nil t)
command-line-1((\"-l\" \"/private/var/tmp/emacs-int-comp-subr--trampoline-6d6163726f657870616e64_macroexpand_0-haajZW.el\")) command-line()
normal-top-level()
")
gmake[3]: *** [Makefile:330: org/org-element.elc] Error 1

Thanks. Adding Andrea to the discussion.

Hi all,

reading from emacs-devel... is it still confirmed that the commit that introduced this is e670412a3e101e70dc26e021f467faece8cb7f6b?

Thanks

Andrea