Add fedora building guide and add dependencies to the wiki (#1862)
* Add fedora building guide and add dependencies to the wiki * Remove fedora build instructions * Update Building-From-Source.md * Update Building-From-Source.md (Fixed links) * Update Building-From-Source.md (Fixed links again) * Change to ALVR links
This commit is contained in:
parent
de8ee832b3
commit
fe5abf3f8d
|
@ -41,7 +41,13 @@ If you are on Linux, install these additional packages:
|
|||
```bash
|
||||
sudo apt install build-essential pkg-config libclang-dev libssl-dev libasound2-dev libjack-dev libgtk-3-dev libvulkan-dev libunwind-dev gcc-8 g++-8 yasm nasm curl libx264-dev libx265-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libspeechd-dev libxkbcommon-dev libdrm-dev libva-dev libvulkan-dev vulkan-headers
|
||||
```
|
||||
|
||||
* **Fedora**
|
||||
```bash
|
||||
sudo dnf groupinstall 'Development Tools' | For c++ and build tools
|
||||
sudo dnf install yasm libdrm-devel vulkan-headers jack-audio-connection-kit-devel atk-devel gdk-pixbuf2-devel cairo-devel rust-gdk0.15-devel x264-devel vulkan-devel libunwind-devel clang
|
||||
```
|
||||
If you are using Nvidia, see [Fedora cuda installation](https://github.com/alvr-org/ALVR/wiki/Building-From-Source#fedora-cuda-installation)
|
||||
|
||||
Move to the root directory of the project, then run this command (paying attention to the bullet points below):
|
||||
|
||||
```bash
|
||||
|
@ -64,12 +70,67 @@ You can find the resulting package in `build/alvr_streamer_[your platform]`
|
|||
|
||||
If you want to edit and rebuild the code, you can skip the `prepare-deps` command and run only the `build-streamer` command.
|
||||
|
||||
## Fedora CUDA installation
|
||||
If you are here for CUDA installation on Fedora you're at the right place! Else continue down to [Client Building](https://github.com/alvr-org/ALVR/wiki/Building-From-Source#client-building)
|
||||
### 1. Install Nvidia drivers and Fedora CUDA driver
|
||||
```bash
|
||||
sudo dnf update -y
|
||||
```
|
||||
(Reboot if you have a new kernel)
|
||||
```bash
|
||||
sudo dnf install akmod-nvidia
|
||||
sudo dnf install xorg-x11-drv-nvidia-cuda
|
||||
```
|
||||
Wait until ```modinfo -F version nvidia``` doesn't report ```"ERROR: Module nvidia not found"``` anymore
|
||||
|
||||
### 2. Install Nvidia's CUDA
|
||||
In the previous step, we installed Fedora's CUDA that doesn't work with ALVR, installing Nvidia's CUDA works and creates directories instead
|
||||
```bash
|
||||
sudo dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/fedora37/x86_64/cuda-fedora37.repo
|
||||
```
|
||||
Change the Fedora version if you are on a different version. You should check if your version is supported by inspecting the repo
|
||||
```bash
|
||||
sudo dnf clean all
|
||||
sudo dnf module disable nvidia-driver
|
||||
sudo dnf -y install cuda
|
||||
export PATH=/usr/local/cuda-12.2/bin${PATH:+:${PATH}}
|
||||
```
|
||||
If your cuda version is different, change it to the version that is installed. You can check installed versions by doing ```ls /usr/local/ | grep "cuda"``` in your terminal
|
||||
|
||||
**Comments**
|
||||
* Disabling the nvidia-driver doesn't disable Nvidia drivers but prevents nvidia dkms from installing over the akmod driver
|
||||
|
||||
### 3. Install gcc11 install with homebrew
|
||||
Becuase cuda cannot be ran without a gcc version lower than or equal to gcc12, you will need to install a gcc version on homebrew. The fedora gcc11 package got removed so this is the only way sadly
|
||||
To install homebrew, run this command:
|
||||
```bash
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
```
|
||||
Then install gcc11
|
||||
```bash
|
||||
brew install gcc@11
|
||||
```
|
||||
**Comments**
|
||||
* If brew is not found in your path, run the following separately to add brew to your path:
|
||||
```bash
|
||||
test -d ~/.linuxbrew && eval "$(~/.linuxbrew/bin/brew shellenv)"
|
||||
test -d /home/linuxbrew/.linuxbrew && eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
||||
echo "eval \"\$($(brew --prefix)/bin/brew shellenv)\"" >> ~/.bashrc
|
||||
```
|
||||
|
||||
### 4. Modify dependencies.rs to use correct cuda path and gcc version
|
||||
Because CURA installs as a symlink by default, we need to change the dependencies.rs to use the directory
|
||||
From the ALVR directory edit the ./alvr/xtask/src/dependencies.rs, and change two lines:
|
||||
* Line 159, change ```cuda``` -> ```cuda-12.2``` (or whatever version you have)
|
||||
* Line 179, replace that line with ```--nvccflags=\"-ccbin /home/linuxbrew/.linuxbrew/bin/g++-11 -gencode arch=compute_52,code=sm_52 -O2\"``` (Change homebrew path if needed, default is used)
|
||||
|
||||
You should be good to go! Refer to [Streamer Building](https://github.com/alvr-org/ALVR/wiki/Building-From-Source#streamer-building) for the commands to build ALVR
|
||||
|
||||
# Client Building
|
||||
|
||||
## 1. Installing necessary packages
|
||||
|
||||
For the client you need install:
|
||||
|
||||
* [Android Studio](https://developer.android.com/studio) or the [sdkmanager](https://developer.android.com/studio/command-line/sdkmanager)
|
||||
* Android SDK Platform-Tools 29 (Android 10)
|
||||
* Latest Android NDK (currently v25.1.8937393)
|
||||
|
@ -102,7 +163,6 @@ For Debian, it requires to have the `non-free` repository to be enabled:
|
|||
```bash
|
||||
sudo apt install android-sdk-platform-tools-common sdkmanager google-android-ndk-r25b-installer
|
||||
```
|
||||
|
||||
## 2. Setting environment variables
|
||||
|
||||
For Windows, set the environment variables:
|
||||
|
|
Loading…
Reference in New Issue