Skip to content

Commit

Permalink
Merge pull request #852 from filecoin-project/fix-libc-version
Browse files Browse the repository at this point in the history
Build statically on Linux to avoid libc versioning issues.
  • Loading branch information
simonwo authored Oct 10, 2022
2 parents a84dab9 + ad9e50d commit 51e3a98
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ jobs:
- "*.tar.gz"
- "*.sha256"

- store_artifacts:
path: dist/

lint:
parallelism: 1
environment:
Expand Down
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ define BUILD_FLAGS
-X github.com/filecoin-project/bacalhau/pkg/version.GOARCH=$(GOARCH)
endef

define STATIC_BUILD_FLAGS
-linkmode=external -extldflags '-static'
endef

ifeq (${GOOS},linux)
BUILD_FLAGS += ${STATIC_BUILD_FLAGS}
endif

# If we are cross-compiling, bring in the appropriate compilers
ifneq ($(GOOS)_$(GOARCH),$(OS)_$(ARCH))
compile/${OS}/$(GOOS)_$(GOARCH).env:
Expand Down

0 comments on commit 51e3a98

Please sign in to comment.