Closed RatanPaul closed 7 years ago
Without debug output, I think it would be hard to report anything. There should also be the rebar3.crashdump file for you to open and give context regarding the failure.
Error: {badmatch,[]}
[{rebar_prv_bare_compile,do,1,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_prv_bare_compile.erl"},
{line,45}]},
{rebar_core,do,2,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_core.erl"},
{line,125}]},
{rebar_prv_do,do_tasks,2,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_prv_do.erl"},
{line,68}]},
{rebar_core,do,2,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_core.erl"},
{line,125}]},
{rebar3,main,1,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar3.erl"},
{line,56}]},
{escript,run,2,[{file,"escript.erl"},{line,757}]},
{escript,start,1,[{file,"escript.erl"},{line,277}]},
{init,start_em,1,[{file,"init.erl"},{line,1077}]}]
This is the rebar3.crashdump. Any suggestion ?
https://github.com/erlang/rebar3/blob/master/src/rebar_prv_bare_compile.erl#L45 this line seems to say the problem has to do with not being able to detect any application in the repository from the bare compiler. Looking at idna
, it's a standard app, not quite sure what is wrong there.
Wondering if it's a path or a windows issue there, or just plain problems with the mix integration on the bare compiler.
I have same error with next stacktrace:
===> Uncaught error in rebar_core. Run with DEBUG=1 to see stacktrace or consult rebar3.crashdump
===> Uncaught error: {badmatch,
{error,
{bad_lib,
"Library version (2.11) not compatible (with 2.10)."}}}
===> Stack trace to the error location:
[{rebar3_run,init,0,
[{file,"/home/ne/Projects/messenger/_build/default/plugins/rebar3_run/src/rebar3_run.erl"},
{line,53}]},
{rebar3_run,do,1,
[{file,"/home/ne/Projects/messenger/_build/default/plugins/rebar3_run/src/rebar3_run.erl"},
{line,34}]},
{rebar_core,do,2,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_core.erl"},
{line,125}]},
{rebar3,main,1,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar3.erl"},
{line,56}]},
{escript,run,2,[{file,"escript.erl"},{line,757}]},
{escript,start,1,[{file,"escript.erl"},{line,277}]},
{init,start_it,1,[]},
{init,start_em,1,[]}]
i think, problem with rebar_core,do,2
and rebar3,main,1
, i mean pathes with /home/tristan
- i have no this path, this is hardcode whos make this build (i get it with wget https://s3.amazonaws.com/rebar3/rebar3 && chmod +x rebar3
). I try compile rebar in my another computer (PC2) and run - same problem, but another pathes, from PC2.
P.S. Problem exists only if kerl activated, after kerl_deactivate all ok.
The problem appears to be with the rebar3 run plugin and the NIF library it requires. If the plugin was built on a version of the VM incompatible with the one you're trying to run it with, you'll get these errors.
I got this error as well:
$ DEBUG=1 /home/ubuntu/.mix/rebar3 bare compile --paths "/home/ubuntu/progress/_build/dev/lib/cf/ebin"
===> Uncaught error in rebar_core. Run with DEBUG=1 to see stacktrace
===> Uncaught error: {badmatch,[]}
===> Stack trace to the error location: [{rebar_prv_bare_compile,do,1,
[{file,
"/Users/ericmj/code/rebar3/_build/default/lib/rebar/src/rebar_prv_bare_compile.erl"},
{line,45}]},
{rebar_core,do,2,
[{file,
"/Users/ericmj/code/rebar3/_build/default/lib/rebar/src/rebar_core.erl"},
{line,124}]},
{rebar_prv_do,do_tasks,2,
[{file,
"/Users/ericmj/code/rebar3/_build/default/lib/rebar/src/rebar_prv_do.erl"},
{line,68}]},
{rebar_core,do,2,
[{file,
"/Users/ericmj/code/rebar3/_build/default/lib/rebar/src/rebar_core.erl"},
{line,124}]},
{rebar3,main,1,
[{file,
"/Users/ericmj/code/rebar3/_build/default/lib/rebar/src/rebar3.erl"},
{line,55}]},
{escript,run,2,
[{file,"escript.erl"},
{line,757}]},
{escript,start,1,
[{file,"escript.erl"},
{line,277}]},
{init,start_em,1,[]}]
===> When submitting a bug report, please include the output of `rebar3 report "your command"`
FWIW, I just found this as well while investigating why I received the same error. However, my situation is running rebar3 release
against an untouched generation from a new webmachine
template.
Error: {badmatch,{error,eexist}}
[{rlx_prv_assembler,copy_or_symlink_config_file,3,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/rlx_prv_assembler.erl"},
{line,459}]},
{rlx_prv_assembler,write_bin_file,4,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/rlx_prv_assembler.erl"},
{line,381}]},
{rlx_prv_assembler,do,1,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/rlx_prv_assembler.erl"},
{line,59}]},
{relx,run_provider,2,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/relx.erl"},
{line,308}]},
{lists,foldl,3,[{file,"lists.erl"},{line,1263}]},
{relx,run_providers_for_actions,2,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/relx.erl"},
{line,291}]},
{relx,main,2,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/relx.erl"},
{line,65}]},
{rebar_relx,do,4,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_relx.erl"},
{line,38}]}]
To reproduce, follow the quickstart docs found on the home page for webmachine, first creating a new webmachine
from rebar3 new webmachine your_app_here
and then running rebar3 release
in the directory of the newly created webmachine.
NOTE: This worked for me the first time. The second and subsequent times, however, I consistently get the above stacktrace. It feels like it's generated a file that it's expecting not to find, and so crashes when trying to overwrite it -- but that's total speculation.
@goneflyin i don't think the error you're getting is related with the one being discussed in this ticket, if you try out the rebar3 nightly (https://s3.amazonaws.com/rebar3-nightly/rebar3) it won't fail as you described
I am having the same problem, badlib error.. MacOS has erlang 19.1 installed, however i use kerl activate 18.3 for risk_core project.
Does that mean i have to recompile rebar3 for this environment?
Error: {badmatch,{error,{bad_lib,"Library version (2.11) not compatible (with 2.10)."}}} [{rebar3_run,init,0, [{file,"/Users/ginahagg/tanodb/_build/default/plugins/rebar3_run/src/rebar3_run.erl"}, {line,53}]}, {rebar3_run,do,1, [{file,"/Users/ginahagg/tanodb/_build/default/plugins/rebar3_run/src/rebar3_run.erl"}, {line,34}]}, {rebar_core,do,2, [{file,"/Users/ginahagg/rebar3/_build/default/lib/rebar/src/rebar_core.erl"}, {line,125}]}, {rebar3,main,1, [{file,"/Users/ginahagg/rebar3/_build/default/lib/rebar/src/rebar3.erl"}, {line,56}]}, {escript,run,2,[{file,"escript.erl"},{line,757}]}, {escript,start,1,[{file,"escript.erl"},{line,277}]}, {init,start_it,1,[]}, {init,start_em,1,[]}]
i have been running this with kerl activate. Here's the output from my crash dump
Gina-Haggs-MacBook-Pro:tanodb ginahagg$ rebar3 run
===> Verifying dependencies...
===> Compiling tanodb
===> Running cuttlefish schema generator
===> Starting relx build process ...
===> Resolving OTP Applications from directories:
/Users/ginahagg/tanodb/_build/default/lib
/Users/ginahagg/tanodb/apps
/Users/ginahagg/erlang/otp18.3/lib
/Users/ginahagg/mywork/cowboy_chat/apps/chat
/Users/ginahagg/mywork/cowboy_chat/deps/cowboy
/Users/ginahagg/mywork/cowboy_chat/deps/ranch
/Users/ginahagg/cowboy_chat/deps/reloader
/Users/ginahagg/mywork/cowboy_chat/deps/sync
/Users/ginahagg/mywork/cowboy_chat/rel/chat/lib/mimetypes-1.0
/Users/ginahagg/tanodb/_build/default/rel
Resolved tanodb-0.1.0
Dev mode enabled, release will be symlinked
release successfully created!
Uncaught error in rebar_core. Run with DEBUG=1 to see stacktrace or consult rebar3.crashdump
When submitting a bug report, please include the output of rebar3 report "your command"
Gina-Haggs-MacBook-Pro:tanodb ginahagg$ rebar3 report "rebar3 run"
Rebar3 report
version 3.3.2+build.3635.ref5f0658d
generated at 2016-12-03T19:40:18+00:00
Verifying dependencies...
release successfully created!
Uncaught error in rebar_core. Run with DEBUG=1 to see stacktrace or consult rebar3.crashdump
When submitting a bug report, please include the output of rebar3 report "your command"
Loaded Applications: bbmustache: 1.3.0 certifi: 0.4.0 cf: 0.2.2 common_test: 1.12 compiler: 6.0.3 crypto: 3.6.3 cth_readable: 1.2.3 dialyzer: 2.9 edoc: 0.7.18 erlware_commons: 0.22.0 eunit: 2.2.13 eunit_formatters: 0.3.1 getopt: 0.8.2 inets: 6.2 kernel: 4.2 providers: 1.6.0 public_key: 1.1.1 relx: 3.22.0 sasl: 2.7 snmp: 5.2.2 ssl_verify_fun: 1.1.1 stdlib: 2.8 syntax_tools: 1.7 tools: 2.8.3
Escript path: /usr/local/bin/rebar3 Providers: app_discovery as clean compile compile cover ct deps dialyzer do edoc escriptize eunit help install install_deps list lock new path pkgs release release relup report run shell state tar tar tree unlock update upgrade upgrade upgrade version xref
@ginahagg the same recomendation above applies, please try out rebar3 nightly
@lrascao I just tried it. it is the same thing. however i will create a test project with rebar3 and run it without kerl and see what happens..
@ginahagg there are already three different issues on this ticket, the one you mentioned Fred has provided the most likely explanation for it:
The problem appears to be with the rebar3 run plugin and the NIF library it requires.
If the plugin was built on a version of the VM incompatible with the one you're trying to
run it with, you'll get these errors.
rebar3 nightly most likely fixes the one @goneflyin mentioned
Agreed. I'll close this issue. I think people see the title and use it as a catch all for all kinds of issues and it shouldn't be that way.
@lrascao yes, incompatible VM was the issue. thank you :)
@ferd similar error while trying to install ejabberd. Tristan's file path is hardcoded into this and I can't find where it is in the source code to fix it. will look more closely and keep you posted. let me know if anyone has the fix.
Ann-jies-Mac-mini:ejabberd annjie$ more rebar3.crashdump
Error: function_clause
[{rebar3_hex_info,normalize,
[{fs,".*",{git,"https://github.com/synrc/fs","bed9467"}}],
[{file,"/Users/annjie/.cache/rebar3/plugins/rebar3_hex/src/rebar3_hex_info.erl"},
{line,140}]},
{rebar3_hex_info,'-general/1-lc$^0/1-0-',2,
[{file,"/Users/annjie/.cache/rebar3/plugins/rebar3_hex/src/rebar3_hex_info.erl"},
{line,55}]},
{rebar3_hex_info,'-general/1-lc$^0/1-0-',2,
[{file,"/Users/annjie/.cache/rebar3/plugins/rebar3_hex/src/rebar3_hex_info.erl"},
{line,56}]},
{rebar3_hex_info,general,1,
[{file,"/Users/annjie/.cache/rebar3/plugins/rebar3_hex/src/rebar3_hex_info.erl"},
{line,53}]},
{rebar3_hex_info,do,1,
[{file,"/Users/annjie/.cache/rebar3/plugins/rebar3_hex/src/rebar3_hex_info.erl"},
{line,40}]},
{rebar_core,do,2,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_core.erl"},
{line,154}]},
{rebar_prv_do,do_tasks,2,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_prv_do.erl"},
{line,68}]},
{rebar_core,do,2,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_core.erl"},
{line,154}]}]
Those appear to be issues in the rebar3 hex plugin, which only works with hex packages, not git resources.
I am following the instruction https://github.com/esl/MongooseIM/blob/master/doc/user-guide/How-to-build.md#compiling-on-macos to build MonooseIM locally.
$ make rel
shows below error
===> Starting relx build process ...
===> Resolving OTP Applications from directories:
/Users/adarshmaurya/Downloads/MongooseIM-master/_build/prod/lib
/Users/adarshmaurya/Downloads/MongooseIM-master/ebin
/usr/local/Cellar/erlang/21.0.3/lib/erlang/lib
=ERROR REPORT==== 21-Jul-2018::22:24:21.839882 ===
Error in process <0.8730.0> with exit value:
{function_clause,
[{rlx_app_info,parse_version,
[{cmd,"tools/generate_vsn.sh"}],
[{file,
"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/rlx_app_info.erl"},
{line,197}]},
{rlx_app_info,new,6,
[{file,
"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/rlx_app_info.erl"},
{line,98}]},
{rlx_app_discovery,get_vsn,3,
[{file,
"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/rlx_app_discovery.erl"},
{line,285}]},
{rlx_dscv_util,discover_dir,3,
[{file,
"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/rlx_dscv_util.erl"},
{line,97}]},
{lists,map,2,[{file,"lists.erl"},{line,1239}]},
{ec_plists,'-local_runmany/3-fun-0-',3,
[{file,
"/home/tristan/Devel/rebar3/_build/default/lib/erlware_commons/src/ec_plists.erl"},
{line,753}]}]}
===> Uncaught error in rebar_core. Run with DEBUG=1 to see stacktrace or consult rebar3.crashdump
===> When submitting a bug report, please include the output of `rebar3 report "your command"`
make: *** [rel] Error 1
Please help to fix it. Below is the rebar3.crashdump
Error: {function_clause,
[{rlx_app_info,parse_version,
[{cmd,"tools/generate_vsn.sh"}],
[{file,
"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/rlx_app_info.erl"},
{line,197}]},
{rlx_app_info,new,6,
[{file,
"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/rlx_app_info.erl"},
{line,98}]},
{rlx_app_discovery,get_vsn,3,
[{file,
"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/rlx_app_discovery.erl"},
{line,285}]},
{rlx_dscv_util,discover_dir,3,
[{file,
"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/rlx_dscv_util.erl"},
{line,97}]},
{lists,map,2,[{file,"lists.erl"},{line,1239}]},
{ec_plists,'-local_runmany/3-fun-0-',3,
[{file,
"/home/tristan/Devel/rebar3/_build/default/lib/erlware_commons/src/ec_plists.erl"},
{line,753}]}]}
[{ec_plists,handle_error,3,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/erlware_commons/src/ec_plists.erl"},
{line,917}]},
{ec_plists,local_runmany,3,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/erlware_commons/src/ec_plists.erl"},
{line,764}]},
{rlx_dscv_util,do,2,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/rlx_dscv_util.erl"},
{line,52}]},
{rlx_app_discovery,resolve_app_metadata,2,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/rlx_app_discovery.erl"},
{line,103}]},
{rlx_prv_app_discover,do,1,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/rlx_prv_app_discover.erl"},
{line,54}]},
{relx,run_provider,2,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/relx.erl"},
{line,308}]},
{lists,foldl,3,[{file,"lists.erl"},{line,1263}]},
{relx,run_providers_for_actions,2,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/relx.erl"},
{line,291}]},
{relx,main,2,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/relx.erl"},
{line,65}]},
{rebar_relx,do,4,
[{file,"/home/tristan/Devel/rebar3/_build/prod/lib/rebar/src/rebar_relx.erl"},
{line,44}]},
{rebar_core,do,2,
[{file,"/home/tristan/Devel/rebar3/_build/prod/lib/rebar/src/rebar_core.erl"},
{line,154}]},
{rebar_prv_do,do_tasks,2,
[{file,"/home/tristan/Devel/rebar3/_build/prod/lib/rebar/src/rebar_prv_do.erl"},
{line,57}]},
{rebar_core,do,2,
[{file,"/home/tristan/Devel/rebar3/_build/prod/lib/rebar/src/rebar_core.erl"},
{line,154}]},
{rebar3,main,1,
[{file,"/home/tristan/Devel/rebar3/_build/prod/lib/rebar/src/rebar3.erl"},
{line,66}]},
{escript,run,2,[{file,"escript.erl"},{line,758}]},
{escript,start,1,[{file,"escript.erl"},{line,277}]},
{init,start_em,1,[]},
{init,do_boot,3,[]}]
Can you please update your Erlang version? I'm not too sure how their build works, but this seems to be part of what other issues on the mongoose project had as a problem in issues such as https://github.com/esl/MongooseIM/issues/1988
@ferd : Thanks for looking in it & providing the thread above. I reinstalled erlang 21.0.3. No help, Meanwhile, I would dig more to understand it better unless someone post it here ;)
===> Resolving OTP Applications from directories:
/Users/adarshmaurya/Downloads/MongooseIM-master/_build/prod/lib
/Users/adarshmaurya/Downloads/MongooseIM-master/ebin
/usr/local/Cellar/erlang/21.0.3/lib/erlang/lib
=ERROR REPORT==== 22-Jul-2018::16:36:07.486477 ===
Error in process <0.2081.0> with exit value:
{function_clause,
[{rlx_app_info,parse_version,
[{cmd,"tools/generate_vsn.sh"}],
[{file,
"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/rlx_app_info.erl"},
{line,197}]},
{rlx_app_info,new,6,
[{file,
"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/rlx_app_info.erl"},
{line,98}]},
{rlx_app_discovery,get_vsn,3,
[{file,
"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/rlx_app_discovery.erl"},
{line,285}]},
{rlx_dscv_util,discover_dir,3,
[{file,
"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/rlx_dscv_util.erl"},
{line,97}]},
{lists,map,2,[{file,"lists.erl"},{line,1239}]},
{ec_plists,'-local_runmany/3-fun-0-',3,
[{file,
"/home/tristan/Devel/rebar3/_build/default/lib/erlware_commons/src/ec_plists.erl"},
{line,753}]}]}
===> Uncaught error in rebar_core. Run with DEBUG=1 to see stacktrace or consult rebar3.crashdump
===> Uncaught error: {function_clause,
[{rlx_app_info,parse_version,
[{cmd,"tools/generate_vsn.sh"}],
[{file,
"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/rlx_app_info.erl"},
{line,197}]},
{rlx_app_info,new,6,
[{file,
"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/rlx_app_info.erl"},
{line,98}]},
{rlx_app_discovery,get_vsn,3,
[{file,
"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/rlx_app_discovery.erl"},
{line,285}]},
{rlx_dscv_util,discover_dir,3,
[{file,
"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/rlx_dscv_util.erl"},
{line,97}]},
{lists,map,2,[{file,"lists.erl"},{line,1239}]},
{ec_plists,'-local_runmany/3-fun-0-',3,
[{file,
"/home/tristan/Devel/rebar3/_build/default/lib/erlware_commons/src/ec_plists.erl"},
{line,753}]}]}
===> Stack trace to the error location:
[{ec_plists,handle_error,3,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/erlware_commons/src/ec_plists.erl"},
{line,917}]},
{ec_plists,local_runmany,3,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/erlware_commons/src/ec_plists.erl"},
{line,764}]},
{rlx_dscv_util,do,2,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/rlx_dscv_util.erl"},
{line,52}]},
{rlx_app_discovery,resolve_app_metadata,2,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/rlx_app_discovery.erl"},
{line,103}]},
{rlx_prv_app_discover,do,1,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/rlx_prv_app_discover.erl"},
{line,54}]},
{relx,run_provider,2,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/relx.erl"},
{line,308}]},
{lists,foldl,3,[{file,"lists.erl"},{line,1263}]},
{relx,run_providers_for_actions,2,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/relx.erl"},
{line,291}]}]
===> When submitting a bug report, please include the output of `rebar3 report "your command"`
make: *** [rel] Error 1
We'll track the issue on the other one. I'll lock this one so we stop notifying everyone on an unrelated issue.
I am working reactJS and phoenix app. When I tried to run mix ecto.create && mix ecto.migrate command. getting below error
Any idea what is the issue here/