application startup

Serge Aleynikov <>
Mon Aug 22 13:38:42 CEST 2005


Uffe,

Over the weekend, I briefly tried to experiment with the builder app by 
taking your 'dist' application from the "How-to" section of 
trapexit.org, and trying to creage a distibution package.  I had very 
little luck on getting a clean built.  On the other hand the build 
process using target_system.erl worked well.  It must be that some 
options weren't set correctly, but the errors are not very descriptive.

The root of the 'dist' app is /home/serge/tmp/distr-erl/.  The release 
file looks like this (note I added mnesia app because I wanted that to 
be included in the build):

{release, {"Example","1.0"}, {erts,"5.4.8"},
  [{kernel,"2.10.9"},
   {stdlib,"1.13.8"},
   {sasl, "2.0.1"},
   {mnesia, "4.2.2", load},
   {dist,"1.0"}]}.

1> builder:go([{app_dir, 
"/home/serge/tmp/distr-erl/lib/dist-1.0"},{report, verbose},{out_dir, 
"/home/serge/tmp/distr-erl/releases/1.0"},{path, 
["/usr/local/lib/erlang/lib/*/ebin","/home/serge/tmp/distr-erl/lib/*/ebin"]},{make_app,false},{make_rel,false}]). 
     pushed 1st report level verbose(2)
redefined report level verbose(2)

=ERROR REPORT==== 22-Aug-2005::07:35:10 ===
Error in process <0.30.0> with exit value: 
{{case_clause,[{"2.10.9",[]}]},[{builder,later_vsn,2},{builder,maybe_save_app,6},{builder,expand_path,4},{builder,expand_path,4},{builder,search_apps,4},{builder,'-go/1-fun-14-',1},{lists,foldl,3},{builder,go,1}]}

** exited: {{case_clause,[{"2.10.9",[]}]},
             [{builder,later_vsn,2},
              {builder,maybe_save_app,6},
              {builder,expand_path,4},
              {builder,expand_path,4},
              {builder,search_apps,4},
              {builder,'-go/1-fun-14-',1},
              {lists,foldl,3},
              {builder,go,1}]} **

Then I created an example.rel.src file and tried again:

{release, {"Example","1.0"},
  [kernel, stdlib, sasl, mnesia, dist]}.

2> builder:go([{app_dir, 
"/home/serge/tmp/distr-erl/lib/dist-1.0"},{report, verbose},{out_dir, 
"/home/serge/tmp/distr-erl/releases/1.0"},{path, 
["/usr/local/lib/erlang/lib/*/ebin","/home/serge/tmp/distr-erl/lib/*/ebin"]},{make_app,false},{make_rel,true},{rel_file, 
"/home/serge/tmp/distr-erl/releases/1.0/example.rel.src"}]).
pushed 1st report level verbose(2)
redefined report level verbose(2)

=ERROR REPORT==== 21-Aug-2005::08:35:46 ===
Error in process <0.91.0> with exit value: 
{undef,[{dict,store,[make_rel,false]},{lists,foldl,3},{builder,post_process_options,1},{lists,foldl,3},{builder,go,1},{erl_eval,do_apply,5},{shell,exprs,6},{shell,eval_loop,3}]}

** exited: {undef,[{dict,store,[make_rel,false]},
                    {lists,foldl,3},
                    {builder,post_process_options,1},
                    {lists,foldl,3},
                    {builder,go,1},
                    {erl_eval,do_apply,5},
                    {shell,exprs,6},
                    {shell,eval_loop,3}]} **
11> builder:go([{app_dir, 
"/home/serge/tmp/distr-erl/lib/dist-1.0"},{report, verbose},{out_dir, 
"/home/serge/tmp/distr-erl/releases/1.0"},{path, 
["/usr/local/lib/erlang/lib/*/ebin","/home/serge/tmp/distr-erl/lib/*/ebin"]},{make_app,false},{make_rel,true},{rel_file, 
"/home/serge/tmp/distr-erl/releases/1.0/example.rel.src"}]).

At this point I gave up because I had to take my daugter to a swimming pool.

My humble suggestion would be that instead of replying to my email you 
would expand the help (or write a small tutorial) on how to make use of 
the 'builder' tool.

 > ... To achieve the ease of use part, a tutorial
 > is badly needed. It's not that obvious how to get
 > started with it.

Regards,

Serge

Ulf Wiger wrote:
> Den 2005-08-19 19:24:45 skrev Serge Aleynikov <>:
> 
>> Uffe,
>>
>> Is the 'builder' contrib supposed to be a complete replacement of  
>> target_system.erl documented below?
>>
>> http://erlang.se/doc/doc-5.4.8/doc/system_principles/part_frame.html
> 
> 
> Builder tries to conform to the OTP system principles
> as much as possible, so it's more of an attempt to
> automate the process -- not replace it.
> 
> Builder essentially tries to combine the following ideas:
> 
> - automate some of the error-prone steps, like
>   getting the version numbers and the module list right.
> 
> - explore the idea of incrementally building the
>   system: for each application, you can generate boot
>   scripts that let you start a full system up to and
>   including the application you're working on. Once
>   you get to the final application, you are building
>   the whole system.
> 
> - if you usually want to build your scripts using the
>   latest available applications, this should not be
>   tedious and difficult. Builder will find out which
>   are the latest versions, as long as it gets the
>   application names and search paths. If you want to
>   be specific about versions, you can do that too.
> 
> - try to achieve modularity in that once you've
>   specified build options for one application, they
>   can be reused (or optionally overridden) when adding
>   another. To some extent, OTP does this already, but
>   builder adds support for handling environment
>   variables this way.
> 
> Essentially, ease of use for the beginner, and speed
> and convenience for the power user were the modest
> goals. To achieve the ease of use part, a tutorial
> is badly needed. It's not that obvious how to get
> started with it.
> 
> /Uffe




More information about the erlang-questions mailing list