Need help to install c++ grpc on ubuntu 16.04 - c++

I tried to install grpc by executing the following
git clone -b $(curl -L http://grpc.io/release) https://github.com/grpc/grpc
cd grpc
git submodule update --init
make
But when I run make, I get the message "#error This file was generated by an older version of protoc which is"
But, I have the latest protoc installed ...
/usr/bin/protoc --version
libprotoc 3.2.0

Posting an answer to my own question ...
The issue gets resolved when I remove the third party protobuf files before running install.
rm -rf third_party/protobuf
I am not exactly sure why this works though ...

Related

How i can Compile telegram cpp client given by telegram github?

I find telegram clients sample in c++ languages. first i install TDlib on Ubuntu 20.4 by the following commands :
apt-get update
apt-get upgrade
apt-get install make git zlib1g-dev libssl-dev gperf php cmake g++
git clone https://github.com/tdlib/td.git
cd td
git checkout v1.6.0
rm -rf build
mkdir build
cd build
export CXXFLAGS=""
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr/local ..
cmake --build . --target prepare_cross_compiling
cd ..
php SplitSource.php
cd build
cmake --build . --target install
cd ..
php SplitSource.php --undo
cd ..
ls -l /usr/local
after install i want to compile official telegram simple sample given by telegram in the following address :
https://github.com/tdlib/td/blob/master/example/cpp/td_example.cpp
after that i want to compile this example by the following command :
gcc td_example.cpp
but unfortunatelly i get many errors. can anybody please tell me how i can compile this file on ubuntu via terminal console ?
.

Simple Telegram client that read new channel messages that I'm Subscribed?

I need to read all new messages of one specific channel that I'm in (not as an admin but I,m Subscribed). I need to do this by C++. My OS is Ubuntu 20.04 Server.
I Install TDlib by the following Commands :
apt-get update
apt-get upgrade
apt-get install make git zlib1g-dev libssl-dev gperf php cmake g++
git clone https://github.com/tdlib/td.git
cd td
git checkout v1.6.0
rm -rf build
mkdir build
cd build
export CXXFLAGS=""
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr/local ..
cmake --build . --target prepare_cross_compiling
cd ..
php SplitSource.php
cd build
cmake --build . --target install
cd ..
php SplitSource.php --undo
cd ..
ls -l /usr/local
can anybody give me a simple C++ example and command to compile that to run over console and get new incoming messages from specific channel? i need to be all login and API client info () be in the code. any help will be really appreciated.

Not able to create site-package inside /usr/lib/Python2.7 it shows "Operation not permitted"

I was trying to install thrift(0.11.0) over my system(macOs 10.14.5).For which I downloaded and extracted tar file. Then I ran following commands :
./bootstrap.sh
./configure
make
make install
But make install throwed the following error :
error: could not create '/usr/lib/python2.7/site-packages': Operation not permitted
then I also tried manually creating site-package inside /usr/lib/python2.7 but still the error message was same.
I have also tried sudo while running make install but it didn't helped much.
1.open thrift's subfolder lib/py/ and modify the Makefile as follow:
PY_PREFIX=/usr
change to
PY_PREFIX = /Users/amy/python
2.sudo make install
I faced the same problem trying to install thrift on Mac OS.
I found a separate guide for installing thrift on Mac OS, I tried it and it finally worked successfully:
1- Download the boost library from boost.org untar compile with
./bootstrap.sh
sudo ./b2 threading=multi address-model=64 variant=release stage install
2- Download libevent, untar and compile with
./configure --prefix=/usr/local
make
sudo make install
3- Download the latest version of Apache Thrift, untar and compile with
./configure --prefix=/usr/local/ --with-boost=/usr/local --with-libevent=/usr/local
Try it and let me know your results.
Reference: Apache Thrift - OS X Install

Error: VNDK library: libandroid_net's ABI has EXTENDING CHANGES

I am setting up an environment to run AOSP code on Ubuntu 18.04.1 LTS and got the error "error: VNDK library: libandroid_net's ABI has EXTENDING CHANGES". Please help me to resolve this. I have searched for hours but didn't get the solution.
I have done following things:
Installed required packages: sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev libgl1-mesa-dev libxml2-utils xsltproc unzip
Installed community-maintained default set of udev rules for all Android devices: apt-get install adb
Install repo: https://source.android.com/setup/build/downloading.html
mkdir ~/bin
PATH=~/bin:$PATH
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
Initializing a Repo client
mkdir WORK
cd WORK
git config --global user.name "Your Name"
git config --global user.email "you#example.com"
repo init -u https://android.googlesource.com/platform/manifest
Installed pixel 3 XL binaries which include google-devices and qcom blueline. Used Extractor and ./*.sh command to extract them.
Copied qcom extracted vendor folder into Source Code and then copied pixel 3 xl vendor folder. Meged and replaced in all dialogs.
Run make clobber to clean the build directory.
Run . build/envsetup.sh to initialize the environment.
Run lunch aosp_arm-eng to select your run target as asop_arm BUILD with eng BUILDTYPE.
Run make -j16 to build the code.
Got build error:
error: VNDK library: libandroid_net's ABI has EXTENDING CHANGES
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000e7400000, 83886080, 0) failed; error='Not enough space' (errno=12)
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000cac00000, 73400320, 0) failed; error='Not enough space' (errno=12)
For 'Not enough space' error: I am setting cache and configuring jack
export USE_CCACHE=1 to enable compiler cache
Failed to do prebuilts/misc/linux-x86/ccache/ccache -M 15G because there is no ccache folder exists.
export ANDROID_JACK_VM_ARGS="-Xmx4g -Dfile.encoding=UTF-8 -XX:+TieredCompilation" to configure Jack.
For resolving the VNDK issue I am not sure by may be binaries I have included are not correct so I have deleted the vendor folder that contains Pixel 3 XL binaries.
I am a newbie for this task and just started a week ago to look into this.
Please suggest.
Thank you in advance.

Is it possible to undo a build just after ./configure, make and BEFORE sudo make install?

So I was trying to install Python 3.3 from source (I'm running on Debian Wheezy)...
$ cd /tmp
$ wget [web address of the tar]
$ tar -xzf [tar file]
$ ./configure --prefix=/usr/local/opt/python-3.3.6
$ make
..when I realised I was in production server. The installation should have been installed in local development.
$ make uninstall
make: *** No rule to make target `uninstall'. Stop.
It seems 'make uninstall' is not available and I do NOT have checkinstall installed.
Is it possible to abort the installation and leave everything as it was before? I mean, after firing 'make' I've only build the software but it hasn't been installed into a specific location (i.e. 'sudo make install'), right?
TL;DR
Is it just matter of deleting the directory created by the tar file (considering sudo make install hasn't been fired)?