Iulian7

Iulian7

Erlang dependency doesn't compile with mix

Hi guys,

I have an Erlang dependency which does not compile with mix but compiles fine with rebar3. The output when compiling with DEBUG=1 is:

...
===> Building escript...
===> Creating escript file /Users/iulian/elixir/riak/deps/cuttlefish/_build/default/bin/cuttlefish
===> processing <<"cuttlefish">>
===> new deps of <<"cuttlefish">> found to be []
===> processing <<"getopt">>
===> Uncaught error in rebar_core. Run with DEBUG=1 to see stacktrace or consult rebar3.crashdump
===> Uncaught error: {badmatch,error}
===> Stack trace to the error location:
[{rebar_prv_escriptize,find_deps_of_deps,3,
                       [{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_prv_escriptize.erl"},
                        {line,246}]},
 {rebar_prv_escriptize,find_deps,2,
                       [{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_prv_escriptize.erl"},
                        {line,240}]},
 {rebar_prv_escriptize,escriptize,2,
                       [{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_prv_escriptize.erl"},
                        {line,104}]},
 {rebar_prv_escriptize,do,1,
                       [{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_prv_escriptize.erl"},
                        {line,80}]},
 {rebar_core,do,2,
             [{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_core.erl"},
              {line,153}]},
 {rebar_hooks,run_provider_hooks_,6,
              [{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_hooks.erl"},
               {line,49}]},
 {rebar_hooks,run_all_hooks,6,
              [{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_hooks.erl"},
               {line,16}]},
 {rebar_prv_compile,compile,3,
                    [{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_prv_compile.erl"},
                     {line,129}]}]
...

I am running Elixir 1.4.5, Erlang/OTP 20 on macOS Sierra. I also made sure the rebar3 mix uses is the correct version using mix local.rebar rebar3. The rebar3 version is 3.4.2.

Any help would be much appreciated!

First Post!

NobbZ

NobbZ

Getopt uses legacy rebar, try setting manager rebar for it.

Most Liked

Iulian7

Iulian7

Interesting. I observed the memory usage. It doesn’t really go up and there is no swapping. It is worth noting I have 16GB of RAM. The usage is constant at about 8GB.

This is also followed in this issue: Problems compiling (warnings_as_errors) · Issue #23 · Kyorai/riak_core · GitHub.

Iulian7

Iulian7

This is the full output:

$ DEBUG=1 mix compile
===> 20.0 satisfies the requirement for minimum OTP version R16
===> Expanded command sequence to be run: []
===> Expanded command sequence to be run: [{default,app_discovery},
                                           {bare,compile}]
===> 20.0 satisfies the requirement for minimum OTP version R16
===> Compiling cuttlefish
===> run_hooks("/Users/iulian/elixir/riak/deps/cuttlefish", pre_hooks, compile) -> no hooks defined

===> run_hooks("/Users/iulian/elixir/riak/deps/cuttlefish", pre_hooks, erlc_compile) -> no hooks defined

===> erlopts [debug_info,warnings_as_errors,
              {parse_transform,lager_transform},
              debug_info,warn_untyped_record]
===> files to compile ["/Users/iulian/elixir/riak/deps/cuttlefish/src/lager_stderr_backend.erl",
                       "/Users/iulian/elixir/riak/deps/cuttlefish/src/cuttlefish_vmargs.erl",
                       "/Users/iulian/elixir/riak/deps/cuttlefish/src/cuttlefish_variable.erl",
                       "/Users/iulian/elixir/riak/deps/cuttlefish/src/cuttlefish_validator.erl",
                       "/Users/iulian/elixir/riak/deps/cuttlefish/src/cuttlefish_util.erl",
                       "/Users/iulian/elixir/riak/deps/cuttlefish/src/cuttlefish_unit.erl",
                       "/Users/iulian/elixir/riak/deps/cuttlefish/src/cuttlefish_translation.erl",
                       "/Users/iulian/elixir/riak/deps/cuttlefish/src/cuttlefish_schema.erl",
                       "/Users/iulian/elixir/riak/deps/cuttlefish/src/cuttlefish_rebar_plugin.erl",
                       "/Users/iulian/elixir/riak/deps/cuttlefish/src/cuttlefish_mapping.erl",
                       "/Users/iulian/elixir/riak/deps/cuttlefish/src/cuttlefish_generator.erl",
                       "/Users/iulian/elixir/riak/deps/cuttlefish/src/cuttlefish_flag.erl",
                       "/Users/iulian/elixir/riak/deps/cuttlefish/src/cuttlefish_escript.erl",
                       "/Users/iulian/elixir/riak/deps/cuttlefish/src/cuttlefish_error.erl",
                       "/Users/iulian/elixir/riak/deps/cuttlefish/src/cuttlefish_enum.erl",
                       "/Users/iulian/elixir/riak/deps/cuttlefish/src/cuttlefish_effective.erl",
                       "/Users/iulian/elixir/riak/deps/cuttlefish/src/cuttlefish_duration_parse.erl",
                       "/Users/iulian/elixir/riak/deps/cuttlefish/src/cuttlefish_duration.erl",
                       "/Users/iulian/elixir/riak/deps/cuttlefish/src/cuttlefish_datatypes.erl",
                       "/Users/iulian/elixir/riak/deps/cuttlefish/src/cuttlefish_conf.erl",
                       "/Users/iulian/elixir/riak/deps/cuttlefish/src/cuttlefish_bytesize.erl",
                       "/Users/iulian/elixir/riak/deps/cuttlefish/src/cuttlefish_advanced.erl",
                       "/Users/iulian/elixir/riak/deps/cuttlefish/src/cuttlefish.erl",
                       "/Users/iulian/elixir/riak/deps/cuttlefish/src/conf_parse.erl"]
===> run_hooks("/Users/iulian/elixir/riak/deps/cuttlefish", post_hooks, erlc_compile) -> no hooks defined

===> run_hooks("/Users/iulian/elixir/riak/deps/cuttlefish", pre_hooks, app_compile) -> no hooks defined

===> run_hooks("/Users/iulian/elixir/riak/deps/cuttlefish", post_hooks, app_compile) -> no hooks defined

===> run_hooks("/Users/iulian/elixir/riak/deps/cuttlefish", pre_hooks, escriptize) -> no hooks defined

===> run_hooks("/Users/iulian/elixir/riak/deps/cuttlefish", pre_hooks, escriptize) -> no hooks defined

===> Building escript...
===> Creating escript file /Users/iulian/elixir/riak/deps/cuttlefish/_build/default/bin/cuttlefish
===> processing <<"cuttlefish">>
===> new deps of <<"cuttlefish">> found to be []
===> processing <<"getopt">>
===> Uncaught error in rebar_core. Run with DEBUG=1 to see stacktrace or consult rebar3.crashdump
===> Uncaught error: {badmatch,error}
===> Stack trace to the error location:
[{rebar_prv_escriptize,find_deps_of_deps,3,
                       [{file,"/private/tmp/rebar@3-20170715-74378-1pwzyot/rebar3-3.4.2/_build/default/lib/rebar/src/rebar_prv_escriptize.erl"},
                        {line,246}]},
 {rebar_prv_escriptize,find_deps,2,
                       [{file,"/private/tmp/rebar@3-20170715-74378-1pwzyot/rebar3-3.4.2/_build/default/lib/rebar/src/rebar_prv_escriptize.erl"},
                        {line,240}]},
 {rebar_prv_escriptize,escriptize,2,
                       [{file,"/private/tmp/rebar@3-20170715-74378-1pwzyot/rebar3-3.4.2/_build/default/lib/rebar/src/rebar_prv_escriptize.erl"},
                        {line,104}]},
 {rebar_prv_escriptize,do,1,
                       [{file,"/private/tmp/rebar@3-20170715-74378-1pwzyot/rebar3-3.4.2/_build/default/lib/rebar/src/rebar_prv_escriptize.erl"},
                        {line,80}]},
 {rebar_core,do,2,
             [{file,"/private/tmp/rebar@3-20170715-74378-1pwzyot/rebar3-3.4.2/_build/default/lib/rebar/src/rebar_core.erl"},
              {line,153}]},
 {rebar_hooks,run_provider_hooks_,6,
              [{file,"/private/tmp/rebar@3-20170715-74378-1pwzyot/rebar3-3.4.2/_build/default/lib/rebar/src/rebar_hooks.erl"},
               {line,49}]},
 {rebar_hooks,run_all_hooks,6,
              [{file,"/private/tmp/rebar@3-20170715-74378-1pwzyot/rebar3-3.4.2/_build/default/lib/rebar/src/rebar_hooks.erl"},
               {line,16}]},
 {rebar_prv_compile,compile,3,
                    [{file,"/private/tmp/rebar@3-20170715-74378-1pwzyot/rebar3-3.4.2/_build/default/lib/rebar/src/rebar_prv_compile.erl"},
                     {line,129}]}]
===> When submitting a bug report, please include the output of `rebar3 report "your command"`
** (Mix) Could not compile dependency :cuttlefish, "/Users/iulian/.mix/rebar3 bare compile --paths "/Users/iulian/elixir/riak/_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 "mixdeps.clean cuttlefish"

Last Post!

peerreynders

peerreynders

FYI: This rebar3 issue seems to have a similar failure pattern.

Where Next?

Trending in Questions Top

jonnycharles
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
spammy
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
silverdr
Using Phoenix.LiveView.TagEngine as an EEx.Engine is deprecated! To compile HEEx, use Phoenix.LiveView.TagEngine.compile/2 instead. Sta...
New
saveman71
Hello ! We want new/edit form pages to POST/PUT to their own URL rather than the resources REST defaults (post /things, put /things/:id)...
New
dli
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app? Looking for hints regarding: Addi...
New
bottlenecked
Hi all, I wanted to ask how the community is dealing with post-release steps. Today we have Ecto migrations, which make sure that the db...
New
michallepicki
I am using Oban and occasionally, shortly after a deployment, a handful of jobs can fail because of dependency on other parts of the syst...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge &amp; Solve. They are GUI (Emerge) and State management (S...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
type1fool
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New
akoutmos
@hugobarauna and I (Alex Koutmos) have been hard at work on writing a book on Nerves that takes you from simply blinking LEDs to building...
New

We're in Beta

About us Mission Statement