Doom-emacs: Make compile emits error.

Created on 4 Jan 2018  ·  23Comments  ·  Source: hlissner/doom-emacs

Observed behavior

Make install gives the error Recursive 'require' for feature 'org'.

M-x org-version gives 9.1.6-elpa

System information

I have also added the ("org" . "https://orgmode.org/elpa/") package-archive.


Click to expand

DOOM Doctor
Running Emacs v25.3.2, commit d465c6199249fb6e6e8b49474a04f94e7d5e3cdd

shell: /bin/zsh
Compiled with:
  XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
  NOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
  TOOLKIT_SCROLL_BARS GTK3 X11 MODULES
uname -a:
  Linux zeronone-ubuntu 4.10.0-42-generic #46~16.04.1-Ubuntu SMP Mon Dec
  4 15:57:59 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Attempt to load DOOM: success! Loaded v2.0.9
Revision d465c6199249fb6e6e8b49474a04f94e7d5e3cdd

----

test-emacs
test-windows
test-fonts
Found font material-design-icons.ttf
Found font weathericons.ttf
Found font octicons.ttf
Found font fontawesome.ttf
Found font file-icons.ttf
Found font all-the-icons.ttf
test-gnutls
test-tls
Validated https://elpa.gnu.org
Validated https://melpa.org
Successfully rejected https://self-signed.badssl.com
Successfully rejected https://wrong.host.badssl.com/
test-tar
Everything seems fine, happy Emacs’ing!

bug obsolete bidoom resolved

Most helpful comment

These issues have been fixed in develop. The 2.1 release is this weekend, so they will be in master soon.

All 23 comments

Having Same Issue also on Arch.

@hlissner I commented it out, but it didn't fix it.

Commenting out the line didn't seem to help. I tried to do a fresh install of doom and the following happens during the make install, perhaps related

Installing ox-reveal
  FATAL ERROR: (error) Package ‘org-20150330’ is unavailable
Installing org-tree-slide
✓ DONE
Installing centered-window-mode
✓ DONE
Installing ox-pandoc
  FATAL ERROR: (error) Package ‘org-8.2’ is unavailable
Installing ob-translate
  FATAL ERROR: (error) Package ‘org-8’ is unavailable

@exrok I added the ("org" . "http://orgmode.org/elpa/") to package-archives to fix that one. AFAIK org-9.x is required by doom-emacs. But emacs v25.x uses org-8

@zeronone Thanks that fixed that problem. However the orignal problem still stands when compiling.

Odd. Neither of these fixes should be necessary. I think the underlying issue is that Doom is trying to install all these packages that _depend_ on org, _before installing org-plus-contrib_, which includes org 9.1.4. I will look into this.

Hey. I hadn't realized orgmode.com got https support. If you add ("org" . "https://orgmode.org/elpa/") instead, does this resolve your issues? This was pretty much the only reason Doom wasn't using it.

I've now added it in develop. I'll keep this open until it is in master.

@hlissner @exrok The problem still persists even with applying https://github.com/hlissner/doom-emacs/commit/2598d48bba46435249402693edacfe65f22bdb2f and https://github.com/hlissner/doom-emacs/commit/a29bc54c63ba87f147eff1a42564d85fc837e58c

I see that both org (dependency of ox-reveal and others ?) and org-plus-contrib is installed.

I tried installing org-plus-contrib :files ("contrib/lisp/*.el") and also changing the order of org in init.el (first element after :lang); but the same error appeared in other places.

Finally, I just added org-plus-contrib to doom-core-packages and it fixed the problem.

diff --git a/core/core-packages.el b/core/core-packages.el
index d486c5f..6ae55ea 100644
--- a/core/core-packages.el
+++ b/core/core-packages.el
@@ -63,7 +63,7 @@ package's name as a symbol, and whose CDR is the plist supplied to its
 `package!' declaration. Set by `doom-initialize-packages'.")

 (defvar doom-core-packages
-  '(persistent-soft use-package quelpa async)
+  '(persistent-soft use-package quelpa async org-plus-contrib)
   "A list of packages that must be installed (and will be auto-installed if
 missing) and shouldn't be deleted.")

diff --git a/modules/lang/org/packages.el b/modules/lang/org/packages.el
index d6a7eca..2d523c1 100644
--- a/modules/lang/org/packages.el
+++ b/modules/lang/org/packages.el
@@ -2,7 +2,7 @@
 ;;; lang/org/packages.el

 ;; Installs a cutting-edge version of org-mode
-(package! org-plus-contrib)
+;; (package! org-plus-contrib)

 (package! org-bullets :recipe (:fetcher github :repo "hlissner/org-bullets"))
 (package! toc-org)

Oh I am sorry, it didn't resolve the problem. I was mistaken. I also had to additionally move the when-let part.

diff --git a/core/core-packages.el b/core/core-packages.el
index d486c5f..6ae55ea 100644
--- a/core/core-packages.el
+++ b/core/core-packages.el
@@ -63,7 +63,7 @@ package's name as a symbol, and whose CDR is the plist supplied to its
 `package!' declaration. Set by `doom-initialize-packages'.")

 (defvar doom-core-packages
-  '(persistent-soft use-package quelpa async)
+  '(persistent-soft use-package quelpa async org-plus-contrib)
   "A list of packages that must be installed (and will be auto-installed if
 missing) and shouldn't be deleted.")

diff --git a/core/core.el b/core/core.el
index fbcc234..a77f98c 100644
--- a/core/core.el
+++ b/core/core.el
@@ -162,6 +162,15 @@ ability to invoke the debugger in debug mode."
         doom--package-load-path (eval-when-compile doom--package-load-path))

   (load! core-lib)
+
+  ;; Ensure ELPA org is prioritized above built-in org.
+  ;; when-let is defined in core-lib
+  (when-let ((path (locate-library "org" nil doom--base-load-path)))
+            (setq load-path
+                  (delete (substring (file-name-directory path) 0 -1)
+                          load-path)))
+
+
   (load! core-os) ; consistent behavior across OSes
   (condition-case-unless-debug ex
       (require 'autoloads doom-autoload-file t)
diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el
index 422e0ea..7876b9e 100644
--- a/modules/lang/org/config.el
+++ b/modules/lang/org/config.el
@@ -3,12 +3,6 @@
 (defvar +org-dir (expand-file-name "~/work/org/")
   "The directory where org files are kept.")

-;; Ensure ELPA org is prioritized above built-in org.
-(when-let* ((path (locate-library "org" nil doom--base-load-path)))
-  (setq load-path
-        (delete (substring (file-name-directory path) 0 -1)
-                load-path)))
-
 ;; Sub-modules
 (if (featurep! +attach)  (load! +attach))
 (if (featurep! +babel)   (load! +babel))

@zeronone Your patch now has fixed the problem completely, make compile runs fine now. However, I think the patch breaks modularity since doom's org features are supposed to be toggleable, althougth I think org-mode is pretty core to Doom.

Before the patch if I ran make compile-lang/org it worked without the errors. Also, before the patch, when running make compile that first weird error was Cannot load toc-org: (void-function org-link-set-parameters) which occoured before the reccursive require errors presumably since at that point it was using the wrong version of org-mode. Your patch enforces the correct version to load early on avoiding this problem, I think.

@zeronone Could you try something else for me?

If you move that when-let* block back to lang/org/config.el and wrap it in (eval-and-compile (when-let* ...)), does that solve your issues?

Just pushed Now it's https://github.com/hlissner/doom-emacs/commit/55ad843a09f9064f38af067da217da2f740cdadd with that block wrapped in an eval-and-compile block. This _should_ resolve these issues.

@hlissner It didn't resolve the issue for me. For reference I get the following error. I tried to do DEBUG=1 make compile but somehow it never progress when compiling eshell


Compile log

⚠ Ignored modules/lang/clojure/packages.el
Cannot load clojure-mode: (void-function org-link-set-parameters)
Cannot load clj-refactor: (error "Recursive ‘require’ for feature ‘org’")
Cannot load cider: (error "Recursive ‘require’ for feature ‘org’")
✓ Compiled modules/lang/clojure/config.el

There were breaking errors.

Recursive ‘require’ for feature ‘org’

Reverting changes...

Ah, silly me. I forgot there may be other packages that try to load org before lang/org is loaded (like cider).

Alright, new strategy. I've made it so load-path is modified _much_ earlier in the loading process. Let me know if that fixes the problem.

@hlissner ~I did a fresh install from develop branch, but the issue still persists. I still get error in clojure as before.~ My mistake it is working now.

Phew! Had me worried for a bit. Anyhow, I pushed https://github.com/hlissner/doom-emacs/commit/c0680e6fa30ad80fb91be520f20e98d56076e5a3 a while ago, which should further improve Doom's reliability with org. I'll consider this fixed for now, and will leave this open until it hits master.

Make gives:
Looking for packages to install...
5 packages will be installed:

+ ob-mongo (ELPA)
+ ob-redis (ELPA)
+ ob-translate (ELPA)
+ ox-pandoc (ELPA)
+ ox-reveal (ELPA)

Proceed? (y or n) y
Refreshing package archives
Importing package-keyring.gpg...
Importing package-keyring.gpg...done
Contacting host: elpa.gnu.org:443
Contacting host: elpa.gnu.org:443
Contacting host: melpa.org:443
Package refresh done
Installing ox-reveal
FATAL ERROR: (error) Package ‘org-20150330’ is unavailable
Installing ox-pandoc
FATAL ERROR: (error) Package ‘org-8.2’ is unavailable
Installing ob-translate
FATAL ERROR: (error) Package ‘org-8’ is unavailable
Installing ob-redis
FATAL ERROR: (error) Package ‘org-8’ is unavailable
Installing ob-mongo
FATAL ERROR: (error) Package ‘org-8’ is unavailable
Finished!

All these failed packages have no-more-existing packages among their dependencies (MELPA).
Should I create a new issue about this?

I'm getting the same error:

Importing package-keyring.gpg...
Importing package-keyring.gpg...done
Contacting host: elpa.gnu.org:443
Contacting host: elpa.gnu.org:443
Contacting host: melpa.org:443
Package refresh done
Installing ox-reveal
FATAL ERROR: (error) Package ‘org-20150330’ is unavailable
Installing centered-window-mode
FATAL ERROR: (error) Package ‘centered-window-mode-’ is unavailable
Installing ox-pandoc
FATAL ERROR: (error) Package ‘org-8.2’ is unavailable
Installing ob-translate
FATAL ERROR: (error) Package ‘org-8’ is unavailable
Installing ob-redis
FATAL ERROR: (error) Package ‘org-8’ is unavailable
Installing ob-mongo
FATAL ERROR: (error) Package ‘org-8’ is unavailable
Installing help-fns+
FATAL ERROR: (error) Package ‘help-fns+-’ is unavailable
Finished!
Reloading active Emacs session...

These issues have been fixed in develop. The 2.1 release is this weekend, so they will be in master soon.

What's the status of this issue and of the 2.1 release?

Well, it certainly didn't come out that weekend! Haha.

It'll be up this weekend. 2.1 is already on develop as of two days ago, minus the new documentation. That's all there is left to do. Doom's more adventurous users are putting it through its rounds now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

benjaminbauer picture benjaminbauer  ·  3Comments

luisenrike picture luisenrike  ·  3Comments

randomizedthinking picture randomizedthinking  ·  3Comments

waymondo picture waymondo  ·  3Comments

idoo picture idoo  ·  3Comments