Describe the bug
I was trying to cross compile x11vnc (inside yocto) with --with-drm but I always got the following error message even though drm.h existed:
[...]
| In file included from ../../git/src/x11vnc.h:75,
| from ../../git/src/connections.c:35:
| /build/tmp/work/cortexa7t2hf-neon-vfpv4-dinos-linux-gnueabi/x11vnc/0.9.17+git/recipe-sysroot/usr/include/xf86drm.h:40:10: fatal error: drm.h: No such file or directory
| 40 | #include <drm.h>
| | ^~~~~~~
| compilation terminated.
[...]
During my investigation I found that configure.ac hardcodes the include dir to /usr/include/drm/ (https://github.com/LibVNC/x11vnc/blob/master/configure.ac#L79) even though it should be something like <sysrootdir>/usr/include/drm. Also, ssl uses $with_ssl/include.
My solution was:
- CPPFLAGS="$saved_CPPFLAGS -I/usr/include/drm/"
+ CPPFLAGS="$saved_CPPFLAGS -I$with_drm/drm"
(and in yocto explicitly set the include dir like this: --with-drm=${RECIPE_SYSROOT}${includedir})
Unfortunately I am unable to properly test my patch for other platforms right now, so I am not able to open a MR. But if anyone can verify it, please feel free to do so.
To Reproduce
Try to cross compile x11vnc with --with-drm setting
Expected Behavior
Successful compilation
Describe the bug
I was trying to cross compile x11vnc (inside yocto) with
--with-drmbut I always got the following error message even thoughdrm.hexisted:During my investigation I found that
configure.achardcodes the include dir to/usr/include/drm/(https://github.com/LibVNC/x11vnc/blob/master/configure.ac#L79) even though it should be something like<sysrootdir>/usr/include/drm. Also, ssl uses$with_ssl/include.My solution was:
(and in yocto explicitly set the include dir like this:
--with-drm=${RECIPE_SYSROOT}${includedir})Unfortunately I am unable to properly test my patch for other platforms right now, so I am not able to open a MR. But if anyone can verify it, please feel free to do so.
To Reproduce
Try to cross compile x11vnc with
--with-drmsettingExpected Behavior
Successful compilation