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

时光毁灭记忆、已成空白 提交于 2019-12-25 02:37:05

问题


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?


回答1:


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?




回答2:


just add follow line to reltool.config file.

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



来源:https://stackoverflow.com/questions/22632470/erlang-rebar-fixing-potentially-included-by-two-different-application-erro

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!