Bug 99972 - xf86drm.h:40:17: error: drm.h: No such file or directory
Summary: xf86drm.h:40:17: error: drm.h: No such file or directory
Status: CLOSED NOTABUG
Alias: None
Product: DRI
Classification: Unclassified
Component: libdrm (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-26 13:36 UTC by Joaquín Montero Salinas
Modified: 2017-02-26 14:39 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Joaquín Montero Salinas 2017-02-26 13:36:10 UTC
In libdrm-2.4.75, xf86drm.h and xf86drmMode.h include drm.h, which doesn't exist.
drm.h and friends are installed in /usr/local/include/libdrm.

When compiling a C program that includes xf86dri.h with GCC, the following error message appears:

  /usr/include/xf86drm.h:40:17: fatal error: drm.h: No such file or directory
   #include <drm.h>
                   ^
Comment 1 Emil Velikov 2017-02-26 13:51:28 UTC
Me again ... 

There is some contradiction in your statement - "drm.h" doesn't exist. "drm.h" does exist in X :-P

But seriously, sounds like want to read-up on pkg-config [1].

In a nut-shell: gcc `pkg-config --cflags --libs libdrm` foo.c bar.c -o binary


[1] https://people.freedesktop.org/~dbn/pkg-config-guide.html
Comment 2 Joaquín Montero Salinas 2017-02-26 14:22:27 UTC
(In reply to Emil Velikov from comment #1)
> Me again ... 
> 
> There is some contradiction in your statement - "drm.h" doesn't exist.
> "drm.h" does exist in X :-P
> 
> But seriously, sounds like want to read-up on pkg-config [1].
> 
> In a nut-shell: gcc `pkg-config --cflags --libs libdrm` foo.c bar.c -o binary
> 
> 
> [1] https://people.freedesktop.org/~dbn/pkg-config-guide.html

Me again...

Totally forgot about pkg-config, thought I could get away with just tacking a
-ldrm at the end of my compilation line.

Sorry for wasting your time, again :-P


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.