The macro `org-dlet' is not expanded in file org-agenda.el at compile time when installing Org 9.5 from ELPA. It is plain-top-level require'd. I think that (require 'org-macs) form should be wrapped in an `eval-and-compile' form.
Emacs : GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2021-08-28 Package: Org mode version 9.5 (9.5-g0a86ad @ /home/phil/.emacs.d/elpa/org-9.5/)