Can't build drm/drm.h: No such file or directory #6

Closed
AdamNuclear opened this Issue Jan 10, 2016 · 3 comments

Comments

Projects
None yet
3 participants

Hi,

Build problem:

make -C module 
make[1]: Entering directory '/home/nuclear/evdi/module'
make -C /lib/modules/4.2.1/build M=$PWD
make[2]: Entering directory '/usr/src/linux-4.2.1'
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/nuclear/evdi/module/evdi.mod.o
  LD [M]  /home/nuclear/evdi/module/evdi.ko
make[2]: Leaving directory '/usr/src/linux-4.2.1'
make[1]: Leaving directory '/home/nuclear/evdi/module'
make -C library 
make[1]: Entering directory '/home/nuclear/evdi/library'
cc -std=gnu99 -fPIC -I../module   -c -o evdi_lib.o evdi_lib.c
In file included from evdi_lib.c:4:0:
../module/evdi_ioctl.h:10:21: fatal error: drm/drm.h: No such file or directory
 #include <drm/drm.h>
                     ^
compilation terminated.
<builtin>: recipe for target 'evdi_lib.o' failed
make[1]: *** [evdi_lib.o] Error 1
make[1]: Leaving directory '/home/nuclear/evdi/library'
Makefile:6: recipe for target 'all' failed
make: *** [all] Error 2

But drm package is installed.

*  x11-libs/libdrm
      Latest version available: 2.4.65
      Latest version installed: 2.4.65
      Size of files: 631 KiB
      Homepage:      http://dri.freedesktop.org/
      Description:   X.Org libdrm library
      License:       MIT
 gcc -v    
Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.9.3/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.9.3/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.9.3/work/gcc-4.9.3/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.9.3 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.9.3 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.9.3/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.9.3/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4 --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.9.3/python --enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.9.3 p1.2, pie-0.6.3' --enable-libstdcxx-time --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-altivec --disable-fixed-point --enable-targets=all --disable-libgcj --enable-libgomp --disable-libmudflap --disable-libssp --disable-libcilkrts --enable-lto --without-cloog --enable-libsanitizer
Thread model: posix
gcc version 4.9.3 (Gentoo 4.9.3 p1.2, pie-0.6.3) 

Same topic is here maggu2810/maggu2810-overlay#9

My guess is you need to install the appropriate development headers (notably drm.h). I think libdrm-devel is the package you are looking for.

Contributor

displaylink-mlukaszek commented Jan 13, 2016

Hi Adam,
Check where your drm.h from libdrm is installed. It might be in /usr/include/libdrm, in which case you should probably edit the header files that include drm.h - for userspace library code only.
The include is in evdi_ioctl.h, a header file which is shared between the kernel module and the library.

I solved that issue already here: maggu2810/maggu2810-overlay#9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment