Reputation: 451
I am new to Erlang, I have been trying to install Erlang and ejabberd on EC2 ubuntu machine, everything went well till I started compiling some external modules in ejabberd
. It started throwing error undefined parse transform 'lager_transform'
.
I tried everything which is as below:
get-deps
, make clean
, make deps
, make install
. After this I am able to see that lager_transform.beam is made and present in /lib/
folder.-compile[{parse_tranform},{lager_transform}]
on top of module, even then their is no luck.I am really blocked on this, and not able to complete the installation. I have done this before on fedora with ejabberd 15.11 and otp 18.2, at that time it was using p1_logger
instead of lager. But now when I am installing fresh with otp 18.2 and ejabberd 16.0 or 15.11, I am getting lager_transform undefined error
.
Upvotes: 3
Views: 562
Reputation: 1
Navigate to your ejabberd project directory cd /path/to/ejabberd
Fetch dependencies rebar get-deps
Compile the project with verbose output rebar compile -v
If issues persist, perform a clean build make clean make deps make
Verify that the lager_transform.beam is in the expected directory find _build/default/lib/lager/ebin -name "lager_transform.beam"
Set Erlang library path export ERL_LIBS=/path/to/ejabberd/_build/default/lib
Compile again to see if the issue is resolved rebar compile -v
Upvotes: 0
Reputation: 9055
Please make sure you compile ejabberd as described in documentation: http://docs.ejabberd.im/admin/guide/installation/#installing-ejabberd-from-source-code
For example, you can compile it with:
./configure --enable-lager --enable-mysql
make
You need to run configure and make to set properly the build chain.
Upvotes: 2