What is Cinder?
Cinder is an OpenStack Block Storage service. It provides virtual management of block storage devices. It offers end users a self-service API to request and utilize those resources without requiring any understanding of where their storage is deployed or what type of device is being used.
Cinder with Jetson TK1
Prerequisites
CMake 3.0+
CMake is an open-source, cross-platform tool that generates native build tool files particular to your compiler and platform by using the compiler and platform-independent configuration files. The CMake Tools extension combines Visual Studio Code and CMake to simplify configuring, building and debugging your C++ project.
Unfortunately, the CMake version packaged for L4T-Linux For Tegra R21.5 is too old to build Cinder, so it must be compiled from the source. From a temporary directory, do the following:
sudo apt-get install g++
wget https://cmake.org/files/v3.7/cmake-3.7.2.tar.gz
tar xvf cmake-cmake-3.7.2.tar.gz
cd cmake-3.7.2
./configure --prefix=/opt/local
make -j 4
sudo make install
Dependencies for Cinder
Run the below command to get Cinder Jetson TK1 with its 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-base1.0-dev \
gstreamer1.0-libav \
gstreamer1.0-alsa \
gstreamer1.0-pulseaudio \
libboost-filesystem-dev
The package libmpg123-dev is missing from libmpg123-dev - L4T R21.5. The package's contents must be built and installed locally. From a temporary directory, do the following:
wget https://www.mpg123.de/download/mpg123-1.24.0.tar.bz2
tar xvf mpg123-1.24.0.tar.bz2
cd mpg123-1.24.0
./configure --prefix=/opt/local
make -j 4
sudo make install
The above example uses /opt/local because CMake's find_package scripts are configured to look there for custom libraries.
Building the Cinder
Fetching and Building the Cinder
git clone --recursive https://github.com/cinder/Cinder.git
cd Cinder
mkdir build && cd build
cmake ..
make -j 4
Clang
Clang is a front-end compiler that converts programming languages like C++, C, Objective C++, and Objective C into machine code. Compared to GCC, Clang reduces single-thread compilation time by 5% to 10%. As a result, Clang provides more benefits for large-scale project development.
Cinder can be used with the Jetson TK1 version of Clang (v3.5.0). Install it with apt-get:
sudo apt-get install clang
When prompted by this command, type /usr/bin/clang++ to make Clang the default compiler:
sudo update-alternatives --config c++
Building and Running BasicApp
Building
cd samples/BasicApp/proj/cmake
mkdir build && cd build
cmake ..
make
Running
Starting from samples/BasicApp/proj/cmake/build:
./Debug/BasicApp/BasicApp
Frequently Asked Questions
What is Jetson TK1?
The Jetson TK1 is a small but powerful computer designed for the development of both embedded and mobile applications.
What are the requirements for Cinder-Jetson TK1 Platform?
CMake 3.0+ is required for Cinder-Jetson TK1 Platform.
How do you use clang while building a Cinder?
Cinder can be used with the Jetson TK1 version of Clang (v3.5.0). Install it with apt-get: sudo apt-get install clang.
How to run the BasicApp of Cinder-Jetson TK1?
To run BasicApp of Cinder-Jetson TK1, starting from samples/BasicApp/proj/cmake/build: ./Debug/BasicApp/BasicApp.
Conclusion
In this article, we have learned about Cinder with the Jetson TK1 platform with a brief introduction to Jetson TK1 and Cinder.
You can checkout our article on Cinder-Raspberry Pi 3 Platform. You can also refer to our guided paths on Coding Ninjas Studio to learn more about DSA, Competitive Programming, JavaScript, System Design, etc. Enrol in our courses and refer to the mock test and problems available. Take a look at the interview experiences and interview bundle for placement preparations.
Happy Learning!