IQSS.emacs icon indicating copy to clipboard operation
IQSS.emacs copied to clipboard

IQSS.emacs dies on the new macs

Open thegaryking opened this issue 3 years ago • 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]

thegaryking avatar Feb 02 '22 16:02 thegaryking

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?

izahn avatar Feb 02 '22 17:02 izahn

come back and we'll buy you a new mac :-).. here's my version info

[image: Screen Shot 2022-02-02 at 12.17.02 PM.png]

Gary

Gary King - Albert J. Weatherhead III University Professor - Director, IQSS http://iq.harvard.edu/ - Harvard University GaryKing.org http://garyking.org/ - @.*** - @KingGary https://twitter.com/kinggary - 617-500-7570 - Assistant @.***>: 617-495-9271

On Wed, Feb 2, 2022 at 12:04 PM Ista Zahn @.***> wrote:

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?

— Reply to this email directly, view it on GitHub https://github.com/IQSS/IQSS.emacs/issues/20#issuecomment-1028154893, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEMN7UYV45GI53R76POFVTUZFP3LANCNFSM5NMSB2RA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

thegaryking avatar Feb 02 '22 17:02 thegaryking

sorry i responded by email and it stripped the image. it is version 27.2 (9.0)

thegaryking avatar Feb 02 '22 17:02 thegaryking

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.

izahn avatar Feb 02 '22 17:02 izahn

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.

iqlinuxadmin avatar Feb 10 '22 20:02 iqlinuxadmin

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.

izahn avatar Feb 10 '22 20:02 izahn

Ah, thanks, that's super useful info too. Could the 'obsolete' directory be removed?

iqlinuxadmin avatar Feb 10 '22 20:02 iqlinuxadmin

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...

izahn avatar Feb 10 '22 21:02 izahn

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]

iqlinuxadmin avatar Feb 23 '22 21:02 iqlinuxadmin

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.

iqlinuxadmin avatar Feb 23 '22 21:02 iqlinuxadmin

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.

iqlinuxadmin avatar Feb 23 '22 21:02 iqlinuxadmin

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:

  1. 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.
  2. Try both https://vigou3.gitlab.io/emacs-modified-macos/ and https://emacsformacosx.com/ to see if the problem is specific to one CPU architecture

izahn avatar Feb 24 '22 12:02 izahn

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.

iqlinuxadmin avatar Feb 24 '22 14:02 iqlinuxadmin

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?

izahn avatar Feb 24 '22 14:02 izahn

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.

iqlinuxadmin avatar Feb 24 '22 21:02 iqlinuxadmin