On macOS, I am often getting this when building Emacs from scratch (I've also attached my full build log). Could this be a race condition with a parallel build?
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
I can reproduce this consistently when building with homebrew, but it's more intermittent when building from the git repo.