git bisect shows that this emacs commit is the problem (if I understand correctly ... this is the first time I have used git bisect):
[6ddcf67052545a0f77233f1a952dc90e296cda35] Make it possible to mark generalized variables as obsolete

Here is the bug report:
Subject: 29.0.50; emacs commit 6ddcf67052545a0f77233f1a952dc90e296cda35 causes org-mode build to fail

dortmann@ddo-linux:git-org-mode$ ( set -eu ;  make clean ; make ; make autoloads )
make -C lisp clean
make[1]: Entering directory '/home/dortmann/src/git-org-mode/lisp'
rm -f org-version.el org-loaddefs.el org-version.elc org-loaddefs.elc org-install.elc
rm -f *.elc
make[1]: Leaving directory '/home/dortmann/src/git-org-mode/lisp'
make -C doc clean
make[1]: Entering directory '/home/dortmann/src/git-org-mode/doc'
rm -f *.pdf *.html *.info *_letter.tex org-version.inc org-version.tex \
      *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs *.toc \
              *.tp *.tps *.vr *.vrs *.log *.ps
make[1]: Leaving directory '/home/dortmann/src/git-org-mode/doc'
make -C doc clean;  make -C lisp clean;
make[1]: Entering directory '/home/dortmann/src/git-org-mode/doc'
rm -f *.pdf *.html *.info *_letter.tex org-version.inc org-version.tex \
      *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs *.toc \
              *.tp *.tps *.vr *.vrs *.log *.ps
make[1]: Leaving directory '/home/dortmann/src/git-org-mode/doc'
make[1]: Entering directory '/home/dortmann/src/git-org-mode/lisp'
rm -f org-version.el org-loaddefs.el org-version.elc org-loaddefs.elc org-install.elc
rm -f *.elc
make[1]: Leaving directory '/home/dortmann/src/git-org-mode/lisp'
make -C lisp compile
make[1]: Entering directory '/home/dortmann/src/git-org-mode/lisp'
rm -f org-version.el org-loaddefs.el org-version.elc org-loaddefs.elc org-install.elc
org-version: 9.5.4 (release_9.5.4-758-g3c11e9)
Loading /home/dortmann/src/git-org-mode/lisp/org-compat.el (source)...

Error: error ("Eager macro-expansion failure: (void-function byte-compile-warn-obsolete)")
  debug-early-backtrace()
  debug-early(error (error "Eager macro-expansion failure: (void-function byte-compile-warn-obsolete)"))
  error("Eager macro-expansion failure: %S" (void-function byte-compile-warn-obsolete))
  internal-macroexpand-for-load((defalias 'org-string-width #'(lambda (string &optional pixels) "Return width of STRING when displayed in the current buffer.\nReturn width in pixels when PIXELS is non-nil." (if (and (version< emacs-version "28") (not pixels)) (org--string-width-1 string) (remove-text-properties 0 (length string) '(wrap-prefix t line-prefix t) string) (unless pixels (remove-text-properties 0 (length string) '(face t) string)) (let ((current-invisibility-spec (or (and (not (listp buffer-invisibility-spec)) buffer-invisibility-spec) (let (result) (dolist (el buffer-invisibility-spec) (unless (or (memq el '(org-fold-drawer org-fold-block org-fold-outline)) (and (listp el) (memq (car el) '(org-fold-drawer org-fold-block org-fold-outline)))) (push el result))) result))) (current-char-property-alias-alist char-property-alias-alist)) (with-temp-buffer (setq-local display-line-numbers nil) (setq-local buffer-invisibility-spec (if (listp current-invisibility-spec) (mapcar (lambda (el) (if (and (consp el) (cdr el)) (list (car el)) el)) current-invisibility-spec) current-invisibility-spec)) (setq-local char-property-alias-alist current-char-property-alias-alist) (let (pixel-width symbol-width) (with-silent-modifications (setf (buffer-string) string) (setq pixel-width (if (get-buffer-window (current-buffer)) (car (window-text-pixel-size nil (line-beginning-position) (point-max))) (set-window-buffer nil (current-buffer)) (car (window-text-pixel-size nil (line-beginning-position) (point-max))))) (unless pixels (setf (buffer-string) "a") (setq symbol-width (if (get-buffer-window (current-buffer)) (car (window-text-pixel-size nil (line-beginning-position) (point-max))) (set-window-buffer nil (current-buffer)) (car (window-text-pixel-size nil (line-beginning-position) (point-max))))))) (if pixels pixel-width (/ pixel-width symbol-width)))))))) t)
  load-with-code-conversion("/home/dortmann/src/git-org-mode/lisp/org-macs.el" "/home/dortmann/src/git-org-mode/lisp/org-macs.el" nil t)
  require(org-macs)
  load-with-code-conversion("/home/dortmann/src/git-org-mode/lisp/org-compat.el" "/home/dortmann/src/git-org-mode/lisp/org-compat.el" nil nil)
  load("org-compat.el")
  command-line-1(("--eval" "(setq vc-handled-backends nil org-startup-folded nil org-element-cache-persistent nil)" "--eval" "(add-to-list 'load-path \".\")" "--eval" "(load \"org-compat.el\")" "--eval" "(load \"../mk/org-fixup.el\")" "--eval" "(org-make-org-version \"9.5.4\" \"release_9.5.4-758-g3c11e9\")"))
  command-line()
  normal-top-level()
Eager macro-expansion failure: (void-function byte-compile-warn-obsolete)
make[1]: *** [Makefile:72: org-version.el] Error 255
make[1]: Leaving directory '/home/dortmann/src/git-org-mode/lisp'
make: *** [mk/targets.mk:96: compile] Error 2
dortmann@ddo-linux:git-org-mode$ cd -
/home/dortmann/src/git-emacs-master
dortmann@ddo-linux:git-emacs-master$ git ^C
dortmann@ddo-linux:git-emacs-master$ git bisect bad
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[6ddcf67052545a0f77233f1a952dc90e296cda35] Make it possible to mark generalized variables as obsolete
dortmann@ddo-linux:git-emacs-master$



On 8/23/22 02:28, Ihor Radchenko wrote:
Tim Cross <theophilusx@gmail.com> writes:

I tried this and it failed wiht the same error i.e.

Eager macro-expansion failure: (void-function byte-compile-warn-obsolete)
make[1]: *** [Makefile:72: org-version.el] Error 255
make[1]: Leaving directory '/home/tim/git/org-mode/lisp'
make: *** [mk/targets.mk:96: compile] Error 2

This is with Emacs built from current git head

GNU Emacs 29.0.50 (build 5, x86_64-pc-linux-gnu, X toolkit, cairo
version 1.17.6, Xaw3d scroll bars) of 2022-08-22
I can reproduce, but it is likely Emacs issue. Please report to Emacs
devs.