You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by mm...@apache.org on 2022/10/12 22:00:43 UTC

[pulsar-client-cpp] 01/03: Fix Ubuntu and macOS build guide (#44)

This is an automated email from the ASF dual-hosted git repository.

mmerli pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/pulsar-client-cpp.git

commit 624cac14b91d7dcbc944d3e0358443c8a58b21c8
Author: Kai Wang <kw...@apache.org>
AuthorDate: Thu Oct 13 01:06:08 2022 +0800

    Fix Ubuntu and macOS build guide (#44)
    
    * Fix Ubuntu and macOS build guide
    
    * Fixed readme
    
    Co-authored-by: Matteo Merli <mm...@apache.org>
---
 README.md | 52 +++++++---------------------------------------------
 1 file changed, 7 insertions(+), 45 deletions(-)

diff --git a/README.md b/README.md
index dbad721..c7fc302 100644
--- a/README.md
+++ b/README.md
@@ -92,37 +92,11 @@ Run unit tests:
 #### Install all dependencies:
 
 ```shell
-apt-get install -y g++ cmake libssl-dev libcurl4-openssl-dev \
-                libprotobuf-dev libboost-all-dev libgtest-dev google-mock \
+sudo apt-get install -y g++ cmake libssl-dev libcurl4-openssl-dev \
+                libprotobuf-dev libboost-all-dev libgtest-dev libgmock-dev \
                 protobuf-compiler
 ```
 
-#### Compile and install Google Test:
-
-```shell
-cd /usr/src/gtest
-sudo cmake .
-sudo make
-
-# Copy the libraries you just built to the OS library path.
-sudo cp lib/*.a /usr/lib
-```
-
-
-#### Compile and install Google Mock:
-
-```shell
-cd /usr/src/gmock
-sudo cmake .
-sudo make
-
-# Copy the gmock headers to the OS include path.
-sudo cp -r include/gmock /usr/include/
-# Copy the libraries you just built to the OS brary path.
-sudo cp lib/*.a /usr/lib
-```
-
-
 #### Compile Pulsar client library:
 
 ```shell
@@ -149,17 +123,7 @@ perf/perfConsumer
 
 #### Install all dependencies:
 ```shell
-# For openSSL
-brew install openssl
-export OPENSSL_INCLUDE_DIR=/usr/local/opt/openssl/include/
-export OPENSSL_ROOT_DIR=/usr/local/opt/openssl/
-
-# For Protobuf
-brew install protobuf boost boost-python log4cxx jsoncpp
-// If you are using python3, you need to install boost-python3
-
-# For GoogleTest
-brew install googletest
+brew install openssl protobuf boost boost-python3 googletest zstd snappy
 ```
 
 #### Compile Pulsar client library:
@@ -258,18 +222,16 @@ pulsar-client-cpp/build/examples/Release
 
 ## Tests
 ```shell
-# Source code
-pulsar-client-cpp/tests/
-
 # Execution
 # Start standalone broker
-pulsar-test-service-start.sh
+./pulsar-test-service-start.sh
 
 # Run the tests
-pulsar-client-cpp/tests/main
+cd tests
+./pulsar-tests
 
 # When no longer needed, stop standalone broker
-pulsar-test-service-stop.sh
+./pulsar-test-service-stop.sh
 ```
 
 ## Requirements for Contributors