{"record":{"id":"93b1b8ffcb5ab64e","repo":"rustdesk/rustdesk","slug":"the-libdrmtap-being-packaged-is-so-ver-0-so-ve","errorCode":null,"errorMessage":"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.","messagePattern":"the libdrmtap being packaged is (.+?)\\.(.+?)\\.(.+?), which the runtime loader would REFUSE: drmtap_dl\\.rs accepts exactly major (.+?), minor (.+?), patch >= (.+?)\\. 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\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"build.py","lineNumber":612,"sourceCode":"    gate_path = os.path.join(REPO_ROOT, 'libs', 'scrap', 'src', 'common', 'drmtap_dl.rs')\n    with open(gate_path) as f:\n        gate_src = f.read()\n\n    def _const(name):\n        mm = re.search(rf'const {name}: c_int = (\\d+);', gate_src)\n        return int(mm.group(1)) if mm else None\n\n    major, minor = _const('DRMTAP_ABI_MAJOR'), _const('DRMTAP_ABI_MINOR')\n    mm = re.search(r'const DRMTAP_MIN_MINOR_PATCH: \\(c_int, c_int\\) = \\((\\d+), (\\d+)\\);', gate_src)\n    floor = (int(mm.group(1)), int(mm.group(2))) if mm else None\n    if major is None or minor is None or floor is None:\n        raise Exception(\n            'could not parse the libdrmtap ABI gate out of drmtap_dl.rs (DRMTAP_ABI_MAJOR / '\n            'DRMTAP_ABI_MINOR / DRMTAP_MIN_MINOR_PATCH). The gate moved and this check did not; '\n            'fix the check rather than removing it, or the pin and the gate can drift silently.')\n    accepted = so_ver[0] == major and so_ver[1] == minor and (so_ver[1], so_ver[2]) >= floor\n    if not accepted:\n        raise Exception(\n            f'the libdrmtap being packaged is {so_ver[0]}.{so_ver[1]}.{so_ver[2]}, which the '\n            f'runtime loader would REFUSE: drmtap_dl.rs accepts exactly major {major}, minor '\n            f'{minor}, patch >= {floor[1]}. Shipping it produces a deb whose DRM capture can never '\n            'start. Move the build pin and the gate together, or fix whichever one is wrong.')\n    print(f'[drm] libdrmtap {so_ver[0]}.{so_ver[1]}.{so_ver[2]} satisfies the runtime ABI gate '\n          f'(major {major}, minor {minor}, patch >= {floor[1]})')\n\n\ndef stage_libdrmtap_into_deb(so_path):\n    # Put the built libdrmtap object plus its soname symlink into the staged deb. Only the soname\n    # symlink is needed: libdrmtap is resolved by ABSOLUTE path (/usr/lib/rustdesk/libdrmtap.so.0) at\n    # the in-process dlopen site (drmtap_dl.rs), so the deb does NOT drop /usr/lib/rustdesk into the\n    # system-wide /etc/ld.so.conf.d search path, which would let this private library shadow a system\n    # library for every binary on the host (Debian Policy 10.2 forbids that). No ld.so.conf.d drop-in\n    # and no ldconfig trigger are shipped, so the stock postinst is used unchanged.\n    assert_so_satisfies_the_runtime_abi_gate(so_path)\n    so_basename = os.path.basename(so_path)\n    system2('mkdir -p tmpdeb/usr/lib/rustdesk')","sourceCodeStart":594,"sourceCodeEnd":630,"githubUrl":"https://github.com/rustdesk/rustdesk/blob/7aa98d43cf1962a7a29ec16ffef42974377ef11e/build.py#L594-L630","documentation":"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.","triggerScenarios":"Thrown at build.py:612 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7aa98d43cf1962a7a29ec16ffef42974377ef11e","analyzedAt":"2026-08-16T06:17:34.842Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}