What am I doing wrong with compiling? (ERROR: libdrm not found using pkg-config) #61

Closed
opened 2025-12-23 10:32:00 +01:00 by backuprepo · 3 comments
Owner

Originally created by @dison4linux on GitHub (May 31, 2024).

I'm following the compilation procedure in the wiki pretty much word for word but am running into the error:
ERROR: libdrm not found using pkg-config

LibDRM is installed

$ sudo dpkg-query -l | grep libdrm
ii  libdrm-amdgpu1:arm64                    2.4.120-2build1                         arm64        Userspace interface to amdgpu-specific kernel DRM services -- runtime
ii  libdrm-common                           2.4.120-2build1                         all          Userspace interface to kernel DRM services -- common files
ii  libdrm-dev:arm64                        2.4.120-2build1                         arm64        Userspace interface to kernel DRM services -- development files
ii  libdrm-etnaviv1:arm64                   2.4.120-2build1                         arm64        Userspace interface to etnaviv-specific kernel DRM services -- runtime
ii  libdrm-freedreno1:arm64                 2.4.120-2build1                         arm64        Userspace interface to msm/kgsl kernel DRM services -- runtime
ii  libdrm-nouveau2:arm64                   2.4.120-2build1                         arm64        Userspace interface to nouveau-specific kernel DRM services -- runtime
ii  libdrm-radeon1:arm64                    2.4.120-2build1                         arm64        Userspace interface to radeon-specific kernel DRM services -- runtime
ii  libdrm-tegra0:arm64                     2.4.120-2build1                         arm64        Userspace interface to tegra-specific kernel DRM services -- runtime
ii  libdrm2:arm64                           2.4.120-2build1                         arm64        Userspace interface to kernel DRM services -- runtime

But on the configure step for ffmpeg it complains that libdrm is not found...

$ ./configure --prefix=/usr --enable-gpl --enable-version3 --enable-libdrm --enable-rkmpp --enable-rkrga
ERROR: libdrm not found using pkg-config

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.libera.chat.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.

The contents of that file mentioned contain the same error
ERROR: libdrm not found using pkg-config

Originally created by @dison4linux on GitHub (May 31, 2024). I'm following the compilation procedure in the wiki pretty much word for word but am running into the error: `ERROR: libdrm not found using pkg-config` LibDRM is installed ``` $ sudo dpkg-query -l | grep libdrm ii libdrm-amdgpu1:arm64 2.4.120-2build1 arm64 Userspace interface to amdgpu-specific kernel DRM services -- runtime ii libdrm-common 2.4.120-2build1 all Userspace interface to kernel DRM services -- common files ii libdrm-dev:arm64 2.4.120-2build1 arm64 Userspace interface to kernel DRM services -- development files ii libdrm-etnaviv1:arm64 2.4.120-2build1 arm64 Userspace interface to etnaviv-specific kernel DRM services -- runtime ii libdrm-freedreno1:arm64 2.4.120-2build1 arm64 Userspace interface to msm/kgsl kernel DRM services -- runtime ii libdrm-nouveau2:arm64 2.4.120-2build1 arm64 Userspace interface to nouveau-specific kernel DRM services -- runtime ii libdrm-radeon1:arm64 2.4.120-2build1 arm64 Userspace interface to radeon-specific kernel DRM services -- runtime ii libdrm-tegra0:arm64 2.4.120-2build1 arm64 Userspace interface to tegra-specific kernel DRM services -- runtime ii libdrm2:arm64 2.4.120-2build1 arm64 Userspace interface to kernel DRM services -- runtime ``` But on the configure step for ffmpeg it complains that libdrm is not found... ``` $ ./configure --prefix=/usr --enable-gpl --enable-version3 --enable-libdrm --enable-rkmpp --enable-rkrga ERROR: libdrm not found using pkg-config If you think configure made a mistake, make sure you are using the latest version from Git. If the latest version fails, report the problem to the ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.libera.chat. Include the log file "ffbuild/config.log" produced by configure as this will help solve the problem. ``` The contents of that file mentioned contain the same error `ERROR: libdrm not found using pkg-config`
backuprepo 2025-12-23 10:32:00 +01:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@Tryanks commented on GitHub (May 31, 2024):

Try checking if the file libdrm.pc exists on your device. On my device, it can be found at the following path:

/usr/local/lib/pkgconfig/libdrm.pc

Next, set the PKG_CONFIG_PATH environment variable:

export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig"

Then try compiling again.

Regarding your compilation issue, this is not a problem solely related to this repository. Please consider using other community features instead of an issue.

@Tryanks commented on GitHub (May 31, 2024): Try checking if the file `libdrm.pc` exists on your device. On my device, it can be found at the following path: > /usr/local/lib/pkgconfig/libdrm.pc Next, set the `PKG_CONFIG_PATH` environment variable: ``` export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig" ``` Then try compiling again. Regarding your compilation issue, this is not a problem solely related to this repository. Please consider using other community features instead of an issue.
Author
Owner

@nyanmisaka commented on GitHub (May 31, 2024):

https://github.com/nyanmisaka/ffmpeg-rockchip/wiki/Compilation#examples

$ dpkg-query -l | grep -E "pkgconf|pkg-config"
ii  libpkgconf3:arm64                          1.8.1-1                              arm64        shared library for pkgconf
ii  pkg-config:arm64                           1.8.1-1                              arm64        manage compile and link flags for libraries (transitional package)
ii  pkgconf:arm64                              1.8.1-1                              arm64        manage compile and link flags for libraries
ii  pkgconf-bin                                1.8.1-1                              arm64        manage compile and link flags for libraries (binaries)

$ ls -lh /usr/lib/aarch64-linux-gnu/pkgconfig/ | grep libdrm.pc
-rw-r--r-- 1 root root  256 Mar 23  2023 libdrm.pc
@nyanmisaka commented on GitHub (May 31, 2024): https://github.com/nyanmisaka/ffmpeg-rockchip/wiki/Compilation#examples ``` $ dpkg-query -l | grep -E "pkgconf|pkg-config" ii libpkgconf3:arm64 1.8.1-1 arm64 shared library for pkgconf ii pkg-config:arm64 1.8.1-1 arm64 manage compile and link flags for libraries (transitional package) ii pkgconf:arm64 1.8.1-1 arm64 manage compile and link flags for libraries ii pkgconf-bin 1.8.1-1 arm64 manage compile and link flags for libraries (binaries) $ ls -lh /usr/lib/aarch64-linux-gnu/pkgconfig/ | grep libdrm.pc -rw-r--r-- 1 root root 256 Mar 23 2023 libdrm.pc ```
Author
Owner

@dison4linux commented on GitHub (May 31, 2024):

Thanks, it was installing pkgconf itself that was needed I missed that listed in the guide...
"
...such as git,meson,cmake,pkg-config,gcc,libdrm-dev,etc...
"

@dison4linux commented on GitHub (May 31, 2024): Thanks, it was installing pkgconf itself that was needed I missed that listed in the guide... " ...such as git,meson,cmake,**pkg-config**,gcc,libdrm-dev,etc... "
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: starred/ffmpeg-rockchip#61
No description provided.