Rate This Document
Findability
Accuracy
Completeness
Readability

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.

  1. Obtain the UCX open source software package.

    To obtain the package, see Table 2.

  2. Define the directory for building RPM packages.
    1. Open the /root/.rpmmacros file.
      1
      vi /root/.rpmmacros
      
    2. 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
      
    3. Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
    4. Create a build directory in the rpmbuild directory.
      1
      rpmdev-setuptree
      
  3. Install the UCX RPM package.
    1
    rpm -ivh ucx-1.14.1-1.el7.src.rpm
    
  4. 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:

    1
    pid = getpid()
    

    Modify line 753 ucx-1.14.1\ucx-1.14.1\src\uct\ib\base\ib_iface.c as follows:

    1
    ah_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
    
  5. 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.

  6. 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