Compiling and Installing the UCX Package
Compile and deploy the UCX open source software package, including compiling and building the RPM packages required for compiling Ceph.
- Obtain the UCX open source software package.
To obtain the package, see Table 2.
- Define the directory for building RPM packages.
- Open the /root/.rpmmacros file.
1vi /root/.rpmmacros - Press i to enter the insert mode, set %_topdir to the RPM package build directory (/root/rpmbuild for example), and comment out other lines.
1%_topdir /root/rpmbuild - Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
- Create a build directory in the rpmbuild directory.
1rpmdev-setuptree
- Open the /root/.rpmmacros file.
- Install the UCX RPM package.
1rpm -ivh ucx-1.14.1-1.el7.src.rpm
- To avoid errors reported when UCX is deployed in a container, modify a line of code based on the following code.
1 2 3
cd /root/rpmbuild/SOURCES/ tar -zxvf ucx-1.14.1.tar.gz vim ucx-1.14.1/src/ucs/sys/sys.c
Add the following content to line 1560:
1pid = getpid()

Modify line 753 ucx-1.14.1\ucx-1.14.1\src\uct\ib\base\ib_iface.c as follows:
1ah_attr->grh.flow_label = 0;

Package the file.
1 2
rm -rf ucx-1.14.1.tar.gz tar zcvf ucx-1.14.1.tar.gz ucx-1.14.1
- Compile and build RPM packages. In the rpmbuild directory, compile and build the ucx.spec file to generate RPM packages.
1 2
cd /root/rpmbuild/SPECS rpmbuild -bb ucx.spec
After the build is complete, eight RPM packages are generated in the /root/rpmbuild/RPMS/aarch64 directory, as shown in the following figure.

- Extract the RPM packages and install them.
1 2 3
mkdir -p /home/local_rpm/ cp /root/rpmbuild/RPMS/aarch64/ucx* /home/local_rpm/ cd /home/local_rpm/
1 2 3 4 5 6 7 8
rpm -ivh ucx-1.14.1-1.aarch64.rpm rpm -ivh ucx-cma-1.14.1-1.aarch64.rpm rpm -ivh ucx-debuginfo-1.14.1-1.aarch64.rpm rpm -ivh ucx-debugsource-1.14.1-1.aarch64.rpm rpm -ivh ucx-devel-1.14.1-1.aarch64.rpm rpm -ivh ucx-ib-1.14.1-1.aarch64.rpm rpm -ivh ucx-rdmacm-1.14.1-1.aarch64.rpm rpm -ivh ucx-static-1.14.1-1.aarch64.rpm