1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-02-03 13:11:48 +02:00

docs: errors/build

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
Carlos A Becker 2022-12-04 10:29:02 -03:00
parent b06f217e3b
commit 5c15e5a6ef
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940
2 changed files with 26 additions and 0 deletions

25
www/docs/errors/build.md Normal file
View File

@ -0,0 +1,25 @@
# Build Errors
## Undefined methods
If you see an error that looks like this:
```shell
⨯ release failed after 14s error=failed to build for darwin_amd64_v1: exit status 2: # github.com/rjeczalik/notify
../../../../go/pkg/mod/github.com/rjeczalik/notify@v0.9.2/watcher_fsevents.go:49:11: undefined: stream
../../../../go/pkg/mod/github.com/rjeczalik/notify@v0.9.2/watcher_fsevents.go:200:13: undefined: newStream
```
It usually means that some dependency you are using needs CGO, or does not have
an implementation for the given OS.
You can check that locally with:
```bash
GOOS=darwin GOARCH=amd64 go build ./...
CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 go build ./...
```
If the first fails, but the seconds succeeds, you need to set up
[CGO](/limitations/cgo). If both fail, your dependency don't have an
implementation for some methods for Darwin amd64 (in this example).

View File

@ -151,6 +151,7 @@ nav:
- errors/release-upload.md
- errors/docker-build.md
- errors/no-main.md
- errors/build.md
- errors/resource-not-accessible-by-integration.md
- errors/no-history.md
- errors/multiple-binaries-archive.md