Merge pull request #105 from MarcusLlewellyn/kasen/core

Update BUILD_LINUX.md
This commit is contained in:
Marcus Llewellyn 2020-01-20 15:35:43 -06:00 committed by GitHub
commit 4a90a7fd20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,80 +14,77 @@ sudo add-apt-repository universe
sudo apt-get update sudo apt-get update
``` ```
#### Install build tools: #### Install build tools:
1. First update the repositiories: - First update the repositiories:
```bash ```bash
sudo apt-get update -y sudo apt-get update -y
sudo apt-get upgrade -y sudo apt-get upgrade -y
``` ```
1. git - git
```bash ```bash
sudo apt-get install git -y sudo apt-get install git -y
``` ```
Verify by git --version Verify by git --version
1. g++ - g++
```bash ```bash
sudo apt-get install g++ -y sudo apt-get install g++ -y
``` ```
Verify by g++ --version Verify by g++ --version
1. *Ubuntu 18.04* cmake - *Ubuntu 18.04* cmake
```bash ```bash
sudo apt-get install cmake -y sudo apt-get install cmake -y
``` ```
Verify by cmake --version Verify by cmake --version
1. *Ubuntu 16.04* cmake - *Ubuntu 16.04* cmake
```bash ```bash
wget https://cmake.org/files/v3.14/cmake-3.14.2-Linux-x86_64.sh wget https://cmake.org/files/v3.14/cmake-3.14.2-Linux-x86_64.sh
sudo sh cmake-3.14.2-Linux-x86_64.sh --prefix=/usr/local --exclude-subdir sudo sh cmake-3.14.2-Linux-x86_64.sh --prefix=/usr/local --exclude-subdir
``` ```
#### Install build dependencies: #### Install build dependencies:
1. OpenSSL - OpenSSL:
```bash ```bash
sudo apt-get install libssl-dev sudo apt-get install libssl-dev
``` ```
Verify with `openssl version` Verify with `openssl version`
1. OpenGL - OpenGL:
Verify (first install mesa-utils - `sudo apt install mesa-utils -y`) by `glxinfo | grep "OpenGL version"`
```bash ```bash
sudo apt-get install libgl1-mesa-dev -y sudo apt-get install libgl1-mesa-dev -y
sudo ln -s /usr/lib/x86_64-linux-gnu/libGL.so.346.35 /usr/lib/x86_64-linux-gnu/libGL.so.1.2.0 sudo ln -s /usr/lib/x86_64-linux-gnu/libGL.so.346.35 /usr/lib/x86_64-linux-gnu/libGL.so.1.2.0
``` ```
- Verify OpenGL:
- First install mesa-utils with the command `sudo apt install mesa-utils -y`
- Then run `glxinfo | grep "OpenGL version"`
#### To compile interface in a server you must install: #### To compile interface in a server you must install:
```bash ```bash
sudo apt-get -y install libpulse0 libnss3 libnspr4 libfontconfig1 libxcursor1 libxcomposite1 libxtst6 libxslt1.1 sudo apt-get -y install libpulse0 libnss3 libnspr4 libfontconfig1 libxcursor1 libxcomposite1 libxtst6 libxslt1.1
``` ```
1. Misc dependencies - Misc dependencies:
```bash ```bash
sudo apt-get install libasound2 libxmu-dev libxi-dev freeglut3-dev libasound2-dev libjack0 libjack-dev libxrandr-dev libudev-dev libssl-dev zlib1g-dev sudo apt-get install libasound2 libxmu-dev libxi-dev freeglut3-dev libasound2-dev libjack0 libjack-dev libxrandr-dev libudev-dev libssl-dev zlib1g-dev
``` ```
1. To compile interface in a server you must install: - Install Python 3 and required packages:
```bash ```bash
sudo apt-get -y install libpulse0 libnss3 libnspr4 libfontconfig1 libxcursor1 libxcomposite1 libxtst6 libxslt1.1 sudo apt-get install python python3 python3-distro
``` ```
1. Install Python 3 and required packages - Install node, required to build the jsdoc documentation:
```bash
sudo apt-get install python3 python3-distro
```
1. Install node, required to build the jsdoc documentation
```bash ```bash
sudo apt-get install nodejs sudo apt-get install nodejs
``` ```
### Get code and checkout the tag you need ### Get code and checkout the branch you need
Clone this repository: Clone this repository:
```bash ```bash
git clone https://github.com/kasenvr/project-athena.git git clone https://github.com/kasenvr/project-athena.git
``` ```
To compile a RELEASE version checkout the tag you need getting a list of all tags: To compile a DEV version checkout the branch you need. To get a list of all tags:
```bash ```bash
git fetch -a git fetch -a
git tag
``` ```
Then checkout last tag with: Then checkout the main branch with:
```bash ```bash
git checkout tag/1.0 git checkout kasen/core
``` ```
### Compiling ### Compiling
@ -104,7 +101,7 @@ Prepare makefiles:
cmake .. cmake ..
``` ```
* If cmake fails with a vcpkg error - delete /tmp/hifi/vcpkg. - If cmake fails with a vcpkg error - delete /tmp/hifi/vcpkg.
Start compilation of the server and get a cup of coffee: Start compilation of the server and get a cup of coffee:
```bash ```bash
@ -116,7 +113,15 @@ To compile interface:
make interface make interface
``` ```
In a server, it does not make sense to compile interface The commands above will compile with a single thread. If you have enough memory,
you can decrease your build time using the `-j` flag. Since most x64 CPUs
support two threads per core, this works out to CPU_COUNT*2. As an example, if
you have a 2 core machine, you could use:
```
make -j4 interface
```
In a server, it does not make sense to compile interface.
### Running the software ### Running the software
@ -143,6 +148,13 @@ Running interface:
Go to localhost in the running interface. Go to localhost in the running interface.
#### Notes
If your goal is to set up a development environment, it is desirable to set the
directory that vcpkg builds into with the `HIFI_VCPKG_BASE` environment variable.
For example, you might set `HIFI_VCPKG_BASE` to `/home/$USER/vcpkg`.
By default, vcpkg will build in the system `/tmp` directory.
##### Ubuntu 18.04 only ##### Ubuntu 18.04 only
In Ubuntu 18.04 there is a problem related with NVidia driver library version. In Ubuntu 18.04 there is a problem related with NVidia driver library version.