|
1 | 1 | # Linux build guide
|
2 | 2 |
|
3 | 3 | Please read the [general build guide](BUILD.md) for information on dependencies required for all platforms. Only Linux specific instructions are found in this file.
|
4 |
| - |
5 | 4 | ## Qt5 Dependencies
|
6 | 5 |
|
7 | 6 | Should you choose not to install Qt5 via a package manager that handles dependencies for you, you may be missing some Qt5 dependencies. On Ubuntu, for example, the following additional packages are required:
|
8 | 7 |
|
9 | 8 | libasound2 libxmu-dev libxi-dev freeglut3-dev libasound2-dev libjack0 libjack-dev libxrandr-dev libudev-dev libssl-dev zlib1g-dev
|
10 | 9 |
|
11 | 10 | ## Ubuntu 16.04/18.04 specific build guide
|
12 |
| - |
13 |
| -### Ubuntu 18.04 only |
14 |
| -Add the universe repository: |
15 |
| -_(This is not enabled by default on the server edition)_ |
16 |
| -```bash |
17 |
| -sudo add-apt-repository universe |
18 |
| -sudo apt-get update |
19 |
| -``` |
20 |
| - |
21 |
| -### Prepare environment |
| 11 | +### Ubuntu 16.04 only |
22 | 12 | Add the following line to *.bash_profile*
|
23 | 13 | `export QT_QPA_FONTDIR=/usr/share/fonts/truetype/dejavu/`
|
| 14 | +### Ubuntu 18.04 only |
| 15 | +Add the universe repository: |
| 16 | +_(This is not enabled by default on the server edition)_ |
| 17 | +`sudo add-apt-repository universe` |
| 18 | +`sudo apt-get update` |
24 | 19 | #### Install build dependencies:
|
25 |
| -```bash |
26 |
| -sudo apt-get install libasound2 libxmu-dev libxi-dev freeglut3-dev libasound2-dev libjack0 libjack-dev libxrandr-dev libudev-dev libssl-dev zlib1g-dev |
27 |
| -``` |
28 |
| - |
| 20 | +1. OpenSSL |
| 21 | +`sudo apt-get install libssl-dev` |
| 22 | +Verify with `openssl version` |
| 23 | +1. OpenGL |
| 24 | +Verify (first install mesa-utils - `sudo apt install mesa-utils -y`) by `glxinfo | grep "OpenGL version"` |
| 25 | +`sudo apt-get install libgl1-mesa-dev -y` |
| 26 | +`sudo ln -s /usr/lib/x86_64-linux-gnu/libGL.so.346.35 /usr/lib/x86_64-linux-gnu/libGL.so.1.2.0` |
29 | 27 | #### To compile interface in a server you must install:
|
30 |
| -```bash |
31 |
| -sudo apt-get -y install libpulse0 libnss3 libnspr4 libfontconfig1 libxcursor1 libxcomposite1 libxtst6 libxslt1.1 |
32 |
| -``` |
33 |
| - |
| 28 | +`sudo apt-get -y install libpulse0 libnss3 libnspr4 libfontconfig1 libxcursor1 libxcomposite1 libxtst6 libxslt1.1` |
34 | 29 | #### Install build tools:
|
35 |
| -```bash |
36 |
| -# For Ubuntu 18.04 |
37 |
| -sudo apt-get install cmake |
38 |
| -``` |
39 |
| -```bash |
40 |
| -# For Ubuntu 16.04 |
41 |
| -wget https://cmake.org/files/v3.9/cmake-3.9.5-Linux-x86_64.sh |
42 |
| -sudo sh cmake-3.9.5-Linux-x86_64.sh --prefix=/usr/local --exclude-subdir |
43 |
| -``` |
44 |
| - |
45 |
| -#### Install Python 3: |
46 |
| -```bash |
47 |
| -sudo apt-get install python3 |
48 |
| -``` |
| 30 | +1. First update the repositiories: |
| 31 | +`sudo apt-get update -y` |
| 32 | +`sudo apt-get upgrade -y` |
| 33 | +1. git |
| 34 | +`sudo apt-get install git -y` |
| 35 | +Verify by git --version |
| 36 | +1. g++ |
| 37 | +`sudo apt-get install g++ -y` |
| 38 | +Verify by g++ --version |
| 39 | +1. cmake |
| 40 | +`sudo apt-get install cmake -y` |
| 41 | +Verify by git --version |
| 42 | +1. cmake |
| 43 | +`wget https://cmake.org/files/v3.14/cmake-3.14.2-Linux-x86_64.sh` |
| 44 | +`sudo sh cmake-3.14.2-Linux-x86_64.sh --prefix=/usr/local --exclude-subdir` |
| 45 | +##### Python |
| 46 | +Add to _bash_profile: |
| 47 | +` |
49 | 48 | ### Get code and checkout the tag you need
|
50 | 49 | Clone this repository:
|
51 | 50 | ```bash
|
52 | 51 | git clone https://github.com/highfidelity/hifi.git
|
53 | 52 | ```
|
54 | 53 |
|
55 | 54 | To compile a RELEASE version checkout the tag you need getting a list of all tags:
|
56 |
| -```bash |
57 |
| -git fetch -a |
58 |
| -git tags |
59 |
| -``` |
60 |
| - |
| 55 | +`git fetch -a` |
| 56 | +`git tags` |
61 | 57 | Then checkout last tag with:
|
62 |
| -```bash |
63 |
| -git checkout tags/v0.79.0 |
64 |
| -``` |
65 |
| - |
| 58 | +`git checkout tags/v0.79.0` |
66 | 59 | ### Compiling
|
67 | 60 |
|
68 | 61 | Create the build directory:
|
69 |
| -```bash |
70 |
| -mkdir -p hifi/build |
71 |
| -cd hifi/build |
72 |
| -``` |
73 |
| - |
| 62 | +`mkdir -p hifi/build` |
| 63 | +`cd hifi/build` |
74 | 64 | Prepare makefiles:
|
75 |
| -```bash |
76 |
| -cmake .. |
77 |
| -``` |
| 65 | +`cmake ..` |
78 | 66 |
|
79 |
| -Start compilation of the server and get a cup of coffee: |
80 |
| -```bash |
81 |
| -make domain-server assignment-client |
82 |
| -``` |
| 67 | +* If cmake fails with a vcpkg error - delete /tmp/hifi/vcpkg. |
83 | 68 |
|
84 |
| -To compile interface: |
85 |
| -```bash |
86 |
| -make interface |
87 |
| -``` |
| 69 | +Start compilation of the server and get a cup of coffee: |
| 70 | +`make domain-server assignment-client` |
88 | 71 |
|
| 72 | +To compile interface: |
| 73 | +`make interface` |
89 | 74 | In a server, it does not make sense to compile interface
|
90 |
| - |
91 | 75 | ### Running the software
|
92 | 76 |
|
93 | 77 | #### Domain server
|
94 | 78 |
|
95 | 79 | Running domain server:
|
96 |
| -```bash |
97 |
| -./domain-server/domain-server |
98 |
| -``` |
99 |
| - |
| 80 | +`./domain-server/domain-server` |
100 | 81 | #### Assignment clients
|
101 | 82 |
|
102 | 83 | Running assignment client:
|
103 |
| -```bash |
104 |
| -./assignment-client/assignment-client -n 6 |
105 |
| -``` |
106 |
| - |
| 84 | +`./assignment-client/assignment-client -n 6` |
107 | 85 | #### Interface
|
108 | 86 |
|
109 | 87 | Running interface:
|
110 |
| -```bash |
111 |
| -./interface/interface |
112 |
| -``` |
| 88 | +`./interface/interface` |
113 | 89 |
|
114 |
| -Go to localhost in the running interface. |
| 90 | +Go to localhost in the running interface. |
115 | 91 |
|
116 | 92 | ##### Ubuntu 18.04 only
|
117 | 93 |
|
118 | 94 | In Ubuntu 18.04 there is a problem related with NVidia driver library version.
|
119 | 95 |
|
120 |
| -It can be workarounded following these steps: |
| 96 | +It can be worked around following these steps: |
121 | 97 |
|
122 |
| -Uninstall incompatible nvtt libraries: |
123 |
| -```bash |
124 |
| -sudo apt-get remove libnvtt2 libnvtt-dev |
125 |
| -``` |
| 98 | +1. Uninstall incompatible nvtt libraries: |
| 99 | +`sudo apt-get remove libnvtt2 libnvtt-dev` |
126 | 100 |
|
127 |
| -Install libssl1.0-dev: |
128 |
| -```bash |
129 |
| -sudo apt-get -y install libssl1.0-dev |
130 |
| -``` |
| 101 | +1. Install libssl1.0-dev: |
| 102 | +`sudo apt-get -y install libssl1.0-dev` |
131 | 103 |
|
132 |
| -Clone castano nvidia-texture-tools: |
133 |
| -``` |
134 |
| -git clone https://github.com/castano/nvidia-texture-tools |
135 |
| -cd nvidia-texture-tools/ |
136 |
| -``` |
| 104 | +1. Clone castano nvidia-texture-tools: |
| 105 | +`git clone https://github.com/castano/nvidia-texture-tools` |
| 106 | +`cd nvidia-texture-tools/` |
137 | 107 |
|
138 |
| -Make these changes in repo: |
139 |
| -* In file **VERSION** set `2.2.1` |
140 |
| -* In file **configure**: |
141 |
| - * set `build="release"` |
142 |
| - * set `-DNVTT_SHARED=1` |
| 108 | +1. Make these changes in repo: |
| 109 | +* In file **VERSION** set `2.2.1` |
| 110 | +* In file **configure**: |
| 111 | + * set `build="release"` |
| 112 | + * set `-DNVTT_SHARED=1` |
143 | 113 |
|
144 |
| -Configure, build and install: |
145 |
| -``` |
146 |
| -./configure |
147 |
| -make |
148 |
| -sudo make install |
149 |
| -``` |
| 114 | +1. Configure, build and install: |
| 115 | +`./configure` |
| 116 | +`make` |
| 117 | +`sudo make install` |
150 | 118 |
|
151 |
| -Link compiled files: |
152 |
| -``` |
153 |
| -sudo ln -s /usr/local/lib/libnvcore.so /usr/lib/libnvcore.so |
154 |
| -sudo ln -s /usr/local/lib/libnvimage.so /usr/lib/libnvimage.so |
155 |
| -sudo ln -s /usr/local/lib/libnvmath.so /usr/lib/libnvmath.so |
156 |
| -sudo ln -s /usr/local/lib/libnvtt.so /usr/lib/libnvtt.so |
157 |
| -``` |
| 119 | +1.. Link compiled files: |
| 120 | +`sudo ln -s /usr/local/lib/libnvcore.so /usr/lib/libnvcore.so` |
| 121 | +`sudo ln -s /usr/local/lib/libnvimage.so /usr/lib/libnvimage.so` |
| 122 | +`sudo ln -s /usr/local/lib/libnvmath.so /usr/lib/libnvmath.so` |
| 123 | +`sudo ln -s /usr/local/lib/libnvtt.so /usr/lib/libnvtt.so` |
158 | 124 |
|
159 |
| -After running this steps you can run interface: |
160 |
| -``` |
161 |
| -interface/interface |
162 |
| -``` |
| 125 | +`. After running this steps you can run interface: |
| 126 | +`interface/interface` |
0 commit comments