【问题标题】:I got the error: 'EXIT',{undef,[{compile,forms, ... when start the application generated by rebar3 release我收到错误:'EXIT',{undef,[{compile,forms, ... 启动 rebar3 版本生成的应用程序时
【发布时间】:2016-11-27 01:19:30
【问题描述】:

通过erlang shell -erl启动应用可以正常运行,但是报错:

{"Kernel pid terminated",application_controller,"
{application_start_failure,gateway,{bad_return,{{gateway_app,start,[normal,[]]},
{'EXIT',{undef,[{compile,forms, ...

从 _build/default/rel/xmxx/bin/xmxx 开始时。

rebar.config 是

{erl_opts, 
    [debug_info,
        {i, "include"},
        {outdir, "./ebin"},
        {src_dirs, ["src", "../../src"]}]}.
{deps, []}.

{relx, [{release, {xmxx, "0.0.1"}, [gateway, kernel, stdlib, sasl]},

    {sys_config, "./config/sys.config"},
    {vm_args, "./config/vm.args"},

    {dev_mode, true},
    {include_erts, false},
    {extended_start_script, true}]
}.

{profiles, 
    [{prod, 
        [{relx, [
            {dev_mode, false},
            {include_erts, true},
            {include_src, false}]
        }]
    }]
}.

gateway.app.src 是

{application, gateway, [
    {description, "This is server gateway."},
    {vsn, "0.0.1"},
    {registered, [gateway_sup]},
    {mod, {gateway_app, []}},
    {applications, [kernel, crypto, stdlib, sasl]},
    {env,[]},
    {modules, [xmxx_run]},
    {maintainers, []},
    {licenses, []},
    {links, []}
]}.

任何帮助将不胜感激!

【问题讨论】:

    标签: erlang rebar3


    【解决方案1】:

    它抱怨 compile:forms 未定义,可能是因为 compile 位于您未包含的 compiler 应用程序中。

    【讨论】:

    • 感谢您的回复!估计是这个问题,但是不知道怎么通过rebar3包含编译器应用?
    • 非常感谢 - 我输入了错误的单词 compiler 来编译 - 现在它可以工作了!真的非常感谢!
    猜你喜欢
    • 2019-08-04
    • 1970-01-01
    • 2016-12-26
    • 2012-12-16
    • 1970-01-01
    • 2021-08-19
    • 1970-01-01
    • 2020-08-22
    • 1970-01-01
    相关资源
    最近更新 更多