-
-
Notifications
You must be signed in to change notification settings - Fork 647
Compiling on Debian
Majesty edited this page Sep 2, 2024
·
3 revisions
- Debian 12
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 -y
sudo apt install git cmake build-essential autoconf libtool ca-certificates curl zip unzip tar pkg-config ninja-build ccache linux-headers-$(uname -r) -y
Update cmake
sudo apt remove --purge cmake -y
hash -r
sudo apt install snapd -y
sudo snap install cmake --classic
cmake --version
Update gcc
- Edit repository file:
sudo nano /etc/apt/sources.list
- Append these lines to the end:
deb http://deb.debian.org/debian testing main contrib non-free
deb-src http://deb.debian.org/debian testing main contrib non-free
- Save the file.
sudo apt update
sudo apt install gcc-14 -t testing && sudo apt install g++-14 -t testing
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 14
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 14
gcc-14 --version
g++-14 --version
Install vcpkg
cd ~
git clone https://github.com/microsoft/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!