Subject: bug#57381: 29.0.50; void-function byte-compile-warn-obsolete when building latest org-mode

From: Malcolm Purvis <[email-masked]>
Date: Wed, 24 Aug 2022 22:14:39 +1000

Trying to build the latest development version of org-mode (from 
 https://git.savannah.gnu.org/git/emacs/org-mode.git/) with the 
 latest development version of Emacs ("HEAD is now at e518146a30 
 Fix input extension focus tracking with some window managers") 
 fails with the following error:

--8<---------------cut here---------------start------------->8--- 
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("/Users/malcolmp/builds/org-mode/org-mode.git/lisp/org-macs.el" 
  "/Users/malcolmp/builds/org-mode/org-mode.git/lisp/org-macs.el" 
  nil t) require(org-macs) 
  load-with-code-conversion("/Users/malcolmp/builds/org-mode/org-mode.git/lisp/org-compat.el" 
  "/Users/malcolmp/builds/org-mode/org-mode.git/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]: *** [org-version.el] Error 
255 make: *** [compile] Error 2 garden:org-mode.git malcolmp$ git 
status On branch main Your branch is up to date with 
'origin/main'.  --8<---------------cut 
here---------------end--------------->8--- 

This error appeared in the last few days.    In GNU Emacs 29.0.50 
(build 2, x86_64-apple-darwin21.6.0, NS appkit-2113.60 Version 
12.5.1 (Build 21G83)) of 2022-08-23 built on lamechWindowing 
system distributor 'Apple', version 10.3.2113 System Description: 
macOS 12.5.1  Configured using: 
 'configure 
 --enable-locallisppath=/usr/local/share/emacs/site-lisp 
 --infodir=/usr/local/Cellar/emacs-head@29/29.0.50_1/share/info/emacs 
 --prefix=/usr/local/Cellar/emacs-head@29/29.0.50_1 --without-x 
 --without-dbus --with-imagemagick --with-modules --with-gnutls 
 --with-rsvg --with-xml2 --with-xwidgets --with-ns 
 --disable-ns-self-contained' 

-- 
		    Malcolm Purvis <[email-masked]>