-
Notifications
You must be signed in to change notification settings - Fork 16
Description
@skevetter in #195 (comment), you said:
The application is compiled with CGO_ENABLED, so there may be some work involved to unlink that dependency.
Indeed, CONTRIBUTING.md says to build with CGO_ENABLED=0:
$ `CGO_ENABLED=0 go build -ldflags "-s -w" -o devpod-cli`hack/dev_devpod_pro.sh does the same unless 'race detector' is requested:
if [[ $RACE == "yes" ]]; then
echo "Building devpod with race detector"
CGO_ENABLED=1 go build -ldflags "-s -w" -tags profile -race -o devpod-cli
else
CGO_ENABLED=0 go build -ldflags "-s -w" -tags profile -o devpod-cli
fiI have no idea what 'sidecar' means here, but it is being built the same way in .github/actions/build-cli/action.yml:
steps:
- name: build sidecar CLI (Linux/macOS)
run: |
... CGO_ENABLED=0 go build -ldflags "-s -w ..." -XOn the other hand, in .goreleaser.yml the build for devpod-linux confusingly mentions both values of CGO_ENABLED:
hooks:
pre:
- sh -c 'CGO_ENABLED=1 go ...'
ldflags:
- -s -w
env:
- CGO_ENABLED=0When I build with CGO_ENABLED=0 go build -ldflags "-s -w" and scp ./devpod to the box configured into the ssh provider, I no longer see the "/lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.38 not found" error.
(I need to copy the agent manually because I am using the forked ssh provider, an agent injection with it is broken: #224.)
It would be nice if the repository was configured in such a way that $ go build gets GO_ENABLED and ldflags configured implicitly...