Ubuntu Build Process¶
The process to try out Simula, is as simple as 1, 2, 3, 4 with only minor software compliation in between. You will need to install software from your linux distributor and have your machine whirl and buzz for minutes on end with no output to test this collection of Haskell, C, and C++ code. If you are up for the challenge then you can find most of a recipie below. Many of the instructions have only been attempted once, if any at all, and can only be cast as a guide to get running. With those precautions aside, here’s what someone got working once, sometime, probably.
- Clone all submodules, see Git Help
- Build and Install requisite packages for your system
- Build SimulaHS
stack build --extra-lib-dirs="${HOME}"/.local/lib --extra-include-dirs="${HOME}"/.local/include
- Execute the program and play around: SimlaVR Usage
Ubuntu 17.10 (Artful) Packages¶
Install all the dependecies in one shot with the following script:
sudo apt install \
g++ \
automake \
autoconf \
autoconf-archive \
make \
cmake \
libtool \
pkg-config \
binutils-dev \
libegl1-mesa-dev \
libgles2-mesa-dev \
libxcb-composite0-dev \
libxcursor-dev \
libcairo2-dev \
libpixman-1-dev \
libgbm-dev \
libmtdev-dev \
libinput-dev \
libxkbcommon-dev \
libpam0g-dev \
libgflags-dev \
libgoogle-glog-dev \
libssl-dev \
libdouble-conversion-dev \
libevent-dev \
libboost-context-dev \
libboost-chrono-dev \
libboost-filesystem-dev \
libboost-iostreams-dev \
libboost-locale-dev \
libboost-program-options-dev \
libboost-regex-dev \
libboost-system-dev \
libboost-thread-dev \
libsdl2-dev \
libopencv-dev \
libjsoncpp-dev \
libxml2-dev \
libusb-1.0-0-dev \
libspdlog-dev \
libeigen3-dev
Obtaining Source Dependencies¶
- wayland-protocols - [https://github.com/wayland-project/wayland-protocols]
Currently HEAD is fine, but any tag >= 1.7 will work fine.
- libweston - [https://github.com/wayland-project/weston]
You will need to checkout tag 2.0.0.
- libfunctionality - [https://github.com/OSVR/libfunctionality]
Currently HEAD is fine, previous versions not tested (2017-07-20).
- folly - [https://github.com/facebook/folly]
- OSVR-Core - [https://github.com/OSVR/OSVR-Core]
Currently HEAD is fine, v0.6 does not build on debian stretch.
Per Repository Notes¶
Dependencies for wayland-protocols¶
There are no special dependencies, but a pro-tip, run configure with a custom PREFIX and copy the wayland-protocols.pc file to PREFIX/lib/pkgconfig and set PKG_CONFIG_PATH to the same.
Example:
./configure --prefix="$HOME"/.local
make && make install
cp wayland-protocols.pc "$HOME"/.local/lib/pkgconfig
export PKG_CONFIG_PATH="$HOME"/.local/lib/pkgconfig
Dependencies for libweston¶
Make sure you have installed wayland-protocols before proceeding to building libweston.
- EGL - libegl1-mesa-dev
- glesv2 - libgles2-mesa-dev
- xcb-composite - libxcb-composite0-dev
- xcursor - libxcursor-dev
- cairo-xcb - libcairo2-dev
- automatically install by libcairo2-dev - libpixman-1-dev
- gbm - libgbm-dev
- mtdev - libmtdev-dev
- libinput - libinput-dev
- xkbcommon - libxkbcommon-dev
- pam - libpam0g-dev
After installing the above packages you can configure and build libweston. Here is a recipie for success.:
git checkout -b v2.0.0 2.0.0
./autogen.sh
./configure --prefix="$HOME"/.local --disable-setuid-install
make && make install
You will see a notice about needing to set LD_LIBRARY_PATH and also for setting LD_RUN_PATH to use these newly installed libraries. You may want to set these in your .bashrc file or other shell startup file. For your interactive shell you can just use the following lines:
LIBDIR=”$HOME”/.local/lib export LD_LIBRARY_PATH=”$LD_LIBRARY_PATH”:”$LIBDIR”:”$LIBDIR”/libweston-2:”$LIBDIR”/weston export LD_RUN_PATH=”$LD_RUN_PATH:”$LIBDIR”:”$LIBDIR”/libweston-2:”$LIBDIR”/weston
Dependencies for libfunctionality¶
You will need cmake to build any of the projects from OSVR. When building cmake projects you should perform out-of-tree builds by creating a build directory and running cmake from that directory. For example you can repeat this pattern for any cmake project.:
mkdir $PROJECT-build
git clone $PROJECT_URI
cd $PROJECT-build
cmake ../$PROJECT
- To set a custom PREFIX for cmake projects you need to use the following incantation.
cmake -D CMAKE_INSTALL_PREFIX="$HOME"/.local ../$PROJECT
Dependencies for folly¶
- boost-context - libboost-context-dev
- boost-chrono - libboost-chrono-dev
- boost-filesystem - libboost-filesystem-dev
- boost-regex - libboost-regex-dev
- boost-program-options - libboost-program-options-dev
- boost-system - libboost-system-dev
- boost-thread - libboost-thread-dev
- gflags - libgflags-dev
- google-glog - libgoogle-glog-dev
- libssl - libssl-dev
- double-conversion - libdouble-conversion-dev
- libevent - libevent-dev
To build folly you need to run autoreconf -ivf
from the folly subdirectory of the cloned repository.:
cd folly
autoreconf -ivf
./configure --prefix="$HOME"/.local
make && make install
Dependencies for OSVR-Core¶
To proceed ensure you have installed folly, libfunctionality, libweston, and wayland-protocols as described above.
- sdl2 - libsdl2-dev
- opencv - libopencv-dev
- jsoncpp - libjsoncpp-dev
- boost-thread - libboost-thread-dev
- boost-locale - libboost-locale-dev
- boost-filesystem - libboost-filesystem-dev
- boost-program-options - libboost-program-options-deu
- libusb - libusb-1.0-0-dev
- libspdlog - libspdlog-dev
When fetching from github you must fetch the submodules and initialize them before attempting a build.
git submodule update --init --recursive
OSVR-Core is a cmake project so refer to the instructions above in the libfunctionality section to perform an out-of-tree build.