With the Apps plugin we've run into an issue (https://github.com/mattermost/mattermost-plugin-apps/pull/318) where cross compiling the plugin causes an issue as on cloud server a symbol was missing:
error relocating plugins/com.mattermost.apps/server/dist/plugin-linux-amd64: __fprintf_chk: symbol not found
By static linking the binary we not longer rely on a DL to be there.
Summary
With the Apps plugin we've run into an issue (https://github.com/mattermost/mattermost-plugin-apps/pull/318) where cross compiling the plugin causes an issue as on cloud server a symbol was missing:
error relocating plugins/com.mattermost.apps/server/dist/plugin-linux-amd64: __fprintf_chk: symbol not found
By static linking the binary we not longer rely on a DL to be there.
Focalboard already disabled CGO: https://github.com/mattermost/focalboard/blob/d6e494ca295969322abca0f62228061161573dd7/mattermost-plugin/Makefile#L91-L105
Ticket Link
https://mattermost.atlassian.net/browse/MM-43713