golang: Skip CI builds on MacOS and newer FreeBSD
commita3a2f9a46054ab45ce170f92344eea1e801d9892
authorEric Blake <eblake@redhat.com>
Wed, 1 Mar 2023 16:43:57 +0000 (1 10:43 -0600)
committerEric Blake <eblake@redhat.com>
Wed, 1 Mar 2023 16:43:57 +0000 (1 10:43 -0600)
treefe06e7564df4301dc2ecc2b311c298334bfb525a
parentf935260cc50265e1f89e95ae4ca275b43d38f128
golang: Skip CI builds on MacOS and newer FreeBSD

golang is causing odd linker errors on these platforms:

FreeBSD 13:
go build -o /tmp/cirrus-ci-build/plugins/golang/examples/disk/nbdkit-godisk-plugin.so -buildmode=c-shared
# main
/usr/local/go119/pkg/tool/freebsd_amd64/link: running cc failed: exit status 1
ld: error: /lib/libc.so.7: undefined reference to environ [--no-allow-shlib-undefined]
ld: error: /lib/libc.so.7: undefined reference to __progname [--no-allow-shlib-undefined]
cc: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[3]: *** [Makefile:1097: examples/disk/nbdkit-godisk-plugin.so] Error 2

MacOS 12:
go build -o /private/var/folders/76/zy5ktkns50v6gt5g8r0sf6sc0000gn/T/cirrus-ci-build/plugins/golang/examples/disk/nbdkit-godisk-plugin.so -buildmode=c-shared
# main
/opt/homebrew/Cellar/go/1.20.1/libexec/pkg/tool/darwin_arm64/link: running clang failed: exit status 1
ld: unknown option: --unresolved-symbols=ignore-in-object-files
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[3]: *** [Makefile:1097: examples/disk/nbdkit-godisk-plugin.so] Error 1

It's easier to just ignore golang on these platforms than to worry
about why the Go community is playing weird games with the linker.
ci/gitlab/builds.yml
ci/manifest.yml