goreleaser: Cannot compile with a cgo package

Describe the bug

Compiling with a cgo package succeeds with go build but fails when done through goreleaser.

To Reproduce

This repo contains a minimal reproduction.

Expected behavior

Goreleaser should compile if passed the same arguments and flags that are passed to go build

Environment (please complete the following information):

  • OS: mac
  • OS version: Darwin MIKEs-MacBook-Air.local 16.6.0 Darwin Kernel Version 16.6.0: Fri Apr 14 16:21:16 PDT 2017; root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64
  • GoReleaser Version 0.84.0, commit 93a0055d036200749a25b5a3454737b0de6af2d3, built at 2018-08-28T14:54:55Z

Additional context Please refer to the reproduction repository.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 15 (12 by maintainers)

Commits related to this issue

Most upvoted comments

Thanks so much for the help @sgnn7! You’re correct, I ended up opening an issue with goreleaser-action to find out more: https://github.com/goreleaser/goreleaser-action/issues/233

Ultimately I created a project that let’s you pull osxcross into that github action: https://github.com/plentico/osxcross-target

That let’s me build linux and darwin binaries, hopefully helps other folks as well 😃. Thanks!