Rate This Document
Findability
Accuracy
Completeness
Readability

Setting Up the Compilation Environment

Before compiling 3FS, you need to download required dependencies and components to meet the compilation environment requirements. In this document, the Meta node is used as the compilation node.

Installing Compilation Dependencies

Perform this operation on all nodes.

yum install cmake libuv-devel lz4-devel xz-devel double-conversion-devel libdwarf libdwarf-devel libunwind libunwind-devel libaio-devel gflags-devel glog glog-devel gtest-devel gmock-devel gperftools-devel gperftools openssl-devel gcc gcc-c++ boost* libatomic autoconf libevent-devel libibverbs libibverbs-devel cargo numactl-devel lld gperftools-devel gperftools double-conversion libibverbs rsync gperftools-libs glibc-devel python3-devel meson vim jemalloc -y 

Installing Rust

Perform this operation on the Meta node.

Download the package in the AArch64 architecture from the official Rust website, upload the package to the server, and decompress it.

If your server can access the official Rust website, you can run the wget commands to obtain the required package.
cd /home
wget https://static.rust-lang.org/dist/rust-1.85.0-aarch64-unknown-linux-gnu.tar.xz 
tar -xvf rust-1.85.0-aarch64-unknown-linux-gnu.tar.xz 
cd rust-1.85.0-aarch64-unknown-linux-gnu 
sh install.sh

Installing FoundationDB

Perform this operation on the Meta node.

  1. Obtain the FoundationDB installation package from GitHub and upload it to the server.

  2. If your server can access GitHub, you can run the wget or yum commands to install the required installation package.
    • Run the wget commands.
      wget https://github.com/apple/foundationdb/releases/download/7.3.63/foundationdb-clients-7.3.63-1.el9.aarch64.rpm 
      wget https://github.com/apple/foundationdb/releases/download/7.3.63/foundationdb-server-7.3.63-1.el9.aarch64.rpm 
      rpm -ivh foundationdb-clients-7.3.63-1.el9.aarch64.rpm 
      rpm -ivh foundationdb-server-7.3.63-1.el9.aarch64.rpm
    • Run the yum commands.
      yum install https://github.com/apple/foundationdb/releases/download/7.3.63/foundationdb-clients-7.3.63-1.el9.aarch64.rpm -y 
      yum install https://github.com/apple/foundationdb/releases/download/7.3.63/foundationdb-server-7.3.63-1.el9.aarch64.rpm -y

Installing the BiSheng Compiler

Perform this operation on the Meta node.

  1. Obtain the BiSheng Compiler 4.2.0 package from Huawei technical support, upload it to the server, and decompress it.

    You can also run the wget commands to obtain the required package.
    cd /home 
    wget https://mirrors.huaweicloud.com/kunpeng/archive/compiler/bisheng_compiler/BiShengCompiler-4.2.0-aarch64-linux.tar.gz
    tar -xvf BiShengCompiler-4.2.0-aarch64-linux.tar.gz
  2. Set a temporary environment variable.
    export PATH=/home/BiShengCompiler-4.2.0-aarch64-linux/bin:$PATH
  3. Check the compiler version.
    clang -v 

    Command output:

    BiSheng Enterprise 4.2.0.B009 clang version 17.0.6 (958fd14d28f0) 
    Target: aarch64-unknown-linux-gnu 
    Thread model: posix InstalledDir: /home/BiShengCompiler-4.2.0-aarch64-linux/bin 
    Found candidate GCC installation: /usr/lib/gcc/aarch64-linux-gnu/10.3.1 
    Selected GCC installation: /usr/lib/gcc/aarch64-linux-gnu/10.3.1 
    Candidate multilib: .;@m64 
    Selected multilib: .;@m64

Installing Libfuse

Perform the following steps on the Meta node and FUSE client.

  1. Download the libfuse package.
    cd /home 
    wget https://github.com/libfuse/libfuse/releases/download/fuse-3.16.1/fuse-3.16.1.tar.gz 
  2. Decompress and install the libfuse package.
    tar -vzxf fuse-3.16.1.tar.gz 
    cd fuse-3.16.1 
    mkdir build 
    cd build 
    yum install -y meson 
    meson setup .. 
    ninja 
    ninja install