0
votes

When I try to start erlang release prepared by relx it crashes with reason:

{"init terminating in do_boot",{badarg,[{erl_prim_loader,check_file_result,3,[]},{init,get_boot,1,[]},{init,get_boot,2,[]},{init,do_boot,3,[]}]}}

Directory listing:

    ├── bin
    ├── lib
    │   ├── asn1-2.0.2
    │   │   ├── ebin
    │   │   ├── priv
    │   │   └── src
    │   ├── bear-0.8.1
    │   │   ├── ebin
    │   │   └── src
    │   ├── cache-1.0.0
    │   │   ├── ebin
    │   │   ├── priv
    │   │   └── src
    │   ├── cberl-1
    │   │   ├── c_src
    │   │   ├── ebin
    │   │   ├── include
    │   │   ├── priv
    │   │   └── src
    │   ├── compiler-4.9.2
    │   │   ├── ebin
    │   │   └── src
    │   ├── cowboy-0.8.6
    │   │   ├── ebin
    │   │   └── src
....................
    │   ├── crypto-3.0
    │   │   ├── ebin
    │   │   ├── priv
    │   │   │   └── lib
    │   │   └── src
    └── releases
        └── 0.5.2

All libraries on it's own places.

I tried to start application with the command erl -env ERL_LIBS ../libs -erlconto and it successfully started.

It seems, that problem in boot file, but i don't know how to approach this problem.

Any tips or way to solve, please.

Tnx!

2

2 Answers

2
votes

I added

{extended_start_script, true}.

to relx.conf an application now work!

Tnx.

0
votes

This usually happens when OTP application's .app file is missing a required dependency. relx uses the contents of .app to resolve dependencies to go into the release.

Make sure all of your release applications include, at least, kernel and stdlib in the applications tuple in .app.

Here is an example .app file listing kernel, stdlib, and elk as dependencies:

{application, prop, [
  {description, "Prop Template Generator"},
  {vsn, "0.0.1"},
  {registered, []},
  {applications, [kernel, stdlib, elk]},
  {modules, [prop, prop_otp, prop_generator]},
  {env, []}
]}.