Advertisement
Guest User

hifi linux build - partial success

a guest
Apr 28th, 2014
269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.78 KB | None | 0 0
  1. # Notes from setting up a linuxmint-16 laptop to be a hifi dev environment.
  2. # We know at a minimum we need these packages:
  3.  
  4.     apt-get install git g++ cmake
  5.  
  6. # Clone the repo:
  7.  
  8.     cd $HOME
  9.     mkdir src
  10.     cd src
  11.     git clone https://github.com/highfidelity/hifi.git
  12.  
  13. # Configure the build:
  14.  
  15.     mkdir build
  16.     cd build
  17.     cmake ../
  18.  
  19. # The configure fails for lack of GLM:
  20. #
  21. # "CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
  22. #  Could NOT find GLM (missing: GLM_INCLUDE_DIR)"
  23.  
  24. # Downloaded GLM via http://glm.g-truc.net/0.9.5/index.html
  25. # as per the instructions in .../hifi/BUILD.md.
  26. # (I could have put glm in my homedir, but it wasn't something I wanted to clutter up my homedir
  27. # backup, so instead I unpacked into /usr/local/src/ using admin priviledges.)
  28.  
  29.     sudo mkdir /usr/local/src/glm-0.9.5.3
  30.     cd ~/Downloads/
  31.     sudo unzip -d /usr/local/src/glm-0.9.5.3 glm-0.9.5.3.zip
  32.  
  33. # I added this line to my ~/.bashrc:
  34.  
  35. export GLM_ROOT_DIR="/usr/local/src/glm-0.9.5.3/glm"
  36.  
  37.     source ~/.bashrc
  38.     cd ~/src/hifi/build
  39.     cmake ../
  40.  
  41. # The configure fails for lack of Qt:
  42. #
  43. # CMake Error at cmake/macros/SetupHifiProject.cmake:29 (find_package):
  44. #  By not providing "FindQt5Core.cmake" in CMAKE_MODULE_PATH this project has
  45. #  asked CMake to find a package configuration file provided by "Qt5Core", but
  46. #  CMake did not find one.
  47.  
  48. # Download Qt at http://qt-project.org/downloads
  49. # as per the instructions in .../hifi/BUILD.md.
  50. # (I downloaded the 64bit version since I'm using 64-bit linuxmint)
  51.  
  52.     cd ~/Downloads
  53.  
  54. # The download is a script, but we must set the executable bit to run it:
  55.  
  56.     chmod a+x qt-opensource-linux-x64-1.5.0-2-online.run
  57.  
  58. # (Since I'm running this as a regular user but I want to install it in a protected directory
  59. # I temporarily make the directory readable):
  60.  
  61.     sudo chmod o+w /usr/local/src
  62.  
  63. # Run the script (this can take several minutes to download some stuff).
  64. # Install in:  /usr/local/src/Qt.
  65. # Cleanup permissions when done.
  66.  
  67.     sudo chown -R root.root /usr/local/src/Qt
  68.     sudo chmod go-w /usr/local/src
  69.     sudo chmod -R go-w /usr/local/src/Qt
  70.  
  71. # add another environment variable to .bashrc
  72.  
  73. export QT_CMAKE_PREFIX_PATH=/usr/local/src/Qt/5.2.1/gcc_64/lib/cmake
  74.  
  75.     source ~/.bashrc
  76.     cd ~/src/hifi/build
  77.     cmake ../
  78.  
  79. # Examinging the cmake logs suggests some lib headers are missing:
  80.  
  81.     sudo apt-get install libdrm-dev libgl1-mesa-dev zlib1g-dev
  82.  
  83. # Try again:
  84.  
  85.     cmake ../
  86.  
  87. # At this point cmake complains that it can't find GNUTLS.  Since hifi requires version
  88. # 3.2.12 or higher I had to install from source.  I downloaded the source for 3.2.13
  89. # from here: ftp://ftp.gnutls.org/gcrypt/gnutls/v3.2/
  90.  
  91.     cd ~/Downloads
  92.     tar -C /tmp -xJf gnutls-3.2.13.tar.xz
  93.     cd /tmp/gnutls-3.2.13
  94.     ./configure
  95.  
  96. # gnutls requires libnettle:
  97.  
  98.     sudo apt-get install nettle-dev
  99.  
  100. # Try again:
  101.  
  102.     ./configure
  103.  
  104. # The configure may warn that it cannot find: P11_KIT, guile, and crywrap.
  105. # It is okay to ignore these dependencies -- hifi does not use them.
  106.  
  107. # (I built as regular user and then installed with admin priviledges.  Again I didn't
  108. # want to clutter my homedir with a lib package that I didn't want included in my
  109. # personal backups).
  110.  
  111.     make
  112.     sudo make install
  113.  
  114. # Go back to the hifi directory and try cmake...
  115.  
  116.     cd ~/src/hifi/build
  117.     cmake ../
  118.  
  119. # Cmake is now complaining that it can't find GLUT
  120.  
  121.     sudo apt-get install freeglut3 freeglut3-dev
  122.  
  123. # Hrm... cmake still can't find GLUT, and is also complaining about QXMPP.
  124. # Installing libqxmpp-dev automatically installs some qt4 libs, which we don't
  125. # need/want, so we'll probably have to get that directly from source for Qt5.
  126.  
  127. # Time for bed. Give up for now.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement