Skip to content

Latest commit

 

History

History
312 lines (231 loc) · 8.33 KB

ubuntu-18.04-compile-libjpeg-turbo-virtualgl-turbovnc.md

File metadata and controls

312 lines (231 loc) · 8.33 KB

Ubuntu-18.04 - Compile libjpeg-turbo, VirtualGL and TurboVNC

This document describes how to compile libjpeg-turbo, VirtualGL and TurboVNC from sources.

Procedure

Step 01.00: Build libjpeg-turbo.

When building libjpeg-turbo from sources, you will need to additionally build the nasm library for x86_64 architecture. You can skip building nasm for ppc64le architecture.

Step 01.01: [x86_64 client only] Build nasm library from sources for x86_64 libmirclient.

We will need to additionally download and build the nasm library for x86_64 clients.

Build the nasm library from sources for x86_64 clients. Skip this step for the ppc64le remote server:

wget http://www.nasm.us/pub/nasm/releasebuilds/2.14/nasm-2.14.tar.bz2
tar -xvjf nasm-2.14.tar.bz2
cd nasm-2.14
./configure
make  -j8
sudo make install

Step 01.02: Build libjepg-turbo from sources.

Install required packages:

sudo apt install \
default-jdk

Clone sources:

cd /project/software/library
git clone https://github.com/libjpeg-turbo/libjpeg-turbo.git libjpeg-turbo/src
cd libjpeg-turbo/src

# checkout 2.0.2 tag and create a local branch
git checkout 2.0.2
git checkout -b 2.0.2

Configure:

cd /project/software/library/libjpeg-turbo
mkdir build; cd build;

ccmake \
-DCMAKE_INSTALL_PREFIX="/opt/libjpeg-turbo" \
-DCMAKE_BUILD_TYPE="Release" \
-DWITH_JAVA="ON" \
../src

Build:

make -j8

Install:

sudo make install

Notes:

  1. The latest version of libjpeg-turbo is 2.0.2. github.com/libjpeg-turbo/libjpeg-turbo

Step 02.00: Build virtualgl.

Step 02.01: Build virtualgl from sources.

Install required packages:

sudo apt install \
libgles2-mesa-dev \
libglu1-mesa-dev \
libssl-dev \
libxcb-keysyms1-dev \
libxcomposite-dev \
libxcursor-dev \
libxft-dev \
libxinerama-dev \
libxkbfile-dev \
libxmu-dev \
libxpm-dev \
libxrandr-dev \
libxres-dev \
libxtst-dev \
libxv-dev \
libxt-dev

[Do no install:] Installation of the NVIDIA Capture SDK is not required, since the VirtuaGL libraries will need to be updated to use the latest version of the capture SDK. The earlier legacy grid-2.2 headers can be found here: https://github.com/omega-hub/llenc/blob/master/GRID-2.2/NvIFR_API.h

Download the NVIDIA Capture SDK for Linux v7.1.6 from the following location: https://developer.nvidia.com/designworks/capture_sdk/downloads/v7.1/linux

Extract the contents of the Capture_Linux_v7.1.6.zip file and re-organize the sdk folder structure such that the nvEncodeAPI.h and NvFBC.h header files are located in /project/software/library/nvidia-capture-sdk/linux-v7.1.6/NvFBC/inc.

unzip ./Capture_Linux_v7.1.6.zip -d /tmp
mkdir -p /project/software/library/nvidia-capture-sdk/linux-v7.1.6
mv -v /tmp/Capture_Linux_v7.1.6/Capture_Linux_v7.1.6/* /tmp/linux-v7.1.6

Clone sources:

cd /project/software/library
git clone https://github.com/VirtualGL/virtualgl.git virtualgl/src
cd virtualgl/src

# checkout master branch
git checkout master

# checkout 2.6.2 tag and create a local branch
#git checkout 2.6.2
#git checkout -b 2.6.2

Configure:

cd /project/software/library/virtualgl
mkdir build; cd build;

ccmake \
-DCMAKE_INSTALL_PREFIX="/opt/VirtualGL" \
-DCMAKE_BUILD_TYPE="Release" \
-DTJPEG_INCLUDE_DIR="/opt/libjpeg-turbo/include" \
-DTJPEG_LIBRARY="-L/opt/libjpeg-turbo/lib64 -lturbojpeg" \
-DVGL_FAKEOPENCL="OFF" \
-DVGL_USESSL=1 \
-DVGL_FAKEXCB="ON" \
-DVGL_USEIFR="OFF" \
-DVGL_USEXV="ON" \
-DIFR_INCLUDE_DIR="/project/software/library/nvidia-capture-sdk/linux-v7.1.6/NvFBC/inc" \
../src

Fix broken link to /usr/lib/powerpc64le-linux-gnu/libGL.so. While build, you might encounter the following error:

[  8%] Building CXX object util/CMakeFiles/glreadtest.dir/glreadtest.cpp.o
make[2]: *** No rule to make target '/usr/lib/powerpc64le-linux-gnu/libGL.so', needed by 'bin/glreadtest'.  Stop.
CMakeFiles/Makefile2:708: recipe for target 'util/CMakeFiles/glreadtest.dir/all' failed

To fix this, uodate the symbolic link:

cd /usr/lib/powerpc64le-linux-gnu/
ls -la libGL.*

# libGL.so is symlinked to non-existent libGL.so.1.0.0
lrwxrwxrwx 1 root root      14 May 10 08:17 libGL.so -> libGL.so.1.0.0
lrwxrwxrwx 1 root root      14 Aug 11 02:52 libGL.so.1 -> libGL.so.1.7.0
-rwxr-xr-x 1 root root 1437056 Aug 11 02:52 libGL.so.1.7.0

# fix broken libGL.so symbolic link
sudo rm /usr/lib/powerpc64le-linux-gnu/libGL.so
cd /usr/lib/powerpc64le-linux-gnu/
sudo ln -s libGL.so.1 libGL.so

Build:

cd /project/software/library/virtualgl/build
make -j8

Install:

sudo make install

Create debian style binary package:

make deb

Note:

  1. The latest stable release of libssl-dev is 1.1.1. openssl project openssl-1.1.1c.tar.gz github.com/openssl/openssl

Step 03.00: Build turbovnc.

Step 03.01: Build turbovnc from sources.

Install required packages:

sudo apt install \
libpam0g-dev \
libxfont-dev

Clone sources:

cd /project/software/library
git clone https://github.com/TurboVNC/turbovnc.git turbovnc/src
cd turbovnc/src

# checkout master branch
git checkout master

# checkout 2.2.2 tag and create a local branch
#git checkout 2.2.2
#git checkout -b 2.2.2

Configure:

cd /project/software/library/turbovnc
mkdir build; cd build;

ccmake \
-DCMAKE_INSTALL_PREFIX="/opt/TurboVNC" \
-DCMAKE_BUILD_TYPE="Release" \
-DTJPEG_INCLUDE_DIR="/opt/libjpeg-turbo/include" \
-DTJPEG_LIBRARY="-L/opt/libjpeg-turbo/lib64 -lturbojpeg" \
-DTVNC_BUILDJAVA=1 \
-DTVNC_GLX="ON" \
../src

Build:

cd /project/software/library/turbovnc/build
make -j8

Install:

sudo make install

Downloads

  1. NVIDIA Capture SDK v7.1

Issues

  1. Compiler error on Ubuntu Linux with Nvidia Drivers: No rule to make target `/usr/lib/x86_64-linux-gnu/libGL.so' #2087 - RobotLocomotion/drake

  2. Not creating vgl_xauth_key when using gdm3 in ubuntu server #65

  3. gdm does not run /etc/gdm/*/Default scripts properly!


Repositories

  1. github.com/openssl/openssl

TLS/SSL and crypto library.


Technotes

Ubuntu

  1. How to install the GNOME Desktop on Ubuntu Server 18.04 - TechRepublic

  2. Install GUI on Ubuntu Server 18.04 Bionic Beaver - Lubos Rendek - LinuxConfig

  3. How to Remove or Delete PPA in Ubuntu - It's FOSS

libjpeg-turbo

  1. Compile and use libjpeg-turbo on ubuntu 16.04

VirtualGL

  1. Headless nVidia Mini How-To - VirtualGL

  2. How to set up VirtualGL and TurboVNC for use with ParaViewWeb - Kitware

  3. Remote accelerated graphics with VirtualGL and TurboVNC - Jan Hreha - 20150804


Related Topics

Ubuntu

  1. How to create a bootable Ubuntu USB flash drive from terminal? - Ubuntu

EGL

  1. How do I get EGL and OpenGLES libraries for Ubuntu running on VirtualBox?

X11

  1. X11 connection rejected because of wrong authentication

Solution: Set X11UseLocalhost variable to no in the file /etc/opt/ssh/sshd_config

VirtualGL

01.vgl transport: '[VGL] ERROR: Could not open display :0.'