[erlang-questions] Need help with systools:make_tar/2

Serge Aleynikov <>
Mon Aug 18 15:07:13 CEST 2008


Can you try running it without escript (just like I showed in my last 
email)?  Probably the problem is that systools is having hard time 
finding simpledb.app or it's modules because "-pa ./ebin" option is missing.

Matt Williamson wrote:
> Hi Serge,
> 
> Thanks for the help. I made the changes, but I am still getting an error.
> 
> Here is my directory structure:
> ~/simpledb
>                   /make.escript
>                   /ebin/simpledb.app
>                   /priv/simpldb.rel
> 
> After applying the changes I get the following escript which I am using to
> compile.
> 
> *#!/usr/bin/env escript
> %% -*- erlang -*-
> %% File: make.escript
> 
> main(_Args) ->
>     make:all(),
>     systools:make_script("./priv/simpledb", [{path, ["ebin"]},
>                          {outdir, "rel"}]),
>     systools:make_tar("./priv/simpledb", [{path, ["ebin"]},
>                       {erts, code:root_dir()},
>                       {outdir, "rel"},
>                       {dirs, [include, doc]}]).*
> 
> 
> The error I get is:
> *{{case_clause,
>      {'EXIT',
>          {function_clause,
>              [{filename,join,[[]]},
>               {systools_make,add_appl,7},
>               {systools_make,'-add_applications/5-fun-0-',6},
>               {lists,foldl,3},
>               {systools_make,add_applications,5},
>               {systools_make,mk_tar,6},
>               {systools_make,mk_tar,5},
>               {systools_make,make_tar,2}]}}},
>  [{systools_make,'-add_applications/5-fun-0-',6},
>   {lists,foldl,3},
>   {systools_make,add_applications,5},
>   {systools_make,mk_tar,6},
>   {systools_make,mk_tar,5},
>   {systools_make,make_tar,2},
>   {erl_eval,do_apply,5},
>   {escript,code_handler,4}]}*
> 
> make_script/1,2 still works great but make_tar is not.
> 
> On Mon, Aug 18, 2008 at 8:31 AM, Serge Aleynikov <> wrote:
> 
>> This is what you need to do:
>>
>> Suppose your app's directory tree is as follows:
>> simpledb/
>> simpledb/ebin/simpledb.app
>> simpledb/priv/simpledb.rel
>>
>> $ cd /path/to/your/simpledb
>> $ erl -pa ./ebin
>> 1> systools:make_tar("./priv/simpledb", [{dirs, [doc,include]}, {erts,
>> code:root_dir()}]).
>>
>> This will create ./priv/simpledb.tar.gz
>>
>> Regarding the WARNINGS - just ignore them.  What they mean is that SASL is
>> finding that the mentioned source files have been modified (i.e. their
>> timestamps changed) after they were compiled into beams.
>>
>> Regards,
>>
>> Serge
>>
>>
>> Matt Williamson wrote:
>>
>>> No problem, I hope someone can help though :)
>>>
>>> I have two projects with the same problem and I have not seen make_tar run
>>> successfully to date.
>>>
>>> On Mon, Aug 18, 2008 at 7:53 AM, Mazen Harake
>>> <>wrote:
>>>
>>>  Sorry all... This is what happens when you read something and answer
>>>> quickly :(
>>>>
>>>> Completly ignore what I just wrote :P
>>>>
>>>> /Mazen
>>>>
>>>> Mazen Harake wrote:
>>>>
>>>>  Hi Mat,
>>>>> Answers inline...
>>>>>
>>>>> Matt Williamson wrote:
>>>>>
>>>>>
>>>>>  Hi there,
>>>>>> I have an OTP app with the following simpledb.rel file:
>>>>>>
>>>>>> /{release, {"simpledb", "1.0"}, {erts, "5.5.5"},
>>>>>>     [{simpledb, "1.0"},
>>>>>>      {kernel, "2.11.5"},
>>>>>>      {stdlib, "1.14.5"}]}./
>>>>>>
>>>>>> And the following simpledb.app file:
>>>>>>
>>>>>> /{application, simpledb,
>>>>>>   [{description, "Stores Key, Value pairs."},
>>>>>>    {id, "simpledb"},
>>>>>>    {vsn, "1.0"},
>>>>>>    {modules, [simpledb_app, simpledb_sup, simpledb_svr]},
>>>>>>    {mod, {simpledb_app, []}},
>>>>>> /
>>>>>>
>>>>>>
>>>>>>  Why do you have an empty list here? mod specifies modules for
>>>>> application
>>>>> simpledb... and empty list ("") is not a valid module name :)
>>>>>
>>>>>
>>>>>  /     {registered, [simpledb_svr]},
>>>>>>    {applications, [kernel, stdlib]}]}./
>>>>>>
>>>>>> When I run `systools:make_tar("simpledb", [{path, ["ebin"]}])` I get
>>>>>> the
>>>>>> following error:
>>>>>>
>>>>>> /{{case_clause,
>>>>>>    {'EXIT',
>>>>>>        {function_clause,
>>>>>>            [{filename,join,[[]]},
>>>>>>             {systools_make,add_appl,7},
>>>>>>             {systools_make,'-add_applications/5-fun-0-',6},
>>>>>>             {lists,foldl,3},
>>>>>>             {systools_make,add_applications,5},
>>>>>>             {systools_make,mk_tar,6},
>>>>>>             {systools_make,mk_tar,5},
>>>>>>             {systools_make,make_tar,2}]}}},
>>>>>>  [{systools_make,'-add_applications/5-fun-0-',6},
>>>>>>  {lists,foldl,3},
>>>>>>  {systools_make,add_applications,5},
>>>>>>  {systools_make,mk_tar,6},
>>>>>>  {systools_make,mk_tar,5},
>>>>>>  {systools_make,make_tar,2},
>>>>>>  {erl_eval,do_apply,5},
>>>>>>  {escript,code_handler,4}]}/
>>>>>>
>>>>>> `systools:make_script("simpledb", [{path, ["ebin"]}])` works fine.
>>>>>>
>>>>>> Also if you know why I get the following junk, it would be forever
>>>>>> thankful:
>>>>>>
>>>>>> /*WARNING* kernel: Object code (application) out of date
>>>>>> *WARNING* kernel: Object code (application_controller) out of date
>>>>>> *WARNING* kernel: Object code (application_master) out of date
>>>>>> *WARNING* kernel: Object code (application_starter) out of date
>>>>>> *WARNING* kernel: Object code (auth) out of date
>>>>>> *WARNING* kernel: Object code (code) out of date
>>>>>> *WARNING* kernel: Object code (code_aux) out of date
>>>>>> *WARNING* kernel: Object code (packages) out of date
>>>>>> *WARNING* kernel: Object code (code_server) out of date
>>>>>> *WARNING* kernel: Object code (dist_util) out of date
>>>>>> *WARNING* kernel: Object code (erl_boot_server) out of date
>>>>>> *WARNING* kernel: Object code (erl_distribution) out of date
>>>>>> *WARNING* kernel: Object code (erl_prim_loader) out of date
>>>>>> *WARNING* kernel: Object code (erl_reply) out of date
>>>>>> *WARNING* kernel: Object code (erlang) out of date
>>>>>> *WARNING* kernel: Object code (error_handler) out of date
>>>>>> *WARNING* kernel: Object code (error_logger) out of date
>>>>>> *WARNING* kernel: Object code (file) out of date
>>>>>> *WARNING* kernel: Object code (file_server) out of date
>>>>>> *WARNING* kernel: Object code (file_io_server) out of date
>>>>>> *WARNING* kernel: Object code (prim_file) out of date
>>>>>> *WARNING* kernel: Object code (global) out of date
>>>>>> *WARNING* kernel: Object code (global_group) out of date
>>>>>> *WARNING* kernel: Object code (global_search) out of date
>>>>>> *WARNING* kernel: Object code (group) out of date
>>>>>> *WARNING* kernel: Object code (heart) out of date
>>>>>> *WARNING* kernel: Object code (hipe_unified_loader) out of date
>>>>>> *WARNING* kernel: Object code (inet6_tcp) out of date
>>>>>> *WARNING* kernel: Object code (inet6_tcp_dist) out of date
>>>>>> *WARNING* kernel: Object code (inet6_udp) out of date
>>>>>> *WARNING* kernel: Object code (inet_config) out of date
>>>>>> *WARNING* kernel: Object code (inet_hosts) out of date
>>>>>> *WARNING* kernel: Object code (inet_gethost_native) out of date
>>>>>> *WARNING* kernel: Object code (inet_tcp_dist) out of date
>>>>>> *WARNING* kernel: Object code (init) out of date
>>>>>> *WARNING* kernel: Object code (kernel) out of date
>>>>>> *WARNING* kernel: Object code (kernel_config) out of date
>>>>>> *WARNING* kernel: Object code (net) out of date
>>>>>> *WARNING* kernel: Object code (net_adm) out of date
>>>>>> *WARNING* kernel: Object code (net_kernel) out of date
>>>>>> *WARNING* kernel: Object code (os) out of date
>>>>>> *WARNING* kernel: Object code (ram_file) out of date
>>>>>> *WARNING* kernel: Object code (rpc) out of date
>>>>>> *WARNING* kernel: Object code (user) out of date
>>>>>> *WARNING* kernel: Object code (user_drv) out of date
>>>>>> *WARNING* kernel: Object code (user_sup) out of date
>>>>>> *WARNING* kernel: Object code (disk_log) out of date
>>>>>> *WARNING* kernel: Object code (disk_log_1) out of date
>>>>>> *WARNING* kernel: Object code (disk_log_server) out of date
>>>>>> *WARNING* kernel: Object code (disk_log_sup) out of date
>>>>>> *WARNING* kernel: Object code (dist_ac) out of date
>>>>>> *WARNING* kernel: Object code (erl_ddll) out of date
>>>>>> *WARNING* kernel: Object code (erl_epmd) out of date
>>>>>> *WARNING* kernel: Object code (erts_debug) out of date
>>>>>> *WARNING* kernel: Object code (gen_tcp) out of date
>>>>>> *WARNING* kernel: Object code (gen_udp) out of date
>>>>>> *WARNING* kernel: Object code (gen_sctp) out of date
>>>>>> *WARNING* kernel: Object code (prim_inet) out of date
>>>>>> *WARNING* kernel: Object code (inet) out of date
>>>>>> *WARNING* kernel: Object code (inet_db) out of date
>>>>>> *WARNING* kernel: Object code (inet_dns) out of date
>>>>>> *WARNING* kernel: Object code (inet_parse) out of date
>>>>>> *WARNING* kernel: Object code (inet_res) out of date
>>>>>> *WARNING* kernel: Object code (inet_tcp) out of date
>>>>>> *WARNING* kernel: Object code (inet_udp) out of date
>>>>>> *WARNING* kernel: Object code (inet_sctp) out of date
>>>>>> *WARNING* kernel: Object code (pg2) out of date
>>>>>> *WARNING* kernel: Object code (seq_trace) out of date
>>>>>> *WARNING* kernel: Object code (wrap_log_reader) out of date
>>>>>> *WARNING* kernel: Object code (zlib) out of date
>>>>>> *WARNING* kernel: Object code (otp_ring0) out of date
>>>>>> *WARNING* stdlib: Object code (base64) out of date
>>>>>> *WARNING* stdlib: Object code (beam_lib) out of date
>>>>>> *WARNING* stdlib: Object code (c) out of date
>>>>>> *WARNING* stdlib: Object code (calendar) out of date
>>>>>> *WARNING* stdlib: Object code (dets) out of date
>>>>>> *WARNING* stdlib: Object code (dets_server) out of date
>>>>>> *WARNING* stdlib: Object code (dets_sup) out of date
>>>>>> *WARNING* stdlib: Object code (dets_utils) out of date
>>>>>> *WARNING* stdlib: Object code (dets_v8) out of date
>>>>>> *WARNING* stdlib: Object code (dets_v9) out of date
>>>>>> *WARNING* stdlib: Object code (dict) out of date
>>>>>> *WARNING* stdlib: Object code (digraph) out of date
>>>>>> *WARNING* stdlib: Object code (digraph_utils) out of date
>>>>>> *WARNING* stdlib: Object code (edlin) out of date
>>>>>> *WARNING* stdlib: Object code (edlin_expand) out of date
>>>>>> *WARNING* stdlib: Object code (epp) out of date
>>>>>> *WARNING* stdlib: Object code (eval_bits) out of date
>>>>>> *WARNING* stdlib: Object code (erl_bits) out of date
>>>>>> *WARNING* stdlib: Object code (erl_compile) out of date
>>>>>> *WARNING* stdlib: Object code (erl_eval) out of date
>>>>>> *WARNING* stdlib: Object code (erl_expand_records) out of date
>>>>>> *WARNING* stdlib: Object code (erl_internal) out of date
>>>>>> *WARNING* stdlib: Object code (erl_lint) out of date
>>>>>> *WARNING* stdlib: Object code (erl_parse) out of date
>>>>>> *WARNING* stdlib: Object code (erl_posix_msg) out of date
>>>>>> *WARNING* stdlib: Object code (erl_pp) out of date
>>>>>> *WARNING* stdlib: Object code (erl_scan) out of date
>>>>>> *WARNING* stdlib: Object code (erl_tar) out of date
>>>>>> *WARNING* stdlib: Object code (error_logger_file_h) out of date
>>>>>> *WARNING* stdlib: Object code (error_logger_tty_h) out of date
>>>>>> *WARNING* stdlib: Object code (escript) out of date
>>>>>> *WARNING* stdlib: Object code (ets) out of date
>>>>>> *WARNING* stdlib: Object code (file_sorter) out of date
>>>>>> *WARNING* stdlib: Object code (filelib) out of date
>>>>>> *WARNING* stdlib: Object code (filename) out of date
>>>>>> *WARNING* stdlib: Object code (gb_trees) out of date
>>>>>> *WARNING* stdlib: Object code (gb_sets) out of date
>>>>>> *WARNING* stdlib: Object code (gen) out of date
>>>>>> *WARNING* stdlib: Object code (gen_event) out of date
>>>>>> *WARNING* stdlib: Object code (gen_fsm) out of date
>>>>>> *WARNING* stdlib: Object code (gen_server) out of date
>>>>>> *WARNING* stdlib: Object code (io) out of date
>>>>>> *WARNING* stdlib: Object code (io_lib) out of date
>>>>>> *WARNING* stdlib: Object code (io_lib_format) out of date
>>>>>> *WARNING* stdlib: Object code (io_lib_fread) out of date
>>>>>> *WARNING* stdlib: Object code (io_lib_pretty) out of date
>>>>>> *WARNING* stdlib: Object code (lib) out of date
>>>>>> *WARNING* stdlib: Object code (lists) out of date
>>>>>> *WARNING* stdlib: Object code (log_mf_h) out of date
>>>>>> *WARNING* stdlib: Object code (math) out of date
>>>>>> *WARNING* stdlib: Object code (ms_transform) out of date
>>>>>> *WARNING* stdlib: Object code (orddict) out of date
>>>>>> *WARNING* stdlib: Object code (ordsets) out of date
>>>>>> *WARNING* stdlib: Object code (otp_internal) out of date
>>>>>> *WARNING* stdlib: Object code (pg) out of date
>>>>>> *WARNING* stdlib: Object code (pool) out of date
>>>>>> *WARNING* stdlib: Object code (proc_lib) out of date
>>>>>> *WARNING* stdlib: Object code (proplists) out of date
>>>>>> *WARNING* stdlib: Object code (qlc) out of date
>>>>>> *WARNING* stdlib: Object code (qlc_pt) out of date
>>>>>> *WARNING* stdlib: Object code (queue) out of date
>>>>>> *WARNING* stdlib: Object code (random) out of date
>>>>>> *WARNING* stdlib: Object code (regexp) out of date
>>>>>> *WARNING* stdlib: Object code (sets) out of date
>>>>>> *WARNING* stdlib: Object code (shell) out of date
>>>>>> *WARNING* stdlib: Object code (shell_default) out of date
>>>>>> *WARNING* stdlib: Object code (slave) out of date
>>>>>> *WARNING* stdlib: Object code (sofs) out of date
>>>>>> *WARNING* stdlib: Object code (string) out of date
>>>>>> *WARNING* stdlib: Object code (supervisor) out of date
>>>>>> *WARNING* stdlib: Object code (supervisor_bridge) out of date
>>>>>> *WARNING* stdlib: Object code (sys) out of date
>>>>>> *WARNING* stdlib: Object code (timer) out of date
>>>>>> *WARNING* stdlib: Object code (win32reg) out of date
>>>>>> *WARNING* stdlib: Object code (zip) out of date/
>>>>>>
>>>>>>
>>>>>> Thanks a lot!
>>>>>>
>>>>>> Matt
>>>>>>
>>>>>> ------------------------------------------------------------------------
>>>>>>
>>>>>> _______________________________________________
>>>>>> erlang-questions mailing list
>>>>>> 
>>>>>> http://www.erlang.org/mailman/listinfo/erlang-questions
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>> --
>>>> Mazen Harake <>
>>>> Erlang Software Developer and Consultant,
>>>> Erlang Training & Consulting, Ltd
>>>>
>>>> Mobile Phone: +44 (0)795 13 26 317
>>>> Office Phone: +44 (0)207 45 61 020
>>>> Office Address:
>>>> 401 London Fruit & Wool Exchange
>>>> Brushfield St, London, E1 6EL
>>>> United Kingdom
>>>>
>>>> This email and its attachments may be confidential and are intended
>>>> solely
>>>> for the use of the individual to whom it is addressed. Any views or
>>>> opinions
>>>> expressed are solely those of the author and do not necessarily represent
>>>> those of "Erlang Training & Consulting, Ltd".
>>>>
>>>> If you are not the intended recipient of this email and its attachments,
>>>> you must take no action based upon them, nor must you copy or show them
>>>> to
>>>> anyone. Please contact the sender if you believe you have received this
>>>> email in error.
>>>>
>>>>
>>>>
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> erlang-questions mailing list
>>> 
>>> http://www.erlang.org/mailman/listinfo/erlang-questions
>>>
>>
> 




More information about the erlang-questions mailing list