-
Notifications
You must be signed in to change notification settings - Fork 76
Open
Description
Steps to reproduce (from README):
- git clone https://github.com/pwnesia/dnstake
- cd dnstake/cmd/dnstake
- go build .
Build fails with: link: golang.org/x/net/internal/socket: invalid reference to syscall.recvmsg
(seen on macOS/darwin arm64 with newer Go toolchains).
In restricted/sandboxed environments it can also fail earlier with “operation not permitted”
trying to write Go caches under the default GOCACHE/GOMODCACHE paths.
- Root cause:
- The dependency tree pulls very old golang.org/x/net / golang.org/x/sys versions (2019-era)
that don’t link correctly with current Go on macOS. - Some environments don’t allow writing to the default Go cache/module cache directories.
- The dependency tree pulls very old golang.org/x/net / golang.org/x/sys versions (2019-era)
- Proposed fix:
- Update/pin deps in go.mod (and regenerate go.sum) to newer compatible versions, e.g.
golang.org/x/net v0.35.0 and golang.org/x/sys v0.30.0, and bump the module go version to at
least 1.18. - Update README manual build steps to build from repo root: go build ./cmd/dnstake.
- Document a cache workaround for sandboxed builds, e.g. GOCACHE="$PWD/.cache/go-build"
GOMODCACHE="$PWD/.cache/gomod" go build ./cmd/dnstake, and ignore .cache/ in .gitignore.
- Update/pin deps in go.mod (and regenerate go.sum) to newer compatible versions, e.g.
- Expected result:
- go build succeeds on macOS with current Go versions following the README steps.
(Can work for diff linux as well!)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels