joaotavora / sly

Sylvester the Cat's Common Lisp IDE
1.23k stars 139 forks source link

package-install sly (failed compile sly.el line 69) "definition void when eval-with" #611

Closed iamez1 closed 1 year ago

iamez1 commented 1 year ago

I edited "sly.el" added line 70 (require 'cl-lib) and then saved then M-x sly first error and following error disappeared and all seems to work. I do not have in depth knowledge of this package and am not sure this is a proper fix.... if more info is needed i can break it and give any info in case it may help others or the dev team. uname -a Linux main 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux GNU Emacs 27.1 dgipson909@gmail.com

joaotavora commented 1 year ago

am not sure this is a proper fix....

And I am not sure what it is that you're fixing. The subject line is usually not enough space for a MRE/reproduction recipe.

Please provide reproducible steps indicating exactly what you are doing from scratch. Say, from an invocation of emacs -Q.

joaotavora commented 1 year ago

For the record, with Emacs 28:

$ mkdir bla
$ cd bla
$ HOME=$PWD emacs # this trick is largely the same as Emacs -Q, it means all your config is ignored for this experiment
;; in emacs now
M-x package-install RET sly RET
C-u M-x sly RET <point to a sbcl repl somewhere in the system> RET
;; everything seems to work!
iamez1 commented 1 year ago

unable to install either with -Q or mkdir cd dir ...etc method cannot find sly in packages ... it is a fresh install of emacs dont have a ~/.emacs file yet only edit was following sly setup instructions and adding sblc path to inferior lisp .... however when i just do emacs i can find and install sly and get the following

Compiling file /root/.emacs.d/elpa/sly-20230624.1930/sly.el at Mon Jun 26 12:27:48 2023 Entering directory ‘/root/.emacs.d/elpa/sly-20230624.1930/’ sly.el:69:1:Error: Symbol’s function definition is void: eval-when Leaving directory ‘/root/.emacs.d/elpa/sly-20230624.1930/’

more errors follow if you want them

Done (Total of 6 files compiled, 17 failed, 2 skipped in 3 directories) i then go to file sly.el line 69 hit enter at the end of the line and add (require 'cl-lib) and it seeems to work

iamez1 commented 1 year ago

The reason i added that line is a web search produced no results for sly but several other emacs packages had same error and that was the fix for them so i tried it I am willing to get any info that can help reproduce the problem for you ... but if i am the only one and you are busy i seem to be able to fix and run it so i don't wish to disturb you.

iamez1 commented 1 year ago

If you wish to investigate this further feel free to email me at dgipson909@gmail.com .. if not i will assume nobody else has this issue and will investigate the setup on my end .... thank you for your quick response ... i appreciate the sly product have a wonderful day

joaotavora commented 1 year ago

t is a fresh install of emacs dont have a ~/.emacs file yet only edit was following sly setup instruction

So you were following this exactly?? https://github.com/joaotavora/sly#installation

In that case I don't understand how this can happen

however when i just do emacs i can find and install sly and get the following

Something is off. If you have Emacs 27 it's likely that you don't have the non-GNU ELPA mirror configured.

So do the following, please, let's stick with MELPA.

mkdir bla2
cd bla2
HOME=$PWD emacs
;; in the scratch buffer type this
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(package-initialize)
;; now type 
M-x eval-buffer RET
M-x package-refresh-contents RET
M-x package-install

If you wish to investigate this further feel free to email me at dgipson909@gmail.com ..

if you have no objections to that, I prefer to keep analysing the issue in the public issue tracker so that IF someone does come across this issue later on, he or she can find an existing investigation.

joaotavora commented 1 year ago

... but if you prefer to close or abandon this issue at this current state, I'm fine with that, too.

iamez1 commented 1 year ago

i am willing to work with you ... but whatever you wish at the moment let me start following you procedure and see what we find real quick

iamez1 commented 1 year ago

okay following the directions it found the sly package .... apparently i forgot to add the repository. i was unhappy with the old emacs so i started fresh with apt purge apt install emacs ... then ran into this problem. however i get the same error .... must be something in my configs i guess

iamez1 commented 1 year ago

its strange though because i rm -rf emacs.d and .emacs in my home and apt purge is suppose to remove thos from /etc or whever apt install would have put configuration

iamez1 commented 1 year ago

Since we didn't find anything real quick ..... i say we let you think about it and continue with your day .... you have my email if you wish to come back to this and i can get sly to run by adding one line to sly.el so i am happy.... thank you very much ... and let me know if you require anything.

monnier commented 1 year ago

Compiling file /root/.emacs.d/elpa/sly-20230624.1930/sly.el at Mon Jun 26 12:27:48 2023 Entering directory ‘/root/.emacs.d/elpa/sly-20230624.1930/’ sly.el:69:1:Error: Symbol’s function definition is void: eval-when Leaving directory ‘/root/.emacs.d/elpa/sly-20230624.1930/’

Hmm... in the current code I find for Sly, the only use of eval-when is in lib/sly-tests.el, which properly does the need (require 'cl).

Line 69 is a require of hyperspec, but the hyperspec.el file bundled with Sly doesn't seem to use eval-when anywhere either. Any chance you have an old hyperspec.el lying somewhere in your load-path?

iamez1 commented 1 year ago

yes i didn't find eval-when either i just moved line 70 to line 71 and put the require line at line 70 as per directions in other pkgs failure with same error ... as a test it then compiled and the rror that followed went away as well ... everything seems to work when i test

iamez1 commented 1 year ago

well that is possible i guess i have every lisp known to man installed as well as lem ....etc let me look

iamez1 commented 1 year ago

locate hyperspec.el /etc/emacs/site-start.d/60hyperspec.el /mnt/c/Users/iamez/Downloads/gnu/store/swa76smh2ayg6qflb6s1lrv2r0fx92zz-cl-slime-swank-2.28/share/common-lisp/source/cl-slime-swank/lib/hyperspec.el /mnt/c/Users/iamez/Downloads/gnu/store/ybhm72jkfdiqiknjs0mkchj2vjwb4w6m-cl-slynk-1.0.43-7.82b20a9/share/common-lisp/source/cl-slynk/lib/hyperspec.el /usr/share/emacs/site-lisp/ilisp/extra/hyperspec.el /usr/share/xemacs21/xemacs-packages/lisp/ilisp/extra/hyperspec.el

iamez1 commented 1 year ago

so i guess i should grep for a path in /etc/emacs files ...... let me see what i find

iamez1 commented 1 year ago

in /usr/share/emacs i have 75 lines referencing hyperspec in various files and in /etc/emacs i have 7 lines in various files. most of these seem to be bindings to keymaps .... give me till tomorrow to go through this ... if that is the issue i will let you know if not as well. just let me have 24 hours to investigate and i will get back with you ... your patience is much appreciated.

iamez1 commented 1 year ago

I think you have put me on the right track ELISP> (require 'hyperspec) Eval error Symbol’s function definition is void: eval-when now i just need to fix it :)

iamez1 commented 1 year ago

The problem was of course on my end ..... an antiquated package was installed ..... apt purge ilisp then emacs M-x package-install ret .....etc worked flawless. ilisp contains an old hyperspec.el one it was removed all was good ... thank you for your dedication... another satisfied customer please feel free to close this out

iamez1 commented 1 year ago

Thank you!