This is an auto-filled bug because app-editors/xemacs calls ar directly. The issue was originally discovered on arm64, but it may be reproducible on other arches as well. Attached build log and emerge --info. NOTE: To reproduce this issue you may want to temporarily move the /usr/bin/ar binary.
Created attachment 633658 [details] build.log build log and emerge --info
Looks like ar is only checked for by configure. So it is not actually used. But that is an excuse as good as anything to remove it. So I'll provide a patch.
xemacs-21.5.34-r5.ebuild does now contain a patch that removes the check for ar.
Verified that I can build xemacs-21.5 after moving ar from the system. Closing issue as resolved.