Bug 109645 - build error on arm64: tegra_screen.c:33: /usr/include/xf86drm.h:41:10: fatal error: drm.h: No such file or directory
Summary: build error on arm64: tegra_screen.c:33: /usr/include/xf86drm.h:41:10: fatal ...
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: git
Hardware: ARM Linux (All)
: medium major
Assignee: mesa-dev
QA Contact: mesa-dev
Depends on:
Reported: 2019-02-15 18:19 UTC by Fabio Pedretti
Modified: 2019-02-19 14:53 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Description Fabio Pedretti 2019-02-15 18:19:53 UTC
tegra fails to build since a couple days:

In file included from ../src/gallium/drivers/tegra/tegra_screen.c:33:
/usr/include/xf86drm.h:41:10: fatal error: drm.h: No such file or directory
 #include <drm.h>
compilation terminated.

Full build log:

Not bisected, but supposing related to:
Comment 1 Michel Dänzer 2019-02-18 10:48:45 UTC
*** Bug 109647 has been marked as a duplicate of this bug. ***
Comment 2 Fabio Pedretti 2019-02-19 09:52:45 UTC
@Eric Engestrom: any news on this build issue?
Comment 3 Eric Engestrom 2019-02-19 10:57:24 UTC
Sorry, I broke two libdrm things within a few days and I got confused between the issues. Looking at this one now, but at first glance it looks like src/gallium/drivers/tegra/meson.build is just missing its dep_libdrm.

@Fabio could you test this for me?

diff --git a/src/gallium/drivers/tegra/meson.build b/src/gallium/drivers/tegra/meson.build
index d24438edc1383d571552..939d6294601cd07b3f51 100644
--- a/src/gallium/drivers/tegra/meson.build
+++ b/src/gallium/drivers/tegra/meson.build
@@ -33,6 +33,7 @@ libtegra = static_library(
     inc_include, inc_src, inc_gallium, inc_gallium_aux, inc_gallium_drivers,
+  dependencies : dep_libdrm,
 driver_tegra = declare_dependency(
Comment 4 Eric Engestrom 2019-02-19 11:25:33 UTC
Instead of testing a copy/pasted patch, you can test the branch in this MR:
Comment 5 Eric Engestrom 2019-02-19 13:42:58 UTC
Fixed by:

commit b787403a21de8eeb21336274ba6ff19392a216da
Author: Eric Engestrom <eric.engestrom@intel.com>
Date:   Tue Feb 19 10:57:58 2019 +0000

    tegra/meson: add missing dep_libdrm
    Fixes: f1374805a86d0d506557 "drm-uapi: use local files, not system libdrm"
    Bug: https://bugs.freedesktop.org/show_bug.cgi?id=109645
    Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
    Reviewed-by: Emil Velikov <emil.velikov@collabora.com>

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.