Streamlined Ubuntu 14.10 Build Process


#1

With the new build method in place it becomes somewhat easier to build domain-server, assignment-client and interface with Ubuntu 14.10.

Here’s what’s needed starting from a clean Ubuntu 14.10 (I use server variant) install.

apt-get install git build-essential cmake qt5-default qtscript5-dev libssl-dev qttools5-dev qtmultimedia5-dev libqt5svg5-dev libqt5webkit5-dev libsdl2-dev

mkdir $HOME/source
cd $HOME/source
git clone https://github.com/highfidelity/hifi.git

Now you’re ready to setup for compiling HF components.

mkdir compile
cd compile
cmake ../hifi/

If you want server side parts

make assignment-client
make domain-server

If you want interface

make interface


#3

This needs some issues with qxmpp resolved clearly before it’s valid for building interface with qxmpp - I’m trying to avoid having to set more environment variables and work out a way to use tools provided by QT to do this automatically. For building assignment-client and domain-server it will work fine.


#4

Issue with qxmpp resolved by fact it’s no longer used. Just use cmake with no extra parameters and it should work for AC/DS and Interface compiles. I will not be updating this post going onwards. I think the basis is there now and that it should be adequately covered in the build guides included with source checkout for future changes.


#5

For anyone still using Ubuntu or other Linux distros where QT 5.4.x isn’t easily obtainable, there is indication you may want to start planing how to address that.


#6

Hello, did a clean 64bit 14.10 desktop install and followed your instructions. Once cmake …/hifi/ was executed it throw me the following error:

CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Qt5/Qt5Config.cmake:26 (find_package):
  Could not find a package configuration file provided by “Qt5XmlPatterns”
  with any of the following names:

Qt5XmlPatternsConfig.cmake
    qt5xmlpatterns-config.cmake

Add the installation prefix of “Qt5XmlPatterns” to CMAKE_PREFIX_PATH or set
  “Qt5XmlPatterns_DIR” to a directory containing one of the above files.  If
  “Qt5XmlPatterns” provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  cmake/macros/SetupHifiLibrary.cmake:29 (find_package)
  libraries/ui/CMakeLists.txt:4 (setup_hifi_library)

Please provide a compiled version along with windows / mac so linux users would not need to break their necks trying to compile using non-working step-by-steps! By the way this: http://docs.highfidelity.com/v1.0/docs/ubuntu-1410-compile
leads to the same error.

Thank you


#7

I am able to compile interface, assignment-client and domain server on Ubuntu 15.04:

1. Install dependencies

sudo apt-get install git build-essential cmake qt5-default qtscript5-dev libssl-dev qttools5-dev qttools5-dev-tools qtmultimedia5-dev libqt5svg5-dev libqt5webkit5-dev libsdl2-devlibasound2 libxmu-dev libxi-dev freeglut3-dev libasound2-dev libjack-jackd2-dev libxrandr-dev

2. Download the stable release of HiFi

mkdir $HOME/source
cd $HOME/source
git clone https://github.com/highfidelity/hifi.git

3. Run cmake

mkdir build
cd build
cmake …/hifi/

4. To build server parts

make assignment-client
make domain-server

5. To build the interface
make interface

6. Run the domain-server, assignment-client then interface in order
open a terminal
cd ~/source/build/domain-server
./domain-server

open another terminal tab
cd ~/source/build/assignment-client
./assignment-client

open a third terminal tab
cd ~/source/build/interface
./interface

To compile the interface with Hydra

Download and extract Sixense SDK

Download Sixense SDK from http://sixense.com/linuxsdkdownload
Extract the sixenseSDK_linux_OSX.zip file

Install SDK

Correct the source path for the libraries in install.cfg

gedit ~source/sixenseSDK_linux_OSX/install/install.cfg

In lines 45 and 50 delete glibc4.6
from original

linux_64_debug_destination = /usr/local/lib
linux_64_debug_source = …/lib/linux_x64/glibc4.6/debug
linux_64_debug_file = .

linux_64_release_destination = /usr/local/lib
linux_64_release_source = …/lib/linux_x64/glibc4.6/release
linux_64_release_file = .

to correct source path

linux_64_debug_destination = /usr/local/lib
linux_64_debug_source = …/lib/linux_x64/debug
linux_64_debug_file = .

linux_64_release_destination = /usr/local/lib
linux_64_release_source = …/lib/linux_x64/release
linux_64_release_file = .

Make install.py executable
Open a terminal and install

cd ~source/sixenseSDK_linux_OSX/install/
sudo ./install.py

Rebuild interface

Copy SDK to HiFi interface source folder

cp -R ~/source/sixenseSDK_linux_OSX/* ~/source/hifi/interface/external/sixense/

Clean hifi build

cd ~/source/build/

make clean

Rebuild interface

cmake …/hifi/

make interface


#8

I’ve also been able to compile the stack manager in Ubuntu 15.04 by doing the following but I’m not sure if any of the steps I did are even necessary but it worked in one test at least. The stack manager was compiled after compiling assignment-client, interface, and domain server in my earlier post:

1. Install dependencies

sudo apt-get install libquazip-qt5-dev libquazip-dev libquazip-headers
libquazip-qt5-1 libquazip1 libquazip-doc libqt5widgets5 libqt5gui5
libqt5svg5 libqt5svg5-dev libqt5core5a libqt5network5 libqt5webkit5-dev
libqt5webkit5 zlib1g-dev

2, Download source

mkdir ~/source
cd ~/source
git clone https://github.com/highfidelity/StackManagerQt.git

Type the path of the hifi source directory in /source/StackManagerQt/src/GlobalData.cpp

gedit /source/StackManagerQt/src/GlobalData.cpp

Type in the path of the hifi build directory in line 71

// allow user to override path to binaries so that they can run their own builds
    _hifiBuildDirectory = “/home/myhome/source/compile/”;
    _domainServerBaseUrl = “http://localhost:40100”;

3. Build StackManager

mkdir build-sm
cd build-sm
cmake …/StackManagerQt/
make StackManager

StackManager expects the interface and stack manager (domain server
& assignment-client) in /home/dilis/.local/share/High Fidelity/

Move domain server & assignment-client to /home/dilis/.local/share/High Fidelity/

cp ~/source/build/domain-server/domain-server ~/.local/share/‘High Fidelity’/‘Stack Manager’/

cp -R ~/source/hifi/domain-server/resources/web ~/.local/share/‘High Fidelity’/‘Stack Manager’/

cp -R ~/source/build/domain-server/resources/describe-settings.json ~/.local/share/‘High Fidelity’/‘Stack Manager’/

cp ~/source/build/assignment-client/assignment-client ~/.local/share/‘High Fidelity’/‘Stack Manager’/

cp ~/source/build/interface/interface ~/.local/share/‘High Fidelity’/Interface/

cp -R ~/source/build/interface/resources ~/.local/share/‘High Fidelity’/Interface/

4. Run StackManager

cd ~/source/build-sm/
./StackManager

(the computer needs to be online in first run because it downloads
resources.zip and requirements.zip from the hifi public repo)

5. Start Server

Run assignment
Get content set

(There must be something wrong with what I did, or I’m missing some
steps because the content did not appear in the interface. Maybe I need
to configure the Stack Manager first.)

6. Run Interface

Run Interface from ~/.local/share/‘High Fidelity’/Interface/

Open a new terminal

cd ~/.local/share/‘High Fidelity’/Interface/
./interface

Click on File>Show address bar
Enter localhost
Then click on the right arrow to connect to the Stack Manager.


#9

Hmm, following your steps I still get this one as soon as I try to cmake …/hifi/:

CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Qt5/Qt5Config.cmake:26 (find_package):
  Could not find a package configuration file provided by “Qt5XmlPatterns”
  with any of the following names:

Qt5XmlPatternsConfig.cmake
    qt5xmlpatterns-config.cmake

How to set these two properly?


#10

@glamistry, Kindly check if you have the ff. packages libqt5xmlpatterns5-dev libqt5xmlpatterns5 libqt5xmlpatterns5-private-dev via synaptic or aptitude. Otherwise you can try:

apt-get install libqt5xmlpatterns5-dev libqt5xmlpatterns5 libqt5xmlpatterns5-private-dev


#11

Yess, finally progressing! Thank you so much! This step should be included in “how to compile from clean install 14.10” doc.


#12

Making assignment-client didnt succeed:
[ 78%] Building CXX object libraries/entities/CMakeFiles/entities.dir/src/EntityTreeElement.cpp.o
/home/ubuntu/source/hifi/libraries/entities/src/EntityTreeElement.cpp: In member function ‘bool EntityTreeElement::removeEntityItem(EntityItemPointer)’:
/home/ubuntu/source/hifi/libraries/entities/src/EntityTreeElement.cpp:669:36: error: ‘EntityItems’ has no member named ‘removeAll’
     int numEntries = _entityItems->removeAll(entity);
                                    ^
libraries/entities/CMakeFiles/entities.dir/build.make:583: recipe for target ‘libraries/entities/CMakeFiles/entities.dir/src/EntityTreeElement.cpp.o’ failed
make[3]: *** [libraries/entities/CMakeFiles/entities.dir/src/EntityTreeElement.cpp.o] Error 1
CMakeFiles/Makefile2:1094: recipe for target ‘libraries/entities/CMakeFiles/entities.dir/all’ failed
make[2]: *** [libraries/entities/CMakeFiles/entities.dir/all] Error 2
CMakeFiles/Makefile2:135: recipe for target ‘assignment-client/CMakeFiles/assignment-client.dir/rule’ failed
make[1]: *** [assignment-client/CMakeFiles/assignment-client.dir/rule] Error 2
Makefile:106: recipe for target ‘assignment-client’ failed
make: *** [assignment-client] Error 2


#13

[ 39%] Building CXX object libraries/entities/CMakeFiles/entities.dir/src/EntityTreeElement.cpp.o
/home/ubuntu/source/hifi/libraries/entities/src/EntityTreeElement.cpp: In member function ‘bool EntityTreeElement::removeEntityItem(EntityItemPointer)’:
/home/ubuntu/source/hifi/libraries/entities/src/EntityTreeElement.cpp:669:36: error: ‘EntityItems’ has no member named ‘removeAll’
int numEntries = _entityItems->removeAll(entity);
^
libraries/entities/CMakeFiles/entities.dir/build.make:583: recipe for target ‘libraries/entities/CMakeFiles/entities.dir/src/EntityTreeElement.cpp.o’ failed
make[3]: *** [libraries/entities/CMakeFiles/entities.dir/src/EntityTreeElement.cpp.o] Error 1
CMakeFiles/Makefile2:1094: recipe for target ‘libraries/entities/CMakeFiles/entities.dir/all’ failed
make[2]: *** [libraries/entities/CMakeFiles/entities.dir/all] Error 2
CMakeFiles/Makefile2:1804: recipe for target ‘interface/CMakeFiles/interface.dir/rule’ failed
make[1]: *** [interface/CMakeFiles/interface.dir/rule] Error 2
Makefile:587: recipe for target ‘interface’ failed
make: *** [interface] Error 2


#14

The current git version does not compile on Ubuntu Utopic 14.10 because the current hifi needs libqt 5.4 and utopic only has libqt 5.3 . It only compiles on Ubuntu Vivid 15.04 with qt 5.4.1-1 .

And the machine needs to be online as the build pulls additional dependencies online.


#15

Thank you for clearing things up.

Interesting, I believe simple users like me could have never guessed it out of the blue that now it compiles only on 15.04.

I would strongly suggest getting rid of all these misleading/outdated docs and pages that tells you how to build from source but when you actually try them - you realize that it is not working. Instead - how about creating and maintaining only one single article/doc/post (whatever it is called) which clearly states how to install most up to date release/version. Step by step. Assuming you go from clean install. I don’t know who’s in charge of that or who could do that from hifi guys - but it would definitely help to make less confusion and save a lot of time.


#16

To clarify, this will not build on Ubuntu 14.10 (or 14.04 I presume) even if QT 5.4.1-1 is installed?

Really wanted to be part of the alpha but cannot get past this error:

[ 0%] Automoc for target interface
[ 0%] Built target interface_automoc
[ 1%] Built target glm
[ 1%] Automoc for target audio
[ 1%] Built target audio_automoc
[ 1%] Automoc for target networking
[ 1%] Built target networking_automoc
[ 1%] Automoc for target shared
[ 1%] Built target shared_automoc
[ 1%] Building CXX object libraries/shared/CMakeFiles/shared.dir/src/SharedUtil.cpp.o
/home/pablorios/source/hifi/libraries/shared/src/SharedUtil.cpp:437:39: error: macro “qCDebug” passed 3 arguments, but takes just 1
qCDebug(shared, “octets=%d”,octets);
^
/home/pablorios/source/hifi/libraries/shared/src/SharedUtil.cpp:438:57: error: macro “qCDebug” passed 3 arguments, but takes just 1
qCDebug(shared, “voxelSizeInBits=%d”,voxelSizeInBits);
^
/home/pablorios/source/hifi/libraries/shared/src/SharedUtil.cpp:439:59: error: macro “qCDebug” passed 3 arguments, but takes just 1
qCDebug(shared, “voxelSizeInBytes=%d”,voxelSizeInBytes);
^
/home/pablorios/source/hifi/libraries/shared/src/SharedUtil.cpp:440:61: error: macro “qCDebug” passed 3 arguments, but takes just 1
qCDebug(shared, “voxelSizeInOctets=%d”,voxelSizeInOctets);
^
/home/pablorios/source/hifi/libraries/shared/src/SharedUtil.cpp:441:57: error: macro “qCDebug” passed 3 arguments, but takes just 1
qCDebug(shared, “voxelBufferSize=%d”,voxelBufferSize);
^
/home/pablorios/source/hifi/libraries/shared/src/SharedUtil.cpp: In function ‘void printVoxelCode(unsigned char*)’:
/home/pablorios/source/hifi/libraries/shared/src/SharedUtil.cpp:437:5: error: ‘qCDebug’ was not declared in this scope
qCDebug(shared, “octets=%d”,octets);
^
/home/pablorios/source/hifi/libraries/shared/src/SharedUtil.cpp:434:18: warning: unused variable ‘voxelSizeInOctets’ [-Wunused-variable]
unsigned int voxelSizeInOctets = (voxelSizeInBits/3);
^
make[3]: *** [libraries/shared/CMakeFiles/shared.dir/src/SharedUtil.cpp.o] Error 1
make[2]: *** [libraries/shared/CMakeFiles/shared.dir/all] Error 2
make[1]: *** [interface/CMakeFiles/interface.dir/rule] Error 2
make: *** [interface/CMakeFiles/interface.dir/rule] Error 2

Thing is I was able to get the interface built a couple of weeks ago but received errors during the loading of the interface on my work laptop running Ubuntu 14.04 LTS. Between then and now, I had to reinstall the OS on the machine and decided to try again today to get the interface working. According to this thread, that is now not possible.

Really wanted to get on the ground floor of this alpha but I only have a work laptop available to me that can’t be dual booted. I guess I’ll just have to wait until I have a personal machine available which might not be until the end of the year! Boohoo.


#17

I apologise about the sweeping statement and would like to qualify my earlier post that I was not able to build hifi on a clean out-of-the-box installation of Ubuntu 14.04 and 14.10. What I have not done is:

  1. compile QT from source on 14.10 or 14.04
  2. use a ppa
  3. force installation of new packages in 14.10 thus creating a frankenstein Ubuntu installation

I have no idea if any of these approaches will allow building of hifi on Ubuntu 14.10 or 14.04. In addition I can only say from my last build and not future builds because from my experience the git source changes a lot every day and something may break in the future. Thus I backup my successful builds before doing a git pull.

And I build on UbuntuStudio 15.04 Vivid Vervet . As of June 2, 2015 I can still successfully build the interface on my rig. But when I log-in to some servers I get an incompatible server dialogue box and no longer see a room but an empty space with a ball and I can’t move only pan the view left, right, up, and down.

It worked on the ff. servers though:

floydseum hifi://Floydseum/10012.3,9997.77,9983.42/-0.00015292,-0.999401,1.68363e-05,0.0346163

venice hifi://Venice/9300.77,206.084,8788.15/0,-0.972284,0,0.233802


#18

Also need

sudo apt-get install libqt5xmlpatterns5-dev

#19

and now you also need this…

sudo apt-get install libqt5websockets5-dev


#20

By the way this works on Ubuntu 15 as well.