Setting Up the Development Environment

You are advised to use the server based on Ubuntu 22.04 in the development environment. The AArch64 architecture the same as that in the operating environment is preferred. If the development environment uses the server of the x86_64 architecture, install the cross compilation toolchain.

  • The Glibc version in the development environment must be 2.28 or later.
  • The Python version in the development environment must be 3.8 or later.

Installing Tools

Before secondary development, developers need to confirm the development environment by referring to Table 1.

Table 1 Installing tools

Dependency

Description

Installation Command or Procedure

cmake

CMake is used to compile source code, make program libraries, generate wrappers, and construct executable files in any sequence.

Run the following commands to install CMake.

  • openEuler
    yum install cmake
  • Ubuntu
    apt-get install cmake

git

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

Run the following commands to install Git:

  • openEuler
    yum install git
  • Ubuntu
     apt-get install git

make

Make is a construction tool based on specified shell commands.

Run the following commands to install Make:

  • openEuler
    yum install make
  • Ubuntu
    apt-get install make

gcc

GCC is a frontend program for compilation. It invokes other programs to compile program source files into target files.

Run the following commands to install GCC:

  • openEuler
    yum install gcc
  • Ubuntu
    apt-get install gcc

crossbuild-essential-arm64

(Optional, required only the x86 compilation environment) Dependency tool package for cross compilation

Run the following commands to install the dependency tool package for cross compilation:

  • openEuler
    yum install crossbuild-essential-arm64
  • Ubuntu
    apt-get install crossbuild-essential-arm64

pam-devel

Pluggable authentication module (PAM) is a system security tool that allows system administrators to set authentication policies without recompiling programs that process authentication.

Run the following commands to install pam-devel:

  • openEuler
    yum install pam-devel
  • Ubuntu
    apt-get install pam-devel

node.js/npm

Compiles frontend code.

To ensure the successful dependency download and compilation of the customized frontend project, install node.js of the 14.21.3 version and npm of the 6.14.18 version. The procedure is as follows:

  1. Run the following command to view the current environment architecture:
    uname -m
    • The x86_64 architecture uses the software package named node-v14.21.3-linux-x64.tar.xz.
    • The AArch64 architecture uses the software package named node-v14.21.3-linux-arm64.tar.xz.
  2. Download the software package as required. node-xxxx.tar.xz indicates the software package name.
    wget https://nodejs.org/download/release/v14.21.3/node-xxxx.tar.xz
  3. Run the following command to decompress the software package:
    tar xf node-xxxx.tar.xz
  4. Go to the decompression directory and check the node version of the software package.
    cd node-xxxx
    ./bin/node -v
  5. Run the following commands to set the soft links as the root user
    ln -s /path_to_node-xxx/bin/node /usr/bin/node
    ln -s /path_to_node-xxx/bin/npm /usr/bin/npm
  6. Run the following commands to check the global node and npm versions:
    node -v
    npm -v
    Take node as an example. The command output is as follows:
    >>>v14.21.3

zip

Tool for compressing files

Run the following commands to install the .zip packages:

  • openEuler
    yum install zip
  • Ubuntu
    apt-get install zip