[2/2] Android: EGL: fix missing nativewindow.h include on O

Submitted by Rob Herring on Aug. 23, 2017, 5:25 p.m.

Details

Message ID 20170823172556.11334-2-robh@kernel.org
State New
Headers show
Series "Series without cover letter" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Rob Herring Aug. 23, 2017, 5:25 p.m.
The build against AOSP master and O is broken:

external/mesa3d/include/EGL/eglplatform.h:100:10: fatal error: 'android/native_window.h' file not found

native_window.h has moved and is now part of libnativewindow library, so
add this dependency.

Signed-off-by: Rob Herring <robh@kernel.org>
---
 src/egl/Android.mk | 4 ++++
 1 file changed, 4 insertions(+)

Patch hide | download patch | download mbox

diff --git a/src/egl/Android.mk b/src/egl/Android.mk
index 00553226773e..3852deb4364c 100644
--- a/src/egl/Android.mk
+++ b/src/egl/Android.mk
@@ -58,6 +58,10 @@  LOCAL_SHARED_LIBRARIES := \
 	libgralloc_drm \
 	libsync
 
+ifeq ($(filter $(MESA_ANDROID_MAJOR_VERSION),5 6 7),)
+LOCAL_SHARED_LIBRARIES += libnativewindow
+endif
+
 # This controls enabling building of driver libraries
 ifneq ($(HAVE_I915_DRI),)
 LOCAL_REQUIRED_MODULES += i915_dri

Comments

On 23 August 2017 at 18:25, Rob Herring <robh@kernel.org> wrote:
> The build against AOSP master and O is broken:
>
> external/mesa3d/include/EGL/eglplatform.h:100:10: fatal error: 'android/native_window.h' file not found
>
> native_window.h has moved and is now part of libnativewindow library, so
> add this dependency.
>
That ones seems resolved upstream [1] in a rather nice way IMHO.
Note that we cannot use the upstream header since there's local changes in Mesa.

I've attempted to address the underlying issue by moving from implicit
to explicit, Vulkan-like, platform detection/selection here [2]. I'll
see about getting that sorted with Khronos, but using a patch similar
to [1] might be the better option?

What do you guys think?
-Emil

[1] https://github.com/KhronosGroup/EGL-Registry/commit/89be4fbc3ace60f03c0f3b221fff3b6c772bc21e
[2] http://patchwork.freedesktop.org/bundle/evelikov/explicit-platforms-for-eglplatform/
On Thursday, 2017-08-24 11:07:27 +0100, Emil Velikov wrote:
> On 23 August 2017 at 18:25, Rob Herring <robh@kernel.org> wrote:
> > The build against AOSP master and O is broken:
> >
> > external/mesa3d/include/EGL/eglplatform.h:100:10: fatal error: 'android/native_window.h' file not found
> >
> > native_window.h has moved and is now part of libnativewindow library, so
> > add this dependency.
> >
> That ones seems resolved upstream [1] in a rather nice way IMHO.
> Note that we cannot use the upstream header since there's local changes in Mesa.
> 
> I've attempted to address the underlying issue by moving from implicit
> to explicit, Vulkan-like, platform detection/selection here [2]. I'll
> see about getting that sorted with Khronos, but using a patch similar
> to [1] might be the better option?
> 
> What do you guys think?

I agree, it's cleaner to align with Khronos and simply forward declare
the struct, rather than having to track changes in include paths and
libraries.
Sending this patch in a minute.

> -Emil
> 
> [1] https://github.com/KhronosGroup/EGL-Registry/commit/89be4fbc3ace60f03c0f3b221fff3b6c772bc21e
> [2] http://patchwork.freedesktop.org/bundle/evelikov/explicit-platforms-for-eglplatform/