emqx / emqx/emqx-plugin-template
make erl command occur error
- Dominant language
- Erlang
- Stars
- 79
- Forks
- 75
- PR merge metrics
- No merged PRs in 30d
Description
When running make or rebar3 emqx_plugrel tar, thWhen running make or rebar3 emqx_plugrel tar, the following error occurs:
D:/github/emqx-plugin-template-master/emqx-plugin-templates/rebar3 emqx_plugrel tar
===> Plugin emqx_plugin_helper does not export init/1. It will not be used.
===> Plugin emqx_plugin_helper does not export init/1. It will not be used.
===> Verifying dependencies...
===> Analyzing applications...
===> Compiling my_emqx_plugin
===> Assembling release my_emqx_plugin-1.0.0...
===> There are missing function calls in the release.
===> Make sure all applications needed at runtime are included in the release.
===> my_emqx_plugin:hook/0 calls undefined function emqx_hooks:add/3
===> my_emqx_plugin:on_client_authorize/4 calls undefined function emqx_topic:match/2
===> my_emqx_plugin:on_message_puback/4 calls undefined function emqx_message:to_map/1
===> my_emqx_plugin:unhook/0 calls undefined function emqx_hooks:del/2
===> my_emqx_plugin_app:start/2 calls undefined function emqx_ctl:register_command/2
===> my_emqx_plugin_app:stop/1 calls undefined function emqx_ctl:unregister_command/1
===> my_emqx_plugin_cli:cmd/1 calls undefined function emqx_ctl:print/2
===> my_emqx_plugin_cli:cmd/1 calls undefined function emqx_ctl:usage/1
===> my_emqx_plugin_cli:cmd/1 calls undefined function emqx_utils_json:encode/1
===> Warnings generating release:
*WARNING* Missing application sasl. Can not upgrade with this release
===> Release successfully assembled: _build/default/rel/my_emqx_plugin
===> [emqx_plugrel] Pre-processing to create tarball for my_emqx_plugin-1.0.0
===> Uncaught error in rebar_core. Run with DIAGNOSTIC=1 to see stacktrace or consult rebar3.crashdump
===> When submitting a bug report, please include the output of `rebar3 report "your command"`
make: *** [Makefile:46: rel] Error 1
rebar3.crashdump Content
text
Error: function_clause
[{filelib,wildcard,
[<<"d:/github/emqx-plugin-template-master/emqx-plugin-templates/_build/default/rel/my_emqx_plugin/lib/my_emqx_plugin-0.1.0">>],
[{file,"filelib.erl"},{line,157}]},
{rebar_file_utils,cp_r_win32,3,[{file,"rebar_file_utils.erl"},{line,650}]},
{rebar_file_utils,'-cp_r/3-fun-1-',3,
[{file,"rebar_file_utils.erl"},{line,258}]},
{lists,foreach_1,2,[{file,"lists.erl"},{line,2310}]},
{rebar_file_utils,cp_r,3,[{file,"rebar_file_utils.erl"},{line,258}]},
{emqx_plugrel,make_tar,2,
[{file,"d:/github/emqx-plugin-template-master/emqx-plugin-templates/_build/default/plugins/emqx_plugrel/src/emqx_plugrel.erl"},
{line,135}]},
{emqx_plugrel,do,1,
[{file,"d:/github/emqx-plugin-template-master/emqx-plugin-templates/_build/default/plugins/emqx_plugrel/src/emqx_plugrel.erl"},
{line,47}]},
{rebar_core,do,2,[{file,"rebar_core.erl"},{line,155}]}]e following error occurs:
I want to know how to solve this
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with Makefile:46 and the rebar3 emqx_plugrel tar command, then inspect emqx_plugrel/src/emqx_plugrel.erl at lines 47 and 135 alongside rebar_file_utils:cp_r_win32/3. Re-run with DIAGNOSTIC=1 and review the crashdump; done means the release tarball is created without the function_clause error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- erlang
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100