Compilation Environment Configuration

If you have developed a program using an operator or application project, you need to configure the compilation environment to build and run the project.

Configuring Permissions for the Installation User

If you install MindStudio as a non-root user, you may need to use the privilege escalation commands. In this case, obtain the required sudo permissions. After the installation is complete, cancel the permissions related to high-risk commands. Otherwise, sudo privilege escalation risks exist.

Installing the Compiler

Install compilers based on the architecture of MindStudio installation server. For details, see Table 1.

After the compilation environment is configured, restart MindStudio IDE for the configuration to take effect.

Table 1 Compiler commands

MindStudio installation server Architecture

Operating Environment Architecture

Compiler

x86_64

x86_64

Run the g++ --version command on the MindStudio installation server as the MindStudio IDE installation user to check whether the compiler has been installed. If not, run the following installation command to install the compiler:

  • For CentOS and openEuler:
    sudo yum install -y g++
  • For Ubuntu OSs:
    sudo apt-get install -y g++

aarch64

Run the aarch64-linux-gnu-g++ --version command on the MindStudio installation server as the MindStudio IDE installation user to check whether the compiler has been installed. If not, run the following command to install the compiler:

  • For CentOS and openEuler:
    sudo yum install -y g++-aarch64-linux-gnu
  • For Ubuntu OSs:
    sudo apt-get install -y g++-aarch64-linux-gnu

If there are multiple cross compilers on the MindStudio installation server, create a soft link between the used cross compiler and the required cross compiler version. The command is as follows:

sudo ln -s Cross compiler of another version Required version

Note: If you install dependencies as the root user, delete sudo from the commands in the table.