0

I compiled Emacs 30.2 with the regular ./configure, make & make install.

I have an existing older Emacs, so I run the new Emacs with --init-directory:

/usr/local/bin/emacs --debug-init --init-directory ~/.emacs30 

where this directory has an init.el that says (message "hello from emacs30/init.el"), which I see.

(the older is actually installed with Guix, btw)

But when I want to start installing packages with M-x package-initialize, I get:

Debugger entered--Lisp error: (void-function cl--generic-struct-tag)
  eval-expression--debug((void-function cl--generic-struct-tag))
  cl--generic-struct-tag(arg)
  #f(compiled-function (arg1)(#s(cl--generic-generalizer :name eieio--generic-generalizer :priority 50 :tagcode-function cl--generic-struct-tag :specializers-function #f(compiled-function (tag &rest _) #<bytecode -0xf9eab8efef0d521>)))
  mapcar(#f(compiled-function (arg1)
  cl--generic-get-dispatcher((0 #s(cl--generic-generalizer :name eieio--generic-generalizer :priority 50 :tagcode-function cl--generic-struct-tag :specializers-function #f(compiled-function (tag &rest _) #<bytecode -0xf9eab8efef0d521>)) #s(cl--generic-generalizer :name cl--generic-t-generalizer :priority 0 :tagcode-function #f(compiled-function (arg1 &rest rest)
  cl--generic-make-next-function(#s(cl--generic :name shared-initialize :dispatches ((1 #s(cl--generic-generalizer :name cl--generic-t-generalizer :priority 0 :tagcode-function #f(compiled-function (arg1 &rest rest)
  cl--generic-make-function(#s(cl--generic :name shared-initialize :dispatches ((1 #s(cl--generic-generalizer :name cl--generic-t-generalizer :priority 0 :tagcode-function #f(compiled-function (arg1 &rest rest)
  cl-generic-define-method(shared-initialize nil ((obj eieio-default-superclass) slots) nil #f(compiled-function (obj slots) "Set slots of OBJ with SLOTS which is a list of name/value pairs.\nCalled from the constructor routine." #<bytecode -0xf14d235bdf7f663>))
  byte-code("\300\301N\20\302\303\300\304#\210\305\303\300\306#\210\302\307\310\307\311\304#\312#\210\302\313\307\304#\210\305\313\307\314#\210\315\307\304\316\304\317%\210\302\320\310\320..." [eieio-default-superclass cl--class defalias standard-class nil make-obsolete "26.1" make-instance cl-generic-define (class &rest initargs) "Make a new instance of CLASS based on INITARGS.\nFo..." constructor "25.1" cl-generic-define-method ((class (subclass eieio-default-superclass)) &rest slots) #f(compiled-function (class &rest slots) "Default constructor for CLASS `eieio-default-superclass'.\nSLOTS are the initialization slots used by `initialize-instance'.\nThis static method is called when an object is constructed.\nIt allocates the vector used to represent an EIEIO object, and then\ncalls `initialize-instance' on that object." #<bytecode 0x1866e7049f21cb98>) shared-initialize (obj slots) "Set slots of OBJ with SLOTS which is a list of nam..." ((obj eieio-default-superclass) slots) #f(compiled-function (obj slots) "Set slots of OBJ with SLOTS which is a list of name/value pairs.\nCalled from the constructor routine." #<bytecode -0xf14d235bdf7f663>) initialize-instance (this &optional slots) "Construct the new object THIS based on SLOTS.\n\n(fn..." ((this eieio-default-superclass) &optional slots) #f(compiled-function (this &optional slots) "Construct the new object THIS based on SLOTS.\nSLOTS is a tagged list where odd numbered elements are tags, and\neven numbered elements are the values to store in the tagged slot.\nIf you overload the `initialize-instance', there you will need to\ncall `shared-initialize' yourself, or you can call `call-next-method'\nto have this constructor called automatically.  If these steps are\nnot taken, then new objects of your class will not have their values\ndynamically set from SLOTS." #<bytecode -0x1d306a7d2a4df4fd>) slot-missing (object slot-name _operation &optional _new-value) "Method invoked when an attempt to access a slot in..." #f(compiled-function (object slot-name operation &optional new-value) #<bytecode -0x104f686700aecafc>) slot-unbound (object class slot-name fn) "Slot unbound is invoked during an attempt to refer..." ((object eieio-default-superclass) class slot-name fn) #f(compiled-function (object class slot-name fn) "Slot unbound is invoked during an attempt to reference an unbound slot.\nOBJECT is the instance of the object being reference.  CLASS is the\nclass of OBJECT, and SLOT-NAME is the offending slot.  This function\nthrows the signal `unbound-slot'.  You can overload this function and\nreturn the value to use in place of the unbound value.\nArgument FN is the function signaling this error.\nUse `slot-boundp' to determine if a slot is bound or not.\n\nIn CLOS, the argument list is (CLASS OBJECT SLOT-NAME), but\nEIEIO can only dispatch on the first argument, so the first two are swapped." #<bytecode 0xf7facf750d12282>) clone (obj &rest params) "Make a copy of OBJ, and then supply PARAMS.\nPARAMS..." ((obj eieio-default-superclass) &rest params) #f(compiled-function (obj &rest params) "Make a copy of OBJ, and then apply PARAMS." #<bytecode -0x1a44d66d388e3659>) destructor (_this &rest _params) "Destructor for cleaning up any dynamic links to ou..." #f(compiled-function (this &rest params) #<bytecode -0x10f40c571627fba1>) object-print (this &rest _strings) "Pretty printer for object THIS.\n\nIt is sometimes u..." #f(compiled-function (this &rest strings) #<bytecode 0x1728c58f0cd373c9>) cl-print-object ((this eieio-default-superclass) &rest strings) ...] 6)
  require(eieio)
  byte-code("\300\301!\210\300\302!\210\300\303!\210\300\304!\210\305\306\307\"\210\305\310\307\"\210\305\311\307\"\210\305\312\307\"\210\305\313\307\"\210\305\314\307\"\210\305\315\307\"..." [require json password-cache cl-lib eieio autoload secrets-create-item "secrets" secrets-delete-item secrets-get-alias secrets-get-attributes secrets-get-secret secrets-list-collections secrets-search-items rfc2104-hash "rfc2104" plstore-open "plstore" plstore-find plstore-put plstore-delete plstore-save plstore-get-file epg-make-context "epg" epg-context-set-passphrase-callback epg-decrypt-string epg-encrypt-string help-mode "help-mode" nil t custom-declare-group auth-source "Authentication sources." :version "23.1" :group gnus custom-declare-variable auth-source-cache-expiry funcall function #f(compiled-function () #<bytecode 0x18c000ae9bc1>) "How many seconds passwords are cached, or nil to d..." "24.1" :type (choice (const :tag "Never" nil) (const :tag "All Day" 86400) (const :tag "2 Hours" 7200) (const :tag "30 Minutes" 1800) (integer :tag "Seconds")) defalias auth-source-backend-p ...] 8)
  require(auth-source)
  byte-code("\300\301!\210\300\302!\210\303\304\305\"\207" [require url-vars auth-source autoload url-scheme-get-property "url-methods"] 3)
  require(url-parse)
  require(url-handlers)
  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 0x18c000af29b1>) "Whether to make installed packages available when ..." :type boolean package-load-list #f(compiled-function () #<bytecode 0x18c000ae5541>) "List of packages for `package-initialize' to make ..." (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 0xb037535fd94090b>) "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")) "26.1" package-menu-hide-low-priority #f(compiled-function () #<bytecode 0x18c0badaa421>) "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 0x18c000af2941>) "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 0x18c000af2941>) "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 0x8272e69dd9246>) ...] 12)
  (package-initialize)
  eval((package-initialize) t)
  #f(compiled-function () #<bytecode -0x196fccfbf7bb1a61>)()
  #f(compiled-function () #<bytecode -0x5db3e1955cb81d1>)()
  handler-bind-1(#f(compiled-function () #<bytecode -0x5db3e1955cb81d1>) (error) eval-expression--debug)
  eval-expression((package-initialize) nil nil 127)
  funcall-interactively(eval-expression (package-initialize) nil nil 127)
  call-interactively(eval-expression nil nil)
  command-execute(eval-expression)

So, are we typically in the case where there are bytecode incompatibilities between my two versions? I hoped to avoid this with the --init-directory. The usual recommendation I hear would be to remove all .elc files, or to remove the elpa directory altogether, but I don't have any (and I did move my .emacs.d/ to try, for no change). Do I have to cleanup somewhere else?

What can I do more?

Thanks!

10
  • The (require 'eieio) should have defined cl--generic-struct-tag. I don't understand why it did not. Maybe try it by hand: start with emacs -Q, do M-: (require 'eieio) and then try C-h f cl--generic-struct-tag. If that works, then something goes wrong with your initialization (although I can't think of a plausible reason). If that does not work, there is something wrong with your emacs. Commented Aug 16 at 2:52
  • The require doesn't work. I get the same error (and stack trace). OK, then I give up on this and I'll try another release and double check the install process. Thanks. Commented Aug 16 at 7:11
  • So doing the require alone produces the stack trace above? If so, that sounds like an eieio bug. Commented Aug 16 at 13:19
  • 1
    You might try rebuilding your Emacs. You should also check to make sure your source tree is intact: maybe clone the git repo again and make sure that you have chanded nothing. Commented Aug 16 at 13:38
  • I built an Emacs 30.2 from git and started it with ./emacs -Q from the src directory of the tree. I can then (require 'eieio) with no error and cl--generic-struct-tag is a known (albeit undocumented) function. I suspect your build was bad. Commented Aug 16 at 14:34

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.