34.[DS6.4_GLib2.0] How to update the GLib 2.0 manually for DS 6.4
As the Note in Quickstart Guide, there is a bug in glib 2.0-2.72 version which comes with ubuntu22.04 by default. If you want to update yourself, you can follow the following methods.
34.1 Install dependencies
Docker: nvcr.io/nvidia/deepstream:6.4-triton-multiarch
apt-get update && apt-get install -y \
pkg-config \
python3-dev \
libffi-dev \
libmount-dev \
ninja-build \
wget \
libgirepository1.0-dev
pip3 install packaging
pip3 install meson==1.2.0
34.2 get the GLib 2.0 source code and install
Note: If you are using python, it is recommended to install version 2.79 or later. It will install the corresponding gobject-instropection together.
wget https://github.com/GNOME/glib/archive/refs/tags/2.79.1.tar.gz
tar -xzvf 2.79.1.tar.gz
cd glib-2.79.1/
rm -r subprojects/gvdb
meson build --prefix=/usr
ninja -C build install
ldconfig
34.3 run the test demo
glib_version.py (143 Bytes)
Note: First you need to set the GI_TYPELIB_PATH
variables to the the gobject-instropection you just installed.
# x86_64
export GI_TYPELIB_PATH=/usr/lib/x86_64-linux-gnu/girepository-1.0
# Jetson
export GI_TYPELIB_PATH=/usr/lib/aarch64-linux-gnu/girepository-1.0
python3 glib_version.py
Or
pkg-config --modversion glib-2.0
You can get the following output
2 79 1
34.4 Other Tips
After the upgrade is complete, please do not run the following command again, which will cause the glib version to fall back to the default version
apt-get update
apt-get -y install libglib2.0-dev