0
votes

I have built a ejabberd module in intelliJ using rebar to compile and I am getting the error "undefined parse transform 'lager_transform'"

rebar.config:

{erl_opts, [nowarn_deprecated_function,
{d, 'LAGER', true},
{d, 'NO_EXT_LIB'},
{i, ["c:/Program Files/ejabberd-15.11/bin"]},
{i, ["c:/Program Files/ejabberd-15.11/lib/ejabberd-15.11/include"]}]}.

I added these lines to the config file after checking responses on this site:

{deps, [{lager, ".", {git, "https://github.com/basho/lager", {tag, "3.0.2"}}},
{p1_utils, ".", {git, "https://github.com/processone/p1_utils", {tag, "1.0.3"}}},

I then proceed to try "rebar get-deps" but this fail with:

Pulling lager from {git,"https://github.com/basho/lager",{tag,"3.0.2"}}
ERROR: Rebar requires version {1,5} or higher of git to process {git,
"https://github.com/basho/lager",{tag,"3.0.2"}}
ERROR: 'get-deps' failed while processing C:/devxmpp/testMe: rebar_abort

So I proceed and downloaded git 2.7.x and still the same error. It is not seeing the new version.

Regards, Will

1

1 Answers

0
votes

This is a duplicate of this question: ejabberd and Erlang installation with lager_transform undefined

You need to compile ejabberd as described in ejabberd documentation, with configure and make. rebar alone is not enough to set some initial define values for macro and will result in some part of the code being incorrectly defined / compiled.