본문 바로가기
BackEnd FrontEnd/GRPC

protoc 지우기(ubuntu) & protobuf 다시 설치 3-> 2

by forkballpitch 2018. 7. 5.
728x90
728x90

rm 'which protoc'



###Building Google Protobuf 2.5.0

  1. Download Protobuf source code:

    cd /<source_root>/
    wget https://github.com/google/protobuf/releases/download/v2.5.0/protobuf-2.5.0.tar.gz
    tar zxvf protobuf-2.5.0.tar.gz
    cd protobuf-2.5.0
  2. Retrieve a generic header file from the official repository (available since version 2.6.0):

    wget https://raw.githubusercontent.com/google/protobuf/master/src/google/protobuf/stubs/atomicops_internals_generic_gcc.h -P src/google/protobuf/stubs/ 
  3. Edit file src/google/protobuf/stubs/atomicops.h, navigate to line 184, add the following lines:

    #elif defined(GOOGLE_PROTOBUF_ARCH_S390)
    #include <google/protobuf/stubs/atomicops_internals_generic_gcc.h>
  4. Edit file protobuf-2.5.0/src/google/protobuf/stubs/platform_macros.h, navigate to line 59, add the following lines:

    #elif defined(__s390x__)
    #define GOOGLE_PROTOBUF_ARCH_S390 1
    #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
  5. Configure the program, and run GNU make to build and install the binaries (please consult official build documentation for detailed configuration https://github.com/google/protobuf/blob/master/INSTALL.txt):

    ./configure
    make
    make check
    make install
  6. Verify the installation

    export LD_LIBRARY_PATH=/usr/local/lib
    protoc --version

    Note: Protobuf should report version libprotoc 2.5.0


728x90
728x90

'BackEnd FrontEnd > GRPC' 카테고리의 다른 글

intelliJ/eclipse grpc import  (0) 2018.07.11
GRPC 설치 및 실행(ubuntu)  (0) 2018.06.28