profile
viewpoint

Ask questions[BUG] [straight] [macOS] No such file or directory use-package-core

Tue Aug 27 14:32:05 BST 2019

doom fails at (doom-initialize-core) with No such file or directory use-package-core

(For testing purposes, I copied init.example.el to ~/.doom.d/init.el.)

After the migration to straight, doom refresh fails with the following error:

Initiating a refresh of Doom Emacs...

> Checking core autoloads file
  ✓ Skipping core autoloads, they are up-to-date
> Installing & building packages...
  ✓ No packages need to be installed
> (Re)building packages...
  ✓ No packages need rebuilding
> Searching for orphaned packages to purge (for the emperor)...
  - No builds to purge
  - No ELPA packages to purge
  - Skipping repos
> Checking package autoloads file
  ✓ Skipping package autoloads, they are up-to-date

Eager macro-expansion failure: (error "Autoloading file /usr/local/src/doom-emacs/modules/config/default/packages.el failed to define function use-package")
Eager macro-expansion failure: (error "Autoloading file /usr/local/src/doom-emacs/modules/config/default/packages.el failed to define function use-package")
--------------------------------------------------

There was an unexpected error:
  File is missing (file-missing)
  Cannot open load file
  No such file or directory
  use-package-core

I've since cloned a fresh copy of doom-emacs with the same results. The GUI also fails to start - trace provided below. When manually running all the commands in init.el, errors are produced on running (doom-initialize-core).

After manually adding (concat doom-local-dir "straight/repos/use-package") to load-path the next error produced was "No such file or directory general".

Additionally adding (concat doom-local-dir "straight/repos/general.el") to load-path did (doom-initialize-core) finally succeed.

Adding those lines to (concat doom-emacs-dir "init.el") just before (doom-initialize-core) did not help.

<details> <details> <summary> Stacktrace </summary> <pre>

Debugger entered--Lisp error: (file-missing "Cannot open load file" "No such file or directory" "use-package-core") (use-package general :init (defalias (quote define-key!) (function general-def)) (defalias (quote unmap!) (function general-unbind))) eval-buffer(#<buffer load-618657> nil "/usr/local/src/doom-emacs/core/core-keybinds.el" nil t) ; Reading at buffer position 2535 load-with-code-conversion("/usr/local/src/doom-emacs/core/core-keybinds.el" "/usr/local/src/doom-emacs/core/core-keybinds.el" nil t) require(core-keybinds) doom-initialize-core() eval-buffer(#<buffer load> nil "/Users/rprimus/dotfiles/doom-emacs/.emacs.d/init.el" nil t) ; Reading at buffer position 2982 load-with-code-conversion("/Users/rprimus/dotfiles/doom-emacs/.emacs.d/init.el" "/Users/rprimus/dotfiles/doom-emacs/.emacs.d/init.el" t t) load("/Users/rprimus/dotfiles/doom-emacs/.emacs.d/init" t t) #f(compiled-function () #<bytecode 0x400ca795>)() command-line() normal-top-level() </pre></details>

<details> <summary> doom-doctor </summary> <pre> : ; ./bin/doom-doctor Doom Doctor Emacs v26.3 Doom v2.0.9 (nil) shell: /usr/local/bin/zsh Compiled with: NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS THREADS LCMS2 uname -msrv: Darwin 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64

Checking Emacs Checking your Emacs version is 25.3 or newer... Checking if your version of Emacs has changed recently... Checking for Emacs config conflicts... Checking for private config conflicts... Checking for stale elc files... Checking your system...

Checking DOOM Emacs... Eager macro-expansion failure: (error "Autoloading file /Users/rprimus/dotfiles/doom-emacs/.doom.d/packages.el failed to define function use-package") Eager macro-expansion failure: (error "Autoloading file /Users/rprimus/dotfiles/doom-emacs/.doom.d/packages.el failed to define function use-package") Attempt to load DOOM failed (Cannot open load file No such file or directory use-package-core)

There is 1 warning! </pre> </details> </details>

Steps to reproduce

  1. ./bin/doom env
  2. ./bin/doom autoloads
  3. ./bin/doom rebuild -f
  4. ./bin/doom refresh

Also tried...

  1. ./bin/doom upgrade <details> <summary>Errors</summary> <pre>

Preparing to upgrade Doom Emacs and its packages... ✓ Doom is already up-to-date! Scanning for outdated packages (this may take a while)...


There was an unexpected error: Symbol's function definition is void (void-function) async-start </pre> </details> 2. Removed .local/straight/repos/straight.el/ and doom upgrade <details> <summary>Errors</summary> <pre> Bootstrapping straight.el... Bootstrapping straight.el...done Building straight... Building straight...done

Preparing to upgrade Doom Emacs and its packages... ✓ Doom is already up-to-date! Scanning for outdated packages (this may take a while)...


There was an unexpected error: Symbol's function definition is void (void-function) async-start </pre> </details>

System information <details><pre> ((emacs (version . "26.3") (features . "NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS THREADS LCMS2") (build . "Aug 25, 2019") (buildopts "--enable-locallisppath=/usr/local/share/emacs/site-lisp --infodir=/usr/local/Cellar/emacs-mac/emacs-26.3-rc1-mac-7.7/share/info/emacs --prefix=/usr/local/Cellar/emacs-mac/emacs-26.3-rc1-mac-7.7 --with-mac --enable-mac-app=/usr/local/Cellar/emacs-mac/emacs-26.3-rc1-mac-7.7 --with-gnutls")) (doom (version . "2.0.9") (build . "HEAD -> develop, origin/develop, origin/HEAD e498a7e2 2019-08-27 02:01:13 -0400")) (system (type . darwin) (config . "x86_64-apple-darwin18.7.0") (shell . "/usr/local/bin/zsh") (uname . "Darwin 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64") (path "~/.opam/system/bin" "/usr/local/Cellar/pyenv-virtualenv/1.1.3/shims" "~/.pyenv/shims" "~/.rbenv/shims" "/usr/local/Cellar/pyenv-virtualenv/1.1.3/shims" "~/.pyenv/shims" "/usr/local/bin" "/usr/local/sbin" "/usr/bin" "/bin" "/usr/sbin" "/sbin" "/Library/TeX/texbin" "/opt/X11/bin" "/Applications/Wireshark.app/Contents/MacOS" "/usr/local/texlive/2018/bin/x86_64-darwin" "/usr/local/Cellar/openssl/*/bin" "~/perl5/bin" "~/.local/bin" "~/.cabal/bin" "/Applications/Mozart2.app/Contents/Resources/bin" "/usr/local/opt/gambit-scheme/current/bin" "~/bin" "~/.opam/system/bin" "/usr/local/Cellar/pyenv-virtualenv/1.1.3/shims" "~/.pyenv/shims" "~/.rbenv/shims" "/usr/local/plan9/bin" "~/prog/go/bin" "/usr/local/opt/go/libexec/bin" "~/.cargo/bin" "/usr/local/opt/fzf/bin" "/usr/local/Cellar/emacs-mac/emacs-26.3-rc1-mac-7.7/libexec/emacs/26.3/x86_64-apple-darwin18.7.0")) (config (envfile . envvar-file) (elc-files . 0) (modules :completion company ivy :ui doom doom-dashboard doom-quit hl-todo modeline nav-flash ophints (popup +all +defaults) vc-gutter vi-tilde-fringe window-select workspaces :editor evil file-templates fold multiple-cursors rotate-text snippets :emacs dired electric vc :tools eval flycheck (lookup +docsets) magit :lang data emacs-lisp markdown (org +dragndrop +ipython +pandoc +present) sh :config default) (packages "n/a") (elpa-packages "n/a"))) </pre></details>

Update

Tue Aug 27 16:50:50 BST 2019

Seems like related to permissions: https://github.com/hlissner/doom-emacs/commit/8766499b0d86aee56d7c79e436bf3b7faaa717f0

My umask is 077. I've changed all directories from 700 to 755 and all files from 600 to 644.

hlissner/doom-emacs

Answer questions rprimus

Sat Sep 7 12:47:27 BST 2019

After further investigation, $GOPATH/bin/cmd (when in $PATH/exec-path) was causing the problem with straight symlinking: see code

Between my previous post and this one, I was using:

HOME=~/dotfiles/doom-emacs PATH=/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin  bin/doom <command>

Using the above to generate an env file allowed the GUI to function as expected.

Results:

  1. Will be submitting and issue/PR for this at straight
  2. Have learnt much on reading and debugging elisp

Thanks for your time investigating this - hopefully you didn't spend too much time on it.

Keep up the GREAT work on doom.

👍

useful!
source:https://uonfu.com/
Github User Rank List