(Basic Outline Only) How to compile HiFi in Ubuntu 14.04 Again


I figured some might find this useful. Since this repo popped up on github, its original purpose is to create a vm to compile hifi in but I gleamed the info off just for people who were more on the advanced end but wanted the basics on how to compile hifi in Ubuntu 14.04 again. Here is the basic steps to prepare your compile box:

Notice that HiFi is hosting the qt needed for Ubuntu 14.04 to work now so that is one of the main reasons this works

Original Repo: https://github.com/highfidelity/hifi-cloud

apt-get install software-properties-common

add-apt-repository "deb http://hifi-debian-repo.s3.amazonaws.com/ stable main"

add-apt-repository ppa:george-edison55/cmake-3.x

add-apt-repository ppa:ubuntu-toolchain-r/test

apt-get update

apt-get install qt cmake gcc-4.9 g++-4.9 build-essential git zlib1g-dev libssl-dev libstdc++6 freeglut3 freeglut3-dev mesa-common-dev libxrandr-dev libudev-dev libxslt1.1 libpulse0 libgstreamer0.10-0 libgstreamer-plugins-base0.10-0 libicu52 libxcomposite1 libtbb2 libsoxr0 -y --force-yes

update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.9

echo QT_CMAKE_PREFIX_PATH=/usr/local/Qt-5.5.1/lib/cmake/ >> /etc/environment

now you can do your git pull on the hifi source.

One last note: Because of changes made by HiFi, you now need to include -DSERVER_ONLY=TRUE in your cmake statement.

An example is:
cd to hifi source dir
mkdir build
cd build



Will it work with OpenSuse too?


To install on OpenSuSE you would need to get the raw deb and covert it to rpm. In short, doubtful unless it installed correctly (for the qt package).

If you wanted to install it on older versions of OpenSuSE, it would require a whole different process to work out, same with packages, etc.


My Ubuntu is giving me this
E: Unable to locate package g+±4.9
E: Couldn’t find any package by regex ‘g+±4.9’


You used 14.04 and followed all of the instructions in the post?

I know you have to use all of the add-apt-repository entries posted above for it to work.

I will load a 14.04 on Digital Ocean and see how it works for me.

EDIT Make sure after you do these commands:

add-apt-repository "deb http://hifi-debian-repo.s3.amazonaws.com/ stable main"
add-apt-repository ppa:george-edison55/cmake-3.x
add-apt-repository ppa:ubuntu-toolchain-r/test

You run apt-get update so it pulls the new files.

I just tried this and it worked just fine.


Yes, and to clarify:

root@ubuntu-server:~# lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 14.04.3 LTS
Release:	14.04
Codename:	trusty

this is the console output of the commands, also this is a fresh, squeaky clean install of 14.04 server in a VM

root@ubuntu-server:~# apt-get install software-properties-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
software-properties-common is already the newest version.
0 to upgrade, 0 to newly install, 0 to remove and 3 not to upgrade.
root@ubuntu-server:~# add-apt-repository "deb http://hifi-debian-repo.s3.amazonaws.com/ stable main"
root@ubuntu-server:~# add-apt-repository ppa:george-edison55/cmake-3.x
 Provides up to date builds of CMake 3.x (and related packages) for recent releases of Ubuntu. This currently includes:

* 14.04 - Trusty Tahr
* 15.04 - Vivid Vervet

These builds were created by taking the Debian packaging for CMake 3.0 from Wily and adapting it for each new release (adjusting patches, adding changelog entries, etc.).
 More info: https://launchpad.net/~george-edison55/+archive/ubuntu/cmake-3.x
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keyring `/tmp/tmpl5gc2re1/secring.gpg' created
gpg: keyring `/tmp/tmpl5gc2re1/pubring.gpg' created
gpg: requesting key 828AB726 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpl5gc2re1/trustdb.gpg: trustdb created
gpg: key 828AB726: public key "Launchpad George Edison's PPA" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
root@ubuntu-server:~# apt-get update
Ign http://ppa.launchpad.net trusty InRelease
Ign http://gb.archive.ubuntu.com trusty InRelease                              
Get:1 http://gb.archive.ubuntu.com trusty-updates InRelease [64.4 kB]          
Get:2 http://ppa.launchpad.net trusty Release.gpg [316 B]                      
Get:3 http://ppa.launchpad.net trusty Release [15.1 kB]                        
Hit http://gb.archive.ubuntu.com trusty-backports InRelease                    
Hit http://security.ubuntu.com trusty-security InRelease                       
Hit http://gb.archive.ubuntu.com trusty Release.gpg                      
Get:4 http://gb.archive.ubuntu.com trusty-updates/main Sources [240 kB]  
Ign http://hifi-debian-repo.s3.amazonaws.com stable InRelease                  
Get:5 http://ppa.launchpad.net trusty/main amd64 Packages [2,061 B]            
Get:6 http://ppa.launchpad.net trusty/main i386 Packages [2,065 B]             
Hit http://security.ubuntu.com trusty-security/main Sources                    
Ign http://hifi-debian-repo.s3.amazonaws.com stable Release.gpg                
Get:7 http://ppa.launchpad.net trusty/main Translation-en [1,284 B]            
Hit http://security.ubuntu.com trusty-security/restricted Sources              
Get:8 http://gb.archive.ubuntu.com trusty-updates/restricted Sources [4,722 B] 
Get:9 http://gb.archive.ubuntu.com trusty-updates/universe Sources [140 kB]    
Get:10 http://hifi-debian-repo.s3.amazonaws.com stable Release [1,234 B]       
Hit http://security.ubuntu.com trusty-security/universe Sources                
Get:11 http://gb.archive.ubuntu.com trusty-updates/multiverse Sources [5,145 B]
Get:12 http://gb.archive.ubuntu.com trusty-updates/main amd64 Packages [635 kB]
Hit http://security.ubuntu.com trusty-security/multiverse Sources              
Hit http://security.ubuntu.com trusty-security/main amd64 Packages             
Hit http://security.ubuntu.com trusty-security/restricted amd64 Packages       
Hit http://security.ubuntu.com trusty-security/universe amd64 Packages         
Hit http://security.ubuntu.com trusty-security/multiverse amd64 Packages       
Get:13 http://gb.archive.ubuntu.com trusty-updates/restricted amd64 Packages [15.4 kB]
Get:14 http://gb.archive.ubuntu.com trusty-updates/universe amd64 Packages [323 kB]
Hit http://security.ubuntu.com trusty-security/main i386 Packages              
Hit http://security.ubuntu.com trusty-security/restricted i386 Packages        
Get:15 http://gb.archive.ubuntu.com trusty-updates/multiverse amd64 Packages [12.0 kB]
Hit http://security.ubuntu.com trusty-security/universe i386 Packages 
Get:16 http://gb.archive.ubuntu.com trusty-updates/main i386 Packages [615 kB] 
Hit http://security.ubuntu.com trusty-security/multiverse i386 Packages        
Hit http://security.ubuntu.com trusty-security/main Translation-en             
Hit http://security.ubuntu.com trusty-security/multiverse Translation-en       
Hit http://security.ubuntu.com trusty-security/restricted Translation-en       
Get:17 http://gb.archive.ubuntu.com trusty-updates/restricted i386 Packages [15.1 kB]
Get:18 http://gb.archive.ubuntu.com trusty-updates/universe i386 Packages [324 kB]
Hit http://security.ubuntu.com trusty-security/universe Translation-en         
Get:19 http://gb.archive.ubuntu.com trusty-updates/multiverse i386 Packages [12.1 kB]
Get:20 http://gb.archive.ubuntu.com trusty-updates/main Translation-en [308 kB]
Get:21 http://hifi-debian-repo.s3.amazonaws.com stable/main amd64 Packages [530 B]
Get:22 http://gb.archive.ubuntu.com trusty-updates/multiverse Translation-en [6,148 B]
Get:23 http://hifi-debian-repo.s3.amazonaws.com stable/main i386 Packages [20 B]
Get:24 http://gb.archive.ubuntu.com trusty-updates/restricted Translation-en [3,569 B]
Get:25 http://gb.archive.ubuntu.com trusty-updates/universe Translation-en [170 kB]
Hit http://gb.archive.ubuntu.com trusty Release                                
Hit http://gb.archive.ubuntu.com trusty-backports/main Sources                 
Hit http://gb.archive.ubuntu.com trusty-backports/restricted Sources           
Hit http://gb.archive.ubuntu.com trusty-backports/universe Sources             
Hit http://gb.archive.ubuntu.com trusty-backports/multiverse Sources
Hit http://gb.archive.ubuntu.com trusty-backports/main amd64 Packages
Hit http://gb.archive.ubuntu.com trusty-backports/restricted amd64 Packages
Hit http://gb.archive.ubuntu.com trusty-backports/universe amd64 Packages
Hit http://gb.archive.ubuntu.com trusty-backports/multiverse amd64 Packages
Hit http://gb.archive.ubuntu.com trusty-backports/main i386 Packages
Hit http://gb.archive.ubuntu.com trusty-backports/restricted i386 Packages
Ign http://hifi-debian-repo.s3.amazonaws.com stable/main Translation-en_GB
Hit http://gb.archive.ubuntu.com trusty-backports/universe i386 Packages
Hit http://gb.archive.ubuntu.com trusty-backports/multiverse i386 Packages
Hit http://gb.archive.ubuntu.com trusty-backports/main Translation-en
Hit http://gb.archive.ubuntu.com trusty-backports/multiverse Translation-en
Ign http://hifi-debian-repo.s3.amazonaws.com stable/main Translation-en  
Hit http://gb.archive.ubuntu.com trusty-backports/restricted Translation-en
Hit http://gb.archive.ubuntu.com trusty-backports/universe Translation-en
Hit http://gb.archive.ubuntu.com trusty/main Sources
Hit http://gb.archive.ubuntu.com trusty/restricted Sources
Hit http://gb.archive.ubuntu.com trusty/universe Sources
Hit http://gb.archive.ubuntu.com trusty/multiverse Sources
Hit http://gb.archive.ubuntu.com trusty/main amd64 Packages
Hit http://gb.archive.ubuntu.com trusty/restricted amd64 Packages
Hit http://gb.archive.ubuntu.com trusty/universe amd64 Packages
Hit http://gb.archive.ubuntu.com trusty/multiverse amd64 Packages
Hit http://gb.archive.ubuntu.com trusty/main i386 Packages
Hit http://gb.archive.ubuntu.com trusty/restricted i386 Packages
Hit http://gb.archive.ubuntu.com trusty/universe i386 Packages
Hit http://gb.archive.ubuntu.com trusty/multiverse i386 Packages
Hit http://gb.archive.ubuntu.com trusty/main Translation-en_GB
Hit http://gb.archive.ubuntu.com trusty/main Translation-en
Hit http://gb.archive.ubuntu.com trusty/multiverse Translation-en_GB
Hit http://gb.archive.ubuntu.com trusty/multiverse Translation-en
Hit http://gb.archive.ubuntu.com trusty/restricted Translation-en_GB
Hit http://gb.archive.ubuntu.com trusty/restricted Translation-en
Hit http://gb.archive.ubuntu.com trusty/universe Translation-en_GB
Hit http://gb.archive.ubuntu.com trusty/universe Translation-en
Fetched 2,917 kB in 6s (432 kB/s)                                              
Reading package lists... Done
root@ubuntu-server:~# apt-get install qt cmake gcc-4.9 g++-4.9 build-essential git zlib1g-dev libssl-dev libstdc++6 freeglut3 freeglut3-dev mesa-common-dev libxrandr-dev libudev-dev libxslt1.1 libpulse0 libgstreamer0.10-0 libgstreamer-plugins-base0.10-0 libicu52 libxcomposite1 -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'gcc-4.9-base' for regex 'gcc-4.9'
E: Unable to locate package g++-4.9
E: Couldn't find any package by regex 'g++-4.9'

Am iI missing something or is ubuntu just hating on me? :frowning:

EDIT: I just spotted something, for some reason it looks like it’s ignoring the hifi repo?


Nevermind, it was apt just being apt. after sequentially re-entering all the repo commands it’s now finding the package.

(probably a note to anyone else reading, don’t copy paste the whole block in one!)


Still getting errors compiling,

this seems to be a running issue, someone somewhere can compile hifi on ubuntu/Debian for all of about a day, then it changes and you get slapped with build errors or missing packages.

the script here gives the following error
E: Unable to locate package qml-module-qtquick-controls
E: Unable to locate package libqt5websockets5-dev


  CMake Error at cmake/macros/SetupHifiProject.cmake:32 (find_package):
  By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Qt5", but
  CMake did not find one.

  Could not find a package configuration file provided by "Qt5" with any of
  the following names:


  Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
  to a directory containing one of the above files.  If "Qt5" provides a
  separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
  assignment-client/CMakeLists.txt:3 (setup_hifi_project)

-- Configuring incomplete, errors occurred!
See also "/usr/local/src/highfidelity/hifi/build/CMakeFiles/CMakeOutput.log".
make: *** No rule to make target `domain-server'. Stop.
DS Build Failed!

i know Qt is once again the culprit, but i cannot for the life of me work out why installing it is such a headache!


Do not use my script when doing this method, you really have to do everything manually or script it your self. My auto compile script does not work for this Ubuntu 14.04 set. Its 15.04 only.

It has all of your needed compile stuff in the apt-get install above so you can use those.

update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.9

To do this entire thing on your own I suggest you make sure you do every line I have in the original post SEPARATELY to ensure it all worked.

ONE MORE NOTE Here is how I handle this and this is a one time command of course, make sure you setup a system user to run this from.

adduser --system --shell /bin/bash --disabled-password --group --home /home/hifi hifi

NEXT (Basic stuff you can figure out how to do it for recompiles)

sudo su - hifi

git clone https://github.com/highfidelity/hifi.git

cd ~/hifi

mkdir build && cd build

cmake ..

make assignment-client

make domain-server


Thanks for the help @Coal i have now managed to compile this on 14 LTS, however i’m now getting that annoying issue where the entities die after a about 30 seconds of running. sigh

Going to download and spawn a 15.10 server, the joys of VMware.
it would be nice to find a solid way of compiling for 14 though, as i imagine most hosting providers will be deploying that more openly than the non lts versions.


I compile hifi at a VPS with Ubuntu 14.04 and it runs since weeks stable.

  1. I install:
    sudo apt-get install screen git build-essential cmake libssl-dev libsdl2-dev libasound2 libxmu-dev libxi-dev freeglut3 freeglut3-dev mesa-common-dev unzip zlib1g-dev
    sudo apt-get install libudev-dev libxslt1.1 libpulse0 libgstreamer0.10-0 libgstreamer-plugins-base0.10-0 libicu52 libxcomposite1 -y
    sudo apt-get install libasound2 libxmu-dev libxi-dev libasound2-dev libjack-dev libxrandr-dev
    sudo apt-get install qt5-default qtscript5-dev qttools5-dev libqt5xmlpatterns5
    sudo apt-get install qtmultimedia5-dev libqt5svg5-dev libqt5webkit5-dev libsdl2-dev libqt5xmlpatterns5-dev qttools5-dev-tools

  2. I install with XMing gt5.4.1 with the path /usr/local/opt/Qt5.4.1/:
    chmod u+x qt-opensource-linux-x64-5.4.1.run

  3. I run compile:
    git clone https://github.com/highfidelity/hifi.git
    mkdir compile
    cd compile
    cmake …/hifi/ -DQT_CMAKE_PREFIX_PATH=/usr/local/opt/Qt5.4.1/5.4/gcc_64/lib/cmake/
    make assignment-client
    make domain-server

  4. I start hifi
    cd compile
    cd domain-server
    screen -S stack -d -m ./domain-server
    cd …
    cd assignment-client
    screen -S assign -d -m ./assignment-client -n 4


thanks but it is compiling fine, running stable however is a different issue, I just completed the compile on a 15.10 server and am having the same issues described on the 14.04 server, actually more issues even, since i can’t even connect to the web interface,

and i got a warning this time while compiling which i’ve never seen pop up before:

in member function ‘virtual void 
OctreeInboundPacketProcessor::processPacket(QSharedPointer<NLPacket>, SharedNodePointer)’:
/usr/local/src/highfidelity/hifi/assignment-client/src/octree/OctreeInboundPacketProcessor.cpp:156:47: warning: format ‘%hhu’ expects argument of type ‘int’, but argument 3 has type ‘PacketType’ [-Wformat=]
                         packet->pos(), maxSize);
/usr/local/src/highfidelity/hifi/assignment-client/src/octree/OctreeInboundPacketProcessor.cpp:193:104: warning: format ‘%hhu’ expects argument of type ‘int’, but argument 3 has type ‘PacketType’ [-Wformat=]
                     packetType, packet->getPayload(), packet->getPayloadSize(), editData, packet->pos());
/usr/local/src/highfidelity/hifi/assignment-client/src/octree/OctreeInboundPacketProcessor.cpp:210:71: warning: format ‘%hhu’ expects argument of type ‘int’, but argument 3 has type ‘PacketType’ [-Wformat=]
         qDebug("unknown packet ignored... packetType=%hhu", packetType);

I really can’t help thinking someone has stuffed up the code somewhere, (though please feel free to prove my hunch wrong)


Hi summer, thanks for that step by step tutorial. Point 1 - works fine.

I am not very experienced with server software setup, can you explain how to do to install with XMING, your second point? I’ve jumped to /usr/local/opt/Qt5.4.1 (the opt and Qt5.4.1 directory was created by me) and tried to chmod u+x qt-opensource-linux-x64-5.4.1.run but just get this error message back: chmod: cannot access ‘qt-opensource-linux-x64-5.4.1.run’: No such file or directory.

So I guess, the installation with XMING works somehow different :confused:


Hey there @Skimi, I am not sure if you have figured this out yet but you need Qt 5.5.1 now to run HiFi. If you still need help with some Linux stuff feel free to hit me up in SL, my name is Coal Edge. You can also send me a message here but I saw by your info you are in SL too.


Hi @Coal thanks for your answer :slight_smile: - very appreciate it. I still stuck at point 2 (all steps in point 1 was done without an error message). Would be great if you can explain how I get this Qt 5.5.1 installed - for dummies

About SL - I am not very active there anymore. Would be cool, if we can stay here in touch.


Click on a person’s name. You will get the following pop up. Next, click on the message button to send a direct message to that person:


Without a good text chat in HiFi, and me liking real time chat to explain things more in depth than doing PMs back and forth, it was the best option I thought but any way you wish to do is fine.

Anyhow, installing Qt depends a lot on your configuration, what else is installed, what versions they are etc. If you want to start fresh with installing it on a VM or something dedicated, I suggest this method which is HiFi compiled, as long as it is Ubuntu 14.04 with a fresh install:

Step 1:
apt-get install software-properties-common

Step 2:
add-apt-repository "deb http://debian.highfidelity.com stable main"

Step 3:
apt-get update

Step 4:
apt-get -y --force-yes install hifi-qt

Step 5:
apt-get -y --force-yes install hifi-domain-server

Step 6:
apt-get -y --force-yes install hifi-assignment-client

Configuration files are found in the /.local and /.config folders (under the root directory)
These would be /.config/High\ Fidelity/ and /.local/share/High\ Fidelity/

You can control the services with
service hifi-domain-server restart/stop/start and service hifi-assignment-client restart/stop/start


Hi @Coal, thank you, that works :slight_smile: - and it was easy! Thank you so much!


Hi Balpien - oh yes, I knew that - sorry if you felt annoyed about that posting, thanks anyway :slight_smile:


Annoyed? Not at all. How did you get that impression?

The instructions for DM is simply because there is not IM facility here, nor is there any meaningful and standardized local chat in domains. About the only way to stay in touch is either post here in the forums or do direct messages.

Welcome, and enjoy!