Skip to content

Build failure if libdrm installed without amdgpu support #1900

@thesamesam

Description

@thesamesam

Description

criu-3.17 fails to build (with the needed backports: cd0ed7e and 2b3763f) if libdrm is installed without amdgpu support.

Originally reported downstream in Gentoo.

Steps to reproduce the issue:

  1. Install libdrm without amdgpu support.
  2. Try to build criu-3.17 (with above patches from git applied)

Describe the results you received:

Build failure:

amdgpu_plugin.c:20:10: fatal error: libdrm/amdgpu.h: No such file or directory
   20 | #include <libdrm/amdgpu.h>
      |          ^~~~~~~~~~~~~~~~~

Describe the results you expected:

Successful build.

Additional information you deem important (e.g. issue happens only occasionally):

The check at https://github.com/checkpoint-restore/criu/blob/criu-dev/Makefile.config#L24 has two issues:

  1. it only checks for the presence of libdrm, not libdrm's amdgpu support;
  2. it's automagic (i.e. building criu will use libraries available on the system without giving a way to disable them, which can be an issue if e.g. building binaries for another system).

Additional environment details:

Gentoo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions