Closed ducbueno closed 2 years ago
Hello,
The Debian package configures the right install prefix (/usr
) to my knowledge.
@sten0 can maybe confirm?
What is printed in the minibuffer when you type this into Emacs?
M-x eval-expression RET (executable-find "irony-server") RET
The expression prints /usr/bin/irony-server
.
Is there a way to make Emacs see it? I mean by something in the configuration.
irony-mode uses executable-find
so it should be found:
https://github.com/Sarcasm/irony-mode/blob/b9c64abf81e73860e39ecd82dfa00cca90b53d99/irony.el#L574
What is printed in the minibuffer when you type this into Emacs?
M-x eval-expression RET irony-server-install-prefix RET
It seems the install prefix is not defined in my system for some reason. The expression prints Symbol's function definition is void: irony-server-install-prefix
.
That's weird, but it can happen if you eval'd this before loading irony-mode, can you double-check irony-mode is actually loaded?
You can force loading by typing this:
M-: (require 'irony) RET
Then check again:
M-: irony-server-install-prefix RET
Even after requiring irony the message is still the same.
If you do:
M-x find-library RET irony RET
What do you have around line 166?
My lines 166 through 172 looks exactly like yours.
One thing I noticed, in the definition of irony-server-source-dir
there is a line (line 156) that says :package-version '(irony . 1.2.0))
. The version of irony that gets installed with apt is 1.4.0. Could this be causing the problem?
What is the path of the file found by M-x find-library RET irony RET
?
The path is ~/.emacs.d/.local/straight/repos/irony-mode
.
Ok, so you have 2 installs. Maybe they conflict, the straight irony.el will use the debian-installed irony-server.
I realize your error checking irony-server-install-prefix
was maybe because you added parenthesis around it.
Do you really get an error if you type this exactly like so?
M-: (require 'irony) RET
M-: irony-server-install-prefix RET
Ah now I got it. My irony-server-install-prefix
points to ~/.emacs.d/.local/etc/irony-server/
, but this directory doesn't exist.
And the hint to use M-x irony-install-server RET
wasn't shown?
I just copied the binary that was installed by apt to ~/.emacs.d/.local/etc/irony-server/
and everything seems to work now. Thanks for the help!
If you think this is a good solution I'll close the issue.
If you are satisfied, fine by me, closing. :)
My recommendation would be to either install the Debian package OR from source (ELPA, straight, ...).
And, if installing from source, using M-x irony-install-server RET
.
Hi @Sarcasm, I've filed #584 in the hopes that it clarifies this issue for other users. I took the liberty of addressing a potential MELPA+straight.el case that seems to be related to #516, but please let me know if I overstepped in making such a recommendation.
P.S. and thank you for CCing me :-)
Hello everyone.
So, I've successfully installed irony via apt (
sudo apt install elpa-irony
) but Emacs doesn't seem to be able to find it, since I keep getting the message "Irony server isn't installed" whenever I open a C++ file. This kept happening even after a system reboot.What am I missing here?
Thanks in advance!