How to compile HiFi in CentOS 7.x (domain-server and assignment-client)


#1

Changelog

  1. January 27, 2015 - Added New Instructions BulletSim - 2.82
  2. February 7, 2015 - Fixed new gverb locations and soxr dependency
  3. February 25, 2015 - Removed need for TBB, Soxr, BulletSim and other items that are now compiled with HiFi.
  4. April 2, 2015 - Added new RandR requirements.

#Domain Server and Assignment Client On CentOS 7

I like to keep up to date and right now CentOS 7 is newest and with some tiny changes to the compile needs for High Fidelity and the simplification of some parts with CentOS 7, I knew it was time to write something new.

Each section is broken down into steps with comments for what I did.


Install the EPEL Repo which has most of what we need already compiled for easy YUM install

yum install epel-release -y

Install Development Tools

yum groupinstall "development tools" -y

Install some base utilities (openssl-devel,git,wget) - and bits needed to compile hifi (libXmu,libXi, Qt5)

yum install openssl-devel git wget libXmu-* libXi-devel libXrandr libXrandr-devel qt5-qt* -y

Now we build cmake as the one on yum is not new enough

cd /usr/local/src
wget http://www.cmake.org/files/v3.0/cmake-3.0.2.tar.gz
tar xvfz cmake-3.0.2.tar.gz
cd cmake-*
./configure --prefix=/usr
gmake && gmake install
rm -rf cmake-*

Now we actually get the code from HiFi and link a required lib into the folder structure

mkdir highfidelity && cd highfidelity
git clone https://github.com/highfidelity/hifi.git

And Build!

mkdir hifi/build && cd hifi/build
cmake ..
make domain-server
make assignment-client

If all went well you now have a ready to run domain client and assignment client!

This should be enough of the basics to get anyone setup with the binary files. Please post if you used this tutorial or improved upon it since it helps everyone.


#2

when i try to run cmake … this fails and i get this!
CMake Error at /usr/share/cmake-3.0/Modules/FindPackageHandleStandardArgs.cmake:136 (message):
Could NOT find TBB (missing: TBB_LIBRARY TBB_MALLOC_LIBRARY
TBB_INCLUDE_DIRS)
Call Stack (most recent call first):
/usr/share/cmake-3.0/Modules/FindPackageHandleStandardArgs.cmake:343 (_FPHSA_FAILURE_MESSAGE)
cmake/modules/FindTBB.cmake:73 (find_package_handle_standard_args)
libraries/networking/CMakeLists.txt:15 (find_package)

Can you help me please!

Ari Kivikangas


#3

You’ll need to install Intel’s TBB library and it’s, as far as I know, not available as a package that’s new enough. You can probably sort it out using the info in Ubuntu 14.10 compile thread.


#4

yes i done the deed already but thanks a lot!!!
Ari Kivikangas


#5

second dumb question!
how i can put the content in to my stack manager!
The Bar
Ari K


#6

Thanks for getting that cleared up for them, I know I need to update the post since some changes have been made and I will be doing that very soon!

Not a dumb question at all, but unless you have a models.svo from someone with content already loaded, you will have to add your own content via the client. Here is an instructional video about how to add client to your domain from HiFi their self from the introductory video set.

Check out this video:
High Fidelity Inc - Edit Entities


#7

Can i make bit of money or virtual currency by running stackmanager 24/7? where should i put my own model (CentOS stackmanager)?
Ari


#8

where can i get infomation about Hifi stack managers and models?
Thanks a lot!
Ari


#9

They stopped the “credit test” a while back. There will be more information on how to earn money posted later and it will be covered here on the forums and discussed in a meeting.

The stack manager is pretty well covered on this video, as part of the same series linked above.

High Fidelity Inc - Stack Manager


#10

How can i uload models to Linux (domain server) stackmanager?
Stupid Fin


#11

If you read above where I posted the video for Edit Entities, it explains how to add content to your domain.


#12

As of January 18th, I have updated this tutorial and it is now current for TBB and BulletSim.

I will post some helpful shell scripts for doing such things as compiling and running the servers (domain-server and assignment-client) under one command.

I also plan to do a sort of optional setup that lets you load in the pre-built places like the floating island and the bar unless I have an objection from HiFi staff, but this would just be to simplify the setup for compilers to have the same sort of experience folks get with the official stack manager.

#Tip number one:

To kill all domain-server and assignment-client processes for simpler restarting.

First install the ps misc package that holds the killall command

yum install psmisc -y

Now run this command on one line to kill all running DS/AC processes at the same time

killall -9 domain-server && killall -9 assignment-client

Now if you run “ps aux” you will notice the servers are no longer running.


#13

I have gone through and fixed the guide to include the new soxr dependency and gverb locations, this is just an information post.


#14

Hey @Coal , awesome work and I plan to test it out this weekend on some server grade hardware and also on some vm’s. I have a few questions, do you mind helping me out?

  1. Do we need to install a Centos gui? On Windows there’s a window popup to start the server.
  2. Do you recommended taking all comands and putting into a single script?
  3. For Windows instructions we had to make changes to bullet. Do we need to make the same changes in Centos build?
  4. I am working to create a server performance testing platform for HF on Centos so will need to do regular recompile and installs of newest code drops. Do you recommend steps to reset? For the vm, I can just take a snapshot of the OS pre HF install, but for the physical box it can be painful to reinstall OS each week.
  5. If we have multiple servers behind our firewall, will all of them be able to partipate as assignment servers with the same outside IP address? And if yes, do we need to name the assignment servers some how to tell them apart during build or install?

My apologies for so many questions. Much appreciative of the help.


#15

@VR_Architect

I do not mind helping at all, its what I do!

  1. No, the domain-server and assignment-client (the domain) runs just fine on your command line only with no GUI.
  2. I put them in a single script to help others. I have separate scripts for different uses I do on other domains I manage. Its all in your specific needs.
  3. No changes needed, works just like I wrote it in the document for CentOS 7 Domain Compile
  4. That is the beauty of HiFi is that each recompile takes care of what you need. My compile script from the GitHub repo is a self fixer on anything I could think of. It backs up your old compile and installs the other.
  • if you want to change the domain’s settings it self, then it can be set to reset those too but you really just need to reset the binary right now.
  1. Right now, the domain server allows any assignment-client pointed to it function depending on the job type assigned, you can even do type 7 and allow it to handle anything the domain server needs. Controlling access between networks, if needed, is done via normal firewall methods if needed.

Hope that helps narrow down some of your questions but either way feel free to ask more!


#16

You rock @Coal !!!
I am excited to start my Centos building this weekend. I am at your service for any testing, collaboration, and help.


#17

Thanks @VR_Architect ! I have not done any testing with the new abilities to actually host more than one domain on a single IP and it allowing port settings in the domain section. I need to see if they have an API setup for altering that sort of thing or just if we just have to wing it with curl and some good old fashion php/shell scripting.

I will hit up @leo about that soon and see if anything like that is in the pipeline.

It boils down to this, if there is anything specific you need it to do you can let me know and we can find ways to work it out, otherwise most everything I do is already in the scripts I have published on github.

I may actually work it out soon where I just create a base package using say Jenkins to compile and then upload the files to a place like amazon s3 and scripts can poll for newest versions. All of that is in the future, but near future either way.

I sort of want to do something like that for Ubuntu and CentOS since those are the top two requested.

Skype or Gitter is the easiest ways to reach me if I do not see here…

Gitter: nbq
Skype: Holoshed


#18

I have now officially cleaned up the guide for the newest commit by @b where everything is basically compiled by HiFi now.

Thanks for making our life easier guys!


#19

Thanks @Coal !!! I am now starting a test on my new Centos 7 builds running on a XenServer vm. My apology for the delay as I had a major go live at work last week. Now I have a little sleep let the compiling begin :smile:


#20

TESTING FEEDBACK

Tester: VR_Architect
Date: March 1st, 2015
Instructions Followed: The instructions at the top of this tread.

Total Time: 51 minutes (pre-requisites install = 22min., cmake build = 8min., get HiFi source code = 4min., HiFi compile = 17min.)

Environment: Comcast Internet 105MB down/26MB up, XenServer 6.5 RC1 based vm, 1 vCPU, 2GB vRAM, 10GB NFS on FreeNAS 7200rpm over 1GB NIC, 1 GB NIC, Centos 7 with all upgrades/updates as of Feb 28th, 2015. (XenServer physical is dual X5650 CPU’s @ 2.67GHz, 96GB RAM, dual 1GB NIC, dedicated resources to vm’s)

  1. Overall experience: Excellent and painless. The below are minor observations and feature requests. Of course, I can only state the build was successful. I was not able to actually start the servers to verify they worked as these instruction are in another location.
  2. Feature Request: A link at the top of the instructions to determine system requirements would be very helpful. For example: amount of vRAM, vCPU cores, and disk space recommended.
  3. Feature Request: A link to somewhere on the internet on how to setup a dedicated IP address and hostname may be helpful. I did this for my test so I could expose the server through my firewall. Note: Centos 7 changed the process from prior versions.
  4. Question: Should we run a yum update / upgrade at any point? I did one prior to starting, but is there a need to do it again somewhere?
  5. Observation: When I got to the cmake build, the switch “—prefix=/usr” was grey on the website. I was not sure if this meant I was supposed to do something different here like change the “usr” to something else. Ultimately, I entered as written in the instructions.
  6. Observation: At the end of getting the HiFi source code the system seemed to hang after saying done yet not providing an OS prompt. Just wait, it will come up shortly.
  7. Observation: During cmake … execution there are several warnings, though it did build:
    a. Could not find the libraries for peripherals like PrioVR, Sixense, LeapMotion, RtMidi, Qxmpp. Do we even need these on a server?
    b. Looking for pthread_create – not found
    c. Looking for pthread_creat in pthreads – not found
    d. It ultimately said Found Threads: TRUE
    e. Could NOT find SDL2 (missing: SDL2_LIBRARY SDL2_INCLUDE_DIR)
    f. Could NOT find RSSDK (missing: RSSDK_INCLUDE_DIRS RSSDK_LIBRARIES)
    g. Could NOT find VHACD, try to set the path to VHACD root folder in the system variable VHACD_ROOT_DIR or create a directory vhacd in HIFI_LIB_DIR and paste the necessary files there (missing: VHACD_INCLUDE_DIRS CHACD_LIBRARIES)
  8. Observation: OK, we built the servers now what? Of course the topic of the tread just indicates the build process :smiley: . A link to one of your other awesome posts on how to run the server and how to update the code may be very helpful here.
  9. Question: After the make of the server steps, is it recommended to move the HiFi server binary code somewhere else on Centos 7 per best practices? BTW, I am new to Linux so I don’t know best practices.
  10. Question: For security best practices, if the user changes their build server to a production server, what should they remove if anything?
  11. Defects: Not sure if items in #7 above are defects or expected results. If expected results, then no defects were found. All packages built successfully; however, HiFi servers were not started.

Excellent work @Coal !!! It takes a lot of time to figure out the secret sauce and to make it easy for newbies like me to follow. It is much appreciated.