basho / riak_core

Distributed systems infrastructure used by Riak.
Apache License 2.0
1.23k stars 392 forks source link

compile error report #966

Closed zhangsiyang0629 closed 3 years ago

zhangsiyang0629 commented 3 years ago

In a Elixir project, I add riak_core as a dependency in the mix.ex:

defp deps do [

{:dep_from_hexpm, "~> 0.3.0"},

  # {:dep_from_git, git: "https://github.com/elixir-lang/my_dep.git", tag: "0.1.0"}
  {:riak_core, git: "https://gitclone.com/github.com/basho/riak_core.git", branch: "develop-3.0-292"}
]

end

However, compile failed, and reported: * (Mix) Could not compile dependency :cuttlefish, "/Users/zhangsiyang/.asdf/installs/elixir/v1.10.4/.mix/rebar3 bare compile --paths="/Users/zhangsiyang/Desktop/test/mfmn/_build/dev/lib//ebin"" command failed. You can recompile this dependency with "mix deps.compile cuttlefish", update it with "mix deps.update cuttlefish" or clean it with "mix deps.clean cuttlefish"

the rebar3.crashdump: Error: {badmatch,[]} [{rebar_prv_bare_compile,do,1, [{file,"/tmp/cirrus-ci-build/src/rebar_prv_bare_compile.erl"}, {line,60}]}, {rebar_core,do,2, [{file,"/tmp/cirrus-ci-build/src/rebar_core.erl"},{line,154}]}, {rebar_prv_do,do_task,5, [{file,"/tmp/cirrus-ci-build/src/rebar_prv_do.erl"},{line,87}]}, {rebar_core,do,2, [{file,"/tmp/cirrus-ci-build/src/rebar_core.erl"},{line,154}]}, {rebar3,run_aux,2,[{file,"/tmp/cirrus-ci-build/src/rebar3.erl"},{line,182}]}, {rebar3,main,1,[{file,"/tmp/cirrus-ci-build/src/rebar3.erl"},{line,66}]}, {escript,run,2,[{file,"escript.erl"},{line,758}]}, {escript,start,1,[{file,"escript.erl"},{line,277}]}]

How to solve the problem? Please, thank you

martinsumner commented 3 years ago

I would recommend using branch develop-3.0, but I don't think this will resolve your problem. The error complains about cuttlefish, which isn't packaged with riak_core - but in riak this rebar .config snippet is used for cuttlefish:

{project_plugins, [
    {rebar3_cuttlefish, {git, "https://github.com/basho/rebar3_cuttlefish", {tag, "0.2.0"}}}
]}.

Fundamentally though, if you're looking to use riak_core in an application other than riak_kv - I would strongly recommend looking at Riak Core Lite. The riak core lite project has a stronger focus on supporting new use cases for riak core, a more active community, and the project has some elixir getting started tutorials as well.

zhangsiyang0629 commented 3 years ago

Thank you very much. I will look at Riak Core Lite.