반응형
rm 'which protoc'
###Building Google Protobuf 2.5.0
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
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/
Edit file
src/google/protobuf/stubs/atomicops.h
, navigate toline 184
, add the following lines:#elif defined(GOOGLE_PROTOBUF_ARCH_S390) #include <google/protobuf/stubs/atomicops_internals_generic_gcc.h>
Edit file
protobuf-2.5.0/src/google/protobuf/stubs/platform_macros.h
, navigate toline 59
, add the following lines:#elif defined(__s390x__) #define GOOGLE_PROTOBUF_ARCH_S390 1 #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
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
Verify the installation
export LD_LIBRARY_PATH=/usr/local/lib protoc --version
Note: Protobuf should report version
libprotoc 2.5.0
반응형
'BackEnd FrontEnd > GRPC' 카테고리의 다른 글
intelliJ/eclipse grpc import (0) | 2018.07.11 |
---|---|
GRPC 설치 및 실행(ubuntu) (0) | 2018.06.28 |