mcpp index

compat.libdrm

libdrm — userspace DRM/KMS interface, built from the upstream release

mcpp add compat.libdrm@2.4.134

用法

来自本仓库自己的测试项目 —— CI 真的编译并运行过,不是为了网站写的。

// compat.libdrm — behavioral test, runnable with no GPU and no DRM node.
//
// Three things can be wrong with this package and none is a missing symbol.
//
//   1. THE INCLUDE LAYOUT. libdrm splits its headers across two roots — the
//      public ones (`xf86drm.h`) at the include root, the uapi ones (`drm.h`,
//      `drm_mode.h`, `drm_fourcc.h`) under `libdrm/` — and `xf86drm.h` itself
//      does `#include <drm.h>`. Exposing one root fails at line 40 of the
//      header, before any of this code exists. So the fact that this file
//      COMPILES is the first assertion, and it is not a trivial one.
//
//   2. THE LIBRARY COULD BE ABSENT while the headers are present. The dlsym
//      checks below pin that: a header-only package would sail past
//      compilation and fail here.
//
//   2b. THE WRONG libdrm COULD BE LOADED. This package builds libdrm from
//      source, and the ecosystem's Mesa payload carries its own
//      `libdrm.so.2` under `xim-x-libdrm/`. Both can be reachable at once, and
//      because they share a soname only ONE is ever mapped — silently. The
//      dladdr check pins which one won: it must be this package's build, or
//      the source build is decorative and the consumer is really running the
//      payload's copy.
// …

tests/examples/libdrm/tests/drm.cpp · 项目 tests/examples/libdrm

构建

targets
drm (shared)
language
c++23
C standard
c11
import std
no
include dirs
mcpp/include, include/drm

源文件 (5)

  • xf86drm.c
  • xf86drmHash.c
  • xf86drmRandom.c
  • xf86drmSL.c
  • xf86drmMode.c

生成的文件

  • generated_static_table_fourcc.h

版本

版本平台 镜像sha256
2.4.134 最新 Linux GLOBAL CN ac5e74d15783…