IQSS.emacs dies on the new macs
Opened this issue · 15 comments
Can we update this for the new Apple silicon? Here's what I get trying to install on a brand new machine:
Compiling internal form(s) at Wed Feb 2 11:35:14 2022
Warning (bytecomp): assignment to free variable ‘gud-pdb-command-name’ [2 times]
Warning (bytecomp): ‘python-shell-virtualenv-path’ is an obsolete variable (as of 25.1); use ‘python-shell-virtualenv-root’ instead.
Warning (bytecomp): assignment to free variable ‘conda-project-env-path’
Warning (bytecomp): reference to free variable ‘prev-env’
Warning (bytecomp): assignment to free variable ‘eshell-modify-global-environment’
Warning (bytecomp): ‘python-shell-virtualenv-path’ is an obsolete variable (as of 25.1); use ‘python-shell-virtualenv-root’ instead. [2 times]
Warning (bytecomp): variable ‘_’ not left unused
Error (bytecomp): Cannot open load file: No such file or directory, ess-mode
Warning (bytecomp): ‘dummy’ is an obsolete variable (as of 25.1); use 'dummy instead [3 times]
If someone wants to buy me a new Mac I can test it out :-)
Which version of Emacs do you have? Do you remember where you installed it from?
sorry i responded by email and it stripped the image. it is version 27.2 (9.0)
This is going to be pretty hard for me to troubleshoot without an Apple silicon machine, but here goes...
My understanding is that there are both native Arm and x86 builds of Emacs for Mac. On the new machines the x86 build should still run in emulation mode. So my thought is, whichever one you have, try the other one.
I believe https://vigou3.gitlab.io/emacs-modified-macos/ is an x86 build and https://emacsformacosx.com/ offers a native Arm build. If one doesn't work you can try the other.
This solved the problem:
rm -rf /Users/garyking/.emacs.d/elpa/ess-20220201.816/obsolete
I diff'ed the compile logs from my Mac where this worked and Gary's M1 where it didn't. This showed that the compile failed here:
Compiling file /Users/garyking/.emacs.d/elpa/ess-20220201.816/obsolete/msdos.el at Thu Feb 10 14:36:26 2022
Compiling internal form(s) at Thu Feb 10 14:36:26 2022
Warning (bytecomp): assignment to free variable ‘gud-pdb-command-name’ [2 times]
Warning (bytecomp): ‘python-shell-virtualenv-path’ is an obsolete variable (as of 25.1); use ‘python-shell-virtualenv-root’ instead.
Warning (bytecomp): assignment to free variable ‘conda-project-env-path’
Warning (bytecomp): reference to free variable ‘prev-env’
Warning (bytecomp): assignment to free variable ‘eshell-modify-global-environment’
Warning (bytecomp): ‘python-shell-virtualenv-path’ is an obsolete variable (as of 25.1); use ‘python-shell-virtualenv-root’ instead. [2 times]
Warning (bytecomp): variable ‘_’ not left unused
Error (bytecomp): Cannot open load file: No such file or directory, ess-mode
Warning (bytecomp): ‘dummy’ is an obsolete variable (as of 25.1); use 'dummy instead [3 times]
The odd thing is that my Mac didn't install any ess stuff at all. Hopefully that doesn't keep anything from working correctly.
This solved the problem:
rm -rf /Users/garyking/.emacs.d/elpa/ess-20220201.816/obsolete
Awesome, thanks!
The odd thing is that my Mac didn't install any ess stuff at all. Hopefully that doesn't keep anything from working correctly.
By design it only installs ess if it detects an R installation, because ess is useless without R.
Ah, thanks, that's super useful info too. Could the 'obsolete' directory be removed?
I think it should be OK, worth a try anyway. Man I wish I had a new Mac so I could look at it more closely. One of these days...
Hi Ista,
Looks like that didn't actually solve the problem. Here's the error with a little more context:
Entering directory ‘/Users//.emacs.d/elpa/ess-20220213.1912/obsolete/’
Compiling file /Users//.emacs.d/elpa/ess-20220213.1912/obsolete/ess-font-lock.el
Compiling file /Users//.emacs.d/elpa/ess-20220213.1912/obsolete/ess-mouse.el
Compiling file /Users//.emacs.d/elpa/ess-20220213.1912/obsolete/ess-r-a.el
Compiling file /Users//.emacs.d/elpa/ess-20220213.1912/obsolete/mouseme.el
Compiling file /Users//.emacs.d/elpa/ess-20220213.1912/obsolete/msdos.el
Compiling internal form(s)
Warning (bytecomp): assignment to free variable ‘gud-pdb-command-name’ [2 times]
Warning (bytecomp): ‘python-shell-virtualenv-path’ is an obsolete variable (as of 25.1); use ‘python-shell-virtualenv-root’ instead.
Warning (bytecomp): assignment to free variable ‘conda-project-env-path’
Warning (bytecomp): reference to free variable ‘prev-env’
Warning (bytecomp): assignment to free variable ‘eshell-modify-global-environment’
Warning (bytecomp): ‘python-shell-virtualenv-path’ is an obsolete variable (as of 25.1); use ‘python-shell-virtualenv-root’ instead. [2 times]
Warning (bytecomp): variable ‘_’ not left unused
Error (bytecomp): Cannot open load file: No such file or directory, ess-mode
Warning (bytecomp): ‘dummy’ is an obsolete variable (as of 25.1); use 'dummy instead [3 times]
Seems like this is the error:
Cannot open load file: No such file or directory, ess-mode
When I compare the compile log on Gary's machine vs mine, his log is way shorter.
Also, we've bought an M1 mac, and would be happy to loan it to you once it arrives if you want to figure this out.
Congrats on the new Mac, I'll be happy to stop by and take a look when it arrives. Here are the debugging steps I would take next:
- Move
~/.emacs.d
to a backup location and try a normal installation of ESS from MELPA following the instructions at https://melpa.org/#/getting-started. This will help us determine if the problem is with ESS itself or with our installation procedure or environment. - Try both https://vigou3.gitlab.io/emacs-modified-macos/ and https://emacsformacosx.com/ to see if the problem is specific to one CPU architecture
Another interesting thing: I didn't have R installed when I installed this repo. I removed .emacs.d, installed R, and started emacs. My install also now fails at the same place as Gary's, but ctrl-cot still works in my emacs.
Ah, so this has nothing to to with M1, it fails on x86 cpu too? Unfortunately I don't have a Mac of any kind so this doesn't help me test, but it does narrow things down.
Can you try moving ~/.emacs.d
and doing a normal MELPA install of ESS?
Okay, I think we did solve it this time. Installing this did the trick: https://vigou3.gitlab.io/emacs-modified-macos/
When we tried to install melpa, then it was in .emacs.d, so we couldn't do the git clone. Didn't keep trying since the vigou emacs worked.