Skip to content

Commit

Permalink
fix: disable CGO when building on Fedora to avoid linking issues on t…
Browse files Browse the repository at this point in the history
…he Ubuntu-based image (#2140)
  • Loading branch information
orpiske committed Mar 17, 2021
1 parent 8f3e0fb commit 052b505
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions script/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,13 @@ test-kamel-cli: build
#go test -timeout 60m -v ./e2e/common/cli -tags=integration

build-kamel:
# Ensure the binary is statically linked when building on Linux due to ABI changes in newer glibc 2.32, otherwise
# it would not run on older versions. See https://github.com/apache/camel-k/pull/2141#issuecomment-800990117
ifeq ($(shell uname -s 2>/dev/null || echo Unknown),Linux)
CGO_ENABLED=0 go build $(GOFLAGS) -o kamel ./cmd/kamel/*.go
else
go build $(GOFLAGS) -o kamel ./cmd/kamel/*.go
endif

build-resources: bundle-kamelets
./script/build_catalog.sh $(RUNTIME_VERSION) -Dcatalog.file=camel-catalog-$(RUNTIME_VERSION).yaml -Dcatalog.runtime=quarkus -Dstaging.repo="$(STAGING_RUNTIME_REPO)"
Expand Down

0 comments on commit 052b505

Please sign in to comment.