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

can't build binary by make retina-binary #128

Closed
nayihz opened this issue Mar 23, 2024 · 2 comments
Closed

can't build binary by make retina-binary #128

nayihz opened this issue Mar 23, 2024 · 2 comments
Assignees
Labels
area/infra Test, Release, or CI Infrastructure lang/go The Go Programming Language priority/1 P1 type/bug Something isn't working

Comments

@nayihz
Copy link
Contributor

nayihz commented Mar 23, 2024

Describe the bug

# make retina-binary
package command-line-arguments
        imports github.com/microsoft/retina/pkg/plugin/packetforward
        imports github.com/microsoft/retina/pkg/plugin/packetforward/_cprog: C source files not allowed when not using cgo or SWIG: packetforward.c
package command-line-arguments
        imports github.com/microsoft/retina/pkg/plugin/packetforward
        imports github.com/microsoft/retina/pkg/plugin/packetforward/_cprog: C source files not allowed when not using cgo or SWIG: packetforward.c
prog.go:12:2: no required module provides package github.com/golang/mock/mockgen/model: go.mod file not found in current directory or any parent directory; see 'go help modules'
prog.go:14:2: no required module provides package github.com/microsoft/retina/pkg/plugin/packetforward: go.mod file not found in current directory or any parent directory; see 'go help modules'
2024/03/23 12:35:28 Loading input failed: exit status 1
exit status 1
pkg/plugin/packetforward/types_linux.go:31: running "go": exit status 1

To Reproduce
Just run make retina-binary on main branch.

Expected behavior
Create an output directory and build retina binary successfully.

Screenshots

Platform (please complete the following information):

  • OS: Ubuntu
  • Kubernetes Version: [e.g. 1.22]
  • Host: [e.g. AKS, KIND, self-host, etc]
  • Retina Version:

Additional context
Add any other context about the problem here.

@nayihz nayihz added the type/bug Something isn't working label Mar 23, 2024
@rbtr rbtr added this to the v0.0.2 milestone Mar 25, 2024
@nddq
Copy link
Contributor

nddq commented Mar 25, 2024

I believe you have to disable CGO_ENABLED for this, so adding CGO_ENABLED=0 before make retina-binary should work. Can you give us addition contexts i.e the reproduce steps as well as the platform you used to build?

@nayihz
Copy link
Contributor Author

nayihz commented Mar 26, 2024

I don't disable CGO_ENABLED manually. CGO_ENABLED=0 doesn't seem to take effect actually.
I have open a pr to fix it(#129). PTAL.

@rbtr rbtr removed this from the v0.0.2 milestone Mar 26, 2024
@rbtr rbtr moved this to Accepted in Retina Triage Board Apr 2, 2024
@rbtr rbtr moved this from Accepted to Ready in Retina Triage Board Apr 3, 2024
@rbtr rbtr added lang/go The Go Programming Language area/infra Test, Release, or CI Infrastructure priority/1 P1 labels Apr 3, 2024
github-merge-queue bot pushed a commit that referenced this issue Apr 4, 2024
Addresses issue #128

Signed-off-by: nayihz <[email protected]>
Co-authored-by: Evan Baker <[email protected]>
@nddq nddq closed this as completed Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/infra Test, Release, or CI Infrastructure lang/go The Go Programming Language priority/1 P1 type/bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

3 participants