Update server_build.md

This commit is contained in:
TheJoKlLa 2022-04-23 21:57:56 +00:00
parent 67661273ac
commit 4f529d1d2c

View File

@ -1,16 +1,34 @@
# Build Server from Source # Build Server from Source
1. Install [rustup.rs](rustup.rs). Distribution packages for rustc are generally way too old ## Install Dependencies
1. `$ rustup install stable` ### Ubuntu / Debian
1. Get yourself a directory to clone BFFH into 1. `sudo apt update && sudo apt upgrade`
* If you put this dir on a SSD you can speed up build times by 5-10 times. 1. `sudo apt install curl && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh`
1. `git clone --recursive --branch stable` 1. `sudo apt install libgsasl7-dev libssl-dev build-essential`
* ... stable ... TODO... 1. `sudo apt install git cmake clang capnproto`
* You can also check out the `development` branch but keep in mind that until Beta it has no stability guarantee. It may work. It may make you a sandwich. But it may also set your hat on fire and fill your shoes with orange juice. *You have been warned*.
1. `cargo install --path .` ### Arch Linux
* if you add `--debug` you get a debug build. It gives you much more logging output but it's slower to run and is almost spammy 1. `sudo pacman -Syu`
1. Make yourself a coffee. Or tea. Or open $beverage of your choice. You earned it! (And you'll be looking at "**Compiling** <stuff>" for a while.) 1. `sudo pacman -S make cmake clang gsasl`
* If you get `error: failed to run custom build command for 'gsasl-sys v0.2.3'` or something like that with the stderr output reading "[…]Unable to find libclang[…]": 1. `sudo pacman -S git rust capnproto`
* `export LIBCLANG_PATH=/usr/lib`
Or wherever `libclang.so` is installed on your computer. It's usually `/usr/lib/libclang.so` or `/usr/lib/llvm/12/lib/libclang.so` or similar. If you can't find it, consult your package manager ### CentOS
* If you get any other error open an issue 1. `sudo yum update`
1. `sudo yum install curl && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh`
1. `sudo yum install epel-release && sudo yum install capnproto`
1. `sudo yum install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm && sudo yum install git`
1. `sudo yum install centos-release-scl && yum install llvm-toolset-7 && scl enable llvm-toolset-7 bash` (Change bash to youre shell)
1. `sudo yum install gcc-c++ libgsasl-devel openssl-devel cmake`
### FreeBSD
TODO
<!--- 1. `sudo pkg update -f`
1. `sudo pkg install curl && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh`
1. `sudo pkg install git` -->
## Build BFFH
Start new terminal - Rustup will not update path while install
1. `git clone https://gitlab.com/fabinfra/fabaccess/bffh.git --recursive`
1. `cd bffh`
1. (Optional) `git checkout development && git submodule update --remote` (Change `development` to wanted branch)
1. `cargo build --release`