Troubles with Ubuntu 18.04


I’ve been hearing some issues regarding compiling the server (domain server and assignment client) on Ubuntu 18.04. While 16.04 won’t be going away any time soon, I decided to poke around to see where some issues lie.

Some known problems (using the Linux build guide from GitHub):

  • Dependencies will be missing. To resolve this, you will need to add the universe repository: sudo add-apt-repository universe
  • Using the included Qt Debian file will install properly, but cmake seems to be ignoring export and -D flags. I’m currently compiling a fresh copy of cmake from scratch to see if that helps. Turns out there was a typo on the Linux build page. I have a commit ready to fix that.
    • Apparently building cmake version 3.12.1 did not help. I’ve noticed I also can’t do things like cd cmake* to quickly get into the cmake build folder, so I’m wondering if Ubuntu 18.04 changed something more…
  • There seems to be some kind of pathing issue:
    ./assignment-client/assignment-client: error while loading shared libraries: cannot open shared object file: No such file or directory

Otherwise, it doesn’t seem to be too much different from Ubuntu 16.04. I will have more to report on once I have completed more steps.


Okay, so something that may be related is how Ubuntu 18.04 is handling things:

Ubuntu 16.04 example:

root@ubuntu-s-1vcpu-3gb-sfo2-01-nonhifitest:/var# ls
backups  cache  crash  lib  local  lock  log  mail  opt  run  snap  spool  swap.img  tmp  www
root@ubuntu-s-1vcpu-3gb-sfo2-01-nonhifitest:/var# cd c*

Ubuntu 18.04 example:

flame@hifidemo-vm:/var$ ls
backups  cache  crash  lib  local  lock  log  mail  opt  run  snap  spool  tmp
flame@hifidemo-vm:/var$ cd c*
bash: cd: too many arguments

I think this may partly explain why cmake arguments aren’t working, since manually editing cmake files to tell me the variables return nothing.


Does HiFi have a recommended Linux distro?


That would be Ubuntu. Also, I solved the issue: there’s a typo on the qt prefix entry that causes it to fail, as it is missing the right folder name. After changing it in the instructions, I had success. I will be updating Github shortly.


So, so far I have updated the page and have it mostly ready for a push. However, while running my tests again, I ran into an infamous error:

./assignment-client/assignment-client: error while loading shared libraries: cannot open shared object file: No such file or directory

After reading the nvtt CMake files, I noticed a part for Apple regarding fixing paths for shared libraries:

I believe it might be worth looking into porting this for Linux compiling as well, since it seems to have been an issue for awhile:

While over-viewing Omega Heron’s script, I noticed it does some path fixing already:

I’ll test if this is also the case in Ubuntu 16.04. Overall, the guide is now complete, but it would appear an entirely different issue is now causing the failure of building the server code.


I can build server and interface with master source code. Could you give me the link of your repo with modifications to take a look?


No modifications are needed. I can’t speak for interface, as I mostly focus on server operations. I just recently made a pull request to revise the outdated Linux build guide, which you can find here:

Until the pull is approved, you can overview all the instructions here:


OK, your MR looks good to me.
Some more instructions are necessary to run interface in Ubuntu. Maybe in other MR: Please publish the correct installation for Linux Ubuntu 16.04.1 LTS


So, apparently the libnvimage doesn’t occur on 16.04 following the guide. So on that note, the guide will lead to a fully stable server build without deviation. Sounds like a pathing issue but… I’ll explore that a bit later.


Thanks to PR13966, that should resolve all current issues with Ubuntu 18.04.


I tried to compile after some months assignment client 0.72 on either 16.04 and 18.04 starting from fresh installation and following the official guides. Apart from minor glitches such as the CD HiFi/build which was a bit misleading I couldn’t make it work with problems many of which discussed in this thread but apparently still unsolved…


For 16.04, there is technically a new step: you have to compile a later version of cmake, as 0.72 made the updated guide incomplete. For convenience sake, I can walk you through how to set it all up. (due to testing some earlier stuff, I have to repeat this step anyway)

This will cover Ubuntu 16.04. 18.04’s updated instructions can be found in @elmanytas PR, which I’ve validated work.

Before we start, make sure you are in your home directory or wherever you like to build things.

First, uninstall your current cmake.
sudo apt remove cmake

Next, we’ll grab the spicy new version and extract it.

tar -xvf cmake-3.12.2.tar.gz

Now we’ll go in and bootstrap it for pure optimization.

cd cmake-3.12.2
./bootstrap -- -DCMAKE_BUILD_TYPE:STRING=Release`

This could take awhile, so relax. Once done, run make (also takes a small while) then make install.

make -j2
sudo make install

Next, let’s remove the hash for cmake so Ubuntu doesn’t get confused (not always needed but I ran into this issue the first time so… just to be safe).

hash -r cmake

Now let’s go back to our hifi folder and try to rebuild it properly this time.

# note I have mine in the home directory
cd ~/hifi
git fetch -a
git checkout tags/v0.72.0
mkdir build
cmake -DQT_CMAKE_PREFIX_PATH=/usr/local/Qt5.10.1/5.10.1/gcc_64/lib/cmake ..
# wait awhile
make -j2 domain-server assignment-client

And walla! Again, this was tested on my fresh install server, no other additives and these instructions (minus the comments) are the exact steps I executed.