processone / xmpp

Erlang/Elixir XMPP parsing and serialization library on top of Fast XML

Home Page:http://process-one.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ejabberd source compile throws deps/xmpp/include/xmpp.hrl:28: can't find include file "fxml.hrl"

cmeng-git opened this issue · comments

Development environment:
Ubuntu 20.04
Erlang (SMP,ASYNC_THREADS) (BEAM) emulator version 10.6.4

Using the source check out from the master (21.01), throws

 deps/xmpp/include/xmpp.hrl:28: can't find include file "fxml.hrl" 

when doing make process.

The xmpp.hrl does include with the file and can be found in the defined directory.

-include_lib("fast_xml/include/fxml.hrl").

For it to compile without error, I need to change the statement to

-include_lib("../../fast_xml/include/fxml.hrl").

I don't get that problem when trying with ejabberd 21.01 source code.

Try something like this:

rm -rf deps/xmpp
rm deps/.build
rm deps/.got
make
...
==> xmpp (compile)
Compiled asn1/XmppAddr.asn1
Compiled src/xmpp_socket.erl
Compiled src/xmpp_sasl.erl
Compiled src/xep0352.erl
Compiled src/scram.erl
Compiled src/xep0363.erl
Compiled src/pubsub_meta_data.erl
Compiled src/xep0184.erl
Compiled src/xep0092.erl
Compiled src/xep0313.erl
Compiled src/xep0359.erl
Compiled src/muc_request.erl
...

Thanks, the problem does not happen anymore.

Previously I was using the following steps to build and install;
• $ make clean // This will force the build to update all deps library if any
• $ ./rebar get-deps (ensure that chmod +x ./rebar has been performed before using rebar command)
• $ make update (update deps sources for compilation – if there are new added deps). May not be necessary if make clean process has been performed.
• $ make all –jx (make all including deps and and x is the number of cpu processors/core)
• $ checkinstal

I tried the same steps again, this time it did not gave any problem. Not sure what went wrong previously.

Thanks, the problem does not happen anymore.

Great!

BTW:

make all –jx (make all including deps and and x is the number of cpu processors/core)

I don't see any time improvement when using the -j argument. In my tests, both CPU cores are used even when not supplying that argument. So, compiling ejabberd takes 75 seconds equally, and compiling all deps+ejabberd takes 12 minutes. I use ejabberd 21.01, Erlang 23.2, rebar3.

It would be nice if you can compare "make" with "make -j" in your system, and comment here if you see any improvement.

It will not improve time, as all that makefile does is call rebar, there is no parallel steps that this could improve. But i must say 12 minutes seems to be a pretty long, or do you count 'make test' in this? It takes around 2 minutes from clean state and that's not particulary fast computer.

Well, it is 12 minutes with --enable-all, and most time is consumed compiling elixir. With all enabled except elixir, it's just 4 minutes :)

Ah, yeah i didn't build with elixir.