插件打包编译过程中服务器报错,使用的时erl26,centOS7,执行make rel

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
ATOMIC
linked by target “quicer_static” in directory /opt/code/my_emqx_plugin_h/_build/default/lib/quicer

CMake Error in CMakeLists.txt:
The compiler feature “cxx_std_17” is not known to CXX compiler

“GNU”

version 4.8.5.

CMake Generate step failed. Build files cannot be regenerated correctly.
make[1]: *** [build-nif] 错误 1
make[1]: 离开目录“/opt/code/my_emqx_plugin_h/_build/default/lib/quicer”
===> Hook for compile failed!

这个是 quicer 编译失败了。

在 v5.8.6 之前 EMQX 插件开发会依赖于 EMQX,EMQX 里面有一个GitHub - emqx/quic: QUIC protocol for Erlang & Elixir ,他会依赖于微软的 quic,这是一个 c 库。
你需要能成功编译 quic,才能成功编译 EMQX,然后才能打包插件。

如果你是在 v5.8.6上开发,建议看 quic的 readme,把他编译通。

但这个依赖关系太重了,不是必要的,所以会在 v5.9.1,后只依赖一个必要的库,而不是整个 emqx。
你可以参照这个样例库: https://github.com/emqx/emqx-offline-message-plugin
https://github.com/emqx/emqx-offline-message-plugin/pull/4

Do not depend on EMQX directly; depend on a plugin helper module instead.