0
votes

I just want use rebar generate the release, but it not works for me :

I am following the steps in :

https://github.com/rebar/rebar/wiki/Release-handling

─$ rebar generate                                                          1 ↵
==> rel (generate)
ERROR: generate failed while processing /home/chinaxing/ssd/Code/erlang/apps/reijie_probe_message_mocker/rel: {'EXIT',
    {undef,
        [{reltool,start_server,
             [[{sys,
                   [{lib_dirs,[]},
                    {erts,[{mod_cond,derived},{app_file,strip}]},
                    {app_file,strip},
                    {rel,"reijie_node","1",[kernel,stdlib,sasl,reijie_node]},
                    {rel,"start_clean",[],[kernel,stdlib]},
                    {boot_rel,"reijie_node"},
                    {profile,embedded},
                    {incl_cond,derived},
                    {excl_archive_filters,[".*"]},
                    {excl_sys_filters,
                        ["^bin/(?!start_clean.boot)",
                         "^erts.*/bin/(dialyzer|typer)",
                         "^erts.*/(doc|info|include|lib|man|src)"]},
                    {excl_app_filters,[".gitignore"]},
                    {app,reijie_node,
                        [{mod_cond,app},
                         {incl_cond,include},
                         {lib_dirs,".."}]}]}]],
             []},
         {rebar_reltool,generate,2,[{file,"src/rebar_reltool.erl"},{line,53}]},
         {rebar_core,run_modules,4,[{file,"src/rebar_core.erl"},{line,491}]},
         {rebar_core,execute,6,[{file,"src/rebar_core.erl"},{line,416}]},
         {rebar_core,maybe_execute,8,[{file,"src/rebar_core.erl"},{line,300}]},
         {rebar_core,process_dir1,7,[{file,"src/rebar_core.erl"},{line,259}]},
         {rebar_core,process_commands,2,
             [{file,"src/rebar_core.erl"},{line,91}]},
         {rebar,main,1,[{file,"src/rebar.erl"},{line,58}]}]}}

directory layout is :

╭─chinaxing@chinaxing  ~/Code/erlang/apps/reijie_probe_message_mocker  
╰─$ tree -L 2
.
├── deps
│   ├── goldrush
│   ├── lager
│   └── udp_broker
├── ebin
│   ├── message_mocker.app
│   ├── message_mocker_app.beam
│   ├── message_mocker.beam
│   └── message_mocker_sup.beam
├── rebar.config
├── rel
│   ├── files
│   └── reltool.config
└── src
    ├── message_mocker_app.erl
    ├── message_mocker.app.src
    ├── message_mocker.erl
    └── message_mocker_sup.erl

8 directories, 10 files
╭─chinaxing@chinaxing  ~/Code/erlang/apps/reijie_probe_message_mocker  
╰─$ 

rebar version :

╰─$ rebar --version                                                         1 ↵
rebar 2.5.1 R16B03 20150115_160515 git 2.5.1-102-g25aca7e

erlang version :

╰─$ erl -V 
Erlang R16B03 (erts-5.10.4) [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]
1
If you run erl to start a shell, and then in the Erlang shell execute m(reltool)., do you see the details of the reltool module? Also, how did you create your reltool.config file?Steve Vinoski
** exception error: undefined function reltool:module_info/0 in function c:m/1 (c.erl, line 503)Chinaxing
That error likely means that reltool isn't even installed in your Erlang installation. Unless you really need Erlang version R16B03, I recommend grabbing the latest version, which is currently 17.4, from here, installing it, rebuilding rebar with it, and trying again.Steve Vinoski

1 Answers

0
votes

Try to install erlang-reltool, this should help:

$ sudo apt-get update
$ sudo apt-get install erlang-reltool