Replies: 1 comment 2 replies
-
我编译出来的动态库和静态库的大小 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
环境centos7
安装gcc8.3.1
echo "###############开始安装gcc8.3.1##########################"
sudo yum install centos-release-scl
sudo yum install devtoolset-8-gcc*
scl enable devtoolset-8 bash
source /opt/rh/devtoolset-8/enable
mv /usr/bin/gcc /usr/bin/gcc-4.8.5
ln -s /opt/rh/devtoolset-8/root/bin/gcc /usr/bin/gcc
mv /usr/bin/g++ /usr/bin/g++-4.8.5
ln -s /opt/rh/devtoolset-8/root/bin/g++ /usr/bin/g++
mv /usr/bin/c++ /usr/bin/c++-4.8.5
ln -s /opt/rh/devtoolset-8/root/bin/c++ /usr/bin/c++
echo "###############结束安装gcc8.3.1###########################"
如过在使用时出现如/usr/lib64/libstdc++.so.6: version `CXXABI_1.3.8’ not found这样的报错
#mv libstdc++.so.6.0.26 /usr/lib64
#mv libstdc++.so.6.0.26 /usr/lib64
#cd /usr/lib64
#rm -rf libstdc++.so.6
#ln -s libstdc++.so.6.0.26 libstdc++.so.6
echo "###############开始编译openssl-1.1.1q (grpc使用这个版本openssl)###############"
cd $HOME
git clone -branch OpenSSL_1_1_1q https://github.com/openssl/openssl.git
cd openssl
./config --prefix=~/openssl_install && make && make install
echo "#############结束编译openssl###########################"
下载grp1.46.2
echo "###############开始编译grpc1.46.2###########################"
echo "不可以用1.60最新版grpc,也不可以用系统默认的openssl1.0,后面都会报错 "
cd ~
mkdir grpc_source && cd grpc_source
git clone --recurse-submodules -b v1.46.2 --depth 1 https://github.com/grpc/grpc
cd grpc && mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=$HOME/grpc -DgRPC_SSL_PROVIDER=package -DgRPC_ZLIB_PROVIDER=package -DOPENSSL_ROOT_DIR=$HOME/openssl_install/ ..
make -j $(nproc)
echo "###############开始编译grpc1.46.2###########################"
编译rocketmq
echo "###############开始编译rocketmq-cpp 5.0 ###########################"
cd $HOME
git clone https://github.com/apache/rocketmq-clients.git
cd rocketmq-clients
mkdir build && cd build
cmake -DOPENSSL_ROOT_DIR=$HOME/openssl_install/ ..
echo "###############结束编译rocketmq-cpp 5.0 ###########################"
echo "为什么这么大57M ?"
Beta Was this translation helpful? Give feedback.
All reactions