processone / ejabberd-contrib

Growing and curated ejabberd contributions repository - PR or ask to join !
http://ejabberd.im
250 stars 140 forks source link

can't build mod_muc_log_http with ejabberd 17.07 and Erlang 20 #221

Closed debalance closed 7 years ago

debalance commented 7 years ago

Trying to update ejabberd-contrib in Debian (https://tracker.debian.org/pkg/ejabberd-contrib) fails with:

mkdir mod_muc_log_http/ebin cd mod_muc_log_http/ && erlc -o ebin -I /usr/lib/x86_64-linux-gnu/ejabberd-17.07/include -DLAGER \ -pa /usr/lib/x86_64-linux-gnu/ejabberd-17.07/ebin/ src/*.erl /usr/lib/x86_64-linux-gnu/ejabberd-17.07/include/mod_muc_room.hrl:95: type message() undefined /usr/lib/x86_64-linux-gnu/ejabberd-17.07/include/mod_muc_room.hrl:96: type presence() undefined src/mod_muc_log_http.erl:11: Warning: undefined callback function depends/2 (behaviour 'gen_mod') src/mod_muc_log_http.erl:11: Warning: undefined callback function mod_opt_type/1 (behaviour 'gen_mod') src/mod_muc_log_http.erl:99: Warning: gen_fsm:sync_send_all_state_event/2 is deprecated and will be removed in a future release; use gen_statem:call/2 debian/rules:28: recipe for target 'compile-ejabberd-mod-muc-log-http' failed make[1]: *** [compile-ejabberd-mod-muc-log-http] Error 1`

badlop commented 7 years ago

It is unrelated to Erlang 20, as it also fails fo me with Erlang R18:

$ ejabberdctl module_install mod_muc_log_http
/usr/local/lib/ejabberd-17.07.9/include/mod_muc_room.hrl:95: type message() undefined
/usr/local/lib/ejabberd-17.07.9/include/mod_muc_room.hrl:96: type presence() undefined
/home/bernar/.ejabberd-modules/sources/
 ejabberd-contrib/mod_muc_log_http/src/mod_muc_log_http.erl:11:
 Warning: undefined callback function depends/2 (behaviour 'gen_mod')
/home/bernar/.ejabberd-modules/sources/
 ejabberd-contrib/mod_muc_log_http/src/mod_muc_log_http.erl:11:
 Warning: undefined callback function mod_opt_type/1 (behaviour 'gen_mod')
Error: {compilation_failed,"/home/bernar/.ejabberd-modules/sources/
 ejabberd-contrib/mod_muc_log_http/src/mod_muc_log_http.erl"}
badlop commented 7 years ago

There were three problems in this module, that I've fixed in a recent git commit:

debalance commented 7 years ago

That fixes it, thx!