mattermost / mattermost-plugin-starter-template

Build scripts and templates for writing Mattermost plugins.
https://developers.mattermost.com/extend/plugins/
Apache License 2.0
128 stars 120 forks source link

[MM-43713] Disable CGO for all builds #167

Closed hanzei closed 1 year ago

hanzei commented 2 years ago

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

hanzei commented 1 year ago

/update-branch