The author of this documentation runs Fedora, so that is what the first part of the documentation is based on. See below for instructions on how to setup an Ubuntu system.
* `@development-tools` * `@fedora-packager` * `binutils-aarch64-linux-gnu` * `binutils-arm-linux-gnu` * `binutils-x86_64-linux-gnu` * `brotli` * `cargo` * `ccache` * `java` * `java-devel` * `java-17-openjdk-devel` * `gcc-c++` * `git-filter-repo` * `glibc.i686` * `gperf` * `libstdc++.i686` * `libxcrypt-compat` * `ncurses-compat-libs-6.4` * `ninja` * `java-1.8.0-openjdk-headless` * `java-17-openjdk-headless` * `java-21-openjdk-headless` * `openssl-devel` * `openssl-engine-devel` * `p7zip` * `parallel` * `perl-FindBin` * `python2.7` * `python3.12` * `repo` * `secilc` * `zlib.i686` * `zlib-ng-compat.i686` * `zopfli`
To do this in one fell swoop:
$ sudo dnf -y install \ @development-tools \ @fedora-packager \ binutils-aarch64-linux-gnu \ binutils-arm-linux-gnu \ binutils-x86_64-linux-gnu \ brotli \ cargo \ ccache \ java \ java-devel \ java-17-openjdk-devel \ gcc-c++ \ git-filter-repo \ glibc.i686 \ gperf \ libstdc++.i686 \ libxcrypt-compat \ ncurses-compat-libs-6.4 \ ninja \ java-1.8.0-openjdk-headless \ java-17-openjdk-headless \ java-21-openjdk-headless \ openssl-devel \ openssl-devel-engine \ p7zip \ parallel \ perl-FindBin \ python2.7 \ python3.12 \ repo \ secilc \ zlib.i686 \ zlib-ng-compat.i686 \ zopfli
Further, you may wish to wrap the repo command like so:
$ cat ~/bin/repo #!/bin/bash if [ -x "$PWD/.repo/repo/repo" ]; then repo_cmd="$PWD/.repo/repo/repo" else repo_cmd=/bin/repo fi if [ -z "${repo_cmd}" ]; then echo "No such command repo" exit 1 fi ${repo_cmd} $@
Install dependencies:
sudo apt update sudo apt install zip unzip flex bison libc6-i386 gcc-multilib lib32z1 7zip
Prepare the system (python2, pip, virtualenv, etc):
sudo apt install -y build-essential checkinstall libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev wget https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tgz tar -xvf Python-2.7.18.tgz pushd Python-2.7.18 ./configure --enable-optimizations make sudo make install popd wget https://bootstrap.pypa.io/pip/2.7/get-pip.py sudo python2 get-pip.py pip2 install virtualenv sudo ln -s /usr/local/bin/python /usr/bin/python for sobjs in /usr/lib/x86_64-linux-gnu/*so\.6; do sudo ln -s "$sobjs" "${sobjs%.6}.5"; done
Finally, create a virtualenv in the same folder as the ./build.sh script:
python2 -m virtualenv venv