[Mesa-dev] [PATCH 2/2] Android: EGL: fix missing nativewindow.h include on O

Chih-Wei Huang cwhuang at android-x86.org
Thu Aug 24 09:08:11 UTC 2017


2017-08-24 1:25 GMT+08:00 Rob Herring <robh at kernel.org>:
> 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 at kernel.org>
> ---
>  src/egl/Android.mk | 4 ++++
>  1 file changed, 4 insertions(+)
>
> 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

I'm also trying to fix it.
Seems it only requires the headers instead
of the shared library. Adding libnativewindow to
LOCAL_SHARED_LIBRARIES would add the
unnecessary dependency to libGLES_mesa.so.

Locally I fixed it in this way:

diff --git a/src/egl/Android.mk b/src/egl/Android.mk
index 4ccbb9b..9e96aca 100644
--- a/src/egl/Android.mk
+++ b/src/egl/Android.mk
@@ -43,6 +43,8 @@ LOCAL_CFLAGS := \
        -D_EGL_BUILT_IN_DRIVER_DRI2

 LOCAL_C_INCLUDES := \
+       frameworks/native/libs/arect/include \
+       frameworks/native/libs/nativewindow/include \
        $(MESA_TOP)/src/egl/main \
        $(MESA_TOP)/src/egl/drivers/dri2 \
        $(MESA_TOP)/src/gallium/include


>  # This controls enabling building of driver libraries
>  ifneq ($(HAVE_I915_DRI),)
>  LOCAL_REQUIRED_MODULES += i915_dri
> --



-- 
Chih-Wei
Android-x86 project
http://www.android-x86.org


More information about the mesa-dev mailing list