Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not make on Ubuntu, compilation error: "elisp/erl-test.el:3:1:Error: Cannot open load file: No such file or directory, erlang"" #70

Open
zwpdbh opened this issue Apr 27, 2021 · 2 comments

Comments

@zwpdbh
Copy link

zwpdbh commented Apr 27, 2021

Excuse me, I have git cloned the package from the master branch and save it to my ~/.emacs.d/site-lisp/.

Then, I cd into the folder and run make. The output shows:

emacs -batch -L elisp -f batch-byte-compile elisp/erl-test.el

In toplevel form:
elisp/erl-test.el:3:1:Error: Cannot open load file: No such file or directory, erlang
Makefile:64: recipe for target 'elisp/erl-test.elc' failed
make: *** [elisp/erl-test.elc] Error 1

But, erlang is already installed:

zw@DESKTOP-TTOPQ58:~/.emacs.d/site-lisp/distel$ erl
Erlang/OTP 20 [erts-9.2] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:10] [kernel-poll:false]

Eshell V9.2  (abort with ^G)
1>

zw@DESKTOP-TTOPQ58:~/.emacs.d/site-lisp/distel$ which erl
/usr/bin/erl

And my Emacs configuration is

(cond (*win64*
       (setq erlang-root-dir "c:/Program Files/erl-23.0/")
       (setq erlang-man-root-dir (concat erlang-root-dir "man"))
       (add-to-list 'exec-path (concat erlang-root-dir "bin/"))
       (add-to-list 'load-path (concat erlang-root-dir "lib/tools-3.4/emacs")))
      (t
       (setq erlang-root-dir "/usr/lib/erlang/")
       (setq erlang-man-root-dir (concat erlang-root-dir "man"))
       (add-to-list 'exec-path (concat erlang-root-dir "bin"))
       (add-to-list 'load-path (concat erlang-root-dir "lib/tools-2.11.1/emacs"))))

(when (executable-find "erl")
  (require 'erlang-start)

  (after-load 'erlang
    ;; ref: http://alexott.net/en/writings/emacs-devenv/EmacsErlang.html
    ;; Installation & customization of distel
    ;; for loading https://github.com/massemanet/distel
    (add-to-list 'load-path "~/.emacs.d/site-lisp/distel/elisp")
    (require 'distel)
    (distel-setup)))

Now, when I start up Emacs and edit any ".erl" file. I could see in modes:

Erlang-Extended minor mode (indicator EXT):
Extensions to erlang-mode for communicating with a running Erlang node.

Does this mean Distel's feature could work properly?

The message buffer shows no error, but the compilation buffer shows same error:

-*- mode: compilation; default-directory: "~/.emacs.d/site-lisp/distel/elisp/" -*-
Compilation started at Tue Apr 27 12:42:12

pwd && make -C.. all
/home/zw/.emacs.d/site-lisp/distel/elisp
make: Entering directory '/home/zw/.emacs.d/site-lisp/distel'
emacs -batch -L elisp -f batch-byte-compile elisp/erl-test.el

In toplevel form:
elisp/erl-test.el:3:1:Error: Cannot open load file: No such file or directory, erlang
Makefile:64: recipe for target 'elisp/erl-test.elc' failed
make: *** [elisp/erl-test.elc] Error 1
make: Leaving directory '/home/zw/.emacs.d/site-lisp/distel'

Compilation exited abnormally with code 2 at Tue Apr 27 12:42:12

How to fix this?

@massemanet
Copy link
Owner

massemanet commented Apr 27, 2021 via email

@DimaLapshyn
Copy link

@massemanet I am getting the same error though I do have Erlang mode installed.

M-x erlang-version

gives me "Erlang mode version 2.8.4, written by Anders Lindgren"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants