From ccdc8259e6d01a0f68a1a35f070ee7b6c8691664 Mon Sep 17 00:00:00 2001 From: noname0443 Date: Wed, 13 Sep 2023 14:04:50 +0300 Subject: [PATCH] Static linking fix (#37) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 5b020e72..cd44feaa 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ jepsen_base_img: docker build --tag=mysync-jepsen-test-base tests/images/jepsen_common test: - GOOS=linux go build -ldflags "-linkmode external -extldflags -static" -o ./cmd/mysync/mysync ./cmd/mysync/... + GOOS=linux go build -tags netgo,osusergo -o ./cmd/mysync/mysync ./cmd/mysync/... go build ./tests/... rm -fr ./tests/images/mysql/mysync && cp ./cmd/mysync/mysync ./tests/images/mysql/mysync rm -rf ./tests/logs @@ -30,7 +30,7 @@ test: (cd tests; go test -timeout 150m) jepsen_test: - GOOS=linux go build -ldflags "-linkmode external -extldflags -static" -o ./cmd/mysync/mysync ./cmd/mysync/... + GOOS=linux go build -tags netgo,osusergo -o ./cmd/mysync/mysync ./cmd/mysync/... go build ./tests/... rm -fr ./tests/images/mysql_jepsen/mysync && cp ./cmd/mysync/mysync ./tests/images/mysql_jepsen/mysync docker-compose -p mysync -f ./tests/images/jepsen-compose.yml up -d --force-recreate --build