diff --git a/Makefile b/Makefile index b49d64704..345761f52 100644 --- a/Makefile +++ b/Makefile @@ -145,7 +145,7 @@ deploy-dev: createnamespaces ##@ Build - Binary .PHONY: build-postgres-operator build-postgres-operator: ## Build the postgres-operator binary - CGO_ENABLED=1 $(GO_BUILD) $(\ + $(GO_BUILD) $(\ ) --ldflags '-X "main.versionString=$(PGO_VERSION)"' $(\ ) --trimpath -o bin/postgres-operator ./cmd/postgres-operator diff --git a/internal/postgres/users.go b/internal/postgres/users.go index be8785a4e..b7e351cd5 100644 --- a/internal/postgres/users.go +++ b/internal/postgres/users.go @@ -2,6 +2,9 @@ // // SPDX-License-Identifier: Apache-2.0 +// [pg_query.Parse] requires CGO to compile and call https://github.com/pganalyze/libpg_query +//go:build cgo + package postgres import (