3

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:

  1. Did rebar 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.
  2. Checked rebar.config file, it had lager deps on top, which is widely suggested, no help even after that.
  3. Added -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.

2240
  • 1,547
  • 2
  • 12
  • 30
mohit3081989
  • 441
  • 6
  • 13

1 Answers1

2

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.

Mickaël Rémond
  • 9,035
  • 1
  • 24
  • 44
  • Thanks mickael, I will try with it. It was useful. Somehow missed it. But shouldn't rebar get-deps should take of it ? As it was installing everything ? – mohit3081989 Feb 02 '16 at 16:27
  • 1
    rebar get-deps is not enough. We have values with macros used by the code that do not get properly set if you bypass the standard ejabberd build chain. – Mickaël Rémond Feb 02 '16 at 16:54