【问题标题】:Cannot compile ejabberd when checked out from Git repository从 Git 存储库签出时无法编译 ejabberd
【发布时间】:2016-05-12 01:54:06
【问题描述】:

我在 intelliJ 中构建了一个 ejabberd 模块,使用 rebar 进行编译,我收到错误“未定义的解析转换 '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"]}]}.

我在查看此站点上的响应后将这些行添加到配置文件中:

{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"}}},

然后我继续尝试“rebar get-deps”,但这失败了:

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

所以我继续并下载了 git 2.7.x,但仍然是同样的错误。它没有看到新版本。

问候, 会

【问题讨论】:

标签: git erlang ejabberd rebar


【解决方案1】:

这是这个问题的重复:ejabberd and Erlang installation with lager_transform undefined

您需要按照ejabberd documentation 中的说明使用configure 和make 编译ejabberd。仅 rebar 不足以为宏设置一些初始定义值,并且会导致某些部分代码被错误定义/编译。

【讨论】:

  • 抱歉重复了,但我没有看到那个。那是在我之前几个小时添加的。为什么当我像这样使用 erlc 时它可以工作 C:\Program Files\ejabberd-15.11\bin>erlc -v -DLAGER=true -DNO_EXT_LIB -I "c:/Program Files/ejabberd-15.11/lib/ejabberd-15.11/include " -o C:\devxmpp\prototype\mod_http_offline\src\ C:\devxmpp\prototype\mod_http_offline\src\mod_http_offline.erl
  • 为什么不使用 configure 和 makefile ?这就是它的用途。将您的模块与其他 ejabberd 源文件放在一起,并按照记录的方式构建 ejabberd。
  • 我会在我的 windows box 上试试这个,然后告诉你。
  • 我什至不确定你是否可以在 Windows 上构建 ejabberd,因为有本地 C 代码。您应该使用适用于 Windows 的 ProcessOne 安装程序:process-one.net/en/ejabberd/downloads。然后,如果您想从 ejabberd-contribs 或本地代码安装 contrib 模块,您可以使用ejabberdctl module_install,如下所示:blog.process-one.net/…
  • 我只是想找到一些为 Windows 设置编译工具的要求……我现在对在 unix 上开发不感兴趣。我将使用 FreeBSD 进行服务器活动,但不用于开发......我仍在尝试。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-09-16
  • 2013-09-22
  • 1970-01-01
  • 1970-01-01
  • 2023-03-22
相关资源
最近更新 更多