[Mesa-dev] [PATCH] gallium/dri: Add shared glapi to LIBADD on Android

Emil Velikov emil.l.velikov at gmail.com
Wed Jul 13 16:28:28 UTC 2016

On 13 July 2016 at 04:29, Nicolas Boichat <drinkcat at chromium.org> wrote:
> From: Tomasz Figa <tfiga at chromium.org>
> An earlier patch fixed the problem for classic drivers, however Gallium
> was still left broken. This patch applies the same workaround to
> Gallium, when compiled for Android. Following is a quote from the
> original patch:
> 0cbc90c57cfc mesa: dri: Add shared glapi to LIBADD on Android
> /system/vendor/lib/dri/*_dri.so actually depend on libglapi: without
> this, loading the so file fails with:
> cannot locate symbol "__emutls_v._glapi_tls_Context"
> On non-Android (non-bionic) platform, EGL uses the following
> workflow, which works fine:
>   dlopen("libglapi.so", RTLD_LAZY | RTLD_GLOBAL);
>   dlopen("dri/<driver>_dri.so", RTLD_NOW | RTLD_GLOBAL);
> However, bionic does not respect the RTLD_GLOBAL flag, and the dri
> library cannot find symbols in libglapi.so, so we need to link
> to libglapi.so explicitly. Android.mk already does this.
I believe we want to have this along side the classic patch, thus
Cc: "12.0" <mesa-stable at lists.freedesktop.org>

> Signed-off-by: Tomasz Figa <tfiga at chromium.org>
> Signed-off-by: Nicolas Boichat <drinkcat at chromium.org>
For this and the "Remove unused variables" patch
Reviewed-by: Emil Velikov <emil.velikov at collabora.com>

Out of curiosity: which driver was this tested with/against ?

Humble suggestion: if you re-spin the third_party/mesa, arc branch(es)
against 12.0 you'll see that many of your local patches are
merged/superseded. From a brief look most/all of the remaining are
also suitable for upstream, albeit they might need a bit of polish.

Let us know how we can help out with those and/or the .pc business
suggested earlier.


More information about the mesa-dev mailing list