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

feat: Replace CGO_ENABLED=0 with //go:build ignore #950

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on Nov 13, 2024

  1. Replace CGO_ENABLED=0 with //go:build ignore

    It will soon become necessary to enable CGO in builds in order to use
    the MS Go distribution. Disabling CGO was always somewhat of a hack
    since we didn't need it anyway for eBPF. Now that we do, another
    solution is necessary. This uses the `//go:build ignore` directive to
    exclude all C source files from the Go toolchain. This is necessary even
    within C source files even though these C source files exist within an
    underscore-prefixed directory. Go's behavior here is likely erroneous,
    and an issue has been filed for its repair:
    golang/go#69639
    timraymond committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    6bcec36 View commit details
    Browse the repository at this point in the history
  2. Add glibc to operator's final image

    As a consequence of removing CGO_ENABLED=0, we now require glibc in the
    final runtime environment of both retina-agent and retina-operator.
    `retina-agent` had this already by consequence of the inclusion of clang
    and other machinery necessary to compile ebpf. `retina-operator`,
    however, did not. This adds the contents of /lib and /usr/lib to the
    final image in order to include glibc into `retina-operator`'s runtime
    environment.
    timraymond committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    2a94fbb View commit details
    Browse the repository at this point in the history