Skip to content

Commit

Permalink
fix(build): instruct users to use GOTAGS, not GOFLAGS
Browse files Browse the repository at this point in the history
GOFLAGS will _override_ all the flags. If we just want to set a tag e.g., enable
OpenSSL, we should set GOTAGS=openssl.

fixes ipfs#6622 (comment)
  • Loading branch information
Stebalien authored and Walter Beegle committed Jun 8, 2020
1 parent 86b8479 commit 352ef94
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:

Expand Down

0 comments on commit 352ef94

Please sign in to comment.