-
Notifications
You must be signed in to change notification settings - Fork 541
8280369: native library cache should be platform/arch specific #762
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
Conversation
|
👋 Welcome back Glavo! A progress list of the required criteria for merging this PR into |
|
To avoid this situation, create a new branch for your changes and reset the Then proceed to create a new pull request with |
|
This looks good, and I can't see possible regression (e.g. issues with non-existing parent directories, or files that have the same name as the directory that will be created by this PR). It is indeed very useful given the increase in potential architectures. |
|
@Glavo 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 5 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and 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 |
|
/integrate |
|
/sponsor |
|
Going to push as commit a0db473.
Your commit was automatically rebased without conflicts. |
Currently, OpenJFX extracts the native library into a local folder and loads it when it is not part of the JRE.
Now we have a notable problem with the fact that a platform may actually run programs of multiple CPU architectures.
Most commonly, 32-bit x86 applications can be executed on Windows AMD64. In addition to this, ARM machines may also execute AMD64 programs by transpiling.
For OpenJFX of different architectures on the same system, their native libraries have the same file name, but their contents are different. Since they will try to unpack the native library into the same folder, this will cause file conflicts.
A practical example is when I run the same JavaFX application with both 32-bit and 64-bit Java on a Windows AMD64 platform, and the application that starts later crashes because it cannot unzip the native libraries:
Crash logs (The length exceeds the GitHub limit): https://paste.ubuntu.com/p/NZBK3pNrh7/
Here I avoid the problem by adding
os.archto the cache path.I ran the tests on Ubuntu 20.04 after the modification and no tests were broken.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.java.net/jfx pull/762/head:pull/762$ git checkout pull/762Update a local copy of the PR:
$ git checkout pull/762$ git pull https://git.openjdk.java.net/jfx pull/762/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 762View PR using the GUI difftool:
$ git pr show -t 762Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jfx/pull/762.diff