Closed mm3509 closed 6 years ago
I'm pretty sure you're running into these errors because macOS ships with a very old version of Emacs. When you run make, your PATH is finding that old Emacs rather than the newer 25.3 you've got installed.
EDIT: you could confirm this by e.g. editing the makefile to make it print emacs --version
I recommend ignoring those installation instructions and just installing from MELPA, as you already did. Not sure about the "Obsolete" part. Perhaps you have other conflicting repositories in your package-archives? Maybe just 'M-x list-packages U x' to update things will take care of it.
Best, Ista
On Thu, Apr 12, 2018 at 12:20 PM, miguelmorin notifications@github.com wrote:
Hello,
I am new to ESS. I followed the steps in the ESS manual http://ess.r-project.org/Manual/ess.html#Step-by-step-instructions and obtain this error after make: $ make cd etc; /Applications/Xcode.app/Contents/Developer/usr/bin/make all make[1]: Nothing to be done forall'. cd lisp; /Applications/Xcode.app/Contents/Developer/usr/bin/make all emacs -batch -no-site-file -no-init-file -l ./ess-comp.el -f batch-byte-compile ess-custom.el loading 'ess-compat .. loading 'ess-custom .. loading 'ess .. Cannot open load file: cl-lib make[1]: [ess-custom.elc] Error 255 make: [all] Error 2`
Alternatively, I download the files from (the downloads section of the ESS site)[http://ess.r-project.org/index.php?Section=download], run make, and get a similar error:
$ make cd etc; /Applications/Xcode.app/Contents/Developer/usr/bin/make all make[1]: Nothing to be done forall'. cd lisp; /Applications/Xcode.app/Contents/Developer/usr/bin/make all EV='17.11'; perl -pi -e "s/"."/"$EV"/ if /ess-version/" ess-custom.el emacs -batch -no-site-file -no-init-file -l ./ess-comp.el -f batch-byte-compile ess-custom.el loading 'ess-compat .. loading 'ess-custom .. loading 'ess .. loading 'ess-site .. [ess-site:] ess-lisp-directory = '/Users/mmorin/Downloads/ess-17.11/lisp' [ess-site:] require 'ess-compat [ess-site:] require 'ess [ess-site:] require 'ess-r-mode [ess-s-lang:] (def ) only ... Unknown keyword :risky make[1]: [ess-custom.elc] Error 255 make: *** [all] Error 2`
Note that the error codes are the same but the line before is different.
Am I doing something wrong?
I got around this by downloading the package from MELPA by adding this to ~/.emacs: (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/")) and then typing M-x package-list-packages, selecting ESS, clicking Enter and clicking Install.
Emacs says that the version is obsolete: `ess is an available obsolete package.
Status: Available Obsolete from melpa -- Install`
but I confirm that it's the latest version by typing M-x ess-version and checking that it is 17.11, the latest version according to the Emacs website.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/emacs-ess/ESS/issues/519, or mute the thread https://github.com/notifications/unsubscribe-auth/AATm093TJ0JMadlPD5dRsVYJnUmgvb9oks5tn363gaJpZM4TSGSk .
-- Ista Zahn Data Science Specialist The Institute for Quantitative Social Science at Harvard http://dss.iq.harvard.edu
@jabranham : Thanks for the tip! I had installed Emacs with Homebrew, so I added this to ~/.bash_profile
:
export PATH="/usr/local/Cellar/emacs/25.3/bin:$PATH"
Then make
works, but make install
fails. The same happens following the ESS manual or the downloads section and despite using sudo
. The error is:
Password:
cd etc; /Applications/Xcode.app/Contents/Developer/usr/bin/make install
mkdir -p /usr/share/emacs/etc/ess/icons
mkdir: /usr/share/emacs/etc/ess/icons: Operation not permitted
make[1]: *** [install] Error 1
make: *** [install] Error 2
@izahn : I did M-x list-packages U
and the mini-buffer showed No packages to upgrade.
For ESS from ELPA, it was not loaded when I restarted Emacs and I had to add this to to ~/.emacs
:
(require 'ess)
I understand that this line should be added automatically after installing the package from MELPA. Is that a quirk from MELPA, or should it be part of ESS?
You're getting that error because you don't have permission to write to /usr/share/emacs/etc/ess/icons
. Probably doing sudo make install
would fix it. Personally, I wouldn't do that though. I try to avoid writing to the root filesystem without using my distro's package manager.
As for the (require 'ess)
statement, that's expected. Without it, Emacs doesn't know about ESS. This method of installation should probably be documented in the manual. Updating the manual is on my todo list for the next few days (#496) and I'll add this in there.
@jabranham : Yes, sudo
was also my first idea, and I get this error even with it. The first line of the error, when it asked for Password:
, is because I ran sudo make install
.
And thanks for adding the (require 'ess)
to the to-do list for the manual!
Hello,
I read the documentation again and it says
For this step to run correctly on macOS, you will need to adjust the
PREFIX
path in Makeconf. The necessary code and instructions are commented in that file.
In that file, I commented lines 23-27 (for GNU Emacs)
##__ GNU Emacs __
#EMACS ?= emacs
#SITELISP=$(PREFIX)/share/emacs/site-lisp
#LISPDIR=$(SITELISP)/ess
#INFODIR=$(PREFIX)/share/info
#ETCDIR =$(PREFIX)/share/emacs/etc/ess
and uncommented lines 36-42:
##__ GNU Emacs __ for Mac OS X with NeXTstep (Cocoa or GNUstep)
PREFIX=/Applications/Emacs.app/Contents/Resources
EMACS=/Applications/Emacs.app/Contents/MacOS/Emacs
SITELISP=$(PREFIX)/site-lisp
LISPDIR=$(SITELISP)/ess
INFODIR=/usr/local/info
ETCDIR =$(PREFIX)/etc/ess
I symlinked /Applications/Emacs.app/
to the Homebrew location, /usr/local/Cellar/emacs/25.3/Emacs.app
. And now sudo make install
works!
I replaced (require 'ess)
with (require 'ess-site)
in .emacs
. I assumed that this would switch from the MELPA version to the one I just installed, but M-x ess-version
still shows ess-version: 17.11 [elpa 20180412.315] (loaded from /Users/mmorin/.emacs.d/elpa/ess-20180412.315/
. I also tried step 4 in the step-by-step instructions:
(add-to-list 'load-path "/path/to/ESS/lisp/")
(load "ess-site")
and M-x ess-version
finds no match.
I just tried this on a different computer and I got it to work, so the code needs no change. I suggest slightly changing the documentation to make it easier. The last two lines of step 3 of the step-by-step instructions are:
The files are installed into /usr/share/emacs directory. For this step to run correctly on macOS, you will need to adjust the PREFIX path in Makeconf. The necessary code and instructions are commented in that file.
I would change it to:
The files are installed into /usr/share/emacs directory. For this step to run correctly on macOS, you will need to adjust the PREFIX path in Makeconf (such as commenting lines 23-27 and uncommenting lines 36-42). The necessary code and instructions are commented in that file.
Step 4 currently is
If you have performed the make install step from above, just add
(require 'ess-site)
to your ~/.emacs file. Otherwise, you should add /path/to/ESS/lisp/ to your emacs load path and then load ESS with the following lines in your ~/.emacs:(add-to-list 'load-path "/path/to/ESS/lisp/")
(load "ess-site")
These instructions fail, but the opposite instructions work, i.e. adding the last two lines if I chose to do make install
. So I would change step 4 to
If you have performed the make install
step from above, add
(add-to-list 'load-path "/path/to/ESS/lisp/")
(load "ess-site")
to your ~/.emacs file
. The first line adds /path/to/ESS/lisp/
to your emacs load path, the second line loads ESS with the following lines in your ~/.emacs.
Otherwise, add this to your ~/.emacs
file:
(require 'ess-site)
And now M-x ess-version
shows ess-version: 17.11 [git: 907540...] (loaded from /path/to/ESS/)
For your first suggestion, we probably don't want to do that because then whenever Makeconf was changed we'd have to remember to also change those line numbers
As for the second, I'm not sure how that could be possible. make install
should install ESS "site-wide" so that adding the path to load-path isn't necessary. My guess is that /Applications/Emacs.app/Contents/Resources/site-lisp
isn't where your Emacs really reads from. You can check what load-path is pointint to with emacs -q
and perhaps see there?
Closing this issue, will possible reopen if we hear back from OP.
Hello,
I am new to ESS. I followed the steps in the ESS manual and obtain this error after
make
:Alternatively, I download the files from the downloads section of the ESS site, run
make
, and get a similar error:Note that the error codes are the same but the line before is different.
I am using macOs High Sierra, Version 10.13.3 (17D102) and GNU Emacs Version 25.3 (9.0).
Am I doing something wrong?
Note: I got around this by downloading the package from MELPA by adding this to
~/.emacs
:(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
and then typingM-x package-list-packages
, selecting ESS, clicking Enter and clicking Install.Emacs says that the version is obsolete:
but I confirm that it's the latest version by typing
M-x ess-version
and checking that it is 17.11, the latest version according to the Emacs website.