-
-
Notifications
You must be signed in to change notification settings - Fork 659
Compiling on Ubuntu 20.04
Beats edited this page Aug 14, 2022
·
12 revisions
- Ubuntu 20.04
The following command will install Git, CMake, a compiler and the libraries used by Canary.
Git will be used to download the source code, and CMake will be used to generate the build files.
sudo apt update
sudo apt dist-upgrade
sudo apt install git cmake build-essential autoconf libtool ca-certificates curl zip unzip tar pkg-config ninja-build ccache linux-headers-$(uname -r)
Update cmake
sudo apt remove --purge cmake
hash -r
sudo apt install snapd
sudo snap install cmake --classic
cmake --version
Update gcc
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt update
sudo apt install gcc-11 g++-11
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100 --slave /usr/bin/g++ g++ /usr/bin/g++-11 --slave /usr/bin/gcov gcov /usr/bin/gcov-11
sudo update-alternatives --set gcc /usr/bin/gcc-11
gcc-11 --version
g++-11 --version
Install vcpkg
cd ~
git clone https://github.com/opentibiabr/vcpkg
cd vcpkg
./bootstrap-vcpkg.sh
cd ..
git clone --depth 1 https://github.com/opentibiabr/canary.git
cd canary
git checkout main
.
├── canary
└── vcpkg
mkdir build && cd build
cmake -DCMAKE_TOOLCHAIN_FILE=~/vcpkg/scripts/buildsystems/vcpkg.cmake .. --preset linux-release
cmake --build linux-release
-- Running vcpkg install
This step will take a long time on the first run, as it needs to download and install all the dependencies, so be patient!