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

Installing fstar-mode does not seem to work with Emacs 25.0.95 #34

Closed
beurdouche opened this issue Jul 2, 2016 · 22 comments
Closed

Installing fstar-mode does not seem to work with Emacs 25.0.95 #34

beurdouche opened this issue Jul 2, 2016 · 22 comments

Comments

@beurdouche
Copy link
Member

Hi @cpitclaudel.

I just installed the fstar-mode 20160701.309 package through melpa on Emacs 25.0.95.1 but M-x fstar-mode gives me the following error: byte-code: Symbol’s function definition is void: seq-do

I think it might be related to my flycheck (20160622.952) and/or my seq (2.3-builtin) packages but I am not sure exactly what happens... Do you have any clue about this ?

Thanks a lot ! ;) Ben

(I just installed on my mac the --devel version of emacs with Homebrew because the stable version had some updating bugs)

@cpitclaudel
Copy link
Contributor

Hmmm. Let me look into this. I use emacs 25 as well.

@cpitclaudel
Copy link
Contributor

I think the problem is not directly with fstar-mode (it doesn't use seq-do), but more likely with an interaction of updated and non-updated things. Can you try updating all your packages? (U in list-packages)

@cpitclaudel
Copy link
Contributor

Also, try installing it after M-x toggle-debug-on-error; this will give us a backtrace :)

@beurdouche
Copy link
Member Author

Ok, trying that. Thanks ;)

@beurdouche
Copy link
Member Author

So I did remove all my packages and my entire ~/.emacs.d first.
Then enabled toggle-debug-on-error.

When I run M-x package-install fstar-mode I get:

Compiling file /Users/bbeurdouche/.emacs.d/elpa/fstar-mode-20160701.309/fstar-mode.el at Sat Jul  2 16:43:31 2016
Entering directory ‘/Users/bbeurdouche/.emacs.d/elpa/fstar-mode-20160701.309/’
fstar-mode.el:46:1:Error: Symbol’s function definition is void: seq-do

@beurdouche
Copy link
Member Author

It points to line 46 which is empty so I am tempted to say it might be line 45 (require 'flycheck nil t).
By the way, dash has properly been installed but not flycheck

@cpitclaudel
Copy link
Contributor

This is so strange. There's nothing on line 46, and flycheck isn't required (the nil t part on that line says it's optional)

@cpitclaudel
Copy link
Contributor

Hmm. Try to install the seq package first?

@beurdouche
Copy link
Member Author

seq version 2.3 is a builtin, so I have it and it was there when installing :/

@cpitclaudel
Copy link
Contributor

cpitclaudel commented Jul 2, 2016

Actually, here's an easier test:

$ cd /tmp/
$ mkdir sandbox/
$ emacs -Q \
        --eval '(setq user-emacs-directory "./sandbox")' \
        -l package \
        --eval "(add-to-list 'package-archives '(\"gnu\" . \"http://elpa.gnu.org/packages/\") t)" \
        --eval "(add-to-list 'package-archives '(\"melpa\" . \"https://melpa.org/packages/\") t)" \
        --eval "(package-refresh-contents)" \
        --eval "(package-initialize)"

This will run a clean copy of emacs, using /tmp/sandbox as your emacs directory. In that clean Emacs, try running M-x package-install fstar-mode

@beurdouche
Copy link
Member Author

Hum. Interesting. This is working ! Means the problem is really on my end...

@cpitclaudel
Copy link
Contributor

All right, at least this is starting to make sense :)
You said you deleted your .emacs.d, right? Presumably there are other, system wide files that are confusing emacs somewhere. In your regular (non -Q) Emacs, can you try M-x find-library seq? Which file does this open (IOW, where is seq loaded from?). Does that file contain a seq-do? What happens when you do M-x describe-function seq-do?

@beurdouche
Copy link
Member Author

It contains:

...
;;; Version 2.16
...
;;; Code:

(if (version< emacs-version "25")
    (require 'seq-24)
  (require 'seq-25))

(provide 'seq)
;;; seq.el ends here

@beurdouche
Copy link
Member Author

Ok. I am attempting a complete cleanup to check where something went wrong...

@cpitclaudel
Copy link
Contributor

Thanks. Where is that file?

@beurdouche
Copy link
Member Author

/usr/local/share/emacs/site-lisp/seq/

@cpitclaudel
Copy link
Contributor

Neat, thanks. There's something strange happening here. The source code that you showed probably comes from an ELPA/MELPA install; the version that (should) ship with emacs is 2.3, and it doesn't include this if version test (at least that's what I get from looking at the sources of Emacs 25.0.95)

@cpitclaudel
Copy link
Contributor

To confirm this, can you try the same (find-library and check the file name) from the sandboxed emacs launched as I wrote above?

@beurdouche
Copy link
Member Author

Yep. Does not look the same at all...

;; Version: 2.3
;; Package: seq

and the path is :
/usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/emacs-lisp/

@cpitclaudel
Copy link
Contributor

Ok, perfect. I think I understand now :)

The /usr/local/share/emacs/site-lisp/ directory is a leftover from a previous Emacs 24 install, while the /usr/local/Cellar/emacs/25.0.95/share/emacs/25.0.95/lisp/emacs-lisp/ one is from your new Emacs 25 install (presumably you used a different method for the old (24) and the new (25) install?).

Make sure that the old version is fully uninstalled, and things should work fine :)

@beurdouche
Copy link
Member Author

No, and usually there is no such leftovers when uninstalling a homebrew formula :s
Maybe the formula itself has a bug. I'll have a look at it later..

Well thanks a lot for the help ;) And again thanks for the fstar-mode which is super Super! useful ;)
Best ! B.

@cpitclaudel
Copy link
Contributor

My pleasure :) Enjoy!

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