Subject: bug#62762: 'make' often errors with "Org version mismatch" after pulling a new version of the code

From: Eli Zaretskii <[email-masked]>
Date: Fri, 21 Apr 2023 14:44:03 +0300

> Cc: [email-masked], [email-masked], [email-masked]
> Date: Sat, 15 Apr 2023 13:48:46 +0300
> From: Eli Zaretskii <[email-masked]>
> 
> > From: Ihor Radchenko <[email-masked]>
> > Cc: [email-masked], [email-masked], [email-masked]
> > Date: Thu, 13 Apr 2023 15:05:21 +0000
> > 
> > Eli Zaretskii <[email-masked]> writes:
> > 
> > >> See the attached.
> > >> On Emacs side, `org--built-in-p' will need to be set during compilation.
> > >
> > > LGTM, will soon incorporate this in our build system.
> > 
> > Once you confirm that my patch + your build system update fixes the
> > problem, I will push to Org bugfix and bump a minor bugfix release.
> 
> I've now installed the change on master.
> 
> I wonder why org--built-in-p is a defconst, though: shouldn't it be a
> defvar instead?

This doesn't seem to work as expected here?  Here's what I get with
the latest update from master:

  '../src/emacs.exe' -batch --no-site-file --no-site-lisp --eval "(setq load-prefer-newer t byte-compile-warnings 'all)"  --eval "(setq org--built-in-p t)"  -f batch-byte-compile org/org-element.el
  Warning (emacs): Org version mismatch.  Org loading aborted.
  This warning usually appears when a built-in Org version is loaded prior to the more recent Org version.

  Version mismatch is commonly encountered in the following situations:

This seems to indicate that the compilation is aborted even though the
command line sets org--built-in-p non-nil.  What went wrong here?