From 42122e5ad07ade3d6d63768c0653e1d776510a18 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Tue, 21 Jan 2020 08:16:29 -0800 Subject: [PATCH] fix(build): instruct users to use GOTAGS, not GOFLAGS GOFLAGS will _override_ all the flags. If we just want to set a tag e.g., enable OpenSSL, we should set GOTAGS=openssl. fixes https://github.com/ipfs/go-ipfs/issues/6622#issuecomment-576713181 --- CHANGELOG.md | 2 +- Dockerfile | 2 +- README.md | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 67272ffa4e5..c31119bcbd7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -425,7 +425,7 @@ receiving multiple inbound connections per second. To enable openssl support, rebuild go-ipfs with: ```bash -> make build GOFLAGS=-tags=openssl +> make build GOTAGS=openssl ``` ### CoreAPI diff --git a/Dockerfile b/Dockerfile index bf04b2ccb40..5b84989729c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,7 @@ COPY . $SRC_DIR # Also: fix getting HEAD commit hash via git rev-parse. RUN cd $SRC_DIR \ && mkdir .git/objects \ - && make build GOFLAGS=-tags=openssl + && make build GOTAGS=openssl # Get su-exec, a very minimal tool for dropping privileges, # and tini, a very minimal init daemon for containers diff --git a/README.md b/README.md index a18c0c68dcf..665d78898c2 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ IPFS can run on most Linux, macOS, and Windows systems. We recommend running it If your system is resource constrained, we recommend: -1. Installing OpenSSL and rebuilding go-ipfs manually with `make build GOFLAGS=-tags=openssl`. See the [download and compile](#download-and-compile-ipfs) section for more information on compiling go-ipfs. +1. Installing OpenSSL and rebuilding go-ipfs manually with `make build GOTAGS=openssl`. See the [download and compile](#download-and-compile-ipfs) section for more information on compiling go-ipfs. 2. Initializing your daemon with `ipfs init --profile=lowpower` ### Install prebuilt packages @@ -204,7 +204,7 @@ make build GOOS=myTargetOS GOARCH=myTargetArchitecture ##### OpenSSL -To build go-ipfs with OpenSSL support, append `GOFLAGS=-tags=openssl` to your `make` invocation. Building with OpenSSL should significantly reduce the background CPU usage on nodes that frequently make or receive new connections. +To build go-ipfs with OpenSSL support, append `GOTAGS=openssl` to your `make` invocation. Building with OpenSSL should significantly reduce the background CPU usage on nodes that frequently make or receive new connections. Note: OpenSSL requires CGO support and, by default, CGO is disabled when cross compiling. To cross compile with OpenSSL support, you must: