Erlang (rebar?): fixing "potentially included by two different application" errors

StackOverflow https://stackoverflow.com/questions/22632470

  •  20-06-2023
  •  | 
  •  

Question

So I need to build riak from git snapshot, (note: there's also a recent official snapshot sharing same problem).

During build, following happens:

Generating dev1 - node='dev1@127.0.0.1' yzsolrjmx=10013 yzsolr=10014 pbc=10017 http=10018 handoff=10019
(cd rel && ../rebar generate target_dir=../dev/dev1 overlay_vars=vars/dev1_vars.config)
==> rel (generate)
ERROR: generate failed while processing /tmp/riak/rel: {'EXIT',{{badmatch,{error,"Module mochijson2 potentially included by two different applications: mochiweb and rabbit."}},

It looks like a classic "from where to inherit" problem, and I don't think that excluding either module completely from distribution will help (although, if it does - I'm going to expunge rabbit support if it stays for RMQ).


However, it's even more strange: grep for rabbit shows no source tree points, where it can nbe removed. WTF?

Was it helpful?

Solution

This is a common problem when reltool finds two applications share the same module.

Do you have rabbit somewhere around /tmp/rabbit or maybe it's installed in ERL_LIBS?

OTHER TIPS

just add follow line to reltool.config file.

{app, mochiweb, [{incl_cond, exclude}]},

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top