syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.65k stars 4.89k forks source link

spacemacs fails to start on my emacs for android #16414

Closed o8vm closed 2 months ago

o8vm commented 3 months ago

Description :octocat:

spacemacs fails to start.

Reproduction guide :beetle:

Observed behaviour: :eyes: :broken_heart: failed to install vim-streamline

Expected behaviour: :heart: :smile: success to install vim-streamline

System Info :computer:

Backtrace :paw_prints:

Loading /data/data/org.gnu.emacs/files/.spacemacs...done
Wrote /data/data/org.gnu.emacs/files/.emacs.d/recentf
(Spacemacs) --> refreshing package archive: melpa... [1/3]
Contacting host: melpa.org:443 [2 times]
Package refresh done
(Spacemacs) --> refreshing package archive: gnu... [2/3]
Contacting host: elpa.gnu.org:443 [2 times]
Package refresh done
(Spacemacs) --> refreshing package archive: nongnu... [3/3]
Contacting host: elpa.nongnu.org:443
Package refresh done
(Spacemacs) --> installing package: vim-powerline@spacemacs-modeline... [1/1]
Fetcher: file
Source: nil

/data/data/org.gnu.emacs/files/.emacs.d/.cache/quelpa/build/vim-powerline/vim-colors.el -> /data/data/org.gnu.emacs/cache/vim-powerline63osKy/vim-powerline-20240526.133057/vim-colors.el
/data/data/org.gnu.emacs/files/.emacs.d/.cache/quelpa/build/vim-powerline/vim-powerline-theme.el -> /data/data/org.gnu.emacs/cache/vim-powerline63osKy/vim-powerline-20240526.133057/vim-powerline-theme.el
Error getting PACKAGE-DESC: (file-missing Opening input file No such file or directory /data/data/org.gnu.emacs/files/.emacs.d/quelpa/packages/vim-powerline-20240526.133057.tar)
(Spacemacs) Error: 
An error occurred while installing vim-powerline (error: (wrong-type-argument package-desc nil))

.emacs.d/elpa/30.0/develop/evil-iedit-state-20220219.1432/evil-iedit-state-autoloads.el: Warning: ‘defadvice’ is an obsolete macro (as of 30.1); use ‘advice-add’ or ‘define-advice’
.emacs.d/elpa/30.0/develop/evil-mc-20230529.210/evil-mc.el: Warning: ‘defadvice’ is an obsolete macro (as of 30.1); use ‘advice-add’ or ‘define-advice’ [3 times]
Spacemacs is ready.
Skipping check for new version (reason: dotfile)
Loading /data/data/org.gnu.emacs/files/.emacs.d/.cache/recentf...done
Wrote /data/data/org.gnu.emacs/files/.emacs.d/.cache/recentf
Loading /data/data/org.gnu.emacs/files/.emacs.d/.cache/recentf...done
evil-line-move: End of buffer [2 times]
Wrote /data/data/org.gnu.emacs/files/.emacs.d/.cache/recentf
Loading /data/data/org.gnu.emacs/files/.emacs.d/.cache/recentf...done
evil-line-move: Beginning of buffer [9 times]
evil-line-move: Beginning of buffer
------
tar: Unknown option 'format=gnu' (see "tar --help")
------
 ■  Error (use-package): popwin/:config: Wrong type argument: listp, window-purpose/save-dedicated-windows
 ■  Error (use-package): window-purpose/:config: Assertion failed: (listp args)

tar is gnu tar1.35

o8vm commented 3 months ago

fix this issue by applying this patch: https://github.com/syl20bnr/spacemacs/pull/15653/files. However, the warning below still exists:

 ■  Error (use-package): popwin/:config: Wrong type argument: listp, window-purpose/save-dedicated-windows
 ■  Error (use-package): window-purpose/:config: Assertion failed: (listp args)
o8vm commented 3 months ago

I referenced https://www.reddit.com/r/emacs/comments/156ncup/using_spacemacs_with_android_emacs/

smile13241324 commented 3 months ago

I have had a look into your issue and it looks like you have an issue with quelpa, basically we configure the following:

(defun configuration-layer//configure-quelpa ()
  "Configure `quelpa' package."
  (with-eval-after-load 'quelpa
    (setq quelpa-verbose init-file-debug
          quelpa-dir (concat spacemacs-cache-directory "quelpa/")
          quelpa-build-dir (expand-file-name "build" quelpa-dir)
          quelpa-persistent-cache-file (expand-file-name "cache" quelpa-dir)
          quelpa-update-melpa-p nil
          quelpa-build-explicit-tar-format-p (eq (quelpa--tar-type) 'gnu)))) ;; this is causing your issue

This will tell quelpa to explicitly require the gnu format from a tar executable if it is a gnu tar. Quelpa will check the version of the executable and if it does not find it fallback to gnu.

(defun quelpa--tar-type ()
  "Return `bsd' or `gnu' depending on type of Tar executable.
Tests and sets variable `quelpa--tar-type' if not already set."
  (or quelpa--tar-type
      (when (and quelpa-build-tar-executable
                 (file-executable-p quelpa-build-tar-executable))
        (setq quelpa--tar-type
              (let ((v (shell-command-to-string
                        (format "%s --version" quelpa-build-tar-executable))))
                (cond ((string-match-p "bsdtar" v) 'bsd)
                      ((string-match-p "GNU tar" v) 'gnu)
                      (t 'gnu)))))))

What you need to do now:

Once the given return type is not longer gnu spacemacs will stop requiring quelpa to set the format parameter and the commands should work on your OS.