Skip to content

Cinder for Linux | Ubuntu 14.04 on NVIDIA TK1

Petros Kataras edited this page Feb 19, 2017 · 7 revisions

Requirements

CMake

Cinder for Linux requires CMake 3.0 or later. You can use the binary package or do a build from the source. Make sure cmake is in $PATH and accessible from the command line.

You can find the downloads for CMake here.

If you need to build CMake, see [Building CMake](Building CMake).

Compiler

You can use either Clang or GCC to build Cinder as well as Cinder based applications. Clang compiles faster and uses less memory than GCC.

Clang 3.6.2 and later

You can download the binaries for Clang from here. For the NVIDIA Jetson TK1, download Clang for armv7a Linux.

GCC 4.9

NOTE: Cinder has not been tested using GCC 5.x

Library Dependencies

sudo apt-get install libxcursor-dev \
libxrandr-dev \
libxinerama-dev \
libxi-dev \
libgl1-mesa-dev \
libgles2-mesa-dev \
zlib1g-dev \
libfontconfig1-dev \
libsndfile1 \
libsndfile1-dev \
libpulse-dev \
libasound2-dev \
libcurl4-gnutls-dev \
libgstreamer1.0-dev \
libgstreamer-plugins-bad1.0-dev \
libgstreamer-plugins-base1.0-dev \
gstreamer1.0-libav \
gstreamer1.0-alsa \
gstreamer1.0-pulseaudio \
gstreamer1.0-plugins-bad

libmpg123-dev - L4T (Linux for Tegra) does not have the package libmpg123-dev. The contents of the package has to be built and installed locally. You can download mpg123 from here. To build, using 1.22.4 as an example:

tar xvf mpg123-1.22.4.tar.bz2
cd mpg123-1.22.4
./configure --prefix=/opt/local
make
sudo make install

The example above uses /opt/local because the find_package scripts for CMakes are set to look there for custom libraries.

Building Cinder

Pre-build checklist:

  • Library dependencies are installed.
  • CMake 3.0 (or later) is installed and cmake is accessible from the command line.

Fetching and Building Cinder

git clone --recursive -b master https://github.com/cinder/Cinder.git
cd Cinder && mkdir build && cd build && cmake .. && make -j4

Building and Running BasicApp

Building

cd Cinder/samples/BasicApp/proj/cmake && mkdir build && cd build && cmake .. && make 

Running

Starting from Cinder/samples/BasicApp/proj/cmake/build:

./Debug/BasicApp

Note for TX1 J4T 24.1 (64-Bit)

If building for TX1, you may get a few undefined references in libGL.so. If that happens, you'll need to change libGL.so's symbolic link...

cd /usr/lib/aarch64-linux-gnu
sudo rm libGL.so
sudo ln -s /usr/lib/aarch64-linux-gnu/tegra/libGL.so libGL.so