alphapapa / ts.el

Emacs timestamp and date-time library
GNU General Public License v3.0
177 stars 15 forks source link

void-variable accessor-init #7

Closed theottm closed 4 years ago

theottm commented 4 years ago

Hello, I tried to install the package with MELPA, with and without Byte-Compilation. I also tried downloading directly the package from git and put it in my load path. What could be going wrong ? Thank you !

alphapapa commented 4 years ago

You would have to provide more details about your system and what exactly you did. Try reproducing with emacs -q.

theottm commented 4 years ago

I'm on Debian stretch. Using Emacs 25 installed from the debian repos.

When installing ts I get this in Compile-Log:

In ts-defstruct: ts.el:95:48:Warning: attempt to let-bind constant ‘:aliases’ ts.el:108:50:Warning: reference to free variable ‘accessor-init’ ts.el:126:41:Warning: reference to free variable ‘aliases’ ts.el:146:1:Error: Attempt to set a constant symbol: :aliases

If I disable byte-compilation, I don't get this error.

In both case I get an error when running (require 'ts):

list: Symbol’s value as variable is void: accessor-init

theottm commented 4 years ago

Not sure how I can reproduce it with emacs -q, I get this error when running (require 'ts):

(file-missing "Cannot open load file" "No such file or directory" "ts")

however ts is installed according to list-packages...

theottm commented 4 years ago

I uninstalled ts, then I tryed to install it from emacs -q.

I run emacs -q -l snippet.el with snipptt.el being

(require 'package)
(setq package-archives
      '(
        ("marmalade" . "http://marmalade-repo.org/packages/")
        ("elpa" . "http://tromey.com/elpa/")
        ("melpa" . "http://melpa.milkbox.net/packages/")
        ("gnu" . "http://elpa.gnu.org/packages/")
        ("org" . "https://orgmode.org/elpa/")
        ))
(setq package-enable-at-startup nil)
(package-initialize)

and then installed ts again from list-packages. Same compilation error...

Compiling file /home/teddd/.emacs.d/elpa/ts-20191010.210/ts.el at Wed Jan 22 17:12:11 2020 Entering directory ‘/home/teddd/.emacs.d/elpa/ts-20191010.210/’

In ts-defstruct: ts.el:95:48:Warning: attempt to let-bind constant ‘:aliases’ ts.el:108:50:Warning: reference to free variable ‘accessor-init’ ts.el:126:41:Warning: reference to free variable ‘aliases’ ts.el:146:1:Error: Attempt to set a constant symbol: :aliases

and same error when running (require 'ts)

(void-variable accessor-init)

alphapapa commented 4 years ago

As shown in the package headers, Emacs 26.1 or greater is required.

theottm commented 4 years ago

Oh sorry, I meant 26.1 for the version...

theottm commented 4 years ago

I created a new Unix user and there the problem doesn't appear. Maybe a conflict with another package ? Though it is weird since it crashed with my usual Unix user account using emacs -q ... The problem must be located in ~/.emacs.d/

theottm commented 4 years ago

Ok I used the opportunity to make a great cleanup in all my packages and ... now it works fine. :)

alphapapa commented 4 years ago

Likely caused by outdated .elc files in elpa/. Happens often. Recommend setting load-prefer-newer to t.

bamanzi commented 2 years ago

I run into the same problem (list: Symbol’s value as variable is void: accessor-init) today.

After some tests with emacs -Q, I find I need to upgrade dash.el to 2.16.0, while the version 2.14.1 given in ts.el would lead to the error message above. (But I didn't verify 2.15.0.)

Hope this helps.