-
Notifications
You must be signed in to change notification settings - Fork 478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8256012: Fix build of Monocle for Linux #350
Conversation
👋 Welcome back jgneff! A progress list of the required criteria for merging this PR into |
Webrevs
|
I don't see any harm in this PR, but I wonder which toolchains are still not having |
Thanks, Johan. I've been following the instructions in the OpenJFX Wiki. I use the GCC cross-compiler installed by the repository's crosslibs-armv6hf.sh script. Then I build for ARM using the repository's armv6hf.gradle build file.
No, that prints the same error. The comments in the header file So below is an alternative fix in the ARM build file: diff --git a/buildSrc/armv6hf.gradle b/buildSrc/armv6hf.gradle
index 05e3e83551..bd56dcf86c 100644
--- a/buildSrc/armv6hf.gradle
+++ b/buildSrc/armv6hf.gradle
@@ -140,7 +140,7 @@ def iioCFlags = [extraCFlags,
].flatten()
def iioLFlags = [extraLFlags].flatten()
-def es2EglfbCFlags = [extraCFlags, "-DIS_EGLFB", "-DLINUX"].flatten()
+def es2EglfbCFlags = [extraCFlags, "-DIS_EGLFB", "-DLINUX", "-D_GNU_SOURCE"].flatten()
def es2EglfbLFlags = [extraLFlags].flatten()
def es2MonocleCFlags = [extraCFlags, "-DIS_EGLFB", "-DLINUX"].flatten()
def es2MonocleLFlags = [extraLFlags].flatten() It seems the |
I think it is safer to use it as a flag for all monocle-es2 compilation then. It is also less intrusive as it doesn't require code changes, so it only affects specific builds. |
@jgneff This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been no new commits pushed to the As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@johanvos) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
@jgneff this looks good to be merged now. You can integrate it and then I will sponsor this. |
/integrate |
/sponsor |
This pull request fixes the error when building embedded JavaFX for Linux.
The error occurs because
MonocleGLFactory.c
does not define the macro__USE_GNU
before including the header filedlfcn.h
. The two lines in the conditional group "#ifndef ANDROID
" below have no effect because the header file has already been included at that point, and the header contains include guards to ignore subsequent attempts.MonocleGLFactory.c
The
-H
option ofgcc
prints the name of each header file used. Its output shows thategl.h
ends up includingdlfcn.h
indirectly, but without the required macro definition.For the proposed fix, I referred to the page of the Linux Programmer's Manual at "
man dlsym
" which states, "The_GNU_SOURCE
feature test macro must be defined in order to obtain the definitions ofRTLD_DEFAULT
andRTLD_NEXT
from<dlfcn.h>
." I also used information in the following two Stack Overflow conversations:Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jfx pull/350/head:pull/350
$ git checkout pull/350