emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Daniel Ortmann <daniel.ortmann@oracle.com>
To: Org-mode <emacs-orgmode@gnu.org>
Subject: 'make autoloads' works but 'make ; make autoloads' fails with a version mismatch?
Date: Wed, 14 Sep 2022 17:37:59 -0500	[thread overview]
Message-ID: <cdf0bc7d-3ed1-e1ce-84bb-239575a9c0b9@oracle.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 6424 bytes --]

What's up with this behavior?  It began a couple of weeks ago.  I have 
the load-path set immediately in my init.el followed by require org.

Versions are:

  * GNU Emacs 29.0.50 (build 9, x86_64-pc-linux-gnu, GTK+ Version
    3.22.30, cairo version 1.15.12) of 2022-09-14
  * Org mode version 9.5.5 (release_9.5.5-785-g86c463 @
    /home/dortmann/src/git-org-mode/lisp/)

'make clean' followed by 'make autoloads' works fine:

dortmann@ddo-linux:git-org-mode$ make autoloads
make -C lisp autoloads
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.5 (release_9.5.5-785-g86c463)
Loading /home/dortmann/src/git-org-mode/lisp/org-compat.el (source)...
Loading /home/dortmann/src/git-org-mode/mk/org-fixup.el (source)...
Package autoload is deprecated
org-loaddefs: 9.5.5 (release_9.5.5-785-g86c463)
Loading /home/dortmann/src/git-org-mode/lisp/org-compat.el (source)...
Loading /home/dortmann/src/git-org-mode/mk/org-fixup.el (source)...
Package autoload is deprecated
make[1]: Leaving directory '/home/dortmann/src/git-org-mode/lisp'
dortmann@ddo-linux:git-org-mode$

*==>> *But 'make clean' and then 'make' followed by 'make autoloads' 
fails.  I could not get around it by manipulating load-path further:

dortmann@ddo-linux:git-org-mode$ make autoloads
make -C lisp autoloads
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.5 (release_9.5.5-785-g86c463)
Loading /home/dortmann/src/git-org-mode/lisp/org-compat.el (source)...
Warning (emacs): Org version mismatch.  Make sure that correct 
‘load-path’ is set early in init.el
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:
1. Emacs is loaded using literate Org config and more recent Org
    version is loaded inside the file loaded by ‘org-babel-load-file’.
    ‘org-babel-load-file’ triggers the built-in Org version clashing
    the newer Org version attempted to be loaded later.

    It is recommended to move the Org loading code before the
    ‘org-babel-load-file’ call.

2. New Org version is loaded manually by setting ‘load-path’, but some
    other package depending on Org is loaded before the ‘load-path’ is
    configured.
    This "other package" is triggering built-in Org version, again
    causing the version mismatch.

    It is recommended to set ‘load-path’ as early in the config as
    possible.

3. New Org version is loaded using straight.el package manager and
    other package depending on Org is loaded before straight triggers
    loading of the newer Org version.

    It is recommended to put
     (straight-use-package ’org)
    early in the config.  Ideally, right after the straight.el
    bootstrap.  Moving ‘use-package’ :straight declaration may not be
    sufficient if the corresponding ‘use-package’ statement is
    deferring the loading.

Error: error ("Org version mismatch.  Make sure that correct ‘load-path’ 
is set early in init.el")
   mapbacktrace(#f(compiled-function (evald func args flags) #<bytecode 
0xa578661cbaef144>))
   debug-early-backtrace()
   debug-early(error (error "Org version mismatch.  Make sure that 
correct ‘load-path’ is set early in init.el"))
   signal(error ("Org version mismatch.  Make sure that correct 
‘load-path’ is set early in init.el"))
   error("Org version mismatch.  Make sure that correct `load-path' is 
set early in init.el")
   byte-code("\300 \301\232\204\17\0\302\303!\210\304\305!\210\300\207" 
[org-git-version "release_9.5.5-785-g86c463" warn "Org version 
mismatch.  Make sure that correct `load-path' is set early in 
init.el\nThis warning usually appears when a built-in Org version is 
loaded\nprior to the more recent Org version.\n\nVersion mismatch is 
commonly encountered in the following situations:\n1. Emacs is loaded 
using literate Org config and more recent Org\n   version is loaded 
inside the file loaded by `org-babel-load-file'.\n   
`org-babel-load-file' triggers the built-in Org version clashing\n   the 
newer Org version attempted to be loaded later.\n\n   It is recommended 
to move the Org loading code before the\n   `org-babel-load-file' 
call.\n\n2. New Org version is loaded manually by setting `load-path', 
but some\n   other package depending on Org is loaded before the 
`load-path' is\n   configured.\n   This \"other package\" is triggering 
built-in Org version, again\n causing the version mismatch.\n\n   It is 
recommended to set `load-path' as early in the config as\n   
possible.\n\n3. New Org version is loaded using straight.el package 
manager and\n other package depending on Org is loaded before straight 
triggers\n   loading of the newer Org version.\n\n   It is recommended 
to put\n    (straight-use-package 'org)\n   early in the config.  
Ideally, right after the straight.el\n bootstrap.  Moving `use-package' 
:straight declaration may not be\n   sufficient if the corresponding 
`use-package' statement is\n   deferring the loading." error "Org 
version mismatch. Make sure that correct `load-path' is set early in 
init.el"] 2)
   require(org-macs)
   eval-buffer(#<buffer  *load*> nil 
"/home/dortmann/src/git-org-mode/lisp/org-compat.el" nil t)
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")
   eval((load "org-compat.el") t)
   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.5\" \"release_9.5.5-785-g86c463\")"))
   command-line()
   normal-top-level()
Org version mismatch.  Make sure that correct ‘load-path’ is set early 
in init.el
make[1]: *** [Makefile:72: org-version.el] Error 255
make[1]: Leaving directory '/home/dortmann/src/git-org-mode/lisp'
make: *** [mk/targets.mk:133: autoloads] Error 2
dortmann@ddo-linux:git-org-mode$

[-- Attachment #2: Type: text/html, Size: 8871 bytes --]

             reply	other threads:[~2022-09-14 22:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-14 22:37 Daniel Ortmann [this message]
2022-09-15  4:32 ` 'make autoloads' works but 'make ; make autoloads' fails with a version mismatch? Ihor Radchenko
2022-09-15  4:51   ` Charles Philip Chan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cdf0bc7d-3ed1-e1ce-84bb-239575a9c0b9@oracle.com \
    --to=daniel.ortmann@oracle.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).