You are not logged in.

#1 2015-08-28 09:32:41

marazmista
Member
From: Poland
Registered: 2010-08-04
Posts: 15
Website

[SOLVED] Empty /usr/include/uapi, can't use drmCommandWriteRead()

Hello.
I wanted to use drmCommandWriteRead() so I included <xf86drm.h> but I got error:

/usr/include/xf86drm.h:40: error: drm.h: No such file or directory

I have kernel headers and libdrm installed but I have empty /usr/include/uapi/. When I symlink

ln -s /usr/lib/modules/4.1.4-1-mainline/build/include/uapi/drm/ /usr/include/uapi/drm

I'm getting different error:

/usr/include/uapi/drm/drm.h:682: error: drm/drm_mode.h: No such file or directory

I guess such symlink is wrong, as it points to kernel version dependant path. Same with adding it to includepath in project.
Any suggestions?

Last edited by marazmista (2015-08-28 17:22:25)


.: github :. ||  radeon-profile - radeon oss driver manager  ||  tar-backup - gui for create backups using tar

Offline

#2 2015-08-28 09:51:34

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [SOLVED] Empty /usr/include/uapi, can't use drmCommandWriteRead()

I assume you meant xf86drm.h, part of the libdrm package. That file is in /usr/include, the other header files (drm.h and drm_mode.h from the same package) are in /usr/include/libdrm, so you would need to pass that directory with the -I flag to the compiler (next time, please include the command you used that produced the error). You can also use pkg-config to get the required cflags:

$ pkg-config --cflags libdrm
-I/usr/include/libdrm

Last edited by Raynman (2015-08-28 10:05:15)

Offline

#3 2015-08-28 17:16:28

marazmista
Member
From: Poland
Registered: 2010-08-04
Posts: 15
Website

Re: [SOLVED] Empty /usr/include/uapi, can't use drmCommandWriteRead()

Thanks, that worked! Yes xf86drm.h, just typo, I edited above. Surprisingly though, headers from libdrm looks like are older that headers from kernel-headers package.


.: github :. ||  radeon-profile - radeon oss driver manager  ||  tar-backup - gui for create backups using tar

Offline

Board footer

Powered by FluxBB