Skip to content
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

Update and unify JNA #322

Merged
merged 3 commits into from
Nov 11, 2021
Merged

Update and unify JNA #322

merged 3 commits into from
Nov 11, 2021

Conversation

lbulej
Copy link
Member

@lbulej lbulej commented Oct 12, 2021

This was primarily triggered by the issues with db-shootout on less common CPU/platform combinations (see #153 and #296) and at least part of the cause is that JNA version (4.2.1) used in db-shootout simply does not support those combinations. So this forces JNA in db-shotout to version 5.9.0 (latest at the moment) which provides support for currently live combinations and loses a few outdated ones, specifically:

  • adds aix-ppc64, darwin-aarch64, darwin-x86-64, linux-armel, linux-mips64el, linux-ppc (32-bit), linux-riscv64, linux-s390x, and win32-aarch64
  • removes darwin (replaced by darwin-x86-64 I think), linux-ppc64 (there is still linux-ppc64le), linux-sparcv9 (there still is sunos-sparcv9) and w32ce-arm

Given the two issues mentioned, we are mostly interested in getting darwin-aarch64, linux-ppc64le and linux-s390x support which the newer JNA provides.

Also, because the neo4j and scala-dotty benchmarks pull in JNA as a (transitive) dependency, I forced them to pull the same (latest) version so that we don't have three different JNA versions each supporting a different set of CPU/platform combinations. I don't know if these benchmarks actually get to executing any code that relies on JNA (not sure about neo4j, but scala-dotty might pull it in just because some part of Scala wants to use jline-terminal and jline-terminal-jna for REPL).

Anyway, the benchmarks compile and run on my machine (which is expected), but unfortunately I don't have info about the exotic platforms involved in the original issues.

I created a branch and a special build (including binaries) of db-shootout that the original issue posters could use to check if it fixes their problem, but I haven't received any response so far.

So the question is, do we want to merge this and move on?

The newer JNA should provide support for more platforms/architectures
and the slf4j-simple binding silences SLF4J warnings on startup.
Even though these two benchmarks might not get to actually using
JNA (in scala-dotty, it's apparently needed by the jline-terminal),
but the newer JNA supports more architectures, and this unifies JNA
version with the one forced onto db-shootout.
JNA 5.10.0 includes an architecture mapping fix for SAP JVM and
should make it possible to run the database benchmark on S390x
platform under SAP JVM.
@lbulej
Copy link
Member Author

lbulej commented Nov 9, 2021

JNA 5.10.0 with the fix to architecture mapping on SAP JVM (java-native-access/jna@91eb8c2) was just released. I'm bumping the JNA version in this PR, which should address #153.

Copy link
Collaborator

@farquet farquet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lbulej lbulej changed the title RFC: Update and unify JNA Update and unify JNA Nov 10, 2021
@lbulej lbulej merged commit b00341b into master Nov 11, 2021
@lbulej lbulej deleted the topic/update-unify-jna branch November 12, 2021 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants