Building and running the interface on Linux


#1

Has anyone had luck building and running the interface on Linux, particularly Ubuntu? I have a set of instructions I came up with that satisfy all of the build dependencies, but the interface segfault when I go to run it.

Since my MacBook heats up to roughly the temperature of the sun when running the interface, I’m hoping to run the interface on my desktop under Windows or Linux, preferably Linux.

If anyone has had luck with this, under any Linux distro, can you share your secrets?


#2

Playing with build on Mint 16 with my morning coffee and got about a 3rd of the way through. Out of time for now…

[ 34%] Building CXX object libraries/audio/CMakeFiles/audio.dir/src/PositionalAudioRingBuffer.cpp.o
/home/trinity/HiFi/hifi/libraries/audio/src/PositionalAudioRingBuffer.cpp:11:38: fatal error: glm/detail/func_common.hpp: No such file or directory
#include <glm/detail/func_common.hpp>
^
compilation terminated.


#3

I’ve had some succes building it on Ubuntu.

(old method)

I used to install all these packages: sudo apt-get install build-essential cmake git libcurl4-openssl-dev libqt5scripttools5 libqt5svg5-dev libqt5webkit5-dev libqt5location5 qtlocation5-dev qtdeclarative5-dev qtscript5-dev qtsensors5-dev qtmultimedia5-dev qtquick1-5-dev libasound2 libxmu-dev libxi-dev freeglut3-dev libasound2-dev libjack-dev

in order to build, but that was before the external libraries were thrown out of the repo.

(current method)

  • Get QT from the official site, do a full install
  • Grab all the libraries: glew and glm are just an archive you have to extract, qxmpp and zlib have to be built. If I’ recall correctly, both have “make” and “make install” options, which should put them in locations cmake can find them.
  • Even on LInux, it might be interesting to create the hifi_lib_dir structure listed in the build instructions.

@Trinity Your problem is situated around the glm libraries. Does cmake finish correctly? You already seem to be in the building process. Make sure the glm folder structure is as follows: glm/glm/(headers here). It’s not what you would expect (glm/include/(headers here)).

I’ll do another full build tonight on Ubuntu (been focusing on Win32 for the moment), and see if I can give some more precise instructions.


#4

Yes, cmake finished and it was building quite happily, will look later


#5

@jbaert Thanks, I was mainly looking for validation that it had been done before… that someone was able to build and run interface without it segfaulting. It looks like your Ubuntu instructions are close to mine… I hope to have time to write them up better tomorrow.


#6

@jbaert, here’s a quick-and-dirty of what I did for Ubuntu.

cd ~
mkdir hifi-libs
export HIFI_LIB_DIR=~/hifi-libs

sudo apt-get install build-essential cmake zlib1g-dev libasound2 libxmu-dev libxi-dev freeglut3-dev libasound2-dev libjack-dev  libqxmpp-dev

wget http://download.qt-project.org/official_releases/online_installers/qt-opensource-linux-x64-1.5.0-2-online.run
chmod +x qt-opensource*
./qt-opensource-linux-x64-1.5.0-2-online.run
Specify:  /opt/Qt
Accept default components

Download GLM from http://sourceforge.net/projects/ogl-math/files/glm-0.9.5.2
Unzip
cp -r glm $HIFI_LIB_DIR
export GLM_ROOT_DIR=~/hifi-libs

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

cd hifi
mkdir build
cd build

export QT_CMAKE_PREFIX_PATH=/opt/Qt/5.2.1/gcc_64/
cmake ..

ISSUES:
FindGLM module doesn’t work quite right. MUST set GLM_ROOT_DIR, doesn’t seem to take HIFI_LIB_DIR.
Ultimately interface dies with a segfault: http://pastebin.com/nxd0gePD


#7

I had the problem with GLEW not taking HIFI_LIB_DIR, because some glew distributions just have “lib”, and not “lib/release/…”

Made this pull request, which should make glew detection more robust.

GLM detection works out of the box here - sure you’re using the latest GLM, and have followed the atypical glm/glm path, instead of the expected glm/include?


#8

There are at least two full-time linux developers at High Fidelity (I am one of them), so yes the interface can be built and run on linux.

I think brian’s recipe above covers most of the setup for a linux dev machine but new dependencies have recently been added (such as gnutls >= 3.2.12). Later this week I’ll try to take notes as I build a new linux machine from scratch, and then put the instructions somewhere up on the wiki.


#10

@leviathan Have you had a chance to post directions?

Could you link to them here?


#11

My original partial success at configuring a fresh linux install into a hifi dev machine was here: http://pastebin.com/HWQvHD48

Since then the GnuTLS dependency has been removed and libssl has been added so I updated the notes with theoretical fixes (I didn’t go through the whole process again): http://pastebin.com/0TdxELd0

Those notes may very well be out of date in ways that I can’t remember. Nevertheless they might help someone conquere some of the obstacles. Also, the notes could be condensed into a more terse format, but I wanted to go through the process of solving the problems as they were discovered.


#12

Hello. Compiling the GIT version doesn’t work for me, on openSUSE 13.2 x64. ‘make’ complains about a missing qt5 function, despite having the qt5-*-devel packages requested by cmake installed. Can anyone help me out please? Logs and extra information available here: https://worklist.net/20209


#13

Fresh install OpenSUSE 13.2 using KDE as desktop
Enabled non-oss repositories

Using yast2, find Metapackages section and install the following;

patterns-openSUSE-devel_C_C++
patterns-openSUSE-devel_qt5

Open terminal - working from root of my home directory from here on.

sudo zypper install git-core

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

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

sudo zypper install cmake

mkdir hfbuild

cd hfbuild

sudo zypper install libQt5Script-devel
sudo zypper install libQt5Multimedia-devel
sudo zypper install libQt5Webkitwidgets-devel
sudo zypper install libsdl2-devel
sudo zypper install libqxmpp-devel
sudo zypper install glm-devel
sudo zypper install openssl-devel

make assignment-client
make domain-server
make interface

Done

Getting all this running is a pain - assignment-client and domain-server expect a directory in same location they live called resources with a directory containing the domain-server web templates in resources/web

You can look at my Ubuntu notes to figure the rest out, but, this is still pretty much geek territory level stuff.


#14

Only thing I would say is for those who want to roll 100% command line for this, you can use:

sudo zypper install -t pattern devel_C_C++
sudo zypper install -t pattern devel_qt5

Edited to add:

Also I did all of this from a base server install not a desktop so I was missing freeglut-devel so anyone getting a GLUT not found can do

sudo zypper install freeglut-devel

#15

Thank you. The issue was fixed by uninstalling the qt4 development packages. For some reason, they were conflicting the qt5 ones… despite both being placed in completely different sub-directories. There might be a problem with HIFI’s cmake settings, if not with qt or openSUSE packaging in general.


#16

Sorry I never had a chance to get back to you on Gitter, I saw the messages way later but… I know in the cmake logs it had shown it was pulling from the two versions and that is where your conflict was happening. We had discussed at the time trying to find ways around it by forcing it to look for QT5 but in the end the problem was still that it tried to pull from both.

Glad you got it worked out now!


#17

I’m on openSuse 13.1; I’ve got it all going smashingly up to the embedded webserver. I’ve got about all the qt5 I can get installed. the dist stuff where it lives, and if needed, I can switch to latest qt5 built and installed in userspace.

I’m using the ‘HEAD’ of the git repo, is there a preferred commit for something know to compile and run?

Thanks for having me at your party and thanks for any help you might be able to offer :wink:

Cheers!
EDIT:
console log of build fail: http://pastebin.com/fG3UC7vr

I thought I had gotten beyond this, but apparently not.


#19

UPDATE:

I got this working; my issues remain a bit vague, but what I did to get it working was to a) finally get my Qt paths right and b) start the build from a clean hifi repo.

Thanks for the help and I look forward to seeing you there :smile:


#20

Will HF have a Linux build at all in the future? I really want to get into HF and start building stuff, and I do not have the skills to compile myself.


#21

Hey there, why not just build for ubuntu and make it available from download page along with win and mac versions instead of making ppl go through all this build process themselves (which requires quiet a skill to complete)? Thanks


#22

@glamistry that is a good idea and I’ll try to keep it mind as we move forward. Unfortunately our linux support has deteriorated over the months. I am no longer able to run the interface client on linux (for the last month or so it crashes at login) although my fellow linux dev can still… most of the time… with a few hacks. I’m currently trying to build custom Qt libs to help me get more clues about the problem I’m having.