Elixir: Elixir 1.4.5 not compatible with Erlang 19 on MacOS?

Created on 29 Jun 2017  路  3Comments  路  Source: elixir-lang/elixir

Environment

  • Elixir & Erlang versions (elixir --version): Elixir 1.4.5 and Erlang/OTP 20
  • Operating system: MacOS Sierra

Current behavior

Installed elixir 1.4.5 through brew using brew install elixir.

When trying to run iex I get this crash dump:

2017-06-29 11:45:58 Loading of ~ts failed: ~p

    "/usr/local/Cellar/elixir/1.4.5/bin/../lib/iex/ebin/Elixir.IEx.CLI.beam"
    badfile
2017-06-29 11:45:58 ~s~n
    "beam/beam_load.c(1287): Error loading module 'Elixir.IEx.CLI':\n  mandatory chunk of type 'Atom' not found\n\n"
2017-06-29 11:45:58 crash_report
    initial_call: {supervisor_bridge,user_sup,['Argument__1']}
    pid: <0.47.0>
    registered_name: []
    error_info: {exit,{undef,[{'Elixir.IEx.CLI',start,[],[]},{user_sup,start_user,3,[{file,"user_sup.erl"},{line,100}]},{user_sup,init,1,[{file,"user_sup.erl"},{line,49}]},{supervisor_bridge,init,1,[{file,"supervisor_bridge.erl"},{line,80}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,328}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]}]},[{gen_server,init_it,6,[{file,"gen_server.erl"},{line,352}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]}]}
    ancestors: [kernel_sup,<0.34.0>]
    messages: []
    links: [<0.35.0>]
    dictionary: []
    trap_exit: true
    status: running
    heap_size: 610
    stack_size: 27
    reductions: 144
2017-06-29 11:45:58 supervisor_report
    supervisor: {local,kernel_sup}
    errorContext: start_error
    reason: {undef,[{'Elixir.IEx.CLI',start,[],[]},{user_sup,start_user,3,[{file,"user_sup.erl"},{line,100}]},{user_sup,init,1,[{file,"user_sup.erl"},{line,49}]},{supervisor_bridge,init,1,[{file,"supervisor_bridge.erl"},{line,80}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,328}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]}]}
    offender: [{pid,undefined},{id,user},{mfargs,{user_sup,start,[]}},{restart_type,temporary},{shutdown,2000},{child_type,supervisor}]
2017-06-29 11:45:58 crash_report
    initial_call: {application_master,init,['Argument__1','Argument__2','Argument__3','Argument__4']}
    pid: <0.33.0>
    registered_name: []
    error_info: {exit,{{shutdown,{failed_to_start_child,user,{undef,[{'Elixir.IEx.CLI',start,[],[]},{user_sup,start_user,3,[{file,"user_sup.erl"},{line,100}]},{user_sup,init,1,[{file,"user_sup.erl"},{line,49}]},{supervisor_bridge,init,1,[{file,"supervisor_bridge.erl"},{line,80}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,328}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]}]}}},{kernel,start,[normal,[]]}},[{application_master,init,4,[{file,"application_master.erl"},{line,134}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]}]}
    ancestors: [<0.32.0>]
    messages: [{'EXIT',<0.34.0>,normal}]
    links: [<0.32.0>,<0.31.0>]
    dictionary: []
    trap_exit: true
    status: running
    heap_size: 610
    stack_size: 27
    reductions: 169
2017-06-29 11:45:58 std_info
    application: kernel
    exited: {{shutdown,{failed_to_start_child,user,{undef,[{'Elixir.IEx.CLI',start,[],[]},{user_sup,start_user,3,[{file,"user_sup.erl"},{line,100}]},{user_sup,init,1,[{file,"user_sup.erl"},{line,49}]},{supervisor_bridge,init,1,[{file,"supervisor_bridge.erl"},{line,80}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,328}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]}]}}},{kernel,start,[normal,[]]}}
    type: permanent
{"Kernel pid terminated",application_controller,"{application_start_failure,kernel,{{shutdown,{failed_to_start_child,user,{undef,[{'Elixir.IEx.CLI',start,[],[]},{user_sup,start_user,3,[{file,\"user_sup.erl\"},{line,100}]},{user_sup,init,1,[{file,\"user_sup.erl\"},{line,49}]},{supervisor_bridge,init,1,[{file,\"supervisor_bridge.erl\"},{line,80}]},{gen_server,init_it,6,[{file,\"gen_server.erl\"},{line,328}]},{proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,247}]}]}}},{kernel,start,[normal,[]]}}}"}
Kernel pid terminated (application_controller) ({application_start_failure,kernel,{{shutdown,{failed_to_start_child,user,{undef,[{'Elixir.IEx.CLI',start,[],[]},{user_sup,start_user,3,[{file,"user_sup.

Crash dump is being written to: erl_crash.dump...done

If I upgrade Erlang to version 20 it works again.

Expected behavior

IEx should launch normally.

Most helpful comment

Code compiled on OTP 20 cannot run on OTP 19 (the reverse is perfectly possible, though).

All 3 comments

Code compiled on OTP 20 cannot run on OTP 19 (the reverse is perfectly possible, though).

Yes, either you compiled the code and swapped OTP versions OR homebrew pre-compiled the code on 20 (which then means they should require OTP 20).

@sashaafm I had the same issue. Just for the record, I had erlang@19 installed, might be because I installed rabbitmq. I just did brew uninstall erlang@19 && brew update && brew install elixir and that's it.

Was this page helpful?
0 / 5 - 0 ratings