Compiling Open Source Packages
Create a temporary adaptorlib directory in /home/server to compile libosa and libproxy. libosa needs to be deployed on the server, and libproxy needs to be deployed on both the server and client. Prepare the compilation server based on the client node architecture.
- Create an adaptorlib directory.
1mkdir -p /home/server/adaptorlib
- Obtain the source code and save it to the /home/server/adaptorlib directory.
1 2
cd /home/server/adaptorlib git clone https://gitee.com/kunpengcompute/global-cache-adaptor.git
- Compile adaptorlib.
1 2 3
cd global-cache-adaptor export CPLUS_INCLUDE_PATH="$CPLUS_INCLUDE_PATH:/opt/gcache_adaptor_compile/third_part/inc/" sh build.sh
Before compiling adaptorlib, ensure that the Ceph source package ceph-14.2.8.tar.gz has been compiled and the closed-source RPM package boostkit-globalcache-ceph-adaptor-release-1.3.15.oe1.aarch64.rpm (ARM) or boostkit-globalcache-ceph-adaptor-release-1.3.15.oe1.x86_64.rpm (x86) has been installed. If the boost header file is missing, copy the /home/ceph-14.2.8/src/boost/boost folder to /usr/include. The .so files obtained using the x86 compilation server can be used only on x86 servers, and the .so files obtained using the ARM compilation server can be used only on the ARM servers.
- Create a /home/server/adaptorlib/glz directory.
mkdir -p /home/server/adaptorlib/glz
- Obtain BoostKit-glz_1.0.2.zip and zstd-1.4.5 source packages and save them to the /home/server/adaptorlib/glz directory.
cd /home/server/adaptorlib/glz chmod 700 BoostKit-glz_1.0.2.zip unzip BoostKit-glz_1.0.2.zip unzip zstd-1.4.5.zip
- Compile the obtained installation package and build dependencies to generate a dynamic library. Download the Makefile to the /home/server/adaptorlib/glz directory. The following is an example (for reference only).
1 2 3
wget https://github.com/kunpengcompute/kps/releases/download/glz/Makefile --no-check-certificate make cp libglz.so /home/server/adaptorlib/global-cache-adaptor/build/lib
If you have security considerations, compile security options as needed.
- Pack adaptorlib to generate a globalcache-adaptorlib-release-oe1.aarch64.tar.gz package, which will be used to install the open source package on the server.
1 2
cd /home/server/adaptorlib/global-cache-adaptor/package sh globalcache-adaptorlib_pack.sh