rustdesk/rustdesk · error · Exception

the libdrmtap being packaged is {so_ver[0]}.{so_ver[1]}.{so_

Error message

the libdrmtap being packaged is {so_ver[0]}.{so_ver[1]}.{so_ver[2]}, which the runtime loader would REFUSE: drmtap_dl.rs accepts exactly major {major}, minor {minor}, patch >= {floor[1]}. Shipping it produces a deb whose DRM capture can never start. Move the build pin and the gate together, or fix whichever one is wrong.

What it means

Error "the libdrmtap being packaged is {so_ver[0]}.{so_ver[1]}.{so_ver[2]}, which the runtime loader would REFUSE: drmtap_dl.rs accepts exactly major {major}, minor {minor}, patch >= {floor[1]}. Shipping it produces a deb whose DRM capture can never start. Move the build pin and the gate together, or fix whichever one is wrong." thrown in rustdesk/rustdesk.

Source

Thrown at build.py:612

    gate_path = os.path.join(REPO_ROOT, 'libs', 'scrap', 'src', 'common', 'drmtap_dl.rs')
    with open(gate_path) as f:
        gate_src = f.read()

    def _const(name):
        mm = re.search(rf'const {name}: c_int = (\d+);', gate_src)
        return int(mm.group(1)) if mm else None

    major, minor = _const('DRMTAP_ABI_MAJOR'), _const('DRMTAP_ABI_MINOR')
    mm = re.search(r'const DRMTAP_MIN_MINOR_PATCH: \(c_int, c_int\) = \((\d+), (\d+)\);', gate_src)
    floor = (int(mm.group(1)), int(mm.group(2))) if mm else None
    if major is None or minor is None or floor is None:
        raise Exception(
            'could not parse the libdrmtap ABI gate out of drmtap_dl.rs (DRMTAP_ABI_MAJOR / '
            'DRMTAP_ABI_MINOR / DRMTAP_MIN_MINOR_PATCH). The gate moved and this check did not; '
            'fix the check rather than removing it, or the pin and the gate can drift silently.')
    accepted = so_ver[0] == major and so_ver[1] == minor and (so_ver[1], so_ver[2]) >= floor
    if not accepted:
        raise Exception(
            f'the libdrmtap being packaged is {so_ver[0]}.{so_ver[1]}.{so_ver[2]}, which the '
            f'runtime loader would REFUSE: drmtap_dl.rs accepts exactly major {major}, minor '
            f'{minor}, patch >= {floor[1]}. Shipping it produces a deb whose DRM capture can never '
            'start. Move the build pin and the gate together, or fix whichever one is wrong.')
    print(f'[drm] libdrmtap {so_ver[0]}.{so_ver[1]}.{so_ver[2]} satisfies the runtime ABI gate '
          f'(major {major}, minor {minor}, patch >= {floor[1]})')


def stage_libdrmtap_into_deb(so_path):
    # Put the built libdrmtap object plus its soname symlink into the staged deb. Only the soname
    # symlink is needed: libdrmtap is resolved by ABSOLUTE path (/usr/lib/rustdesk/libdrmtap.so.0) at
    # the in-process dlopen site (drmtap_dl.rs), so the deb does NOT drop /usr/lib/rustdesk into the
    # system-wide /etc/ld.so.conf.d search path, which would let this private library shadow a system
    # library for every binary on the host (Debian Policy 10.2 forbids that). No ld.so.conf.d drop-in
    # and no ldconfig trigger are shipped, so the stock postinst is used unchanged.
    assert_so_satisfies_the_runtime_abi_gate(so_path)
    so_basename = os.path.basename(so_path)
    system2('mkdir -p tmpdeb/usr/lib/rustdesk')

View on GitHub (pinned to 7aa98d43cf)

When it happens

Trigger: Thrown at build.py:612 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of rustdesk/rustdesk@7aa98d43cf (2026-08-16). Data as JSON: /api/errors/93b1b8ffcb5ab64e. Report an issue: GitHub.