I'm very new to Elixir and am trying to set up ejabberd using the instructions on the page https://docs.ejabberd.im/developer/elixir/ (I'm on Erlang/OTP 19 and Elixir 1.3.2).
When doing mix compile
, I get a very long screen output which terminated in a compilation error:
...
{line,1239}]},
{lager_transform,walk_ast,2,
[{file,
"/media/common/code/elixir/ejapp/deps/lager/src/lager_transform.erl"},
{line,62}]},
{compile,
'-foldl_transform/2-anonymous-2-',
2,
[{file,"compile.erl"},
{line,958}]},
{compile,foldl_transform,2,
[{file,"compile.erl"},
{line,960}]},
{compile,
'-internal_comp/4-anonymous-1-',
2,
[{file,"compile.erl"},
{line,315}]},
{compile,fold_comp,3,
[{file,"compile.erl"},
{line,341}]},
{compile,internal_comp,4,
[{file,"compile.erl"},
{line,325}]},
{compile,
'-do_compile/2-anonymous-0-',2,
[{file,"compile.erl"},
{line,175}]}]}
could not compile dependency :ejabberd, "mix compile" failed. You can recompile this dependency with "mix deps.compile ejabberd", update it with "mix deps.update ejabberd" or clean it with "mix deps.clean ejabberd"
==> ejapp
** (Mix) Encountered compilation errors
I have no idea what's wrong and how to fix it. It looks like there's some problem with something called lager
but I don't know how to fix it. Please help!
Well, it turns out ejabberd is not ready for Erlang 19 yet. Some of its dependencies seem to still live in the OTP 18 world. So I downgraded Erlang to 18, and Elixir to 1.2.6 and now it compiled fine.