Giter VIP home page Giter VIP logo

Comments (6)

sighingnow avatar sighingnow commented on July 25, 2024

If I understand correctly you are working with a static-linked grpc library. Current CMakeLists.txt doesn't handle such cases since grpc has a tons of dependencies, which can be either "bundled" or "package". I have noticed that you are working with Ubuntu, thus I think apt-get install libgrpc-dev libgrpc++-dev libprotobuf-dev libssl-dev libz-dev protobuf-compiler-grpc should works, just as what we have done in https://github.com/etcd-cpp-apiv3/etcd-cpp-apiv3/blob/master/.github/workflows/build-test.yml.

Maunally build latest grpc is not need for etcd-cpp-apiv3. This library could work well with a wide range of grpc, even very old versions.

from etcd-cpp-apiv3.

SumuduLansakara avatar SumuduLansakara commented on July 25, 2024

Thanks a lot @sighingnow for the quick response. Indeed you are right, all the problems were related to grpc static lib. Your proposal to install dependancies via the package manager worked perfectly (and it saved a lot of time by avoiding compilation of all the dependent libs). This is my working Dockerfile in case it helps anyone.
@sighingnow I appreciate your help very much ! My problem is solved and this issue can be closed.

from etcd-cpp-apiv3.

sighingnow avatar sighingnow commented on July 25, 2024

Thanks for verifying the solution so quickly @SumuduLansakara , happy coding!

from etcd-cpp-apiv3.

grants avatar grants commented on July 25, 2024

how to compile etcd-cpp-api.so, I always got etcd-cpp-api.a ? thx @sighingnow

from etcd-cpp-apiv3.

sighingnow avatar sighingnow commented on July 25, 2024

@grants Thanks for your interest on this library, you could follow

sudo apt update -y
sudo apt install -y ca-certificates \
ccache \
cmake \
libboost-all-dev \
libcurl4-openssl-dev \
libgrpc-dev \
libgrpc++-dev \
libprotobuf-dev \
libssl-dev \
libz-dev \
lsb-release \
protobuf-compiler-grpc \
screenfetch \
wget
# install etcd
wget https://github.com/etcd-io/etcd/releases/download/v3.4.13/etcd-v3.4.13-linux-amd64.tar.gz
tar zxvf etcd-v3.4.13-linux-amd64.tar.gz
sudo mv etcd-v3.4.13-linux-amd64/etcd /usr/local/bin/
sudo mv etcd-v3.4.13-linux-amd64/etcdctl /usr/local/bin/
lsb_release -a
screenfetch
- name: Install cpprestsdk
run: |
mkdir -p build
cd build
git clone https://github.com/microsoft/cpprestsdk.git
mkdir -p cpprestsdk/build
cd cpprestsdk/build
cmake .. -DBUILD_TESTS=OFF \
-DBUILD_SAMPLES=OFF \
-DCPPREST_EXCLUDE_WEBSOCKETS=ON \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
make -j2
sudo make install
- name: Build
run: |
mkdir -p build
cd build
cmake .. -DBUILD_ETCD_TESTS=ON \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
make -j2
for how to install dependencies and build the library.

from etcd-cpp-apiv3.

grants avatar grants commented on July 25, 2024

Thank you, I got it.

from etcd-cpp-apiv3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.