Skip to content

Commit

Permalink
Small C++ client README tweaks. (#4019)
Browse files Browse the repository at this point in the history
* Small C++ client README tweaks.

* Followup to review comments.
  • Loading branch information
jcferretti committed Jun 17, 2023
1 parent f71a057 commit 5c0e5d0
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions cpp-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@ C++ compiler and tool suite (cmake etc).
sudo apt update
sudo apt install curl git g++ cmake make build-essential zlib1g-dev libssl-dev
```

4. Make a new directory for the Deephaven source code and assign that directory
to a temporary shell variable. This will make subsequent build steps easier.
```
mkdir -p ~/src/deephaven && cd ~/src/deephaven && export DHSRC=`pwd`
export DHSRC=$HOME/src/deephaven
mkdir -p $DHSRC
cd $DHSRC
```

5. Clone deephaven-core sources.
```
cd $DHSRC
Expand All @@ -27,9 +31,9 @@ C++ compiler and tool suite (cmake etc).
6. Build and install dependencies for Deephaven C++ client.

Get the `build-dependencies.sh` script from Deephaven's base images repository
at `https://github.com/deephaven/deephaven-base-images/blob/main/cpp-client`
at https://github.com/deephaven/deephaven-base-images/blob/main/cpp-client
You can download it directly from the link
`https://github.com/deephaven/deephaven-base-images/raw/main/cpp-client/build-dependencies.sh`
https://github.com/deephaven/deephaven-base-images/raw/main/cpp-client/build-dependencies.sh
(this script is also used from our automated tools, to generate a docker image to
support tests runs; that's why it lives in a separate repo).
The script downloads, builds and installs the dependent libraries
Expand All @@ -44,11 +48,13 @@ C++ compiler and tool suite (cmake etc).

Example:
```
mkdir -p $HOME/dhcpp
cd $HOME/dhcpp
# Ensure you have DHCPP defined as above.
mkdir -p $DHCPP
cd $DHCPP
wget https://github.com/deephaven/deephaven-base-images/raw/main/cpp-client/build-dependencies.sh
chmod +x ./build-dependencies.sh
# Maybe edit build-dependencies.sh to reflect choices of build tools and build target
# Maybe edit build-dependencies.sh to reflect choices of build tools and build target;
# defaults should work fine for supported platforms.
./build-dependencies.sh
```

Expand All @@ -57,10 +63,9 @@ C++ compiler and tool suite (cmake etc).
```
cd $DHSRC/deephaven-core/cpp-client/deephaven/
mkdir build && cd build
export DEEPHAVEN_LOCAL=$HOME/dhcpp/local # This should reflect your selection in the previous point.
export CMAKE_PREFIX_PATH=${DEEPHAVEN_LOCAL}/abseil:${DEEPHAVEN_LOCAL}/boost:${DEEPHAVEN_LOCAL}/cares:${DEEPHAVEN_LOCAL}/flatbuffers:${DEEPHAVEN_LOCAL}/gflags:${DEEPHAVEN_LOCAL}/immer:${DEEPHAVEN_LOCAL}/protobuf:${DEEPHAVEN_LOCAL}/re2:${DEEPHAVEN_LOCAL}/zlib:${DEEPHAVEN_LOCAL}/grpc:${DEEPHAVEN_LOCAL}/arrow:${DEEPHAVEN_LOCAL}/deephaven
export NCPUS=$(getconf _NPROCESSORS_ONLN)
cmake -DCMAKE_INSTALL_PREFIX=${DEEPHAVEN_LOCAL}/deephaven .. && make -j$NCPUS install
export DHCPP=$HOME/dhcpp # This should reflect your selection in the previous point.
source $DHCPP/env.sh
cmake -DCMAKE_INSTALL_PREFIX=${DHCPP}/local/deephaven .. && make -j$NCPUS install
```

8. Build and run the deephaven example which uses the installed client.
Expand Down

0 comments on commit 5c0e5d0

Please sign in to comment.