Building on Linux

CMake build, launch, debugging, and deb/rpm/Arch packaging.

Prerequisites first: Build prerequisites (OpenSSL layout, CMake, translations). OpenSSL should be built first; using a folder at the same level as the lmc folder as the OpenSSL folder is recommended. Distribution packages work too (see the OpenSSL setup).

Build

The build is driven by CMake. The package-local target stages the runtime layout (binary, lmc.rcc, lang, sounds) into the LMC_RELEASE_DIR directory (defaults to <build-dir>/release):

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DLMC_RELEASE_DIR="$PWD/release"
cmake --build build --config Release --target package-local --parallel

The packaging scripts read the layout from release, so pass that value for LMC_RELEASE_DIR when building packages (this is what the CI build does).

Launch

Run the lmc binary in the release layout directly (all dependencies resolve via the system libraries, no wrapper needed):

./lmc /loopback

Debugging

To debug a running application, run this command before attaching to the process:

echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope

This will be valid only for the current session. It has to be run again after a log out or restart.

Installer (deb, rpm, Arch)

All three Linux system packages are built from a single nfpm.yaml in the setup/linux folder, on top of the payload tree staged by stage.sh from release (the package-local target must have run first, see above; CI does this in build.yml):

cd setup/linux
sh ./stage.sh
NFPM=/path/to/nfpm sh ./package.sh 1.3.21

nfpm is a single static binary, no root needed: download nfpm_*_Linux_x86_64.tar.gz from the nfpm releases (pin the version, verify the sha256 from checksums.txt). package.sh builds into the setup folder:

  • lmc_<version>_amd64.deb
  • lmc-<version>-1.x86_64.rpm
  • lmc-<version>-1-x86_64.pkg.tar.zst

Only system-Qt packages are built; the Depends/Requires in nfpm.yaml pull the system Qt 6 libraries. Bundled Qt is not supported.

Nightly versions look like 1.3.22~nightly.123 in deb/rpm and 1.3.22_nightly.123 in the Arch package (pkgver forbids ~ and -, so package.sh maps them to _). Nightly Arch packages sort newer than the matching release; switching from a nightly to that release looks like a downgrade to pacman.

Dependencies are declared once per ecosystem in nfpm.yaml (overrides.rpm carries the Fedora names). Icon caches need no maintainer scripts: they are refreshed by the distro triggers/hooks. Autostart entries are per-user configuration created by the app itself and are left in place on uninstall; the app removes its own entry when autostart is disabled.

Chat messages render emoji with the operating system’s color emoji font. The packages recommend it, so it is normally installed automatically (apt installs Recommends by default, dnf installs weak Recommends by default):

  • Debian/Ubuntu: fonts-noto-color-emoji
  • Fedora/RHEL: google-noto-color-emoji-fonts
  • Arch: noto-fonts-emoji

The app also runs without it (monochrome/tofu fallback). If emoji show up as empty boxes (tofu), install the font manually:

sudo apt-get install fonts-noto-color-emoji   # Debian/Ubuntu
sudo dnf install google-noto-color-emoji-fonts  # Fedora
sudo pacman -S noto-fonts-emoji                 # Arch