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.69k stars 4.9k forks source link

Fresh install error #4607

Closed agonzalezro closed 8 years ago

agonzalezro commented 8 years ago

Steps to reproduce:

$ rm ~/.spacemacs
$ rm -rf ~/.emacs.d
$ git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d
$ emacs # open it, install everything as default (enter + enter) and close it

You will see some warnings:

...
Compiling no file at Thu Jan 14 13:46:37 2016
Warning (bytecomp): reference to free variable ‘clean-aindent--last-indent’ [2 times]
Warning (bytecomp): reference to free variable ‘clean-aindent--last-indent-len’
Warning (bytecomp): reference to free variable ‘clean-aindent--last-indent’ [2 times]
Warning (bytecomp): assignment to free variable ‘clean-aindent--last-indent’
Warning (bytecomp): ‘completion-annotate-function’ is an obsolete variable (as of 24.1); use ‘completion-extra-properties’ instead.
Warning (bytecomp): ‘interactive-p’ is an obsolete function (as of 23.2); use ‘called-interactively-p’ instead. [10 times]
Warning (bytecomp): reference to free variable ‘hlt-prop-highlighting-state’
Warning (bytecomp): ‘interactive-p’ is an obsolete function (as of 23.2); use ‘called-interactively-p’ instead. [3 times]
Warning (bytecomp): ‘isearch-word’ is an obsolete variable (as of 25.1); use ‘isearch-regexp-function’ instead. [3 times]
Warning (bytecomp): the following functions are not known to be defined:
    icicle-make-face-candidate, icicle-transform-multi-completion,
    icicle-make-color-candidate, hlt-highlight-regions,
    zz-izone-limits-in-bufs, hlt-unhighlight-regions,
    hlt-listify-invisibility-spec, hlt-set-union, hlt-next-highlight,
    hlt-add-listifying, hlt-add-to-invisibility-spec, hlt-flat-list,
    hlt-set-intersection, hlt-toggle-link-highlighting,
    hlt-toggle-property-highlighting, hlt-unhighlight-all-prop,
    hlt-highlight-all-prop, hlt-highlight-property-with-value
Warning (bytecomp): ‘labels’ is an obsolete macro (as of 24.3); use ‘cl-labels’ instead.
Warning (bytecomp): ‘flet’ is an obsolete macro (as of 24.3); use either ‘cl-flet’ or ‘cl-letf’. [2 times]
Warning (bytecomp): ‘isearch-word’ is an obsolete variable (as of 25.1); use ‘isearch-regexp-function’ instead. [3 times]
Warning (bytecomp): looking-back called with 1 argument, but requires 2-3 [4 times]
Warning (bytecomp): assignment to free variable ‘iedit-initial-string-local’
Warning (bytecomp): ‘isearch-word’ is an obsolete variable (as of 25.1); use ‘isearch-regexp-function’ instead. [4 times]
Warning (bytecomp): iedit-replace-occurrences called with 1 argument, but accepts only 0
Warning (bytecomp): reference to free variable ‘base’ [2 times]
Warning (bytecomp): reference to free variable ‘savehist-additional-variables’
Warning (bytecomp): assignment to free variable ‘savehist-additional-variables’
Warning (bytecomp): looking-back called with 1 argument, but requires 2-3
Warning (bytecomp): reference to free variable ‘ok’
Warning (bytecomp): reference to free variable ‘next-thing’
Warning (bytecomp): looking-back called with 1 argument, but requires 2-3 [4 times]
Warning (bytecomp): reference to free variable ‘enc’ [2 times]
Warning (bytecomp): looking-back called with 1 argument, but requires 2-3 [16 times]
Warning (bytecomp): the following functions are not known to be defined: enh-ruby-forward-sexp,
    ruby-forward-sexp, enh-ruby-backward-sexp, ruby-backward-sexp
Warning (bytecomp): looking-back called with 1 argument, but requires 2-3
Warning (bytecomp): the function ‘rust-mode’ is not known to be defined.
Warning (bytecomp): called-interactively-p called with 0 arguments, but requires 1
Warning (bytecomp): reference to free variable ‘it’
Warning (bytecomp): reference to free variable ‘other’
Warning (bytecomp): looking-back called with 1 argument, but requires 2-3 [9 times]
Warning (bytecomp): reference to free variable ‘region’ [13 times]
Warning (bytecomp): assignment to free variable ‘region’
Warning (bytecomp): reference to free variable ‘region’
Warning (bytecomp): assignment to free variable ‘region’
Warning (bytecomp): reference to free variable ‘region’
Warning (bytecomp): assignment to free variable ‘region’
Warning (bytecomp): reference to free variable ‘undo-stack-pointer’
Warning (bytecomp): assignment to free variable ‘undo-stack-pointer’
Warning (bytecomp): reference to free variable ‘undo-stack’
Warning (bytecomp): reference to free variable ‘undo-stack-pointer’
Warning (bytecomp): assignment to free variable ‘undo-stack-pointer’
Warning (bytecomp): assignment to free variable ‘region’
Warning (bytecomp): reference to free variable ‘region’
Warning (bytecomp): assignment to free variable ‘region’
Warning (bytecomp): reference to free variable ‘evil-mc-custom-known-commands’
Warning (bytecomp): reference to free variable ‘clear-variables’
Warning (bytecomp): reference to free variable ‘handler’
Warning (bytecomp): reference to free variable ‘last-position’
Warning (bytecomp): reference to free variable ‘undo-stack-pointer’
Warning (bytecomp): assignment to free variable ‘undo-stack’
Warning (bytecomp): reference to free variable ‘undo-stack’
Warning (bytecomp): assignment to free variable ‘undo-stack-pointer’
Warning (bytecomp): assignment to free variable ‘last-position’
Warning (bytecomp): macro ‘evil-mc-save-window-scroll’ defined too late
Warning (bytecomp): the following functions are not known to be defined: evil-snipe-repeat,
    evil-commentary, evil-surround-region
Warning (bytecomp): ‘insert-string’ is an obsolete function (as of 22.1); use ‘insert’ instead.
Warning (bytecomp): the function ‘evil-mc-execute-for-all-cursors’ is not known to be defined.
Warning (bytecomp): reference to free variable ‘whitespace-cleanup-disabled’
Warning (bytecomp): assignment to free variable ‘whitespace-cleanup-disabled’
Warning (bytecomp): reference to free variable ‘evil-mc-custom-known-commands’
Warning (bytecomp): reference to free variable ‘evil-mc-incompatible-minor-modes’
Warning (bytecomp): the following functions are not known to be defined:
    evilnc--extend-to-whole-comment, evilnc--comment-or-uncomment-region
Warning (bytecomp): reference to free variable ‘web-mode-engine’
Warning (bytecomp): the function ‘web-mode-comment-or-uncomment’ is not known to be defined.
Warning (bytecomp): looking-back called with 1 argument, but requires 2-3 [2 times]
Warning (bytecomp): ‘interactive-p’ is an obsolete function (as of 23.2); use ‘called-interactively-p’ instead.
Warning (bytecomp): looking-back called with 1 argument, but requires 2-3
Warning (bytecomp): ‘next-line’ is for interactive use only; use ‘forward-line’ instead.
Warning (bytecomp): assignment to free variable ‘eshell-path-env’
Warning (bytecomp): ‘(:files ("google-translate.el" "google-translate-core.el" "google-translate-tk.el" "google-translate-core-ui.el" "google-translate-default-ui.el" "google-translate-pkg.el" "google-translate-smooth-ui.el" "Makefile"))’ is a malformed function
Warning (bytecomp): ‘:current-version’ called as a function
Warning (bytecomp): the function ‘:current-version’ is not known to be defined.
Warning (bytecomp): cl package required at runtime
Warning (bytecomp): the function ‘popup-tip’ is not known to be defined.
Warning (bytecomp): the following functions are not known to be defined: ivy-read,
    projectile-project-root
Warning (bytecomp): ‘completion-annotate-function’ is an obsolete variable (as of 24.1); use ‘completion-extra-properties’ instead.
Warning (bytecomp): ‘interactive-p’ is an obsolete function (as of 23.2); use ‘called-interactively-p’ instead. [2 times]
Warning (bytecomp): ‘print-help-return-message’ is an obsolete function (as of 23.2); use ‘help-print-return-message’ instead.
Warning (bytecomp): ‘help-make-usage’ is an obsolete function (as of 25.1); use ‘help--make-usage’ instead. [3 times]
Warning (bytecomp): help-fns--signature called with 4 arguments, but requires 5 [2 times]
Warning (bytecomp): ‘completion-annotate-function’ is an obsolete variable (as of 24.1); use ‘completion-extra-properties’ instead. [2 times]
Warning (bytecomp): ‘interactive-p’ is an obsolete function (as of 23.2); use ‘called-interactively-p’ instead.
Warning (bytecomp): ‘user-variable-p’ is an obsolete function (as of 24.3); use ‘custom-variable-p’ instead.
Warning (bytecomp): ‘interactive-p’ is an obsolete function (as of 23.2); use ‘called-interactively-p’ instead.
Warning (bytecomp): ‘print-help-return-message’ is an obsolete function (as of 23.2); use ‘help-print-return-message’ instead.
Warning (bytecomp): ‘completion-annotate-function’ is an obsolete variable (as of 24.1); use ‘completion-extra-properties’ instead.
Warning (bytecomp): ‘interactive-p’ is an obsolete function (as of 23.2); use ‘called-interactively-p’ instead.
Warning (bytecomp): ‘user-variable-p’ is an obsolete function (as of 24.3); use ‘custom-variable-p’ instead.
Warning (bytecomp): ‘interactive-p’ is an obsolete function (as of 23.2); use ‘called-interactively-p’ instead. [2 times]
Warning (bytecomp): ‘completion-annotate-function’ is an obsolete variable (as of 24.1); use ‘completion-extra-properties’ instead.
Warning (bytecomp): ‘user-variable-p’ is an obsolete function (as of 24.3); use ‘custom-variable-p’ instead. [5 times]
Warning (bytecomp): ‘interactive-p’ is an obsolete function (as of 23.2); use ‘called-interactively-p’ instead. [2 times]
Warning (bytecomp): function ‘gentemp’ from cl package called at runtime
Warning (bytecomp): ‘interactive-p’ is an obsolete function (as of 23.2); use ‘called-interactively-p’ instead. [3 times]
Warning (bytecomp): the following functions are not known to be defined:
    help-substitute-command-keys, help-key-button-string,
    Info-first-index-occurrence, Info-index-entries-across-manuals,
    Info-index-occurrences, describe-mode-1, help-documentation,
    Info-make-manuals-xref, describe-simplify-lib-file-name,
    icicle-key-description, help-documentation-property,
    bmkp-bookmark-description
Warning (bytecomp): reference to free variable ‘highlight-indentation-overlay-priority’
Warning (bytecomp): reference to free variable ‘css-indent-offset’
Warning (bytecomp): reference to free variable ‘coffee-tab-width’
Warning (bytecomp): reference to free variable ‘js-indent-level’
Warning (bytecomp): reference to free variable ‘js2-basic-offset’
Warning (bytecomp): reference to free variable ‘sws-tab-width’
Warning (bytecomp): reference to free variable ‘web-mode-html-offset’
Warning (bytecomp): ‘interactive-p’ is an obsolete function (as of 23.2); use ‘called-interactively-p’ instead. [7 times]
Warning (bytecomp): looking-back called with 1 argument, but requires 2-3 [6 times]
Warning (bytecomp): reference to free variable ‘isearchp-reg-beg’
Warning (bytecomp): ‘isearch-word’ is an obsolete variable (as of 25.1); use ‘isearch-regexp-function’ instead. [4 times]
Warning (bytecomp): ‘interactive-p’ is an obsolete function (as of 23.2); use ‘called-interactively-p’ instead. [2 times]
Warning (bytecomp): the following functions are not known to be defined:
    tap-define-aliases-wo-prefix, Info-insert-breadcrumbs,
    isearch-string-state
Warning (bytecomp): variable reference to constant ‘nil’
Warning (bytecomp): the function ‘hydra-paradox-filter/body’ is not known to be defined.
Warning (bytecomp): ‘preceding-sexp’ is an obsolete function (as of 25.1); use ‘elisp--preceding-sexp’ instead.
Warning (bytecomp): looking-back called with 1 argument, but requires 2-3
Warning (bytecomp): Unused lexical variable ‘case-fold’
Warning (bytecomp): Unused lexical variable ‘lev1’
Warning (bytecomp): Unused lexical variable ‘lev’
Warning (bytecomp): Unused lexical variable ‘i’
Warning (bytecomp): cl package required at runtime
Warning (bytecomp): assignment to free variable ‘iswitchb-mode’
Warning (bytecomp): reference to free variable ‘iswitchb-mode’
Warning (bytecomp): reference to free variable ‘persp-key-map’
Warning (bytecomp): assignment to free variable ‘tabbar-buffer-list-function’
Warning (bytecomp): assignment to free variable ‘iswitchb-temp-buflist’ [2 times]
Warning (bytecomp): reference to free variable ‘ido-temp-list’
Warning (bytecomp): assignment to free variable ‘ido-temp-list’
Warning (bytecomp): reference to free variable ‘iswitchb-mode’
Warning (bytecomp): the following functions are not known to be defined: self, tabbar-buffer-list,
    iswitchb-read-buffer
Warning (bytecomp): ‘syntax-begin-function’ is an obsolete variable (as of 25.1). [2 times]
Warning (bytecomp): ‘redisplay-dont-pause’ is an obsolete variable (as of 24.5).
Warning (bytecomp): reference to free variable ‘persp-nil-name’

And finally, open it again:

$ emacs

You will see the following errors (and not even the theme loads):

Warning (initialization): An error occurred while loading ‘/Users/alex/.emacs.d/init.el’:

error: Package ‘default-theme-’ is unavailable

To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file.  Start Emacs with
the ‘--debug-init’ option to view a complete error backtrace.

This is the --debug-init output:

Debugger entered--Lisp error: (error "Package ‘default-theme-’ is unavailable")
  signal(error ("Package ‘default-theme-’ is unavailable"))
  error("Package `%s-%s' is unavailable" default-theme "")
  package-compute-transaction(nil ((default-theme)))
  package-install(default-theme)
  (if pkg-elpa-dir (add-to-list (quote load-path) pkg-elpa-dir) (if log (progn (spacemacs-buffer/append (format "(Bootstrap) Installing %s...\n" pkg)) (spacemacs//redisplay))) (configuration-layer/retrieve-package-archives (quote quiet)) (package-install pkg) (setq pkg-elpa-dir (spacemacs//get-package-directory pkg)))
  (let ((pkg-elpa-dir (spacemacs//get-package-directory pkg))) (if pkg-elpa-dir (add-to-list (quote load-path) pkg-elpa-dir) (if log (progn (spacemacs-buffer/append (format "(Bootstrap) Installing %s...\n" pkg)) (spacemacs//redisplay))) (configuration-layer/retrieve-package-archives (quote quiet)) (package-install pkg) (setq pkg-elpa-dir (spacemacs//get-package-directory pkg))) (require pkg nil (quote noerror)) (if file-to-load (progn (load-file (concat pkg-elpa-dir file-to-load)))) pkg-elpa-dir)
  (condition-case nil (require pkg) (error (require (quote cl)) (let ((pkg-elpa-dir (spacemacs//get-package-directory pkg))) (if pkg-elpa-dir (add-to-list (quote load-path) pkg-elpa-dir) (if log (progn (spacemacs-buffer/append (format "(Bootstrap) Installing %s...\n" pkg)) (spacemacs//redisplay))) (configuration-layer/retrieve-package-archives (quote quiet)) (package-install pkg) (setq pkg-elpa-dir (spacemacs//get-package-directory pkg))) (require pkg nil (quote noerror)) (if file-to-load (progn (load-file (concat pkg-elpa-dir file-to-load)))) pkg-elpa-dir)))
  (let ((warning-minimum-level :error)) (condition-case nil (require pkg) (error (require (quote cl)) (let ((pkg-elpa-dir (spacemacs//get-package-directory pkg))) (if pkg-elpa-dir (add-to-list (quote load-path) pkg-elpa-dir) (if log (progn (spacemacs-buffer/append ...) (spacemacs//redisplay))) (configuration-layer/retrieve-package-archives (quote quiet)) (package-install pkg) (setq pkg-elpa-dir (spacemacs//get-package-directory pkg))) (require pkg nil (quote noerror)) (if file-to-load (progn (load-file (concat pkg-elpa-dir file-to-load)))) pkg-elpa-dir))))
  spacemacs/load-or-install-package(default-theme)
  (let ((pkg (spacemacs//get-theme-package theme))) (spacemacs/load-or-install-package pkg))
  (cond ((assq theme spacemacs-theme-name-to-package) (let* ((pkg (spacemacs//get-theme-package theme)) (pkg-dir (spacemacs/load-or-install-package pkg))) (if (or (eq (quote moe-light) theme) (eq (quote moe-dark) theme)) (progn (load-file (concat pkg-dir "moe-light-theme.el")) (load-file (concat pkg-dir "moe-dark-theme.el")))) (add-to-list (quote custom-theme-load-path) pkg-dir))) (t (let ((pkg (spacemacs//get-theme-package theme))) (spacemacs/load-or-install-package pkg))))
  (if (memq theme (custom-available-themes)) nil (cond ((assq theme spacemacs-theme-name-to-package) (let* ((pkg (spacemacs//get-theme-package theme)) (pkg-dir (spacemacs/load-or-install-package pkg))) (if (or (eq (quote moe-light) theme) (eq (quote moe-dark) theme)) (progn (load-file (concat pkg-dir "moe-light-theme.el")) (load-file (concat pkg-dir "moe-dark-theme.el")))) (add-to-list (quote custom-theme-load-path) pkg-dir))) (t (let ((pkg (spacemacs//get-theme-package theme))) (spacemacs/load-or-install-package pkg)))))
  spacemacs/load-theme(default)
  (let ((default-theme (car dotspacemacs-themes))) (spacemacs/load-theme default-theme) (setq configuration-layer--protected-packages (append (delq nil (mapcar (quote spacemacs//get-theme-package) dotspacemacs-themes)) configuration-layer--protected-packages)) (setq-default spacemacs--cur-theme default-theme) (setq-default spacemacs--cycle-themes (cdr dotspacemacs-themes)))
  spacemacs/init()
  (if (not (version<= spacemacs-emacs-min-version emacs-version)) (message (concat "Your version of Emacs (%s) is too old. " "Spacemacs requires Emacs version %d or above.") emacs-version spacemacs-emacs-min-version) (load-file (concat user-emacs-directory "core/core-load-paths.el")) (require (quote core-spacemacs)) (spacemacs/init) (spacemacs/maybe-install-dotfile) (configuration-layer/sync) (spacemacs/setup-startup-hook) (require (quote server)) (if (server-running-p) nil (server-start)))
  eval-buffer(#<buffer  *load*> nil "/Users/alex/.emacs.d/init.el" nil t)  ; Reading at buffer position 1076
  load-with-code-conversion("/Users/alex/.emacs.d/init.el" "/Users/alex/.emacs.d/init.el" t t)
  load("/Users/alex/.emacs.d/init" t t)
  #[0 "\205\266   \306=\203\307\310Q\202? \311=\204\307\312Q\202?\313\307\314\315#\203*\316\202?\313\307\314\317#\203>\320\321\322!D\nB\323\202?\316\324\325\324\211#\210\324=\203e\326\327\330\307\331Q!\"\325\324\211#\210\324=\203d\210\203\247\332!\333\232\203\247\334!\211\335P\336!\203\201\211\202\214\336!\203\213\202\214\314\262\203\245\337\"\203\243\340\341#\210\342\343!\210\266\f?\205\264\314\325\344\324\211#)\262\207" [init-file-user system-type delayed-warnings-list user-init-file inhibit-default-init inhibit-startup-screen ms-dos "~" "/_emacs" windows-nt "/.emacs" directory-files nil "^\\.emacs\\(\\.elc?\\)?$" "~/.emacs" "^_emacs\\(\\.elc?\\)?$" initialization format-message "`_emacs' init file is deprecated, please use `.emacs'" "~/_emacs" t load expand-file-name "init" file-name-as-directory "/.emacs.d" file-name-extension "elc" file-name-sans-extension ".el" file-exists-p file-newer-than-file-p message "Warning: %s is newer than %s" sit-for 1 "default"] 7]()
  command-line()
  normal-top-level()

No, the --insecure doesn't change a thing.

agonzalezro commented 8 years ago

So, I edited this: https://github.com/syl20bnr/spacemacs/blob/master/core/core-spacemacs.el#L76 replacing dotspacemacs-themes for 'spacemacs-dark and it works.

My Lisp knowledge is 0.01 so I don't know how to fix it to create a PR. But it seems a proper bug.

agonzalezro commented 8 years ago

Ok, the installation was actually not that fresh.

I had a file ~/.spacemacs.elc, I removed it and everything seems to work fine.

Can I close this issue?

StreakyCobra commented 8 years ago

Can I close this issue?

Yes you can :-)

shangsunset commented 7 years ago

hmm I got this error when doing a fresh install after removing .spacemacs and .emacs.d - I dont have ~/.spacemacs.elc or anything else thats related to spacemacs.

ghost commented 7 years ago

@shangsunset can confirm, had this last night aswell

shangsunset commented 7 years ago

I tried installing a package on a plain emacs and i still got the errors. So I think it may just be some file thats causing the problem but I cant seem to find any file that relates to emacs/spacemacs...