Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mod_interact compile Error in ejabberd 14.12 #7

Open
pratik1230 opened this issue Dec 31, 2014 · 9 comments
Open

mod_interact compile Error in ejabberd 14.12 #7

pratik1230 opened this issue Dec 31, 2014 · 9 comments

Comments

@pratik1230
Copy link

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

@emilianobonassi
Copy link

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.

@nunohorta
Copy link

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?

@emilianobonassi
Copy link

@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.

@nunohorta
Copy link

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

@srijan02420
Copy link

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.

@emilianobonassi
Copy link

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

@srijan02420
Copy link

@emilianobonassi no I still couldn't find it.

@emilianobonassi
Copy link

@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!

@bhavikdesai94
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants