processone / ejabberd-contrib

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

ejabberd 18.04 mod_pottymouth call to undefined function bitarray:new #249

Closed gpstash closed 6 years ago

gpstash commented 6 years ago

Hi,

I want to install mod_pottymouth module but got this error 2018-06-12 08:32:12.503 [error] <0.346.0>@bitarray:new CRASH REPORT Process <0.346.0> with 0 neighbours exited with reason: call to undefined function bitarray:new(16777216, false) in gen_server:init_it/6 line 352

i already follow to install bitarray module from readme.

mkdir -p $EJABBERD_HOME/erlang-lib/bitarray cd $EJABBERD_HOME/erlang-lib/bitarray clone https://github.com/ferd/bitarray git repo run: /usr/lib/erlang/bin/escript rebar get-deps run: /usr/lib/erlang/bin/escript rebar compile run: /usr/bin/install -c -d /usr/local/lib/bitarray-1.0.0/ebin run: /usr/bin/install -c -d /usr/local/lib/bitarray-1.0.0/priv run: /usr/bin/install -c -m 644 ./ebin/bitarray.app /usr/local/lib/bitarray-1.0.0/ebin/bitarray.app run: /usr/bin/install -c -m 644 ./ebin/bitarray.beam /usr/local/lib/bitarray-1.0.0/ebin/bitarray.beam run: /usr/bin/install -c -m 644 ./priv/bitarray.so /usr/local/lib/bitarray-1.0.0/priv/bitarray.so

anyone know what missing?

Thanks!

badlop commented 6 years ago

I compiled mod_puttymouth, installed, enabled in the config and started ejabberd. Of course, it complained that it lacked etbloom.

In order to compile etbloom, I copied bitarray git repo (once compiled) to etbloom/deps. Then copied all the etbloom to /usr/local/lib, where ejabberd has installed all the other libraries (base64url-0.0.1, cache_tab-1.0.13, eimp-1.0.4, ...).

And I also had to copy to that directory the bitarray dir. So, all the erlang libraries must be in that dir, to allow ejabberd load them.

ytkang commented 6 years ago

@badlop In bitarray/rebar.conf, I've changed proper version to 1.2 and it works

badlop commented 6 years ago

The change you mention was already applied in the bitarray git repo a year ago: https://github.com/madglory/bitarray/commit/f455426f23e7e55a098f50ab20a64c0d384693ee

So, nothing needs to be changed in our ejabberd-contrib repo, and this ticket can be closed, right?

ytkang commented 6 years ago

@badlop I think it is bitarray config issue not mod_pottymouth.