adamvduke / mod_interact

A module to forward certain ejabberd notifications to an arbitrary url
89 stars 30 forks source link

Swtich from xml to fast_xml #13

Open rastkojokic opened 8 years ago

rastkojokic commented 8 years ago

Switching from xml to fast_xml...

About 20 days ago ejabberd switched from xml to fast_xml. Using mode_interact with newest ejabberd version will cause it to fail during runtime.

navjeetc commented 8 years ago

This really helped me to get the module working with ejabberd 16.x. Thanks

rastkojokic commented 8 years ago

Glad it helped!

srijan02420 commented 8 years ago

Hey,

@rastkojokic @navjeetc can you please help me I am not able run build.sh correctly for 16.02.

for following build.sh erl -pa . -pz ebin -make

it gives following error

Recompile: src/mod_offline_post
src/mod_offline_post.erl: undefined parse transform 'lager_transform'

and for following build.sh

#!/bin/bash

# change with the erlc path of your current ejabberd installation
: ${EJBR_PATH:='/home/ubuntu/ejabberd-16.02'}
: ${EJBR_VERSION:='16.02'}

$EJBR_PATH/bin/erlc -DLAGER -DNO_EXT_LIB -I $EJBR_PATH/lib/ejabberd-$EJBR_VERSION/include/ -o ebin/ src/mod_offline_post.erl

its giving this error:

/home/ubuntu/ejabberd-16.02/lib/ejabberd-16.02/include/jlib.hrl:23: can't find include file "fxml.hrl"
/home/ubuntu/ejabberd-16.02/lib/ejabberd-16.02/include/jlib.hrl:430: record xmlel undefined
/home/ubuntu/ejabberd-16.02/lib/ejabberd-16.02/include/jlib.hrl:470: type xmlel() undefined

Please help.

navjeetc commented 8 years ago

The way I did was to get ejabberd source code from https://github.com/processone/ejabberd.

Cloned https://github.com/adamvduke/mod_interact/ into a new folder

Copied erlang files from mod_interact/src folder to src folder under ejabberd source code and then ran

./configure, make and make install

This will compile the erlang files and add the binaries to ejabberd installation.

After that updated ejabberd.yml based on instructions in mod_interact/readme and you should be good to go.

Hope this helps.

-Navjeet

Navjeet

On Tue, Mar 29, 2016 at 11:12 AM, Srijan Gupta notifications@github.com wrote:

Hey,

@rastkojokic https://github.com/rastkojokic @navjeetc https://github.com/navjeetc can you please help me I am not able run build.sh correctly for 16.02.

for following build.sh erl -pa . -pz ebin -make

it gives following error

Recompile: src/mod_offline_post src/mod_offline_post.erl: undefined parse transform 'lager_transform'

and for following build.sh

!/bin/bash

change with the erlc path of your current ejabberd installation

: ${EJBR_PATH:='/home/ubuntu/ejabberd-16.02'} : ${EJBR_VERSION:='16.02'}

$EJBR_PATH/bin/erlc -DLAGER -DNO_EXT_LIB -I $EJBR_PATH/lib/ejabberd-$EJBR_VERSION/include/ -o ebin/ src/mod_offline_post.erl

its giving this error:

/home/ubuntu/ejabberd-16.02/lib/ejabberd-16.02/include/jlib.hrl:23: can't find include file "fxml.hrl" /home/ubuntu/ejabberd-16.02/lib/ejabberd-16.02/include/jlib.hrl:430: record xmlel undefined /home/ubuntu/ejabberd-16.02/lib/ejabberd-16.02/include/jlib.hrl:470: type xmlel() undefined

Please help.

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/adamvduke/mod_interact/pull/13#issuecomment-202947048

rastkojokic commented 8 years ago

@srijan02420 I did the exact same actions as @navjeetc