Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fresh compile against master failing in init-packages.el #48

Closed
ahonnecke opened this issue Jul 9, 2021 · 6 comments
Closed

Fresh compile against master failing in init-packages.el #48

ahonnecke opened this issue Jul 9, 2021 · 6 comments

Comments

@ahonnecke
Copy link

ahonnecke commented Jul 9, 2021

Describe the bug
Recently I updated my packages and everything broke severely, could not open files. I started removing things to narrow down where the problem was. I arrived at a fresh install, fresh compile hard reset to master and it's still unusable.

To Reproduce
Steps to reproduce the behavior:

  1. apt install
ahonnecke@contranym:~/src$ sudo apt-get install build-essential texinfo libx11-dev libxpm-dev libjpeg-dev libpng-dev libgif-dev libtiff-dev libgtk2.0-dev libncurses-dev gnutls-dev libgtk-3-dev git autoconf
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libgnutls28-dev' instead of 'gnutls-dev'
autoconf is already the newest version (2.69-11.1).
build-essential is already the newest version (12.8ubuntu3).
libgif-dev is already the newest version (5.1.9-1).
libgnutls28-dev is already the newest version (3.6.15-4ubuntu2).
libgtk-3-dev is already the newest version (3.24.23-1ubuntu1).
libjpeg-dev is already the newest version (8c-2ubuntu8).
libncurses-dev is already the newest version (6.2-1).
libpng-dev is already the newest version (1.6.37-3).
libxpm-dev is already the newest version (1:3.5.12-1).
libgtk2.0-dev is already the newest version (2.24.32-4ubuntu4).
texinfo is already the newest version (6.7.0.dfsg.2-5).
git is already the newest version (1:2.27.0-1ubuntu1.1).
libtiff-dev is already the newest version (4.1.0+git191117-2ubuntu0.20.10.1).
libx11-dev is already the newest version (2:1.6.12-1ubuntu0.1).
The following packages were automatically installed and are no longer required:
  linux-headers-5.11.0-7612 linux-headers-5.11.0-7612-generic linux-image-5.11.0-7612-generic linux-modules-5.11.0-7612-generic linux-modules-extra-5.11.0-7612-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
  1. hard reset .emacs.d
ahonnecke@contranym:~/src/.emacs.d$ git remote -v
origin	[email protected]:MatthewZMD/.emacs.d.git (fetch)
origin	[email protected]:MatthewZMD/.emacs.d.git (push)
ahonnecke@contranym:~/src/.emacs.d$ git reset --hard origin/master
HEAD is now at 8d26cda erc: switch to libera from freenode
  1. hard reset emacs
ahonnecke@contranym:~/src/emacs$ git reset --hard origin/master
HEAD is now at 9ce6541ac9 Further cleanup for file locks
  1. ahonnecke@contranym:~/src/emacs$ autogen.sh
ahonnecke@contranym:~/src/emacs$ ./autogen.sh
Checking whether you have the necessary tools...
(Read INSTALL.REPO for more details on building Emacs)
Checking for autoconf (need at least version 2.65) ... ok
Your system has the required tools.
Running 'autoreconf -fi -I m4' ...
You can now run './configure'.
  1. ahonnecke@contranym:~/src/emacs$ ./configure --with-mailutils
  2. ahonnecke@contranym:~/src/emacs$ make && sudo make install
  3. Open emacs
ahonnecke@contranym:~/.emacs.d$ emacs --debug-init
  1. Get backtrace
Debugger entered--Lisp error: (invalid-function ((bytecomp "Symbol?s function definition is void: gv-setter" :error "*Compile-Log*")))
  ((bytecomp "Symbol?s function definition is void: gv-setter" :error "*Compile-Log*"))(#s(
  cl--generic-make-next-function(#s(
  cl--generic-make-function(#s(
  cl-generic-define-method(\(setf\ seq-elt\) nil (store (sequence array) n) nil #f(compiled-function (store sequence n) #<bytecode -0x1d67862086490644>))
  byte-code("\300\301\302\303#\304\301\305\306#\210\307\310\311\310\312\313#\314#\210\315\310\313\312\313\316%\210\315\317\313\320\313\321%\210\315\317\313\322\313\323%\210\307\324\311\324\325..." [function-put seq-let lisp-indent-function 2 put edebug-form-spec (sexp form body) defalias seq-elt cl-generic-define (sequence n) nil "Return Nth element of SEQUENCE.\n\n(fn SEQUENCE N)" cl-generic-define-method #f(compiled-function (sequence n) #<bytecode 0x18055cba909654cf>) \(setf\ seq-elt\) (store (sequence array) n) #f(compiled-function (store sequence n) #<bytecode -0x1d67862086490644>) (store (sequence cons) n) #f(compiled-function (store sequence n) #<bytecode -0x1d67872427f09658>) seq-length (sequence) "Return the number of elements of SEQUENCE.\n\n(fn SE..." #f(compiled-function (sequence) #<bytecode -0x47e8175a7f02ab8>)] 7)
  require(seq)
  byte-code("\301\302!\210\301\303!\210\301\304!\210\301\305!\210\301\306!\210\301\307!\210\310\311\312\313\314\315\316\317&\7\210\320\321\322\323\324DD\325\326\327\316\317&\7\210..." [package-user-dir require cl-lib seq tabulated-list macroexp url-handlers browse-url custom-declare-group package nil "Manager for Emacs Lisp packages." :group applications :version "24.1" custom-declare-variable package-enable-at-startup funcall function #f(compiled-function () #<bytecode 0x1f4000153e5d>) "Whether to make installed packages available when ..." :type boolean package-load-list #f(compiled-function () #<bytecode 0xf4fae0e95ce1>) "List of packages for `package-activate-all' to mak..." (repeat (choice (const all) (list :tag "Specific package" (symbol :tag "Package name") (choice :tag "Version" (const :tag "disable" nil) (const :tag "most recent" t) (string :tag "specific version"))))) :risky t package-archives #f(compiled-function () #<bytecode -0x1d8fcb9315c35afc>) "An alist of archives from which to fetch.\nThe defa..." (alist :key-type (string :tag "Archive name") :value-type (string :tag "URL or directory name")) "28.1" package-menu-hide-low-priority #f(compiled-function () #<bytecode 0x1f400744e901>) "If non-nil, hide low priority packages from the pa..." (choice (const :tag "Don't hide anything" nil) (const :tag "Hide per package-archive-priorities" archive) (const :tag "Hide per archive and version number" t)) "25.1" package-archive-priorities #f(compiled-function () #<bytecode 0x1f4000153e91>) "An alist of priorities for packages.\n\nEach element..." (alist :key-type (string :tag "Archive name") :value-type (integer :tag "Priority (default is 0)")) package-pinned-packages #f(compiled-function () #<bytecode 0x1f4000153e91>) "An alist of packages that are pinned to specific a..." (alist :key-type (symbol :tag "Package") :value-type (string :tag "Archive name")) "24.4" #f(compiled-function () #<bytecode 0xb4e982bb4404e>) ...] 12)
  (package-initialize)
  (if (and (boundp 'package--initialized) package--initialized) nil (setq package-enable-at-startup nil) (package-initialize))
  eval-buffer(#<buffer  *load*-992407> nil "/home/ahonnecke/.emacs.d/elisp/init-package.el" nil t)  ; Reading at buffer position 2174
  load-with-code-conversion("/home/ahonnecke/.emacs.d/elisp/init-package.el" "/home/ahonnecke/.emacs.d/elisp/init-package.el" nil t)
  require(init-package)
  eval-buffer(#<buffer  *load*> nil "/home/ahonnecke/.emacs.d/init.el" nil t)  ; Reading at buffer position 4103
  load-with-code-conversion("/home/ahonnecke/.emacs.d/init.el" "/home/ahonnecke/.emacs.d/init.el" t t)
  load("/home/ahonnecke/.emacs.d/init" noerror nomessage)
  startup--load-user-init-file(#f(compiled-function () #<bytecode 0xc5d735ea0d351be>) #f(compiled-function () #<bytecode -0x1f3c686ddc0d3335>) t)
  command-line()
  normal-top-level()
  1. Can trigger the error again by navigating to ~/.emacs.d/elisp/init-package.el and evaluating the buffer
Package dash-functional is obsolete; use dash 2.18.0 instead
byte-code: Symbol?s function definition is void: nil

Expected behavior
A fresh install should not be throwing errors about missing packages and should function when attempting to open a file.

If applicable, add screenshots to help explain your problem.

Versions (please complete the following information):

  • PopOS 20.10
  • GNU Emacs 28.0.50 (build 5, x86_64-pc-linux-gnu, GTK+ Version 3.24.23, cairo version 1.16.0) of 2021-07-09

Additional context
Add any other context about the problem here.

@ahonnecke ahonnecke changed the title Fresh compile against master failing Fresh compile against master failing (Error running timer ‘require’: (void-function nil)) Jul 9, 2021
@ahonnecke
Copy link
Author

This also happens on PopOS 20.10 (on another machine)

@ahonnecke ahonnecke changed the title Fresh compile against master failing (Error running timer ‘require’: (void-function nil)) Fresh compile against master failing in init-packages.el Jul 9, 2021
@ahonnecke ahonnecke reopened this Jul 9, 2021
@ahonnecke
Copy link
Author

Can also reproduce with
M-x package-initialize

@MatthewZMD
Copy link
Owner

MatthewZMD commented Jul 9, 2021

Wow, you really tried a lot of things. But one important thing you should also try is emacs -q, to see if it opens without errors and if C-h f gv-setter gives anything. It should, since gv-setter is a built-in function located in /usr/share/emacs/28.0.50/lisp/emacs-lisp/gv.el (see the source)

Also, check C-h v load-path and see if you can find emacs/28.0.50/lisp/emacs-lisp in the load-path.

@MatthewZMD
Copy link
Owner

Can also reproduce with
M-x package-initialize

If you can reproduce the error with M-x package-initialize, it is very likely that this error is related to Emacs itself, M-EMACS did not mess around with that function.

If you're using the bleeding edge master branch of Emacs, it is likely that something broke very recently. I'd suggest try to reproduce using a stable release, 27.1 or 27.2.

@ahonnecke
Copy link
Author

Fantastic news! It was something in an external package that seemingly broke everything. I was able to fix it by updating the broken package which was fixed upstream this morning:

  1. emacs -q to get a working editor
  2. install use-package manually
  3. eval-buffer init-package.el
  4. Manually update all packages list-packages U x
  5. quit and restart emacs normally

Thanks!

(and thanks BTW for the fantastic emacs setup, I love emacs, but trying to get lsp working right was killing me, yours worked out of the box and all I had to do was add some bindings, it's really a time saver)

@MatthewZMD
Copy link
Owner

Awesome! Glad you fixed it 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants