Installing Dependency Packages
Before compilation, you need to configure the source for the environment and install the mako module of Python 3 and dependency packages such as Meson.
- Configure the source based on the network environment to install the dependency packages required for compiling the source code.
- After the configuration is complete, update the index.
1sudo apt update
- Install the dependency packages required for the compilation.
If the following information is displayed, click Cancel.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
sudo apt-get install libgl1-mesa-dev g++-multilib git flex bison gperf build-essential sudo apt-get install tofrodos python3-markdown xsltproc dpkg-dev libsdl1.2-dev sudo apt-get install git-core gnupg zip curl zlib1g-dev gcc-multilib sudo apt-get install libc6-dev-i386 libx11-dev libncurses5-dev lib32ncurses5-dev x11proto-core-dev sudo apt-get install libxml2-utils unzip m4 lib32z-dev ccache libssl-dev gettext python3-mako libncurses5 sudo apt-get install python3-chardet python3-markupsafe python3-packaging python3-pkg-resources python3-pygments sudo apt-get install python3-pyparsing python3-six python3-yaml python2 python2.7 sudo apt-get install python3 python3-apport python3-apt python3-attr python3-automat sudo apt-get install python3-blinker python3-certifi python3-cffi-backend sudo apt-get install python3-click python3-colorama python3-commandnotfound sudo apt-get install python3-configobj python3-constantly sudo apt-get install python3-cryptography python3-dbus python3-debconf sudo apt-get install python3-debian python3-dev python3-distro python3-distro-info sudo apt-get install python3-distupgrade python3-distutils python3-entrypoints sudo apt-get install python3-gdbm python3-gi python3-hamcrest python3-httplib2 sudo apt-get install python3-hyperlink python3-idna python3-importlib-metadata sudo apt-get install python3-incremental python3-jinja2 python3-json-pointer sudo apt-get install python3-jsonpatch python3-jsonschema python3-jwt sudo apt-get install python3-keyring python3-launchpadlib python3-lazr.restfulclient sudo apt-get install python3-lazr.uri python3-lib2to3 sudo apt-get install python3-more-itertools python3-nacl python3-netifaces python3-newt sudo apt-get install python3-oauthlib python3-openssl python3-pip sudo apt-get install python3-problem-report python3-pyasn1 sudo apt-get install python3-pyasn1-modules python3-pymacaroons python3-pyrsistent sudo apt-get install python3-requests python3-requests-unixsocket python3-secretstorage sudo apt-get install python3-serial python3-service-identity sudo apt-get install python3-setuptools python3-simplejson sudo apt-get install python3-software-properties python3-systemd python3-twisted sudo apt-get install python3-update-manager python3-urllib3 python3-wadllib sudo apt-get install python3-wheel python3-zipp python3-zope.interface sudo apt-get install python-is-python3 ninja-build autoconf
- Check whether the Python 3 environment of the server contains the mako module. If it does not have the mako module, install the module.
Run the following command to go to the Python 3 environment:
1python3
In the Python 3 environment, run the following command to view the module information:1help("modules")

As shown in the following figure, if the command output contains the mako module, you can proceed with subsequent operations. If the mako module is missing, install it in the Python 3 environment. You can download the mako source code or use pip to install the mako module. The mako module is necessary for subsequent operations.

- Create a buildtools directory in the user directory and grant the read, write, and execute permissions to the directory owner.
1 2
mkdir ~/buildtools chmod -R 700 ~/buildtools
- Install Meson.Download the source package according to Software Environment, upload the meson-0.63.2.tar.gz package in the source package to the ~/buildtools directory, and decompress meson-0.63.2.tar.gz.
1 2
cd ~/buildtools tar -xvpf meson-0.63.2.tar.gz
- Set environment variables.
- Add the following content to the end of the ~/.bashrc file:
1 2 3
cat >> ~/.bashrc <<EOF export PATH=~/buildtools/meson-0.63.2:\$PATH EOF
- Make the environment variables take effect.
1source ~/.bashrc
- Add the following content to the end of the ~/.bashrc file:
Parent topic: Software Compilation