Hey! So, I’ve been busy fiddling with my Raspberry Pis again, and after waiting 8 days compiling Qt5.8 on Raspbian, I was ready to get the domain-server and assignment-client working. However, I am running into a very strange situation that baffles my mind a bit, and am hoping someone may have some ideas in how to resolve it.
So, first, here are the instructions I followed to get HiFi working on the Raspberry Pi (leaving out compiling cmake and Qt5.8 as Cmake is straight forward and Qt5.8 is a painful experience).
High Fidelity Changes for the Pi
- git clone -b stable https://github.com/highfidelity/hifi.git && cd hifi
- nano cmake/macros/SetupHifiLibrary.cmake
- Comment out any lines regarding AVX, as there is no support on the Pi
- nano cmake/externals/tbb/CMakeLists.txt
- We need to update TBB to 2017 Update 5, since the current one used doesn’t work on the Pi for some weird reason
- Update line 11’s URL to: https://github.com/01org/tbb/archive/2017_U5.zip
- Update line 12’s MD5 to: 31cf4cddf924791c35dedcf68cf8cc4a
- Update line 41’s URL to: https://github.com/01org/tbb/releases/download/2017_U5/tbb2017_20170226oss_lin.tgz
- Update line 42’s MD5 to: 5afdad5f1d407c63cf00aace96f13677
- nano libraries/audio/src/AudioLimiter.h
- Add #include <stdlib.h> after #include “stdint.h”
- mkdir build && cd build
- cmake -DSERVER_ONLY=TRUE -DQT_CMAKE_PREFIX_PATH=/usr/local/qt5/lib/cmake … |& tee output_cmake
- We need to run two export commands (due to TBB and quazip):
- export CXXFLAGS="-DTBB_USE_GCC_BUILTINS=1 -D__TBB_64BIT_ATOMICS=0 -std=c++11 -m32"
- export LDFLAGS="-DTBB_USE_GCC_BUILTINS=1 -D__TBB_64BIT_ATOMICS=0 -std=c++11 -m32"
- make -j3 assignment-client |& tee output_assignment-client
Link to build log: http://pastebin.com/jcrc9nxN
What is worth pointing out is that it fails to link the libtbb.so.2 file it generated while building the assignment-client. Otherwise, everything else compiles just fine.
[details=Linker Error Details][100%] Linking CXX executable assignment-client
/usr/bin/ld: skipping incompatible /home/hifi/hifi/build/ext/makefiles/tbb/project/src/tbb/lib/ia32/gcc4.4/libtbb.so.2 when searching for libtbb.so.2
/usr/bin/ld: skipping incompatible /home/hifi/hifi/build/ext/makefiles/tbb/project/src/tbb/lib/ia32/gcc4.4/libtbbmalloc.so.2 when searching for libtbbmalloc.so.2
/usr/bin/ld: cannot find libtbbmalloc.so.2[/details]
In my past builds, I typically used Ubuntu 14.04 for the Pi2, but the latest build 16.04 was very buggy as updating the Pi at all would result in a failure to boot. Since I got a USB-COMM debugger, I was able to figure it out and resolve the issue, so I will be building Qt5.8 natively again (I tried cross compiling and getting QtWebkit to cooperate on 5.7.1 is not working). On that distro, I don’t have issues building Hifi at all (the biggest hurdles is always compiling Qt).
However, since the Raspbian build is SO close to working, I’m hoping something can be tweaked to get the final part working. Thankfully I ordered two Pi3s, where my current Pi server is running Ubuntu 14.04 on a Raspberry Pi 2. However, the Pi2 is running Qt5.6, which produces strange results with the assignment-clients and domain-server (they’ll work, just things may act odd).