Summary: | Cannot build against EGL without X11 | ||
---|---|---|---|
Product: | Mesa | Reporter: | Ross Burton <ross> |
Component: | EGL | Assignee: | Ross Burton <ross.burton> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | chadversary, ross, sardemff7+freedesktop |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
Don't include X11 headers if no X11 platform
Use pointers instead of ints Don't include X11 headers if no X11 platform Use right size types |
Description
Ross Burton
2013-05-24 16:16:00 UTC
If you build gallium targets, you additionally need to comment out the xlib_sw_winsys include in src/gallium/auxilliary/pipe-loader/pipe_loader_sw.c as it is not guarded either. Does adding -DWL_EGL_PLATFORM to CFLAGS fix the problem? That seems to be the right define to use when building in a pure Wayland system. Don't use -DMESA_EGL_NO_X11_HEADERS, because that may break ABI on 32-bit systems. The definitions of the EGLNative types in that block are 32-bit instead of 64-bit. (In reply to comment #2) > Does adding -DWL_EGL_PLATFORM to CFLAGS fix the problem? That seems to be > the right define to use when building in a pure Wayland system. On a pure Wayland system, that works fine. > Don't use -DMESA_EGL_NO_X11_HEADERS, because that may break ABI on 32-bit > systems. The definitions of the EGLNative types in that block are 32-bit > instead of 64-bit. What is the correct solution when you have both Wayland and X11 EGL then? Should we define -DWL_EGL_PLATFORM as soon as wayland EGL support is enabled? Depends on the ordering of --with-egl-platforms? As soon as there is an identified solution, I will provide a patch to add the needed flags to the egl.pc file. For fun, current mesa master doesn't even compile without X11 headers: | In file included from /.../mesa/2_9.2.0~gitAUTOINC+9aebad618c-r9.0/git/include/EGL/egl.h:36:0, | from /.../mesa/2_9.2.0~gitAUTOINC+9aebad618c-r9.0/git/src/egl/main/egltypedefs.h:36, | from /.../mesa/2_9.2.0~gitAUTOINC+9aebad618c-r9.0/git/src/egl/main/eglconfig.h:37, | from /.../mesa/2_9.2.0~gitAUTOINC+9aebad618c-r9.0/git/src/egl/main/eglcontext.c:34: | /.../mesa/2_9.2.0~gitAUTOINC+9aebad618c-r9.0/git/include/EGL/eglplatform.h:118:22: fatal error: X11/Xlib.h: No such file or directory Created attachment 81544 [details] [review] Don't include X11 headers if no X11 platform Created attachment 81545 [details] [review] Use pointers instead of ints (In reply to comment #5) > Created attachment 81544 [details] [review] [review] > Don't include X11 headers if no X11 platform We should definitely add such a flag in egl.pc file too. Otherwise, programs built against EGL will fail to build too. Created attachment 81547 [details] [review] Don't include X11 headers if no X11 platform Created attachment 81548 [details] [review] Use right size types [Assigning to Ross]. Ross, both these patches look good to me and are Reviewed-by: Chad Versace <chad.versace@linux.intel.com> To ensure that the patches get backported to the stable branches 9.0 and 9.1 (because that's where the bug is really biting you), add the following tag above the signed-off line: Note: This patch is a candidate for the 9.0 and 9.1 branches. Please mail them to mesa-dev so they can get reviewed and committed. |
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.