High Fidelity On A Pi – Day 06

Day 06 – A New Pi-ginning

Please note this tutorial is a deviation from the original journal system and is more of a rough idea on what steps I am now doing to get High Fidelity to run on the Pi. Just wanted to give a heads up about that.


 

So, with the deb file in hand, I flash MiniBian this time, load it up, and am totally happy I have ssh right off the bat! First thing’s first, need to expand the file system.

Right… we’re not using Raspbian… Okay, manual way it is. Thankfully we have fdisk so I went ahead and got the primary partition set up (the wiki has a great tutorial on how to do this). Once this is done, I went ahead and ran some updates (as per the Ubuntu compiling tutorial).

Now we can go ahead and download the pre-compiled qt5 repository.

At this point, I can resume the Ubuntu tutorial as usual, until I get to the large dependencies part. Attempting to run this causes the following error:

We aren’t using the interface client, so hidapi and sdl2 are not needed. The Bullet physics library had me concerned for a moment, since most servers deal with physics on their end, but a quick glance at the CentOS build instructions revealed the lack of the Bullet library as well as SDL2 and HIDAPI. Interestingly, the lack of libtbb-dev was also noted. Even though this is a single core PC, the quad-core benefit of a Pi2 leaves me concerned. I’ll have to examine where the usage of the library is later. After dismissing the extra parts, I am left with the following:

I know that some more parts can be removed (libx11-* for example), but for the sake of a successful compile, I’d rather install more dependencies than I need than miss ones I do end up needing. After this was run, I ran a few of my own for my own sanity.

My reasoning is because of qtwebkit’s dependency on it in the past, so I’d rather have it in hand than risk more issues with the build.

With that all done, I went ahead and ran the rest of the tutorial, which ran with no problem until I had to deal with freeglut, where i was met with an interesting situation where glu.h was missing. I ran an installation of ‘libglu1-mesa-dev’ to resolve this and continued (note to future self: actually read the configure results). All was well until I had to begin cmake for High Fidelity, where something I figured would happen would occur: the files QT5 was built with weren’t present, and were reporting errors. Great. I ran apt-get on the files used to develop QT5 under a native build, and backed up the hifi folder to be safe.

Ran cmake and… SUCCESS?! Wait, could today be the day? Could this finally be it? Let’s find out:

Well, for whatever reason, it had to build glm… even though I downloaded it already. Whatever makes you happy, High Fidelity. I’d like to note that reading what was happening with dark blue text on a black background is painful to the eyes (until we got to the building part, in which the bright green made me feel I was staring into the Matrix). Just a few steps and…

…Should have seen this one coming. Some quick research shows that my gcc is out of date. Looks like I’m on 4.6, and I need to be on at least 4.7. I went ahead, ran apt-get, and installed gcc-4.7. Okay, let’s try this again and are quickly met with the same results. Surprise surprise, I didn’t tell the system which version to use. A quick snippet of code later to resolve this issue and we are off again. We get up to 61% with AccountManager then…

Ug…. we are SO close! Stopped by yet another thing I don’t fully work with: TBB (Threading Building Blocks). I assumed it was used in the interface client, and not so much the servers, but looks like I was wrong. I’m not sure this is even workable, but some research has shown posts of people doing a compile of it before the Pi2 was announced, so my curiosity leads me towards wondering if it is doable. What I do know is that the Pi2 has the power to do all what I am doing now and is armed with an armV7 processor (no pun intended). If I am to continue this project, I can save myself a lot of headache by just grabbing the new Pi2 and get ready for all this work again. I’ve been meaning to grab it so… looks like I just found the excuse.

I’ll keep seeing how to explore the proper building of QT5 on the Pi then follow up with building TBB as well, since it seems it’ll work without any issues once I upgrade the Pi to the newer rendition. After I get it working on the Pi2, I’ll explore the alternative ODROID-C1, which sports Gigabit Ethernet, 1.5Ghz quad core (better than the default 1Ghz we get with Pi2), and support for eMMC flash storage (which means faster I/O).


I didn’t succeed this time, but I did learn a few things:

  1. QT5 is a royal pain to work with on a platform it wasn’t meant for.
  2. High Fidelity should be checking GCC and G++ for their versions, since in the case of the build, it won’t work unless you are running 4.7+ (in where the Pi comes with 4.6).
  3. Cross compiling, while fast, shows undesired results equally as fast.
  4. Assuming TBB was the only hurdle in this project, it may very well be possible for High Fidelity’s domain-server and assignment-client to function well in a $35 computer.

It is time to let this project rest for a bit until I go ahead and order the Pi2 and C1. Honestly, most of the days were spent getting QT5 to cooperate on the Raspberry Pi rather than just getting High Fidelity to build, but regardless, getting halfway there is pretty impressive for a week’s worth on an unintended platform. It is time to call it a night and return another time.

Leave a Reply

Your email address will not be published. Required fields are marked *

16 − 13 =