Giter Club home page Giter Club logo

grpc-cmake-example's Introduction

Tested on Ubuntu 18.04 LTS

How to build

  • Install Protocol Buffers and gRPC
    # On ubuntu 18.04
    sudo apt-get install build-essential autoconf libtool pkg-config automake curl
      
    git clone -b $(curl -L https://grpc.io/release) https://github.com/grpc/grpc
    cd grpc
    git submodule update --init
     
    # Build and install protobuf
    cd ./third_party/protobuf
    ./autogen.sh
    ./configure --prefix=/opt/protobuf
    make -j `nproc`
    sudo make install
      
    # Build and install gRPC
    cd ../..
    make -j `nproc` PROTOC=/opt/protobuf/bin/protoc 
    sudo make prefix=/opt/grpc install
    
  • Change CMAKE_PREFIX_PATH variable in CMakeFiles.txt[7] according to your install prefixes
  • And build it
  mkdir build
  cd build
  cmake ..
  make

grpc-cmake-example's People

Contributors

ivansafonov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

grpc-cmake-example's Issues

segfault on 18.04.2 LTS (Bionic Beaver) when using grpc pkg installed by apt

cat /etc/*-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.2 LTS"
NAME="Ubuntu"
VERSION="18.04.2 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.2 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

installed with apt-get install
libgrpc++-dev - high performance general RPC framework (development)
libgrpc++1 - high performance general RPC framework
libgrpc-dev - high performance general RPC framework (development)
libgrpc3 - high performance general RPC framework
protobuf-compiler-grpc - high performance general RPC framework - protobuf plugin

valgrind ./greeter_server
==16448== Memcheck, a memory error detector
==16448== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==16448== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==16448== Command: ./greeter_server
==16448==
I0626 10:52:26.868168998 16448 server_builder.cc:247] Synchronous server. Num CQs: 1, Min pollers: 1, Max Pollers: 2147483647, CQ timeout (msec): 1000
==16448== Invalid read of size 8
==16448== at 0x52F8477: grpc_pollset_size (in /usr/lib/libgrpc++.so.1.3.2)
==16448== by 0x530F7DD: grpc_completion_queue_create (in /usr/lib/libgrpc++.so.1.3.2)
==16448== by 0x52D8E87: grpc::ServerBuilder::BuildAndStart() (in /usr/lib/libgrpc++.so.1.3.2)
==16448== by 0x12A1DF: RunServer() (greeter_server.cc:75)
==16448== by 0x12A32C: main (greeter_server.cc:84)
==16448== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==16448==
==16448==
==16448== Process terminating with default action of signal 11 (SIGSEGV)
==16448== Access not within mapped region at address 0x0
==16448== at 0x52F8477: grpc_pollset_size (in /usr/lib/libgrpc++.so.1.3.2)
==16448== by 0x530F7DD: grpc_completion_queue_create (in /usr/lib/libgrpc++.so.1.3.2)
==16448== by 0x52D8E87: grpc::ServerBuilder::BuildAndStart() (in /usr/lib/libgrpc++.so.1.3.2)
==16448== by 0x12A1DF: RunServer() (greeter_server.cc:75)
==16448== by 0x12A32C: main (greeter_server.cc:84)
==16448== If you believe this happened as a result of a stack
==16448== overflow in your program's main thread (unlikely but
==16448== possible), you can try to increase the size of the
==16448== main thread stack using the --main-stacksize= flag.
==16448== The main thread stack size used in this run was 8388608.
==16448==
==16448== HEAP SUMMARY:
==16448== in use at exit: 20,565 bytes in 326 blocks
==16448== total heap usage: 1,649 allocs, 1,323 frees, 169,274 bytes allocated
==16448==
==16448== LEAK SUMMARY:
==16448== definitely lost: 40 bytes in 1 blocks
==16448== indirectly lost: 0 bytes in 0 blocks
==16448== possibly lost: 0 bytes in 0 blocks
==16448== still reachable: 20,525 bytes in 325 blocks
==16448== suppressed: 0 bytes in 0 blocks
==16448== Rerun with --leak-check=full to see details of leaked memory
==16448==
==16448== For counts of detected and suppressed errors, rerun with: -v
==16448== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Erreur de segmentation (core dumped)

license ?

Can you please provide a license for the files in your cmake/ directory, if not the complete repository ?

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.