From 5c0e5d0e00855e92454d9dc9eec8267685ed8ac2 Mon Sep 17 00:00:00 2001 From: Cristian Ferretti <37232625+jcferretti@users.noreply.github.com> Date: Sat, 17 Jun 2023 01:58:40 -0400 Subject: [PATCH] Small C++ client README tweaks. (#4019) * Small C++ client README tweaks. * Followup to review comments. --- cpp-client/README.md | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/cpp-client/README.md b/cpp-client/README.md index 388e0c4b023..81202a62915 100644 --- a/cpp-client/README.md +++ b/cpp-client/README.md @@ -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 @@ -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 @@ -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 ``` @@ -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.