28. February 2024

qt.qpa.plugin: Could not load the Qt platform plugin “xcb” in “” even though it was found.

After the installation of QtCreator on Linux you might get following error messag when launching the application:

qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.

This application failed to start because no Qt platform plugin could be initialized. 
Reinstalling the application may fix this problem.

It is likely one of libraries required by xcb is missing.

To resolve this problem find libxcb.so and run ldd to identify the missing library.

find ~/Qt -name libqxcb.so -exec ldd {} \; | grep "not found"

Install the missing dependency. E.g.:

sudo apt-get install libxcb-cursor0

7. August 2023

How to extract Rust function signatures from .rs file using sed – one-liner

To extract function signatures from .rs file you can use following one-liner with sed:

sed -n -e '/pub fn/,/)/p' file.rs

Sample output:

  pub fn chip(&self) -> Chip {
    pub fn device_info(&mut self) -> Result<DeviceInfo, Error> {
        let chip = self.chip();
    pub fn load_elf_to_ram(
        &mut self,
        elf_data: &[u8],
        mut progress: Option<&mut dyn ProgressCallbacks>,
    ) -> Result<(), Error> {

14. April 2023

Setting up esp-matter development environtment on openSUSE

When setting up development environment for esp-matter on OpenSUSE you may encouter following error:

./install.sh
...
Error
uilding wheels for collected packages: gevent
  Building wheel for gevent (pyproject.toml): started
  error: subprocess-exited-with-error
  
  × Building wheel for gevent (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  Building wheel for gevent (pyproject.toml): finished with status 'error'
  ERROR: Failed building wheel for gevent
Failed to build gevent
ERROR: Could not build wheels for gevent, which is required to install pyproject.toml-based projects
['esp-matter/connectedhomeip/connectedhomeip/.environment/pigweed-venv/bin/python', '-m', 'pip', 'install', '--log', 'esp-matter/connectedhomeip/connectedhomeip/.environment/pigweed-venv/pip-requirements.log', '--requirement=esp-matter/connectedhomeip/connectedhomeip/scripts/setup/requirements.txt', '--constraint=esp-matter/connectedhomeip/connectedhomeip/scripts/setup/constraints.txt'] {'stdout': <_io.TextIOWrapper name=3 mode='w+' encoding='UTF-8'>, 'stderr': -2}

Problem is caused by gdbgui dependency in ESP-IDF. The dependency is not necessary to build the project.

Edit file esp-matter/connectedhomeip/connectedhomeip/scripts/setup/requirements.esp32.txt .

Disable the line with gdbgui:

#gdbgui==0.13.2.0 ; platform_machine != 'aarch64' and sys_platform == 'linux'

Continue with `./install.sh` script.

31. October 2022

openSUSE Rust Bevy application failed with “Unable to find a GPU”

Bevy is data-driven engine written in Rust. The repository of Bevy contains several examples which can be started by a command like:

git clone --depth 1 https://github.com/bevyengine/bevy.git
cd bevy
cargo run --example alien_cake_addict

Users of openSUSe might experience following error:

hread 'main' panicked at 'Unable to find a GPU! Make sure you have installed required drivers! For extra information, see: https://github.com/bevyengine/bevy/blob/latest/docs/linux_dependencies.md', crates/bevy_render/src/renderer/mod.rs:121:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

The problem is caused by missing Vulkan libraries in the system. This can be confirmed by running vkcube which may result in the following error:

vkEnumerateInstanceExtensionProperties failed to find the VK_KHR_surface extension.

Do you have a compatible Vulkan installable client driver (ICD) installed?
Please look at the Getting Started guide for additional information.

Check which graphic card is installed in the system:

sudo lspci -nnk | grep -A3 VGA

Which might result in a message like this:

00:02.0 VGA compatible controller [0300]: Intel Corporation CometLake-U GT2

With this knowledge, it’s clear that library Vulkan Intel is missing and can be installed simply by:

sudo zupper install libvulkan_intel

Application vkcube should work after this change.

3. May 2022

Podman Debian apt-get update fails with “InRelease is not valid yet”

Podman 4.0.3 users on macOS might face the following strange error when building an image:

apt-get update
...
E: Release file for http://security.debian.org/debian-security/dists/bullseye-security/InRelease is not valid yet (invalid for another 3h 1min 9s). Updates for this repository will not be applied.
E: Release file for http://deb.debian.org/debian/dists/bullseye-updates/InRelease is not valid yet (invalid for another 7h 24min 41s). Updates for this repository will not be applied.

The problem is caused by the not synced clock in Podman VM. This might happen due to the hibernation of the notebook.

The quick fix of the problem is to restart Podman’s VM:

podman machine stop
podman machine start