0

I want to compile MongooseIM from the source code but getting some error while compiling the code on Ubuntu:

Ubuntu version: Ubuntu 18.04.1 LTS 64-bit (latest) Erlang version: 21 (latest)

After using the following commands for compiling

  1. $ git clone https://github.com/esl/MongooseIM
  2. $ sudo ./rebar3 compile

Following are the contents of the rebar3.crashdump:

Error: {badmatch,{error,enoent}}
[{rebar_erlc_compiler,modify_erlcinfo,5,
                      [{file,"/home/tristan/Devel/rebar3/_build/prod/lib/rebar/src/rebar_erlc_compiler.erl"},
                       {line,477}]},
 {rebar_erlc_compiler,'-update_erlcinfo_fun/2-fun-0-',4,
                      [{file,"/home/tristan/Devel/rebar3/_build/prod/lib/rebar/src/rebar_erlc_compiler.erl"},
                       {line,463}]},
 {lists,foldl,3,[{file,"lists.erl"},{line,1263}]},
 {rebar_erlc_compiler,update_erlcinfo,3,
                      [{file,"/home/tristan/Devel/rebar3/_build/prod/lib/rebar/src/rebar_erlc_compiler.erl"},
                       {line,448}]},
 {rebar_erlc_compiler,'-update_erlcinfo_fun/2-fun-0-',4,
                      [{file,"/home/tristan/Devel/rebar3/_build/prod/lib/rebar/src/rebar_erlc_compiler.erl"},
                       {line,463}]},
 {lists,foldl,3,[{file,"lists.erl"},{line,1263}]},
 {rebar_erlc_compiler,init_erlcinfo,4,
                      [{file,"/home/tristan/Devel/rebar3/_build/prod/lib/rebar/src/rebar_erlc_compiler.erl"},
                       {line,411}]},
 {rebar_erlc_compiler,compile_dirs,5,
                      [{file,"/home/tristan/Devel/rebar3/_build/prod/lib/rebar/src/rebar_erlc_compiler.erl"},
                       {line,195}]}]

Questions:

  1. Why it is doing something in 'home/tristan/Devel/rebar3' path? because I have only 1 path similar to it i.e 'home/ricky/...'
  2. I have even installed rebar from

$ sudo apt-get install rebar

$ rebar -V

rebar 2.6.4 19 20161102_054252 No VCS info available.

but same error 3. I have tried with lower version of erlang i.e 20 after removing the latest but still no help.

Please suggest something

Shubham1164
  • 357
  • 6
  • 16
  • You don't need install rebar with apt; you are using bundled rebar3 and installed rebar2 by apt has nothing to do with it. I have three erlang versions in my system and compile succeeds with both 20 and 19. Have you cleaned build (`./rebar3 clean`) before downgrading to erlang 20? – reith Aug 10 '18 at 17:05

1 Answers1

0
$ ./rebar3 clean

worked like a charm. Thanks to Reith in this comment.

Pang
  • 9,564
  • 146
  • 81
  • 122
Shubham1164
  • 357
  • 6
  • 16