2

I'm attempting to use rebar to generate a node, and I've followed the instructions from here.

Running rebar get-deps compile works fine, but running rebar generate gives me

ERROR: Unable to generate spec: read file info /home/inaimathi/common/rebar.config~ failed
ERROR: Unexpected error: rebar_abort
ERROR: generate failed while processing /home/inaimathi/common/rel: rebar_abort

Odd, given that rebar.config~ shouldn't figure anywhere in the generate process. Removing rebar.config~ and trying again gives me the same error, but relating to rebar.config instead.

My rebar.config looks like

{sub_dirs, ["rel"]}.
{lib_dirs, ["deps"]}.
{deps, [{erlsha2, ".*", {git, "git://github.com/vinoski/erlsha2.git", "HEAD"}}]}.

and my reltool.config looks like

{sys, [
       {lib_dirs, []},
       {erts, [{mod_cond, derived}, {app_file, strip}]},
       {app_file, strip},
       {rel, "common", "1",
        [
         kernel,
         stdlib,
         sasl,
         common
        ]},
       {rel, "start_clean", "",
        [
         kernel,
         stdlib
        ]},
       {boot_rel, "common"},
       {profile, embedded},
       {incl_cond, derived},
       {mod_cond, derived},
       {excl_archive_filters, [".*"]}, %% Do not archive built libs
       {excl_sys_filters, ["^bin/.*", "^erts.*/bin/(dialyzer|typer)",
                           "^erts.*/(doc|info|include|lib|man|src)"]},
       {excl_app_filters, ["\.gitignore"]},
       {app, common, [{mod_cond, app}, {incl_cond, include}, {lib_dir, ".."}]}
      ]}.

{target_dir, "common"}.

{overlay, [
           {mkdir, "log/sasl"},
           {copy, "files/erl", "\{\{erts_vsn\}\}/bin/erl"},
           {copy, "files/nodetool", "\{\{erts_vsn\}\}/bin/nodetool"},
           {copy, "files/common", "bin/common"},
           {copy, "files/common.cmd", "bin/common.cmd"},
           {copy, "files/start_erl.cmd", "bin/start_erl.cmd"},
           {copy, "files/install_upgrade.escript", "bin/install_upgrade.escript"},
           {copy, "files/sys.config", "releases/\{\{rel_vsn\}\}/sys.config"},
           {copy, "files/vm.args", "releases/\{\{rel_vsn\}\}/vm.args"}
          ]}.

(entirely rebar-generated except that I had to add {lib_dir, ".."} as per the instructions I linked).

What am I doing wrong?


EDIT: I should mention the basics, given that I have no idea what's going wrong. Erlang R15B01 out of the Debian Wheezy repo running on a 64-bit core i3. I did a manual pull and build of rebar from the basho repo. Not sure if anything else is relevant.

EDIT2: The same thing happens with the pre-built version of rebar found at https://github.com/downloads/basho/rebar/rebar

2
  • Did you ever find out an answer? I'm stuck on the same thing. Mar 19, 2013 at 14:13
  • @ThomasKobberPanum - Nope. The deployment tool errors are the main reason I no longer use Erlang. Sorry, and good luck.
    – Inaimathi
    Mar 20, 2013 at 23:14

1 Answer 1

0

You should have run the rebar generate command in the rel directory before this issue, it is fixed now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.