Ejabberd as a mix dependency in a Phoenix project - anyone been able to compile it with mix?

Hi guys,

Have anyone been able to compile ejabberd with mix? If you could share which are the versions (elixir, erlang, ejabberd) that you found stable, it would be great.

I’m trying to setup a phoenix project, according to this docs https://blog.process-one.net/embedding-ejabberd-into-an-elixir-phoenix-web-application/ , but still unable to make it work.

Elixir 1.0.5
Erlang R18+

The logs are:

==> ejabberd
Compiling 26 files (.erl)
src/ejabberd_piefxis.erl:280: field sub_els undefined in record private
src/ejabberd_piefxis.erl:279: Warning: variable 'Els' is unused
src/mod_muc_room.erl:4134: field sub_els undefined in record ps_item
src/mod_muc_room.erl:4177: field sub_els undefined in record ps_item
src/mod_muc_room.erl:4118: Warning: variable 'Payload' is unused
src/mod_muc_room.erl:4170: Warning: variable 'El' is unused
src/mod_admin_extra.erl:1465: field sub_els undefined in record private
src/mod_admin_extra.erl:1463: Warning: variable 'Els' is unused
src/mod_delegation.erl:243: field sub_els undefined in record forwarded
src/mod_delegation.erl:263: field sub_els undefined in record forwarded
src/mod_delegation.erl:265: variable 'SubEl' is unbound
src/mod_mam.erl:948: field sub_els undefined in record forwarded
src/mod_mam.erl:945: Warning: variable 'Pkt3' is unused
src/mod_mam_sql.erl:29: Warning: behaviour mod_mam undefined
src/mod_pubsub.erl:1110: field sub_els undefined in record ps_item
src/mod_pubsub.erl:1115: variable 'ItemId' is unbound
src/mod_pubsub.erl:1116: variable 'Payload' is unbound
src/mod_pubsub.erl:2656: field sub_els undefined in record ps_item
src/mod_pubsub.erl:3740: field sub_els undefined in record ps_item
src/mod_pubsub.erl:2652: Warning: variable 'Payload' is unused
src/mod_pubsub.erl:3741: Warning: variable 'Payload' is unused
src/mod_carboncopy.erl:242: field sub_els undefined in record forwarded
src/mod_carboncopy.erl:241: Warning: variable 'JID' is unused
src/mod_carboncopy.erl:241: Warning: variable 'Msg' is unused
src/mod_carboncopy.erl:270: Warning: function complete_packet/3 is unused
src/mod_carboncopy_sql.erl:24: Warning: behaviour mod_carboncopy undefined
src/mod_muc_sql.erl:30: Warning: behaviour mod_muc_room undefined
src/mod_private.erl:86: field sub_els undefined in record private
src/mod_private.erl:87: variable 'Els0' is unbound
src/mod_private.erl:107: field sub_els undefined in record private
src/mod_private.erl:106: Warning: variable 'Els' is unused
src/mod_service_log.erl:75: field sub_els undefined in record forwarded
src/mod_service_log.erl:70: Warning: variable 'Packet' is unused
src/mod_privilege.erl:281: field sub_els undefined in record forwarded
src/mod_privilege.erl:282: variable 'SubEl' is unbound
src/mod_push.erl:439: field sub_els undefined in record ps_item
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"

Do you get the same errors by going to deps/ejabberd and compiling it manually? If so it’s a bug on their side and needs to be reported I’d bet. If not I’d bet a path is being set assuming a certain root or so…