From 6d61d8056ab8411c9d760404849d787cba13b43c Mon Sep 17 00:00:00 2001 From: Kalila L Date: Wed, 1 Dec 2021 20:46:20 -0500 Subject: [PATCH 1/9] Update formatting on BUILD_LINUX.md. --- BUILD_LINUX.md | 113 +++++++++++++++++++++++++++++-------------------- 1 file changed, 68 insertions(+), 45 deletions(-) diff --git a/BUILD_LINUX.md b/BUILD_LINUX.md index ae0a88a98e..7e74372012 100644 --- a/BUILD_LINUX.md +++ b/BUILD_LINUX.md @@ -1,75 +1,96 @@ # Build Linux -*Last Updated on December 1, 2020* +*Last Updated on December 1, 2021* 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. You can use the [Vircadia Builder](https://github.com/vircadia/vircadia-builder) to build on Linux more easily. Alternatively, you can follow the manual steps below. -## Ubuntu 16.04/18.04 specific build guide +## Ubuntu 16.04/18.04 + ### Ubuntu 16.04 only -Add the following line to *.bash_profile* -`export QT_QPA_FONTDIR=/usr/share/fonts/truetype/dejavu/` -### Ubuntu 18.04 server only + +Add the following line to `.bash_profile`: + +```bash +export QT_QPA_FONTDIR=/usr/share/fonts/truetype/dejavu/ +``` + +### Ubuntu 18.04 Server only Add the universe repository: -_(This is not enabled by default on the server edition)_ +_(This is not enabled by default on the server edition.)_ ```bash sudo add-apt-repository universe sudo apt-get update ``` + #### Install build tools: - First update the repositories: ```bash sudo apt-get update -y sudo apt-get upgrade -y ``` -- git + +- Install git ```bash sudo apt-get install git -y ``` -Verify by git --version -- g++ +Verify git was installed by running `git --version`. + +- Install g++ ```bash sudo apt-get install g++ -y ``` -Verify by g++ --version -- *Ubuntu 18.04* cmake +Verify g++ was installed by running `g++ --version`. + +- **Ubuntu 18.04** CMake ```bash sudo apt-get install cmake -y ``` -Verify by cmake --version -- *Ubuntu 16.04* cmake +Verify CMake was installed by running `cmake --version`. + +- **Ubuntu 16.04** CMake ```bash 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 ``` + #### Install build dependencies: - OpenSSL: ```bash sudo apt-get install libssl-dev ``` -Verify with `openssl version` +Verify OpenSSL was installed by running `openssl version`. + - OpenGL: ```bash 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 ``` -- 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: +Verify OpenGL: + - First install mesa-utils with the command `sudo apt install mesa-utils -y`. + - Then run `glxinfo | grep "OpenGL version"`. + + +#### Extra dependencies to compile an Interface on a server + + +- Install the following: ```bash sudo apt-get -y install libpulse0 libnss3 libnspr4 libfontconfig1 libxcursor1 libxcomposite1 libxtst6 libxslt1.1 ``` + - Misc dependencies: ```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 ``` + - Install Python 3 and required packages: ```bash sudo apt-get install python python3 python3-distro ``` -- Install node, required to build the jsdoc documentation: + +- Install Node.js as it is required to build the jsdoc documentation: ```bash sudo apt-get install nodejs ``` @@ -81,16 +102,16 @@ Clone this repository: git clone https://github.com/vircadia/vircadia.git ``` -To compile a DEV version checkout the branch you need. To get a list of all tags: -```bash -git fetch -a -``` - -Then checkout the main branch with: +Then checkout the master branch with: ```bash git checkout master ``` +If you need a different branch, you can get a list of all tags with: +```bash +git fetch -a +``` + ### Using a custom Qt build Qt binaries are only provided for Ubuntu. In order to build on other distributions, a Qt5 install @@ -104,6 +125,19 @@ The system's Qt can be used, if the development packages are installed, by setti also the last version available in the Qt 5 branch. It is expected that Linux distributions will have Qt 5.15.2 available for a long time. +### Architecture support + +If the build is intended to be packaged for distribution, the `VIRCADIA_CPU_ARCHITECTURE` +CMake variable needs to be set to an architecture specific value. + +By default, it is set to `-march=native -mtune=native`, which yields builds optimized for a particular +machine, but these builds will not work on machines lacking same CPU instructions. + +For packaging, it is recommended to set it to a different value, for example `-msse3`. This will help ensure that the build will run on all reasonably modern CPUs. + +Setting `VIRCADIA_CPU_ARCHITECTURE` to an empty string will use the default compiler settings and yield +maximum compatibility. + ### Compiling Create the build directory: @@ -118,33 +152,30 @@ Prepare makefiles: cmake .. ``` -- If cmake fails with a vcpkg error - delete /tmp/hifi/vcpkg. +If cmake fails with a vcpkg error, then delete `/tmp/vircadia/vcpkg`. -Start compilation of the server and get a cup of coffee: +Start compilation of the server and grab a cup of coffee: ```bash make domain-server assignment-client ``` -To compile interface: +To compile the Interface: ```bash make 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: +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. +*Note: In a server, it is not necessary to compile the Interface.* ### Running the software #### Domain server -Running domain server: +Running Domain server: ```bash ./domain-server/domain-server ``` @@ -163,19 +194,11 @@ Running interface: ./interface/interface ``` -Go to localhost in the running interface. +Go to localhost in the running Interface to visit your newly launched world. #### 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. +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. -If build is intended for packaging or creation of AppImage, `VIRCADIA_CPU_ARCHITECTURE` -CMake variable needs to be set to architecture specific value. -It defaults to `-march=native -mtune=native`, which yields builds optimized for particular -machine, but builds will not work on machines lacking same CPU instructions. -For packaging and AppImage it is recommended to set it to different value, for example `-msse3`. -Setting `VIRCADIA_CPU_ARCHITECTURE` to empty string will use default compiler settings and yield -maximum compatibility. +By default, vcpkg will build in the system `/tmp` directory. From e41c826d051975c4106f281269c07741a698bd0f Mon Sep 17 00:00:00 2001 From: Kalila L Date: Wed, 1 Dec 2021 20:46:39 -0500 Subject: [PATCH 2/9] Update formatting on BUILD_OSX.md. --- BUILD_OSX.md | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/BUILD_OSX.md b/BUILD_OSX.md index 03106b9354..b041768dce 100644 --- a/BUILD_OSX.md +++ b/BUILD_OSX.md @@ -1,6 +1,6 @@ -# Build MacOS +# Build macOS -*Last Updated on October 19, 2021* +*Last Updated on December 1, 2021* Please read the [general build guide](BUILD.md) for information on dependencies required for all platforms. This will include the necessary environment variables to customize your build. Only macOS specific instructions are found in this document. @@ -21,9 +21,9 @@ brew install cmake openssl npm Download an install Python 3.6.6 or higher from [here](https://www.python.org/downloads/). Execute the `Update Shell Profile.command` script that is provided with the installer. -### MacOS SDK +### macOS SDK -You will need version `10.12` of the macOS SDK for building, otherwise you may have crashing or other unintended issues due to the deprecation of OpenGL on macOS. You can get that SDK from [here](https://github.com/phracker/MacOSX-SDKs). You must copy it in to your Xcode SDK directory, e.g. +You will need version `10.12` of the macOS SDK for building, otherwise you may experience crashing or other unintended issues due to the deprecation of OpenGL on macOS. You can get that SDK from [here](https://github.com/phracker/MacOSX-SDKs). You must copy it in to your Xcode SDK directory, e.g. ```bash cp -rp ~/Downloads/MacOSX10.12.sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ @@ -64,14 +64,17 @@ You can append `-j4` to assign more threads to build with. The number indicates To package the installation, you can simply run `make package` afterwards. -## Notes +## Architecture Support -If build is intended for packaging or creation of AppImage, `VIRCADIA_CPU_ARCHITECTURE` -CMake variable needs to be set to architecture specific value. -It defaults to `-march=native -mtune=native`, which yields builds optimized for particular -machine, but builds will not work on machines lacking same CPU instructions. -For packaging and AppImage it is recommended to set it to different value, for example `-msse3`. -Setting `VIRCADIA_CPU_ARCHITECTURE` to empty string will use default compiler settings and yield +If the build is intended to be packaged for distribution, the `VIRCADIA_CPU_ARCHITECTURE` +CMake variable needs to be set to an architecture specific value. + +By default, it is set to `-march=native -mtune=native`, which yields builds optimized for a particular +machine, but these builds will not work on machines lacking same CPU instructions. + +For packaging, it is recommended to set it to a different value, for example `-msse3`. This will help ensure that the build will run on all reasonably modern CPUs. + +Setting `VIRCADIA_CPU_ARCHITECTURE` to an empty string will use the default compiler settings and yield maximum compatibility. ## FAQ From 6b9afb161cf6ef7dba2ba42884798ef6d1335866 Mon Sep 17 00:00:00 2001 From: Kalila L Date: Wed, 1 Dec 2021 20:47:01 -0500 Subject: [PATCH 3/9] Remove .rpm reference from README.md. --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index e5d3c68b2f..828dd94c95 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,6 @@ Vircadia™ is a 3D social software project seeking to incrementally bring about - [For Windows - Interface & Server](https://github.com/vircadia/vircadia/blob/master/INSTALLER.md) - [For Mac - Interface](https://github.com/vircadia/vircadia/blob/master/INSTALLER.md#os-x) - [For Linux - Server .deb - Vircadia Builder](INSTALLER.md#ubuntu-1804--deb) -- [For Linux - Server .rpm - Vircadia Builder](INSTALLER.md#amazon-linux-2--rpm) - [For Linux - Interface AppImage - Vircadia Builder](https://github.com/vircadia/vircadia-builder/blob/master/README.md#building-appimages) ### Boot to Metaverse: [The Goal](https://vircadia.com/vision/) @@ -100,4 +99,4 @@ Keep in mind that Vircadia consists of multiple smaller projects that might have #### Sponsors of Open Source -CrossBrowserTesting +[CrossBrowserTesting](https://crossbrowsertesting.com/) From 604b6c0b2b7a961056d682aacc2857eeed4cff29 Mon Sep 17 00:00:00 2001 From: Kalila <69767640+digisomni@users.noreply.github.com> Date: Thu, 6 Jan 2022 17:17:19 -0500 Subject: [PATCH 4/9] Update BUILD_LINUX.md Remove Ubuntu 16.04 references. --- BUILD_LINUX.md | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/BUILD_LINUX.md b/BUILD_LINUX.md index 7e74372012..7adcbd0479 100644 --- a/BUILD_LINUX.md +++ b/BUILD_LINUX.md @@ -1,20 +1,12 @@ # Build Linux -*Last Updated on December 1, 2021* +*Last Updated on January 6, 2021* 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. You can use the [Vircadia Builder](https://github.com/vircadia/vircadia-builder) to build on Linux more easily. Alternatively, you can follow the manual steps below. -## Ubuntu 16.04/18.04 - -### Ubuntu 16.04 only - -Add the following line to `.bash_profile`: - -```bash -export QT_QPA_FONTDIR=/usr/share/fonts/truetype/dejavu/ -``` +## Ubuntu 18.04 ### Ubuntu 18.04 Server only Add the universe repository: @@ -49,12 +41,6 @@ sudo apt-get install cmake -y ``` Verify CMake was installed by running `cmake --version`. -- **Ubuntu 16.04** CMake -```bash -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 -``` - #### Install build dependencies: - OpenSSL: ```bash From 19adf81c1621d8d3b571c1cce9277c30f88ebea0 Mon Sep 17 00:00:00 2001 From: Kalila <69767640+digisomni@users.noreply.github.com> Date: Thu, 6 Jan 2022 17:17:46 -0500 Subject: [PATCH 5/9] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Julian Groß --- BUILD_LINUX.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/BUILD_LINUX.md b/BUILD_LINUX.md index 7adcbd0479..df99bb16e8 100644 --- a/BUILD_LINUX.md +++ b/BUILD_LINUX.md @@ -51,7 +51,6 @@ Verify OpenSSL was installed by running `openssl version`. - OpenGL: ```bash 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 ``` Verify OpenGL: - First install mesa-utils with the command `sudo apt install mesa-utils -y`. @@ -138,7 +137,7 @@ Prepare makefiles: cmake .. ``` -If cmake fails with a vcpkg error, then delete `/tmp/vircadia/vcpkg`. +If cmake fails with a vcpkg error, then delete `~/vircadia-files/vcpkg/`. Start compilation of the server and grab a cup of coffee: ```bash @@ -187,4 +186,4 @@ Go to localhost in the running Interface to visit your newly launched world. 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. +By default, vcpkg will build in the `~/vircadia-files/vcpkg/` directory. From 02727fc93a8ed9ddc70cc2b75afc73870fff59e7 Mon Sep 17 00:00:00 2001 From: Kalila <69767640+digisomni@users.noreply.github.com> Date: Thu, 6 Jan 2022 17:48:50 -0500 Subject: [PATCH 6/9] Update BUILD_LINUX.md --- BUILD_LINUX.md | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/BUILD_LINUX.md b/BUILD_LINUX.md index df99bb16e8..dad6230205 100644 --- a/BUILD_LINUX.md +++ b/BUILD_LINUX.md @@ -16,7 +16,7 @@ sudo add-apt-repository universe sudo apt-get update ``` -#### Install build tools: +### Install build tools: - First update the repositories: ```bash sudo apt-get update -y @@ -41,7 +41,7 @@ sudo apt-get install cmake -y ``` Verify CMake was installed by running `cmake --version`. -#### Install build dependencies: +### Install build dependencies: - OpenSSL: ```bash sudo apt-get install libssl-dev @@ -57,7 +57,7 @@ Verify OpenGL: - Then run `glxinfo | grep "OpenGL version"`. -#### Extra dependencies to compile an Interface on a server +### Extra dependencies to compile an Interface on a server - Install the following: @@ -94,7 +94,8 @@ git checkout master If you need a different branch, you can get a list of all tags with: ```bash -git fetch -a +git fetch --tags +git tag ``` ### Using a custom Qt build @@ -120,8 +121,7 @@ machine, but these builds will not work on machines lacking same CPU instruction For packaging, it is recommended to set it to a different value, for example `-msse3`. This will help ensure that the build will run on all reasonably modern CPUs. -Setting `VIRCADIA_CPU_ARCHITECTURE` to an empty string will use the default compiler settings and yield -maximum compatibility. +Setting `VIRCADIA_CPU_ARCHITECTURE` to an empty string will use the default compiler settings and yield maximum compatibility. ### Compiling @@ -139,23 +139,27 @@ cmake .. If cmake fails with a vcpkg error, then delete `~/vircadia-files/vcpkg/`. -Start compilation of the server and grab a cup of coffee: +#### Server + +To compile the Domain server: ```bash make domain-server assignment-client ``` -To compile the Interface: +*Note: For a server, it is not necessary to compile the Interface.* + +#### Interface + +To compile the Interface client: ```bash make 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: -``` +```bash make -j4 interface ``` -*Note: In a server, it is not necessary to compile the Interface.* - ### Running the software #### Domain server @@ -174,14 +178,14 @@ Running assignment client: #### Interface -Running interface: +Running the Interface: ```bash ./interface/interface ``` -Go to localhost in the running Interface to visit your newly launched world. +Go to "localhost" in the running Interface to visit your newly launched Domain server. -#### Notes +### 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`. From 262a071b485de9342e2db9ed127c5ad95d98052d Mon Sep 17 00:00:00 2001 From: Kalila L Date: Thu, 13 Jan 2022 05:39:04 -0500 Subject: [PATCH 7/9] Update README.md --- README.md | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/README.md b/README.md index 828dd94c95..4431e5c9f4 100644 --- a/README.md +++ b/README.md @@ -93,10 +93,4 @@ Keep in mind that Vircadia consists of multiple smaller projects that might have #### Supporters of the Vircadia Project -| [ksuprynowicz (74hc595)](https://github.com/ksuprynowicz) | -| --- | -|

[ksuprynowicz](https://github.com/ksuprynowicz)

- -#### Sponsors of Open Source - -[CrossBrowserTesting](https://crossbrowsertesting.com/) +Two (2) anonymous, three (3) total sponsors through GitHub. ❤️ From 60c9486782783eefd2ed72a2595997193e917e91 Mon Sep 17 00:00:00 2001 From: Kalila <69767640+digisomni@users.noreply.github.com> Date: Fri, 21 Jan 2022 06:08:31 -0500 Subject: [PATCH 8/9] Update BUILD_LINUX.md --- BUILD_LINUX.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BUILD_LINUX.md b/BUILD_LINUX.md index dad6230205..53088e90d8 100644 --- a/BUILD_LINUX.md +++ b/BUILD_LINUX.md @@ -1,6 +1,6 @@ # Build Linux -*Last Updated on January 6, 2021* +*Last Updated on January 6, 2022* 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. From e103bcf4473a8fe1450371aa56b4d2e5dc306106 Mon Sep 17 00:00:00 2001 From: Kalila <69767640+digisomni@users.noreply.github.com> Date: Sat, 22 Jan 2022 18:57:44 -0500 Subject: [PATCH 9/9] Apply suggestions from code review Co-authored-by: David Rowe --- BUILD_LINUX.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BUILD_LINUX.md b/BUILD_LINUX.md index 53088e90d8..ed82d097f8 100644 --- a/BUILD_LINUX.md +++ b/BUILD_LINUX.md @@ -57,7 +57,7 @@ Verify OpenGL: - Then run `glxinfo | grep "OpenGL version"`. -### Extra dependencies to compile an Interface on a server +### Extra dependencies to compile Interface on a server - Install the following: @@ -178,7 +178,7 @@ Running assignment client: #### Interface -Running the Interface: +Running Interface: ```bash ./interface/interface ```