uwiger / gproc

Extended process registry for Erlang
Apache License 2.0
1.07k stars 232 forks source link

undef gen_leader:start_link #121

Closed netDalek closed 8 years ago

netDalek commented 8 years ago

Sorry if this issue duplicates smth. Can't start gproc with gproc_dist for master or latest 0.6.1

(a@localhost)1> application:set_env(gproc, gproc_dist, all).
ok
(a@localhost)2> application:start(gproc).
{error,{{shutdown,{failed_to_start_child,gproc_dist,
                                         {'EXIT',{undef,[{gen_leader,start_link,
                                                                     [gproc_dist,
                                                                      [a2p@localhost],
                                                                      [{bcast_type,all}],
                                                                      gproc_dist,[],
                                                                      [{spawn_opt,[]}]],
                                                                     []},
                                                         {supervisor,do_start_child,2,
                                                                     [{file,"supervisor.erl"},{line,314}]},
                                                         {supervisor,start_children,3,
                                                                     [{file,"supervisor.erl"},{line,297}]},
                                                         {supervisor,init_children,2,
                                                                     [{file,"supervisor.erl"},{line,263}]},
                                                         {gen_server,init_it,6,[{file,"gen_server.erl"},{line,306}]},
                                                         {proc_lib,init_p_do_apply,3,
                                                                   [{file,"proc_lib.erl"},{line,237}]}]}}}},
        {gproc_app,start,[normal,[]]}}}
uwiger commented 8 years ago

It might be because gproc doesn't automatically fetch gen_leader. The rebar.config.script file checks for the OS env variable GPROC_DIST. If true, it adds gen_leader to deps, otherwise not.

netDalek commented 8 years ago

No, I've set GPROC_DIST and gen_leader pulled successfully. Surprisingly but rebar compile for the whole project doesn't generate gen_leader.beam file. I have to run rebar compile inside deps/gen_leader