Bug 77240

Summary: khrplatform.h not installed if EGL is disabled
Product: Mesa Reporter: Eric Le Bihan <eric.le.bihan.dev>
Component: OtherAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact: mesa-dev
Severity: normal    
Priority: medium CC: emil.l.velikov, mattst88
Version: unspecified   
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Patch to fix missing khrplatform.h

Description Eric Le Bihan 2014-04-09 13:12:14 UTC
Created attachment 97136 [details]
Patch to fix missing khrplatform.h

KHR/khrplatform.h is required by the EGL, GLES and VG headers, but is
only installed if Mesa3d is compiled with EGL support. Configuring with

  $ ./configure --disable-egl --enable-gles1 --enable-gles2 ...

will result with an incomplete header set. When compiling Cairo with 
OpenGLESv2 support, the build will fail because of the missing header:

  /usr/include/GLES2/gl2platform.h:20:29: fatal error: KHR/khrplatform.h: No such file or directory

The attached patch fixes the issue for me.
Comment 1 Matt Turner 2014-09-21 20:00:43 UTC
How can GL ES be useful without EGL?
Comment 2 Ian Romanick 2014-09-22 19:19:24 UTC
GLX_EXT_create_context_es2_profile :)
Comment 3 Vicente Olivert Riera 2015-09-13 10:08:00 UTC
I think is fixed in mesa3d-11.0.0.
Comment 4 Matt Turner 2017-06-05 18:47:50 UTC
Looks like this should still be a problem. Cc'ing Emil.
Comment 5 Eric Engestrom 2017-06-12 10:59:15 UTC
Issue confirmed, and the attached patch seems to do the trick.
Rebasing and sending to the list for review.
Comment 6 Eric Engestrom 2017-06-15 09:27:15 UTC
commit 2154defcd698c7f9862bd235925cac75c0d5a520
Author: Eric Le Bihan <eric.le.bihan.dev@free.fr>
Date:   Mon Jun 12 12:00:07 2017 +0100

    Fix khrplatform.h not installed if EGL is disabled.
    
    KHR/khrplatform.h is required by the EGL, GLES and VG headers, but is
    only installed if Mesa3d is compiled with EGL support.
    
    This patch installs this header file unconditionally.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77240
    Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
    Reviewed-by: Emil Velikov <emil.velikov@collabora.com>

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.