Compilation issue when try to upgrade EMQX version 4.0.7 to 4.4.19 #12873
Replies: 2 comments 1 reply
-
Just a wild guess: are you building plugins via emqx-rel repo? Around v4.2 EMQX project was changed into a monorepo (https://github.com/emqx/emqx/?tab=readme-ov-file#build-from-source) so it's not used anymore. This may have affected the plugins as well. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Using monorepo I am able to proceed |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We have EMQX version 4.0.7 up and running. We want to upgrade the version to 4.4.19 but while building to create a docker image with desired plugins we are seeing compilation issues.
Here is the rebar.config
`%% NOTE: Order of the deps matters!
{elixir_deps, []}.
{deps,
[{ayla_auth,
{git, "https://github.com/AylaNetworks/DNC-emqx-plugin.git",
{tag, "1.1.0"}}},
emqx,
{emqx_retainer, {git, "https://github.com/emqx/emqx-retainer.git", {tag, "v4.0.7"}}},
{emqx_management, {git, "https://github.com/emqx/emqx-management.git", {tag, "v4.0.7"}}},
{emqx_dashboard, {git, "https://github.com/emqx/emqx-dashboard.git", {tag, "v4.0.7"}}},
{emqx_bridge_mqtt, {git, "https://github.com/emqx/emqx-bridge-mqtt.git", {tag, "4.2.13"}}},
{qdate, {git, "https://github.com/choptastic/qdate.git", {tag, "0.5.0"}}},
{jsone, {git, "https://github.com/sile/jsone.git", {tag, "1.5.2"}}},
{emqx_sn, {git, "https://github.com/emqx/emqx-sn.git", {tag, "4.0.7"}}},
{emqx_stomp, {git, "https://github.com/emqx/emqx-stomp.git", {tag, "v4.0.7"}}},
{emqx_web_hook, {git, "https://github.com/emqx/emqx-web-hook.git", {tag, "v4.0.7"}}},
{emqx_delayed_publish, {git, "https://github.com/emqxarchive/emqx-delayed-publish.git", {tag, "4.0.13"}}},
{emqx_recon, {git, "https://github.com/emqx/emqx-recon.git", {tag, "v4.0.7"}}},
{emqx_rule_engine, {git, "https://github.com/emqx/emqx-rule-engine.git", {tag, "v4.0.7"}}}
]}.
%% Added to deps list for 'cloud' profile
{cloud_deps,
[{emqx_lwm2m, {git, "https://github.com/emqx/emqx-lwm2m.git", {tag, "v4.0.7"}}},
{emqx_lua_hook, {git, "https://github.com/emqx/emqx-lua-hook.git", {tag, "v4.0.7"}}},
{emqx_statsd, {git, "https://github.com/emqx/emqx-prometheus.git", {tag, "v4.0.7"}}},
{emqx_reloader, {git, "https://github.com/emqx/emqx-reloader.git", {tag, "v4.0.7"}}},
{emqx_psk_file, {git, "https://github.com/emqx/emqx-psk-file.git", {tag, "v4.0.7"}}},
{emqx_plugin_template, {git, "https://github.com/emqx/emqx-plugin-template.git", {tag, "v4.0.7"}}}
]}.
{edge_deps, []}.
{relx,
[{include_src, false},
{extended_start_script, false},
{generate_start_script, false},
{sys_config, false},
{vm_args, false},
{release, {emqx, git_describe},
[kernel,
sasl,
crypto,
public_key,
asn1,
syntax_tools,
ssl,
os_mon,
inets,
compiler,
runtime_tools,
gproc,
esockd,
getopt,
cuttlefish,
jiffy,
cowboy,
emqx,
qdate,
jsone,
{mnesia, load},
{ekka, load},
{emqx_retainer, load},
{emqx_management, load},
{emqx_dashboard, load},
{emqx_bridge_mqtt, load},
{emqx_sn, load},
{emqx_stomp, load},
{emqx_web_hook, load},
{emqx_delayed_publish, load},
{emqx_recon, load},
{emqx_rule_engine, load},
{ayla_auth, load}
]},
{overlay,
[{mkdir,"etc/"},
{mkdir,"log/"},
{mkdir,"data/"},
{mkdir,"data/mnesia"},
{mkdir,"data/configs"},
{mkdir,"data/scripts"},
{template,"bin/emqx_env","bin/emqx_env"},
{template,"bin/emqx","bin/emqx"},
{template,"bin/emqx_ctl","bin/emqx_ctl"},
{template,"bin/emqx.cmd","bin/emqx.cmd"},
{template,"bin/emqx_ctl.cmd","bin/emqx_ctl.cmd"},
{copy,"{{output_dir}}/../../conf/plugins","etc/"},
{template,"{{output_dir}}/../../conf/emqx.conf","etc/emqx.conf"},
{template,"{{output_dir}}/../../conf/ssl_dist.conf","etc/ssl_dist.conf"},
{template,"{{output_dir}}/../../conf/plugins/emqx_bridge_mqtt.conf", "etc/plugins/emqx_bridge_mqtt.conf"},
{template, "data/loaded_plugins.tmpl", "data/loaded_plugins"},
{copy,"deploy/conf/acl.conf","etc/acl.conf"},
{copy,"bin/nodetool","bin/nodetool"},
{copy,"{{output_dir}}/../../conf/schema","releases/{{rel_vsn}}/"},
{copy,"bin/install_upgrade_escript", "bin/install_upgrade_escript"},
{template,"{{output_dir}}/../../lib/emqx/etc/{{vm_args_file}}","etc/vm.args"},
{copy, "{{output_dir}}/../../lib/emqx/etc/certs","etc/"},
{copy, "{{output_dir}}/../../lib/cuttlefish/cuttlefish","bin/"}
]}
]}.
{elixir_relx_apps, []}.
{edge_relx_apps, []}.
{cloud_relx_apps,
[{emqx_lwm2m, load},
{emqx_lua_hook, load},
{emqx_statsd, load},
{emqx_reloader, load},
{emqx_psk_file, load},
{emqx_plugin_template, load},
{observer, load},
luerl,
xmerl
]}.
{cloud_relx_overlay,
[{template,"{{output_dir}}/../../conf/plugins/emqx_lwm2m.conf", "etc/plugins/emqx_lwm2m.conf"},
{template,"{{output_dir}}/../../conf/plugins/emqx_psk_file.conf", "etc/plugins/emqx_psk_file.conf"},
{copy,"{{output_dir}}/../../lib/emqx_lwm2m/lwm2m_xml","etc/"},
{copy, "{{output_dir}}/../../lib/emqx_psk_file/etc/psk.txt", "etc/psk.txt"}
]}.
{edge_relx_overlay, []}.
{edoc_opts, [{preprocess,true}]}.
{erl_opts, [warn_unused_vars,warn_shadow_vars,warn_unused_import,
warn_obsolete_guard,no_debug_info,compressed]}.
{overrides, [{add, [{erl_opts, [no_debug_info, compressed]}]}]}.
{xref_checks, [undefined_function_calls,undefined_functions,locals_not_used,
deprecated_function_calls,warnings_as_errors,
deprecated_functions]}.
{cover_enabled, true}.
{cover_opts, [verbose]}.
{cover_export_enabled, true}.
{plugins, [rebar3_run]}.
{post_hooks,
[{"(linux|darwin|solaris|freebsd|netbsd|openbsd)", compile, "./post-compile.sh"},
{"win32", compile, "post-compile.cmd"}
]}.
`
Here are the compilation errors that we are encountering
`===> files to compile ["/codes/_build/emqx/lib/emqx_management/src/emqx_mgmt_api_metrics.erl",
"/codes/_build/emqx/lib/emqx_management/src/emqx_mgmt_http.erl",
"/codes/_build/emqx/lib/emqx_management/src/emqx_mgmt_sup.erl",
"/codes/_build/emqx/lib/emqx_management/src/emqx_mgmt_api_brokers.erl",
"/codes/_build/emqx/lib/emqx_management/src/emqx_mgmt_cli.erl",
"/codes/_build/emqx/lib/emqx_management/src/emqx_mgmt_api_pubsub.erl",
"/codes/_build/emqx/lib/emqx_management/src/emqx_mgmt_api_data.erl",
"/codes/_build/emqx/lib/emqx_management/src/emqx_mgmt_api_subscriptions.erl",
"/codes/_build/emqx/lib/emqx_management/src/emqx_mgmt_api_routes.erl",
"/codes/_build/emqx/lib/emqx_management/src/emqx_mgmt_api_plugins.erl",
"/codes/_build/emqx/lib/emqx_management/src/emqx_mgmt_api_clients.erl",
"/codes/_build/emqx/lib/emqx_management/src/emqx_mgmt_auth.erl",
"/codes/_build/emqx/lib/emqx_management/src/emqx_mgmt_api_nodes.erl",
"/codes/_build/emqx/lib/emqx_management/src/emqx_mgmt_api_listeners.erl",
"/codes/_build/emqx/lib/emqx_management/src/emqx_mgmt_api.erl",
"/codes/_build/emqx/lib/emqx_management/src/emqx_mgmt.erl",
"/codes/_build/emqx/lib/emqx_management/src/emqx_mgmt_api_stats.erl",
"/codes/_build/emqx/lib/emqx_management/src/emqx_mgmt_api_alarms.erl",
"/codes/_build/emqx/lib/emqx_management/src/emqx_mgmt_util.erl",
"/codes/_build/emqx/lib/emqx_management/src/emqx_mgmt_api_apps.erl",
"/codes/_build/emqx/lib/emqx_management/src/emqx_mgmt_app.erl",
"/codes/_build/emqx/lib/emqx_management/src/emqx_mgmt_api_banned.erl"]
===> Compiled emqx_mgmt_util.erl
===> Starting 2 compile worker(s)
===> Compiled /codes/_build/emqx/lib/emqx_management/src/emqx_mgmt_api_listeners.erl
===> Compiling _build/emqx/lib/emqx_management/src/emqx_mgmt_api_alarms.erl failed
_build/emqx/lib/emqx_management/src/emqx_mgmt_api_alarms.erl:70: record alarm undefined
_build/emqx/lib/emqx_management/src/emqx_mgmt_api_alarms.erl:75: variable 'Severity' is unbound
_build/emqx/lib/emqx_management/src/emqx_mgmt_api_alarms.erl:76: variable 'Title' is unbound
_build/emqx/lib/emqx_management/src/emqx_mgmt_api_alarms.erl:77: variable 'Summary' is unbound
_build/emqx/lib/emqx_management/src/emqx_mgmt_api_alarms.erl:78: variable 'Ts' is unbound
_build/emqx/lib/emqx_management/src/emqx_mgmt_api_alarms.erl:82: record alarm undefined
_build/emqx/lib/emqx_management/src/emqx_mgmt_api_alarms.erl:87: variable 'Severity' is unbound
_build/emqx/lib/emqx_management/src/emqx_mgmt_api_alarms.erl:88: variable 'Title' is unbound
_build/emqx/lib/emqx_management/src/emqx_mgmt_api_alarms.erl:89: variable 'Summary' is unbound
_build/emqx/lib/emqx_management/src/emqx_mgmt_api_alarms.erl:90: variable 'Ts' is unbound
�[91mmake: *** [Makefile:51: emqx] Error 1
�[0mThe command '/bin/sh -c make ${EMQX_NAME} DEBUG=1' returned a non-zero code: 2`
Can any one tell what is going wrong?
Beta Was this translation helpful? Give feedback.
All reactions