Error while building Vernemq 1.12.3 from source

46 views
Skip to first unread message

manjeera bellamkonda

unread,
Nov 30, 2021, 12:10:50 AM11/30/21
to vernemq-users
Hi,

I'm trying to run the vernemq 1.12.3 source using a dockerfile. I'm building it on Debian Buster with OTP 23.3.2. I'm seeing an error at the vmq_bridge compile step due to an error in rebar_core. This is the Dockerfile I've used and also the stack trace for the error when run with Diagnostics =1. I appreciate any help that I can get. Thank you!

Dockerfile:

FROM erlang:23.3.2
WORKDIR /vernemq
RUN apt-get update &&
apt-get install -y git bash curl build-essential erlang libsnappy-dev libssl-dev &&
RUN git clone https://github.com/vernemq/vernemq.git .
RUN git checkout -b 1.12.3 tags/1.12.3; make rel DIAGNOSTIC=1;
RUN cd _build/default/rel/vernemq; tar -cvzf /tmp/vernemq-1.12.3.tar.gz .

Stack Trace:

===> Compiling vmq_bridge

===> compile options: {erl_opts, [fail_on_warning,

                                  {d,nowarn_gen_fsm},

                                  {parse_transform,lager_transform},

                                  warnings_as_errors,debug_info]}.

===> files to analyze ["/vernemq/apps/vmq_bridge/src/vmq_bridge_app.erl",

                       "/vernemq/apps/vmq_bridge/src/vmq_bridge.erl",

                       "/vernemq/apps/vmq_bridge/src/vmq_bridge_cli.erl",

                       "/vernemq/apps/vmq_bridge/src/vmq_bridge_sup.erl"]

===> Starting 4 worker(s)

===>      Compiled vmq_bridge_app.erl

===>      Compiled vmq_bridge_cli.erl

===>      Compiled vmq_bridge_sup.erl

===>      Compiled vmq_bridge.erl

===> Running hooks for erlc_compile in app vmq_ql (/vernemq/apps/vmq_ql) with configuration:

===> {post_hooks, []}.

===> run_hooks("/vernemq/apps/vmq_ql", post_hooks, erlc_compile) -> no hooks defined


===> Running hooks for erlc_compile in app vmq_plugin (/vernemq/apps/vmq_plugin) with configuration:

===> {post_hooks, []}.

===> run_hooks("/vernemq/apps/vmq_plugin", post_hooks, erlc_compile) -> no hooks defined


===> Running hooks for erlc_compile in app vmq_commons (/vernemq/apps/vmq_commons) with configuration:

===> {post_hooks, []}.

===> run_hooks("/vernemq/apps/vmq_commons", post_hooks, erlc_compile) -> no hooks defined


===> Running hooks for erlc_compile in app vmq_server (/vernemq/apps/vmq_server) with configuration:

===> {post_hooks, []}.

===> run_hooks("/vernemq/apps/vmq_server", post_hooks, erlc_compile) -> no hooks defined


===> Running hooks for erlc_compile in app vmq_webhooks (/vernemq/apps/vmq_webhooks) with configuration:

===> {post_hooks, []}.

===> run_hooks("/vernemq/apps/vmq_webhooks", post_hooks, erlc_compile) -> no hooks defined


===> Running hooks for erlc_compile in app vmq_swc (/vernemq/apps/vmq_swc) with configuration:

===> {post_hooks, []}.

===> run_hooks("/vernemq/apps/vmq_swc", post_hooks, erlc_compile) -> no hooks defined


===> Running hooks for erlc_compile in app vmq_acl (/vernemq/apps/vmq_acl) with configuration:

===> {post_hooks, []}.

===> run_hooks("/vernemq/apps/vmq_acl", post_hooks, erlc_compile) -> no hooks defined

===> Running hooks for erlc_compile in app vmq_plumtree (/vernemq/apps/vmq_plumtree) with configuration:

===> {post_hooks, []}.

===> run_hooks("/vernemq/apps/vmq_plumtree", post_hooks, erlc_compile) -> no hooks defined


===> Running hooks for erlc_compile in app vmq_generic_msg_store (/vernemq/apps/vmq_generic_msg_store) with configuration:

===> {post_hooks, []}.

===> run_hooks("/vernemq/apps/vmq_generic_msg_store", post_hooks, erlc_compile) -> no hooks defined


===> Running hooks for erlc_compile in app vmq_passwd (/vernemq/apps/vmq_passwd) with configuration:

===> {post_hooks, []}.

===> Running hooks for erlc_compile in app vmq_mqtt5_demo_plugin (/vernemq/apps/vmq_mqtt5_demo_plugin) with configuration:

===> {post_hooks, []}.

===> run_hooks("/vernemq/apps/vmq_mqtt5_demo_plugin", post_hooks, erlc_compile) -> no hooks defined


===> Running hooks for erlc_compile in app vmq_pulse (/vernemq/apps/vmq_pulse) with configuration:

===> {post_hooks, []}.

===> run_hooks("/vernemq/apps/vmq_pulse", post_hooks, erlc_compile) -> no hooks defined


===> Running hooks for erlc_compile in app vmq_bridge (/vernemq/apps/vmq_bridge) with configuration:

===> {post_hooks, []}.

===> run_hooks("/vernemq/apps/vmq_bridge", post_hooks, erlc_compile) -> no hooks defined


===> Running hooks for erlc_compile in app vmq_diversity (/vernemq/apps/vmq_diversity) with configuration:

===> {post_hooks, []}.

===> run_hooks("/vernemq/apps/vmq_diversity", post_hooks, erlc_compile) -> no hooks defined


===> Running hooks for app_compile in app vmq_ql (/vernemq/apps/vmq_ql) with configuration:

===> {provider_hooks, []}.

===> {pre_hooks, []}.

===> run_hooks("/vernemq/apps/vmq_ql", pre_hooks, app_compile) -> no hooks defined


===> Running hooks for app_compile in app vmq_plugin (/vernemq/apps/vmq_plugin) with configuration:

===> {pre_hooks, []}.

===> run_hooks("/vernemq/apps/vmq_plugin", pre_hooks, app_compile) -> no hooks defined


===> Running hooks for app_compile in app vmq_commons (/vernemq/apps/vmq_commons) with configuration:

===> {pre_hooks, []}.

===> run_hooks("/vernemq/apps/vmq_commons", pre_hooks, app_compile) -> no hooks defined


===> Running hooks for app_compile in app vmq_server (/vernemq/apps/vmq_server) with configuration:

===> {pre_hooks, []}.

===> run_hooks("/vernemq/apps/vmq_server", pre_hooks, app_compile) -> no hooks defined


===> Running hooks for app_compile in app vmq_webhooks (/vernemq/apps/vmq_webhooks) with configuration:

===> {pre_hooks, []}.

===> run_hooks("/vernemq/apps/vmq_webhooks", pre_hooks, app_compile) -> no hooks defined


===> Running hooks for app_compile in app vmq_swc (/vernemq/apps/vmq_swc) with configuration:

===> {pre_hooks, []}.

===> run_hooks("/vernemq/apps/vmq_swc", pre_hooks, app_compile) -> no hooks defined


===> Running hooks for app_compile in app vmq_acl (/vernemq/apps/vmq_acl) with configuration:

===> {pre_hooks, []}.

===> run_hooks("/vernemq/apps/vmq_acl", pre_hooks, app_compile) -> no hooks defined


===> Running hooks for app_compile in app vmq_plumtree (/vernemq/apps/vmq_plumtree) with configuration:

===> {pre_hooks, []}.

===> run_hooks("/vernemq/apps/vmq_plumtree", pre_hooks, app_compile) -> no hooks defined


===> Running hooks for app_compile in app vmq_generic_msg_store (/vernemq/apps/vmq_generic_msg_store) with configuration:

===> {pre_hooks, []}.

===> run_hooks("/vernemq/apps/vmq_generic_msg_store", pre_hooks, app_compile) -> no hooks defined


===> Running hooks for app_compile in app vmq_passwd (/vernemq/apps/vmq_passwd) with configuration:

===> {pre_hooks, []}.

===> run_hooks("/vernemq/apps/vmq_passwd", pre_hooks, app_compile) -> no hooks defined


===> Running hooks for app_compile in app vmq_mqtt5_demo_plugin (/vernemq/apps/vmq_mqtt5_demo_plugin) with configuration:

===> {pre_hooks, []}.

===> run_hooks("/vernemq/apps/vmq_mqtt5_demo_plugin", pre_hooks, app_compile) -> no hooks defined

===> Running hooks for app_compile in app vmq_pulse (/vernemq/apps/vmq_pulse) with configuration:

===> {pre_hooks, []}.

===> run_hooks("/vernemq/apps/vmq_pulse", pre_hooks, app_compile) -> no hooks defined


===> Running hooks for app_compile in app vmq_bridge (/vernemq/apps/vmq_bridge) with configuration:

===> {pre_hooks, []}.

===> run_hooks("/vernemq/apps/vmq_bridge", pre_hooks, app_compile) -> no hooks defined


===> Running hooks for app_compile in app vmq_diversity (/vernemq/apps/vmq_diversity) with configuration:

===> {pre_hooks, []}.

===> run_hooks("/vernemq/apps/vmq_diversity", pre_hooks, app_compile) -> no hooks defined


===> Setting paths to [plugins]

===> sh info:

cwd: "/vernemq"

cmd: git log -n 1 --pretty=format:"%h

" 


===> opts: [{use_stdout,false},return_on_error,{cd,"/vernemq/apps/vmq_ql"}]


===> Port Cmd: git log -n 1 --pretty=format:"%h

" 

Port Opts: [{cd,"/vernemq/apps/vmq_ql"},

            exit_status,

            {line,16384},

            use_stdio,stderr_to_stdout,hide,eof,binary]


===> sh info:

cwd: "/vernemq"

cmd: git -c color.ui=false log --oneline --no-walk --tags --decorate


===> opts: [{use_stdout,false},return_on_error,{cd,"/vernemq/apps/vmq_ql"}]


===> Port Cmd: git -c color.ui=false log --oneline --no-walk --tags --decorate

Port Opts: [{cd,"/vernemq/apps/vmq_ql"},

            exit_status,

            {line,16384},

            use_stdio,stderr_to_stdout,hide,eof,binary]


===> sh info:

cwd: "/vernemq"

cmd: git rev-list --count 1.12.3..HEAD


===> opts: [{use_stdout,false},

               {cd,"/vernemq/apps/vmq_ql"},

               {debug_abort_on_error,"Getting rev-list of git dep failed in /vernemq/apps/vmq_ql"}]


===> Port Cmd: git rev-list --count 1.12.3..HEAD

Port Opts: [{cd,"/vernemq/apps/vmq_ql"},

            exit_status,

            {line,16384},

            use_stdio,stderr_to_stdout,hide,eof,binary]


===> Uncaught error in rebar_core. Run with DIAGNOSTIC=1 to see stacktrace or consult rebar3.crashdump

===> Uncaught error: badarg

===> Stack trace to the error location:

[{erlang,list_to_integer,["warning: refname '1.12.3' is ambiguous.\n0"],[]},

 {rebar_git_resource,get_patch_count,2,

                     [{file,"/home/runner/work/rebar3/rebar3/src/rebar_git_resource.erl"},

                      {line,342}]},

 {rebar_git_resource,collect_default_refcount,1,

                     [{file,"/home/runner/work/rebar3/rebar3/src/rebar_git_resource.erl"},

                      {line,315}]},

 {rebar_git_resource,make_vsn_,1,

                     [{file,"/home/runner/work/rebar3/rebar3/src/rebar_git_resource.erl"},

                      {line,268}]},

 {rebar_utils,vcs_vsn,3,

              [{file,"/home/runner/work/rebar3/rebar3/src/rebar_utils.erl"},

               {line,754}]},

 {rebar_otp_app,preprocess,3,

                [{file,"/home/runner/work/rebar3/rebar3/src/rebar_otp_app.erl"},

                 {line,125}]},

 {rebar_otp_app,compile,2,

                [{file,"/home/runner/work/rebar3/rebar3/src/rebar_otp_app.erl"},

                 {line,49}]},

 {rebar_prv_compile,compile_app_file,3,

                    [{file,"/home/runner/work/rebar3/rebar3/src/rebar_prv_compile.erl"},

                     {line,254}]}]


Thanks,

Manjeera Bellamkonda

André Fatton

unread,
Nov 30, 2021, 2:08:42 AM11/30/21
to vernemq-users
Hi,

you get "warning: refname '1.12.3' is ambiguous."

I guess you have to checkout the 1.12.3 tag, and not create a local branch of the same name.
Regards,
André
Reply all
Reply to author
Forward
0 new messages