Skip to content

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

Description

@zwpdbh

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions