Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dockerfile: add delve to binaries-for-test #5497

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

crazy-max
Copy link
Member

follow-up #5291 (comment)

@crazy-max
Copy link
Member Author

Does not seem supported on freebsd: https://github.com/moby/buildkit/actions/runs/11722197637/job/32651224009?pr=5497#step:5:131

 > [dlv 1/1] RUN --mount=target=/root/.cache,type=cache    --mount=target=/go/pkg/mod,type=cache <<EOT (set -ex...):
0.737 go: downloading golang.org/x/sys v0.13.0
0.741 go: downloading github.com/cpuguy83/go-md2man/v2 v2.0.2
0.742 go: downloading gopkg.in/yaml.v3 v3.0.1
0.784 go: downloading github.com/cilium/ebpf v0.11.0
0.798 go: downloading go.starlark.net v0.0.0-20231101134539-556fd59b42f6
0.866 go: downloading github.com/mattn/go-runewidth v0.0.13
0.907 go: downloading github.com/russross/blackfriday/v2 v2.1.0
0.913 go: downloading github.com/rivo/uniseg v0.2.0
0.990 go: downloading golang.org/x/exp v0.0.0-20230224173230-c95f2b4c22f2
1.126 pkg/mod/github.com/go-delve/[email protected]/service/debugger/debugger.go:32:2: found packages native (dump_freebsd.go) and can_not_build_on_freebsd_with_cgo_disabled (support_sentinel_cgo_freebsd.go) in /go/pkg/mod/github.com/go-delve/[email protected]/pkg/proc/native

Seems we need to enable CGO: https://github.com/go-delve/delve/blob/b16e12fde736f7cad60cfe4d029ba9595ca8de0c/pkg/proc/native/support_sentinel_cgo_freebsd.go#L5

See also go-delve/delve#1480

@thaJeztah
Copy link
Member

Seems we need to enable CGO

How much would we loose if we'd skip this for freeBSD? (mostly considering if it's worth adding CGO only for that platform)

@crazy-max
Copy link
Member Author

Seems we need to enable CGO

How much would we loose if we'd skip this for freeBSD? (mostly considering if it's worth adding CGO only for that platform)

Yes I think I will skip freebsd, enabling CGO doesn't seem to work, some headers look missing:

 > [dlv 2/2] RUN --mount=target=/root/.cache,type=cache    --mount=target=/go/pkg/mod,type=cache <<EOT (set -ex...):
0.110 + xx-go install github.com/go-delve/delve/cmd/[email protected]
0.855 # runtime/cgo
0.855 gcc_freebsd_amd64.c:7:10: fatal error: 'sys/signalvar.h' file not found

Copy link
Collaborator

@profnandaa profnandaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the add.

exit 0
fi
xx-go install "github.com/go-delve/delve/cmd/dlv@${DELVE_VERSION}"
if ! xx-info is-cross; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you change the GOBIN solution?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants