Reputation: 4546
I have downloaded ejabberd and even done a :
sudo port install ejabberd
After this, I am trying to install the ejabberd-websocket module from here : https://github.com/superfeedr/ejabberd-websockets
However, try as I might I am not able to install it by issuing :
./build.sh
This is the error that I am getting :
Recompile: src/mod_websocket
src/mod_websocket.erl:22: can't find include file "ejabberd.hrl"
src/mod_websocket.erl:23: can't find include file "jlib.hrl"
src/mod_websocket.erl:36: undefined macro 'DEBUG/2'
src/mod_websocket.erl:16: function process/2 undefined
src/mod_websocket.erl:14: Warning: behaviour gen_mod undefined
src/mod_websocket.erl:95: Warning: function validate_origin/1 is unused
src/mod_websocket.erl:171: Warning: function build_stream_end/0 is unused
I even have erlang as I installed it via macports. However, I am not able to install the module. I am using Mac OSX Mountain Lion.
Any help would be great.
Upvotes: 2
Views: 1022
Reputation: 1124
I can help you get around some of your issues. At least in my case, ejabber installed into a different location than this project expects. If you open Emakefile
you will see it tries to include /usr/lib/ejabber/include, but in my case I had to remove the /usr part so it is just /lib/ejabberd/include. It may not be exactly the same in your case, but you just need to find your ejabber installation and make sure those directory paths match.
My Emakefile for reference
{'src/mod_websocket', [{outdir, "ebin"},{i,"/lib/ejabberd/include"},{i,"/lib/ejabberd/include/web","src"}]}.
{'src/ejabberd_xmpp_websocket', [{outdir, "ebin"},{i,"/lib/ejabberd/include"},{i,"/lib/ejabberd/include/web","src"}]}.
{'src/ejabberd_websocket', [{outdir, "ebin"},{i,"/lib/ejabberd/include"},{i,"/lib/ejabberd/include/web","src"}]}.
I also had to modify the build.sh script, but I don't think it solved any of my problems
#!/bin/sh
erl -pa /lib/ejabberd /lib/ejabberd/include /lib/ejabberd/ebin -pz ebin -make
Upvotes: 1