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

Rob Herring robh at kernel.org
Thu Aug 24 14:02:12 UTC 2017


On Thu, Aug 24, 2017 at 4:08 AM, Chih-Wei Huang <cwhuang at android-x86.org> wrote:
> 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.

Then the correct way to do this is LOCAL_HEADER_LIBRARIES instead.

>
> 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 \

Doing external includes this way is exactly what we don't want to do.
There's a defined way to do cross project headers.

Rob


More information about the mesa-dev mailing list