mod_interact icon indicating copy to clipboard operation
mod_interact copied to clipboard

mod_interact compile Error in ejabberd 14.12

Open pratik1230 opened this issue 10 years ago • 9 comments

Hi,

this module worked proper in ejabberd 13.12

Today i installed ejabberd 14.12 and tried to compile this module and i got following error

/opt/ejabberd-14.12/lib/ejabberd-14.12/include/jlib.hrl:22: can't find include lib "p1_xml/include/xml.hrl" /opt/ejabberd-14.12/lib/ejabberd-14.12/include/jlib.hrl:426: record xmlel undefined /opt/ejabberd-14.12/lib/ejabberd-14.12/include/jlib.hrl:466: type xmlel() undefined

i installed ejabberd 14.12 in ubuntu using .run file.

I found some solution from some forums they said regarding this error

at the source run ./rebar get-deps and ./rebar compile and then i copied the deps to the include folder.

but i did not found any rebar file in your module or in my ejabberd directory

pratik1230 avatar Dec 31 '14 07:12 pratik1230

check my pull request #10 , you have only to set a constant which is looked by jlib.hrl. let me know if it works for you.

emilianobonassi avatar Jun 25 '15 18:06 emilianobonassi

I get no error at all with pull request #10 . This is the ouput:

Recompile: src/mod_offline_post Recompile: src/mod_available_post Recompile: src/mod_unavailable_post

But I can't find the beam files in ebin/ Any idea why?

nunohorta avatar Aug 03 '15 11:08 nunohorta

@nunohorta , thanks for the e-mail. I've just re-corrected the build script again. It seems that erl compiles files but it doesn't produce any output. I tried with a different Emakefile but none of my trials worked. For this reason, I've eliminated Emakefile and put the compilation command in the build.sh. Check out my last pull request update. You have only to adapt it, setting two variables. Anyway it is briefly explained in the README. Let me know if you will build the modules with success.

PS: I have to admit that when I corrected the Emakefile, I used the compilation command I wrote in the build.sh and translated it in a "Emakefile" form without testing correctly. I am sorry for that.

emilianobonassi avatar Aug 03 '15 14:08 emilianobonassi

no problem! It's working fine now! thank you very much

nunohorta avatar Aug 07 '15 11:08 nunohorta

I changed build.sh to

#!/bin/bash

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

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

But still getting this error:

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

Please help.

srijan02420 avatar Mar 29 '16 13:03 srijan02420

@srijan02420, may you confirm that xml.hrl exists in the include folder pointed by the script?

emilianobonassi avatar May 04 '16 11:05 emilianobonassi

@emilianobonassi no I still couldn't find it.

srijan02420 avatar May 04 '16 11:05 srijan02420

@srijan02420, I am sorry.

I am not using 16.01 , may be someone other is using it and can help you. Anyway I offer professional services for things like that (I am a freelancer), if you need we can organise out of github. In that case, send me a private message.

Good luck!

emilianobonassi avatar May 06 '16 11:05 emilianobonassi

@srijan02420 simply copy fxmal.hrl file and put it into the ejabberd/include folder

bhavikdesai94 avatar Jun 10 '16 11:06 bhavikdesai94