3

When I attempt a _rel/bin/application_name console, I get this:

{"Kernel pid terminated",application_controller,"
 {application_start_failure,lager,
  {bad_return,{{lager_app,start,[normal,[]]},
   {'EXIT',{{compile_forms,error},[
    {glc_code,compile_forms,2,[{file,\"src/glc_code.erl\"},{line,509}]},
    {glc_code,compile,2,[{file,\"src/glc_code.erl\"},{line,51}]},
    {glc,compile,4,[{file,\"src/glc.erl\"},{line,205}]},
    {lager_util,trace_filter,2,[{file,\"src/lager_util.erl\"},{line,374}]},
    {lager_app,start,2,[{file,\"src/lager_app.erl\"},{line,221}]},
    {application_master,start_it_old,4,[{file,\"application_master.erl\"},{line,272}]}]}}}}}"}

(not sure what the bad_return is, as this app used to start earlier)

My lager.app.src has both syntax_tools and compiler included (alongwith goldrush, stdlib and kernel) for applications.

However, when I start lager from a vanilla erl prompt, lager starts after I've started all of its dependencies.

Can I get some help with this? I'm not sure what I'm not seeing/missing. Thanks very much in anticipation!

Adam Lindberg
  • 16,447
  • 6
  • 65
  • 85
ombud
  • 199
  • 2
  • 10
  • 1
    One thing you might try to get more information is editing the `goldrush` file `glc_code.erl` and changing line 51 from `{ok, Module, Binary} = compile_forms(Forms, [nowarn_unused_vars]),` to `{ok, Module, Binary} = compile_forms(Forms, [nowarn_unused_vars,return_errors]),`. Without the `return_errors` option, the `compile:forms/2` call made from that file just returns the atom `error` when it hits a problem. – Steve Vinoski Sep 30 '15 at 09:58
  • I'd guess that your config file (which is loaded when you run the release version but not when you run the shell) has something wrong. Can you post it here? – Nathaniel Waisbrot Sep 30 '15 at 18:35
  • what does the lager block in app.config look like? – Joe Oct 05 '15 at 17:56
  • Thanks, @Steve Vinoski Sorry I took so long to answer, my duties have moved away from Erlang development for a bit - @Joe/@Nathaniel Waisbrot, my lager block looks like: {lager, [ {crash_log, "crash.log"} ,{handlers, [ {lager_console_backend, error}, {lager_file_backend, [{file, "info.log"}, {level, info}]}, {lager_file_backend, [{file, "error.log"}, {level, error}]} ]} ]}, – ombud Nov 25 '15 at 00:13
  • (Reformatting) Thanks, @Steve Vinoski Sorry I took so long to answer, my duties have moved away from Erlang development for a bit - @Joe/@Nathaniel Waisbrot, my lager block looks like: {lager, [ {crash_log, "crash.log"} , {handlers, [ {lager_console_backend, error}, {lager_file_backend, [{file, "info.log"}, {level, info}]}, {lager_file_backend, [{file, "error.log"}, {level, error}]} ]} ]}, – ombud Nov 25 '15 at 00:23
  • After I moved the app to a different location, the problem's disappeared, prompting me to think it's a git issue (had a similar issue with erlang.mk - moved it to a different directory, the problem went away!) Maybe some permissions issues? – ombud Nov 25 '15 at 00:31

0 Answers0