RFR: 8254569: Remove hard dependency on Dispman in Monocle fb rendering [v6]
Johan Vos
jvos at openjdk.java.net
Thu Nov 5 20:12:54 UTC 2020
On Thu, 5 Nov 2020 19:27:54 GMT, John Neffenger <github.com+1413266+jgneff at openjdk.org> wrote:
>> Marked as reviewed by jpereda (Committer).
>
> The fix for the compile-time error still fails for target *armv6hf*: `MonocleGLFactory.c:110:19: error: ‘RTLD_DEFAULT’ undeclared (first use in this function)`. Here's one solution:
>
> --- a/modules/javafx.graphics/src/main/native-prism-es2/monocle/MonocleGLFactory.c
> +++ b/modules/javafx.graphics/src/main/native-prism-es2/monocle/MonocleGLFactory.c
> @@ -29,16 +29,13 @@
> #include <string.h>
> #include <math.h>
>
> +#ifndef ANDROID_NDK
> +#define __USE_GNU
> +#endif
> #include <EGL/egl.h>
> #include "eglUtils.h"
>
> -#include "../PrismES2Defs.h"
> -
> #include "com_sun_prism_es2_MonocleGLContext.h"
> -#ifndef ANDROID
> -#define __USE_GNU
> -#include <dlfcn.h>
> -#endif
>
> extern void *get_dlsym(void *handle, const char *symbol, int warn);
> ```
>
> Turns out `eglUtils.h` already includes `../PrismES2Defs.h`, which also includes `<dlfcn.h>` and defines `__USE_GNU` if it's not already defined.
>
> I'm still trying to understand why we need to define `__USE_GNU` ahead of time right at the top there. I'll add another comment if I figure it out.
That sounds like an issue with your toolchain. RTLD_DEFAULT is not standard posix, but the toolchain should detect to use GNU_SOURCE. Maybe you can specify it to the compiler?
-------------
PR: https://git.openjdk.java.net/jfx/pull/343
More information about the openjfx-dev
mailing list