使用Yocto Krogoth为opengl支持构建原子x64的发行版。如果没有添加qtwebengine,bitbake将构建正常但添加它会导致错误:
致命错误:EGL / egl.h:没有这样的文件或目录
我的conf / local.conf我添加了:
DISTRO_FEATURES_append = " opengl x11 "
IMAGE_INSTALL = "qtbase qtwebengine \
x11-common mesa-gl \
"
CORE_IMAGE_BASE_INSTALL += "mesa-megadriver"
CORE_IMAGE_BASE_INSTALL += "libegl-gallium"
CORE_IMAGE_BASE_INSTALL += "libegl-mesa"
CORE_IMAGE_BASE_INSTALL += "libgbm"
CORE_IMAGE_BASE_INSTALL += "libgbm-gallium"
CORE_IMAGE_BASE_INSTALL += "mesa-driver-pipe-swrast"
CORE_IMAGE_BASE_INSTALL += "mesa-driver-pipe-vmwgfx"
CORE_IMAGE_BASE_INSTALL += "mesa-driver-pipe-i915"
CORE_IMAGE_BASE_INSTALL += "libgles1-mesa"
CORE_IMAGE_BASE_INSTALL += "libgles2-mesa"
PREFERRED_PROVIDER_virtual/libgl ?= "mesa-gl"
PREFERRED_PROVIDER_virtual/mesa ?= "mesa-gl"
PREFERRED_PROVIDER_mesa-driver-swrast = "mesa-gl"
PREFERRED_PROVIDER_virtual/libgles1 = "mesa-gl"
PREFERRED_PROVIDER_virtual/libgles2 = "mesa-gl"
如果我将虚拟/ egl设置为mesa,我得
错误:没有提供虚拟/ egl'
错误:mesa PROVIDES virtual / egl但被跳过:PREFERRED_PROVIDER_virtual / libgl设置为mesa-gl,而不是mesa
错误:mesa PROVIDES virtual / egl但被跳过:PREFERRED_PROVIDER_virtual / libgl设置为mesa-gl,而不是mesa
如果我将所有内容设置为mesa,qtbase将无法构建,因为无法找到LGL。
我怎么能通过这个。
答案 0 :(得分:0)
也许这个补丁from the mesa homepage会帮助你。
diff --git a/include/GL/mesa_glinterop.h b/include/GL/mesa_glinterop.h
index b76bd7e..5c172c6 100644
--- a/include/GL/mesa_glinterop.h
+++ b/include/GL/mesa_glinterop.h
@@ -51,7 +51,7 @@
#define MESA_GLINTEROP_H
#include <stddef.h>
-#include <EGL/egl.h>
+#include <stdint.h>
#ifdef __cplusplus
extern "C" {
@@ -61,6 +61,10 @@ extern "C" {
typedef struct _XDisplay Display;
typedef struct __GLXcontextRec *GLXContext;
+/* Forward declarations to avoid inclusion of EGL/egl.h */
+typedef void *EGLDisplay;
+typedef void *EGLContext;
+
/** Returned error codes. */
enum {
MESA_GLINTEROP_SUCCESS = 0,