Skip to content

Commit

Permalink
docs: update readme for new flux building instructions (#18253)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsternberg authored May 27, 2020
1 parent 0eb1e06 commit b7b1113
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,46 @@ Logs to stdout by default:
$ bin/$(uname -s | tr '[:upper:]' '[:lower:]')/influxd
```

### Building with the go command

The `Makefile` provides a wrapper around configuring the utilities for building influxdb. For those wanting to use the `go` command directly, one of two things can be done.

First, the `env` script is located in the root of the repository. This script can be used to execute `go` commands with the appropriate environment configuration.

```bash
$ ./env go build ./cmd/influxd
```

Another method is to configure the `pkg-config` utility. Follow the instructions [here](https://github.com/influxdata/flux#getting-started) to install and configure `pkg-config` and then the normal go commands will work.

The first step is to install the `pkg-config` command.

```bash
# On Debian/Ubuntu
$ sudo apt-get install -y clang pkg-config
# On Mac OS X with Homebrew
$ brew install pkg-config
```

Install the `pkg-config` wrapper utility of the same name to a different path that is earlier in the PATH.

```bash
# Install the pkg-config wrapper utility
$ go build -o ~/go/bin/ github.com/influxdata/pkg-config
# Ensure the GOBIN directory is on your PATH
$ export PATH=$HOME/go/bin:${PATH}
$ which -a pkg-config
/home/user/go/bin/pkg-config
/usr/bin/pkg-config
```

Then all `go` build commands should work.

```bash
$ go build ./cmd/influxd
$ go test ./...
```

## Getting Started

For a complete getting started guide, please see our full [online documentation site](https://v2.docs.influxdata.com/v2.0/).
Expand Down

0 comments on commit b7b1113

Please sign in to comment.